Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to turn off off-screen rendering #2553

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

barisyild
Copy link
Contributor

@barisyild barisyild commented Apr 30, 2022

What is this?

It is a property that determines whether tiles that are off the screen are drawn or not.

How can I use this feature?

Offscreen rendering can be set using the tile.offscreenRendering property.

tile.offscreenRendering = true; //Enables offscreen rendering (default and current behavior)
tile.offscreenRendering = false; //Disable offscreen rendering

Will this affect the behavior of my current project?

It is turned on by default so that existing projects are not affected.

How does it determine whether it is in the screen or not?

It works according to the width and height of the tilemap, if it overflows the tilemap, it does not render and skips the calculations required for drawing.

It is affected by the tilemap's scaleX and scaleY values, so it always draws exactly the area on the screen.

Which renderers are supported?

All renderers are supported except the dom renderer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant