Skip to content

Conversation

gkjohnson
Copy link
Collaborator

Related issue: #31021 (comment)

Description

Adds "toJSON" and "fromJSON" functions for sphere to normalize the serialization process across objects.

@gkjohnson gkjohnson added this to the r177 milestone Apr 29, 2025
@gkjohnson gkjohnson requested a review from Mugen87 April 29, 2025 16:18
Copy link

github-actions bot commented Apr 29, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.33
78.33
336.33
78.33
+0 B
+0 B
WebGPU 547.85
151.9
547.85
151.9
+0 B
+0 B
WebGPU Nodes 547.2
151.74
547.2
151.74
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 466.14
112.58
466.15
112.56
+10 B
-13 B
WebGPU 623.09
168.7
623.1
168.69
+10 B
-17 B
WebGPU Nodes 577.96
158
577.97
157.98
+10 B
-19 B

@Mugen87 Mugen87 merged commit d088fc1 into mrdoob:dev Apr 29, 2025
12 checks passed
@gkjohnson gkjohnson deleted the sphere-tojson branch April 29, 2025 18:58
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* Add bounding sphere toJSON and fromJSON

* Update object3d tojson

* Add support for BufferGeometry

* Remove unused import
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* Add bounding sphere toJSON and fromJSON

* Update object3d tojson

* Add support for BufferGeometry

* Remove unused import
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.

2 participants