model_viewer_plus.dart
model_viewer_plus.dart copied to clipboard
Play next animation when click/tap on model
Is there any plan to supply this feature in future?
+1 And other . reload webpage , reload model ,anim
thanks
I want a detailed way to change the animation
String js = '''
const modelViewer = document.querySelector('#widget');
modelViewer.addEventListener('click', event => {
var ani = modelViewer.animationName === 'idle' ? 'anotherAni' : 'idle';
modelViewer.setAttribute('animation-name', ani);
});
''';
change modeview attr.
autoPlay: true, animationName: "idle" relatedJs: js