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
So ive noticed some strange things happening when using clip rects and scales, here is the test app (source code below) working:
And here is the same test when the _scale var is set to 3:
Whats even more strange is that its possible to "fix" the app by uncommenting the lines in the test app below, which, honestly, doesnt make any sense to me as you have to have both of the lines, and i would have thought that one would have been enough...
FWIW, uncommenting just _s.origin.set(0, 0); has the same effect as uncommenting both, for me, and even then it doesn't seem "fixed".
I'd like to establish better terms than "behave strangely". I assume the bug here is that clipRect's position is scaled by the sprites scale. and the desired behavior is that if a sprite's position moves down and right by 10px, and the clipRect position goes up and left, the drawn rect should stay in the same screen position. Is that right?
So ive noticed some strange things happening when using clip rects and scales, here is the test app (source code below) working:
And here is the same test when the
_scale
var is set to 3:Whats even more strange is that its possible to "fix" the app by uncommenting the lines in the test app below, which, honestly, doesnt make any sense to me as you have to have both of the lines, and i would have thought that one would have been enough...
Cheers,
Ian
Code snippet reproducing the issue:
Observed behavior:
When increasing the scale the clipping seems to behave strangely.
Expected behavior:
Clipping to be consistent regardless of scale.
The text was updated successfully, but these errors were encountered: