You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scratch projects change the positions of their sprites very regularly. Since Scratch keeps Sprites within the visible bounds of the rendered stage, getFencedPositionOfDrawable is called for every position change.
There are a few things that could be changed to possibly speed up getFencedPositionOfDrawable.
getFencedPositionOfDrawable in the convex hull points path creates approximately 8 objects (assuming the hull has 3 points). Most or all of these could use preexisting or cached objects reduce object creation and garbage collection.
getFencedPositionOfDrawable in the aabb path creates 10 objects.
getFastBounds could just ensure u_modelMatrix is up to date instead of both it and _inverseMatrix. (In fact both getBounds and getAABB already make sure that u_modelMatrix is up to date.)
getFastBounds could be assigned to getBounds or getAabb by setConvexHullDirty and setConvexHullPoints
The text was updated successfully, but these errors were encountered:
Scratch projects change the positions of their sprites very regularly. Since Scratch keeps Sprites within the visible bounds of the rendered stage, getFencedPositionOfDrawable is called for every position change.
There are a few things that could be changed to possibly speed up getFencedPositionOfDrawable.
The text was updated successfully, but these errors were encountered: