Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/model-viewer/src/features/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ export const AnimationMixin = <T extends Constructor<ModelViewerElementBase>>(

this[$paused] = true;

if (this.animationName != null) {
this[$changeAnimation]();
}

if (this.autoplay) {
this.play();
}
Expand Down
2 changes: 0 additions & 2 deletions packages/model-viewer/src/three-components/ModelScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,6 @@ export class ModelScene extends Scene {
}
const {animations} = this;
if (animations == null || animations.length === 0) {
console.warn(
`Cannot play animation (model does not have any animations)`);
return;
}

Expand Down