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
Browser: Not browser specific, tested on: Chrome, Firefox
Description
Hello! I am playing with adding my custom cullCallback for TilemapLayers, like here: cullCallback
I want to make use of camera.dirty flag but it is always true, even if nothing is happening on the screen, no camera movement etc
I figured out this is due to the camera's scrollX and scrollY fields being overwritten every frame in preRender method here (and setting camera.dirty to true in setters).
Example Test Code
Custom CullTiles callback
Uncomment console.log inside customCullTiles method to see camera.dirty state.
Additional Information
Adding simple checks if values aren't the same seems to do the work.
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
Hello! I am playing with adding my custom cullCallback for TilemapLayers, like here:
cullCallback
I want to make use of
camera.dirty
flag but it is always true, even if nothing is happening on the screen, no camera movement etcI figured out this is due to the camera's scrollX and scrollY fields being overwritten every frame in preRender method here (and setting
camera.dirty
to true in setters).Example Test Code
Custom CullTiles callback
Uncomment
console.log
insidecustomCullTiles
method to seecamera.dirty
state.Additional Information
Adding simple checks if values aren't the same seems to do the work.
The text was updated successfully, but these errors were encountered: