Skip to content

Conversation

@repalash
Copy link
Contributor

@repalash repalash commented Aug 6, 2025

Description

glTF schema supports extras property in animations. But when loading a file with extra properties using GLTFLoader and saving it with GLTFExporter, these properties are lost.

This PR adds support by adding userData to AnimationClip and loading the animation extras in that, similar to objects, materials, which is then used in GLTFExporter. Also this is useful to store any custom data like in the threejs editor.

This contribution is funded by Threepipe

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.63
79.03
338.63
79.03
+0 B
+0 B
WebGPU 567.9
157.11
567.9
157.11
+0 B
+0 B
WebGPU Nodes 566.51
156.86
566.51
156.86
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.38
113.78
470.38
113.78
+0 B
+0 B
WebGPU 641.64
173.58
641.64
173.58
+0 B
+0 B
WebGPU Nodes 596.28
162.88
596.28
162.88
+0 B
+0 B

@Mugen87 Mugen87 added this to the r180 milestone Aug 6, 2025
@Mugen87 Mugen87 requested a review from donmccurdy August 6, 2025 10:06
@Mugen87 Mugen87 merged commit 23c3f48 into mrdoob:dev Aug 13, 2025
9 checks passed
@Mugen87 Mugen87 changed the title Add userData to AnimationClip and extras to glTF animations AnimationClip: Add userData and honor in glTF loader and exporter. Aug 13, 2025
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