Skip to content

Add userData to AnimationClip and extras to glTF animations #31586

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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

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

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
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