Skip to content

Conversation

@owenmech-nl
Copy link

Context

Allows for a custom renderer sorting comparator to access the RenderItem properties of another object.

Testing

Tested with https://github.com/8thwall/code8/pull/2037/files#diff-80068fa1d904387a335f350cdad391f11039e62aac3eca53fe38411a0175f022

@github-actions
Copy link

github-actions bot commented Jul 10, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.69
78.76
337.73
78.79
+37 B
+26 B
WebGPU 557.18
154.29
556.95
154.24
-227 B
-47 B
WebGPU Nodes 556.1
154.07
556.3
154.01
+202 B
-56 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 468.91
113.42
469.18
113.53
+274 B
+109 B
WebGPU 632.83
171.3
632.97
171.29
+145 B
-15 B
WebGPU Nodes 587.96
160.69
588.02
160.6
+63 B
-87 B

@owenmech-nl owenmech-nl marked this pull request as ready for review July 10, 2025 20:23
const transmissive = [];
const transparent = [];

let items = new WeakMap();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name something more descriptive

objectToRenderItem

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to objectIdToRenderItem.

Also converted from a WeakMap to a Map and used object id so it could be cleared with a stable reference.

@owenmech-nl owenmech-nl merged commit df50591 into dev-8w Jul 11, 2025
8 of 9 checks passed
owenmech-nl added a commit that referenced this pull request Jul 11, 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.

3 participants