Skip to content
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

Expose GLTFInstance.userData in the API #4821

Open
literallylara opened this issue Jun 24, 2024 · 0 comments
Open

Expose GLTFInstance.userData in the API #4821

literallylara opened this issue Jun 24, 2024 · 0 comments

Comments

@literallylara
Copy link

Description

It would be useful to have access to custom data embedded in the GLTF file. ThreeJS appears to save this in a userData property, which is already being used in this project for the variant logic. My client uses <model-viewer> to show models that change appearance based on some user input. The userData could be utlized to store information on how the user input needs to be processed for a particular model or material. Another use-case might be to store the annotation data right in the GLTF file.

I would be happy to implement this if this is something that is deemed in-scope for this project.

Version

  • model-viewer: v3.5.0
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

No branches or pull requests

1 participant