Emitter loop in mobile

when i run that Emitter on mobile it stop after one time, how tell it to play forever?
new Emitter({
obj:[this.fireFun("flameYellow.png"),this.fireFun("flameRed.png"),this.fireFun("flameYellow.png"),this.fireFun("flameRed.png"),this.fireFun("flameDark.png")],
life:2,
angle:{min:-110, max:-61},
force:{min:2.5, max:3.5},
gravity:-0.5,
layers:RANDOM,
shrink:false,
width:60,
height:126,
animation:{scale:{min:scaleToNumber*.2,max:scaleToNumber*0.6}},
})

As far as I know, Emitter runs forever on mobile. This test does for us https://zimjs.com/test7/emitter.html does it for you?

So something about this one or the app - perhaps an error is happening? Something to do with scaleToNumber?

Your link work.
In my code that stop.
If i set cache:false its work.

Even on desktop, it is stopping for me if I use cache:true with an image.

You would not need cache with an image... it is already a Bitmap. But... still, it should not stop when cached. Will add it to the list of things to check.

Oh... wait... maybe cache is set to true by default on mobile... we will change that now for images.

Okay - that has been patched in ZIM 016. There was a note in the docs under cache to not cache bitmaps and sprites... but the default mobile was to cache! So now we test to not cache Pic, Bitmap or Sprite objects in the Emitter. Clear your Browser cache, remove the cache:false as it should not matter now and try again. Let us know if there is still an issue. Cheers.

1 Like

Thanks!!! :slight_smile: