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
Currently the actions moveBy, rotateBy, and scaleBy are confusing, they move a certain quantity in a certain time. They should instead move a quantity relative to the current quantity, this is more expected.
Proposal
The method signature should also hint that things are moving by an offset moveBy(offsetX: number, offsetY: number, pixelsPerSecond: number)
moveBy(10, 10, 2) moves and actor 10 pixels to the right, and 10 pixels down at 2 pixels per second. rotateBy(Math.PI/2, .2) rotates the actor clockwise PI/2 radians at .2 radians per second scaleBy(1, 1, .5, .5) scales the actor 100% in the x and 100% in the y at .5 scale units per second
The text was updated successfully, but these errors were encountered:
Context
Currently the actions
moveBy
,rotateBy
, andscaleBy
are confusing, they move a certain quantity in a certain time. They should instead move a quantity relative to the current quantity, this is more expected.Proposal
The method signature should also hint that things are moving by an offset
moveBy(offsetX: number, offsetY: number, pixelsPerSecond: number)
moveBy(10, 10, 2)
moves and actor 10 pixels to the right, and 10 pixels down at 2 pixels per second.rotateBy(Math.PI/2, .2)
rotates the actor clockwise PI/2 radians at .2 radians per secondscaleBy(1, 1, .5, .5)
scales the actor 100% in the x and 100% in the y at .5 scale units per secondThe text was updated successfully, but these errors were encountered: