-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bounds2 should be used instead of the duck-typed coords #49
Comments
The object literal is used because the Bounds2 doesn't have a setter for left or right so it forces us to create a new Bounds2 instance every time (for 1000s of particles) which degrades performance due to GC. However I have renamed "leftX" to "left". and made changes to top,right and bottom along the same lines which is consistent with the naming convention adopted by other scenery classes. |
'left' and 'right' are aliases for 'minX' and 'maxX', would things be cleaner with using setMinX() and setMaxX()? |
Replaced duckType object properties with Bounds2 instance for Texture and Vertext coordinates. |
This appears to have been fully addressed, closing. |
Multiple places have code like:
I'd recommend instead using Bounds2, which is made for that purpose:
which can then be accessed with:
For code review #29
The text was updated successfully, but these errors were encountered: