Accessing the duration of an animation
See original GitHub issuemodel-viewer
includes some very useful animation properties and methods including:
- play()
- pause()
- currentTime
A notable absence seems to be animationDuration
- i.e. the total time taken by an animation.
I am working on a ‘player’ interface where a user can scrub to a particular moment in the animation, but will need to use a hard coded value for the duration of the animation, rather than reading it from the interface. I suspect the animation duration would be used somewhere internally - it would be very useful if it were made available via a property on the model-viewer in the same way that currentTime
is.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
animation-duration - CSS: Cascading Style Sheets | MDN
The animation-duration CSS property sets the length of time that an animation takes to complete one cycle.
Read more >Set the start time and speed of an animation effect
On the Animations tab, in the Duration box, enter the number of seconds that you want the effect to run. Set the speed...
Read more >Understanding animation, duration and easing using ...
Timing your animations with requestAnimationFrame The requestAnimationFrame passes one argument to your callback. It's a timestamp with how much milliseconds ...
Read more >How to define the duration of an animation takes to complete ...
To do this, we have animation-duration property which sets the time interval that animation takes to complete one cycle. Syntax:
Read more >CSS animation-duration Property - W3Schools
Definition and Usage. The animation-duration property defines how long an animation should take to complete one cycle. Default value: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for adding this!
There is a way to access Threejs library from Model Viewer.
`<script>
</script> `Its a hacky way though, I like your proposal on adding those functionalities in core Model Viewer itself.