Skip to content

Check if drawable is inside the viewport when drawing#7

Closed
Nightre wants to merge 6 commits into
TurboWarp:developfrom
Nightre:viewport-cheack
Closed

Check if drawable is inside the viewport when drawing#7
Nightre wants to merge 6 commits into
TurboWarp:developfrom
Nightre:viewport-cheack

Conversation

@Nightre
Copy link
Copy Markdown

@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
Copy Markdown
Member

does this break offscreen touching?

@Nightre
Copy link
Copy Markdown
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