Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Initial particle size

Open justjuank opened this issue 6 years ago • 2 comments

Hello, Is there a way to change the initial size of the particles so they don't look the same size when the emitter starts? I'm trying emitter.addInitialize(new Proton.Body(image, new Proton.Span(1, 100), new Proton.Span(1, 100))); but the size is always the same. Thanks in advance.

justjuank avatar Nov 29 '19 01:11 justjuank

You can use Proton.Scale Behaviour, it can achieve what you want

emitter.addBehaviour(new Proton.Scale(new Proton.Span(1, 5), 0.1));

drawcall avatar Nov 29 '19 02:11 drawcall

Oh interesting, that worked. I was trying to use Scale as: emitter.addBehaviour(new Proton.Scale(1, 5)); What is the second parameter for?

justjuank avatar Nov 29 '19 19:11 justjuank