Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScriptableNode: Rename global to ScriptableNodeResources #29736

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Conversation

scottmas
Copy link
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.

Copy link

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
12 checks passed
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