Skip to content

MaterialLoader: Introduce registerMaterial().#32879

Open
Mugen87 wants to merge 4 commits intomrdoob:devfrom
Mugen87:dev4
Open

MaterialLoader: Introduce registerMaterial().#32879
Mugen87 wants to merge 4 commits intomrdoob:devfrom
Mugen87:dev4

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 28, 2026

Related issue: #32871 (comment)

Description

As mentioned in #32871 (comment), the PR introduces a new static method for register materials in MaterialLoader. In this way, ShaderMaterial and RawShaderMaterial can be removed from Three.Core.js and are only part of the WebGLRenderer builds.

Repository owner deleted a comment from github-actions bot Mar 6, 2026
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.27
85.31
362.22
86.35
+2.95 kB
+1.03 kB
WebGPU 630.13
174.94
630.1
174.94
-33 B
-9 B
WebGPU Nodes 628.72
174.69
628.68
174.69
-33 B
-9 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 491.13
119.74
491.13
119.77
+0 B
+24 B
WebGPU 703.8
190.02
703.8
190.02
+0 B
+0 B
WebGPU Nodes 653.03
177.44
653.03
177.44
+0 B
+0 B

@Mugen87 Mugen87 marked this pull request as ready for review March 6, 2026 11:48
@Mugen87 Mugen87 added this to the r184 milestone Mar 6, 2026
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