Steps in the fireball particle emitter example

Consider the fireballs particle emitter example:

https://labs.phaser.io/edit.html?src=src\game%20objects\particle%20emitter\fireballs.js

The particle emitter moves along the y axis from 0 to 560. Then there is the steps parameter. What exactly is that for? Experimenting I found that the lower the value the faster the particle emitter is moving. How is that speed calculated exactly?

If I want the particle emitter to move with a certain speed, I guess I would have to control that via the ‘steps’ property. How would I calculate that? Worst case, is that even frame rate dependent?

Hi @MickeyKnox, looking at the docs, I found this below. I’m unsure if my definition of this is correct because I’m guessing all of it, but here is what I think it does based on the docs and some play-around with your code.

The steps are basically, in my guess, the same if you have ever done something similar to a spritesheet animation or a CSS animation using steps. It’s the amount of “frames” between the start and end value. So the more “frames” you have, the longer it takes to animate. I could be 100% incorrect, but here are the docs for it.

It depends on the frequency, but in that example the frequency is implied. There’s one step per particle emit, so the step interval in milliseconds is

frequency * steps / quantity

If you give a frequency above 0 then it’s frame rate independent, although before v3.60 you should give a frequency of at least 16.666 or so.

https://github.com/samme/phaser3-faq/wiki/Particles#stepped-ranges