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

mutliple animation takes #67

Open
chrisdubya-emed opened this issue Aug 31, 2021 · 5 comments
Open

mutliple animation takes #67

chrisdubya-emed opened this issue Aug 31, 2021 · 5 comments
Assignees
Labels

Comments

@chrisdubya-emed
Copy link

It's common for models to have multiple animation takes bundled into or referenced within the model file (and they can be cycled through on the fly based on page events, etc). If there are multiple animation takes embedded in the model, would the following autoplay attribute loop through the first animation take that is found?

<model style="width: 400px; height: 300px" autoplay interactive>
    <source src="assets/example.usdz" type="model/vnd.usd+zip">
    <source src="assets/example.obj" type="model/obj">
</model>

I think there should be an attribute for specifying model clips. For reference, <model-viewer> implements this with several different attributes as documented here. A-Frame's animation-mixer-component also does something simialar declaratively.

@hober hober changed the title [model] mutliple animation takes mutliple animation takes Aug 31, 2021
@hober hober added model and removed consent api labels Aug 31, 2021
@donmccurdy
Copy link
Contributor

FWIW: Standard practice in glTF viewers is to play the first animation by default, and (ideally) provide some means of selecting others. More complex composition is possible but perhaps out of scope here.

@chrisdubya-emed
Copy link
Author

I agree, I also think an autoplay boolean is a bit ambiguous in the context of a model. I think at a minimum you should be able to specify another animation other than the first.

@spartanatreyu
Copy link

Perhaps the desired animation could be specified in the element's attribute, then changed dynamically.

@grorg
Copy link
Contributor

grorg commented Sep 7, 2021

These are great suggestions.

We'll propose a JS API to select animation takes eventually, but an attribute might be a simple start. It does assume that the data format can name the animations.

And I agree that by default it should follow the glTF viewer behaviour of playing the first animation.

@chrisdubya-emed
Copy link
Author

Agreed with starting with a simple attribute for specifying an animation name (given format support).

Then, I would think that the attribute would only work if the proposed autoplay attribute is present and true (and manually can work through a JS API with a .play() function). It may also be helpful to query for available animations through the JS API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants