Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial particle size #69

Open
justjuank opened this issue Nov 29, 2019 · 2 comments
Open

Initial particle size #69

justjuank opened this issue Nov 29, 2019 · 2 comments

Comments

@justjuank
Copy link

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.

@drawcall
Copy link
Owner

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

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

@justjuank
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants