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
At present, if there is a continuous call of the moveToTarget() inside for example update(), it could impact the performance since it has a clone().
Adding a reusable vector can prevent creating a new Vector2 object in every tick.
Any risks?
No
More information
Are you interested in working on a PR for this? Yes
The text was updated successfully, but these errors were encountered:
What could be improved
Add optional reusable diff argument which is
Vector2
to theVector2.moveToTarget
.flame/packages/flame/lib/src/extensions/vector2.dart
Lines 126 to 139 in 295cd72
Why should this be improved
At present, if there is a continuous call of the
moveToTarget()
inside for exampleupdate()
, it could impact the performance since it has aclone()
.Adding a reusable vector can prevent creating a new Vector2 object in every tick.
Any risks?
No
More information
Are you interested in working on a PR for this? Yes
The text was updated successfully, but these errors were encountered: