Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Jan 31, 2026

Related issue: #30849

Description

A minimalist version of StackTrace, which can be applied to detect which line the node error occurred in. This should make debugging the code easier.

Some errors are declared on top of several functions and others at different stages of the construction process, such as setup() or generate(), which makes it difficult for the user to detect the line. The StackTrace process helps preserve the line where it was declared, even if the verification process occurs later.

THREE.Node.captureStackTrace = true;

This allows listing by line and column, which should enable future integrations like in the Inspector.

Error message

image

VS Code

image

@sunag sunag added this to the r184 milestone Jan 31, 2026
@github-actions
Copy link

github-actions bot commented Jan 31, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.21
85.29
359.21
85.29
+0 B
+0 B
WebGPU 624.04
173.42
624.8
173.77
+763 B
+353 B
WebGPU Nodes 622.62
173.17
623.38
173.52
+763 B
+353 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 490.47
119.49
490.47
119.49
+0 B
+0 B
WebGPU 690.7
186.6
691.43
186.96
+731 B
+353 B
WebGPU Nodes 640.08
174
640.82
174.37
+731 B
+365 B

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.

1 participant