Skip to content

Check if drawable is inside the viewport when drawing #7

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

Closed
wants to merge 6 commits into from
Closed

Check if drawable is inside the viewport when drawing #7

wants to merge 6 commits into from

Conversation

Nightre
Copy link

@Nightre Nightre commented Jan 27, 2024

Proposed Changes

This PR adds support for not rendering sprites outside of the viewport.

Reason for Changes

Currently, when rendering sprites, all of them are rendered regardless of whether they are within the viewport or not. This can lead to unnecessary performance overhead, especially when dealing with a large number of sprites. By implementing the feature to not render sprites outside of the viewport, we can significantly improve the rendering performance and optimize resource usage.

(all clones outside the screen)

BFI{$~D0IH GPW{Z%SXNQ1J

YRX 7XQ W%5ZSXRV1C6H(SL

@GarboMuffin
Copy link
Member

does this break offscreen touching?

@Nightre
Copy link
Author

Nightre commented Jan 28, 2024

does this break offscreen touching?

It does not break offscreen touching, as Scratch's collision detection uses data that exists in the CPU (collision detection after effects is also done in the CPU through EffectTransform.js)

@Nightre Nightre closed this by deleting the head repository Aug 24, 2024
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.

2 participants