Comments (4)
Just as a sanity check, could you try version 5.0.5 and see what happens? Also, are you using the autoUpdate
property, or are you calling Emitter.update()
on your own?
from particle-emitter.
ah many thanks, I'm not sure why the particle system was playing 50x slower yesterday.. today it's playing way too fast instead.
anyways, I'm not using the PIXI.ticker.shared - calling emitter.update(deltaSec) from my RAF loop. I see that autoUpdate defaults to false, which should be fine for me. BUT when I check the property at runtime autoUpdate was set to true.
I'm using the playOnceAndDestroy method, I'm not sure why it sets autoUpdate to true? this seems to override any autoUpdate property set in the config and the default value of false,
playOnceAndDestroy(callback) {
this.autoUpdate = true;
this.emit = true;
this._destroyWhenComplete = true;
this._completeCallback = callback;
}
And the reason (at least for particle systems playing too fast) was that autoUpdate modifies my delta in the update method,
if (this._autoUpdate) {
delta = ticker.elapsedMS * 0.001;
}
Particles are looking great and working as expected again when I set autoUpdate to false after calling playOnceAndDestroy. :)
from particle-emitter.
Yeah, playOnceAndDestroy()
is intended to be used with autoUpdate
as the simple way of doing things. Outside of that, you can start an emitter with emitter.emit = true
or emitter.playOnce()
, call emitter.update()
yourself and then destroy or reuse the emitter when it is complete.
from particle-emitter.
Thanks, it's all in the docs too :)
from particle-emitter.
Related Issues (20)
- IntColorComplex throws null exception HOT 2
- LinkedListContainer doesn't play nice with Destroy method HOT 1
- The particle emitter can encounter undefined particles which casues it to choke and break HOT 3
- Artifacts when using `playOnce` HOT 4
- can not use editor export json file HOT 4
- When to support pixi 7.0 HOT 1
- npm install errors upgrading to Pixi 7 HOT 3
- Can not use editor export json file - Format seems different HOT 1
- emitter.updateOwnerPos throws an error if emitter is destroyed HOT 2
- It extends Container, not ParticleContainer HOT 1
- Classes not invoked with new? HOT 3
- [inquiry] does Pixi particles use instanced rendering? HOT 3
- Need to interact with particular particle on mouse touch and destroy it HOT 2
- Alpha interpolating doesn't work for images HOT 2
- animatedSingle behaviour HOT 7
- Is the project will keep update? HOT 4
- Where can I find a CDN link to new version ? HOT 1
- Bug: PropertyNode.createList leads to errors if there are two points with same value HOT 2
- Best practice for continuous trail on a fast-moving object? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from particle-emitter.