I have been trying to make emitter do this.
Any ideas?
I have been trying to make emitter do this.
Any ideas?
From Slack
https://zimjs.com/explore/emitterpaper.html
That is the falling part... the shooting part is the usual emitter... so it is kind of two effects. Shoot, then pause the emitter and loop through the particles and apply a falling effect. We can do a falling effect with the emitter... but not on particles that have been emitted with a different emitter. So the falling effect would be something like:
// set the interval parameter of the emitter to 10
// add a spurt(50) or however many particles you want
// then use the spurted event to call a function with this in it
// or play around with it...
emitter.particles.loop(p=>{
p.animate({
props:{y:H+100},
time:10,
call:target=>{target.dispose()}
})
.wiggle("scaleY", 1, .5, 1, .2,1)
.wiggle("rotation",0,20,50,3,5)
.wiggle("x",null,50,200,2,5)
.wiggle("regY",null,10,100,2,5);
});