To use this you gotta install zerolib haxelib install zerolib
and add it to your build.hxml -lib zerolib
Here I'm just doing a handful of things
- exposing width and height (I'm assuming there's some standard way of doing this in heaps but I'm lazy
- throwing a bloom filter onto the stage (s2d)
- creating an instance of line particles
- in
update()
I'm using my EventBus utility to dispatch an update signal with the delta time
This does a few things:
- it keeps an array of active line particles
- you can instantiate a particle with
add()
- it's just a graphics object that clears itself and draws active line particles every frame
- lines are removed from the array if they leave the screen or if their length is small enough
The lines look rad bc of the bloom