Skip to content

LightProbe: Remove fromJSON().#32415

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
Mugen87:dev3
Nov 29, 2025
Merged

LightProbe: Remove fromJSON().#32415
Mugen87 merged 1 commit into
mrdoob:devfrom
Mugen87:dev3

Conversation

@Mugen87

@Mugen87 Mugen87 commented Nov 29, 2025

Copy link
Copy Markdown
Collaborator

Related issue: #32318 (comment)

Description

The PR removes LightProbe.fromJSON() to ensure all lights are deserialized in the same fashion in ObjectLoader.

I have first tried to add fromJSON() in all lights but the deserialization of shadow cameras and light targets requires logic from ObjectLoader. So without a bigger rewrite, it's not possible to have consistent fromJSON() methods. This PR just ensures a consistent handling across all light classes.

@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.26
83.06
350.26
83.06
+0 B
+0 B
WebGPU 613.84
170.44
613.84
170.44
+0 B
+0 B
WebGPU Nodes 612.44
170.17
612.44
170.17
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 482.25
117.84
482.25
117.84
+0 B
+0 B
WebGPU 685.23
186.23
685.15
186.21
-75 B
-16 B
WebGPU Nodes 635.07
173.41
634.99
173.4
-75 B
-16 B

@Mugen87 Mugen87 added this to the r182 milestone Nov 29, 2025
@Mugen87 Mugen87 merged commit 2a11e57 into mrdoob:dev Nov 29, 2025
10 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.

1 participant