Skip to content

ScriptableNode: Rename global to ScriptableNodeResources#29736

Merged
sunag merged 3 commits intomrdoob:devfrom
scottmas:dev
Oct 25, 2024
Merged

ScriptableNode: Rename global to ScriptableNodeResources#29736
sunag merged 3 commits intomrdoob:devfrom
scottmas:dev

Conversation

@scottmas
Copy link
Copy Markdown
Contributor

Related issue: NA

Description

When running a multiplatform React Native app on the web, the bundler declares a local variable global which exists to increase compatibility with different ecosystems such as react-native ios/android or node. I have renamed the global variable inside ScriptableNode.js so that locally it is simply localGlobal. The export remains the same however, so it should have no downstream implications.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 23, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 691.57
171.41
691.57
171.41
+0 B
+0 B
WebGPU 818.87
220.85
818.89
220.86
+17 B
+5 B
WebGPU Nodes 818.38
220.72
818.4
220.72
+17 B
+5 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 463.72
112.16
463.72
112.16
+0 B
+0 B
WebGPU 539.75
145.78
539.75
145.78
+0 B
+0 B
WebGPU Nodes 495.74
135.6
495.74
135.6
+0 B
+0 B

@Mugen87 Mugen87 added this to the r170 milestone Oct 24, 2024
@sunag sunag changed the title Rename problematic name for variable in ScriptableNode ScriptableNode: Rename global -> ScriptableNodeResources Oct 25, 2024
@sunag sunag changed the title ScriptableNode: Rename global -> ScriptableNodeResources ScriptableNode: Rename global to ScriptableNodeResources Oct 25, 2024
@sunag sunag merged commit e7e4ceb into mrdoob:dev Oct 25, 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.

3 participants