-
Notifications
You must be signed in to change notification settings - Fork 128
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
Bug: PropertyNode.createList leads to errors if there are two points with same value #209
Comments
I can defend against this by flagging such lists as stepped, but the expectation here was that any editor would check the user's data and use the simpler static behavior for the improved performance since the interpolation of a list is not needed. |
This complicates using the Aside from my struggles, I believe a library should not alter the input, at least not without a library user's consent — and there were no warnings in docs or console about using a flat line in property lists. This unauthorized automagic led to long hours of finding out why my emitter tandem editor randomly breaks for my users. And if a library does alter input, failing with errors after this expected behavior is definitely a bug. A side note, I looked through the sources and did not understand why the simplification of two-point lists was needed. If you have time, could you explain that? |
In this file and this line,
https://github.com/pixijs/particle-emitter/blob/master/src/PropertyNode.ts#L104
The PropertyNode bails out forming a complete list if it finds that the only two values in a list have same values. Still, all the behaviors try to interpolate over such lists, leading to errors, and crashing the whole pixi.js app:
Why am I having timeline points when I have same values instead of having static behaviors? Because I am making a general-use app where users are free to write everything they desire, and handling that
behaviors
array in emitters' config objects is enough of an attraction for me in definitely typed projects to handle already.The text was updated successfully, but these errors were encountered: