Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jun 24, 2025

Fixed #24822.

Description

I've run into #24822 when changing the center properties of sprites.

The PR fixes the issue by implementing the approach suggested by @WestLangley in #24828. So the idea is to increase the bounding sphere's radius by an offset derived from the sprite's center.

The implementation does not affect the intersection test for sprites with a default center value.

Below is a live example with the code from the original issue for reproducing the issue. The white quad prematurely disappears when moving it to the left.

https://jsfiddle.net/831pgxnv/

@Mugen87 Mugen87 requested a review from WestLangley June 24, 2025 08:48
@github-actions
Copy link

github-actions bot commented Jun 24, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.65
78.76
337.65
78.76
+0 B
+0 B
WebGPU 556.95
154.24
556.95
154.24
+0 B
+0 B
WebGPU Nodes 556.3
154.01
556.3
154.01
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 468.84
113.43
468.89
113.45
+51 B
+24 B
WebGPU 632.69
171.2
632.75
171.25
+51 B
+47 B
WebGPU Nodes 587.75
160.55
587.8
160.56
+51 B
+9 B

@Mugen87 Mugen87 merged commit f909f5d into mrdoob:dev Jun 25, 2025
12 checks passed
@mrdoob mrdoob added this to the r178 milestone Jun 26, 2025
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.

Sprites with off-center .center properties potentially not rendered at frustum edges.

3 participants