Closed ramako closed 5 years ago
I assume that your particle has the same start & end speed? If so, I understand the bug and an immediate workaround for you would be to have slightly different start/end speeds, like 200 and 200.1
Hello, I am afraid that is not the case, the start and end speed is different, here is the json I am using
{ "alpha": { "start": 1, "end": 0.31 }, "scale": { "start": 0.42, "end": 0.82, "minimumScaleMultiplier": 1 }, "color": { "start": "#ff0505", "end": "#f76f00" }, "speed": { "start": 400, "end": 200, "minimumSpeedMultiplier": 1 }, "acceleration": { "x": 0, "y": 100 }, "maxSpeed": 400, "startRotation": { "min": 180, "max": 360 }, "noRotation": false, "rotationSpeed": { "min": 40, "max": 70 }, "lifetime": { "min": 0.25, "max": 2 }, "blendMode": "normal", "frequency": 0.012, "emitterLifetime": -1, "maxParticles": 10, "extraData": { "path": " (sin(x/50) * 20)" }, "pos": { "x": 0, "y": 20 }, "addAtBack": false, "spawnType": "rect", "spawnRect": { "x": -250, "y": 100, "w": 250, "h": 50 } }
Removing the extra data property will make it work
Ah, the end speed is ignored/removed because you have acceleration.
PathParticles were never designed to use the acceleration property, because their position is locked to the path. In their update they overwrite the position of the particle, so any movement due to acceleration would be ignored.
Hello, yes, that seems to have solved the problem, it was the acceleration property, needs to be locked to 0. Thank you.
Hello, I am trying to use the PathParticle but I keep getting that error. I have the extradata in the json with the path, when I removed that, I don't get the error.
This is the code I use to initialize it
This is the full error I am getting when I start the emitter: Uncaught TypeError: Cannot read property 'time' of null at t.r [as interpolate] (pixi-particles.min.js:8) at e.update (pixi-particles.min.js:8) at t.update (pixi-particles.min.js:8) at TickerListener.emit (TickerListener.js:99) at Ticker.update (Ticker.js:411) at Ticker._tick (Ticker.js:147) r @ pixi-particles.min.js:8