Electric wall desk with adjustable animation sliders #4791
Replies: 1 comment 2 replies
-
@vehrmann wow I'm impressed by what you achieved! I'd like to interact with the (unique) animation in my glTF asset using a slider, but there are many things going on in your code. Can this be done without THREE.js? Is your @elalish I saw that https://modelviewer.dev/editor/ allows to control animations using a "Time" slider, but the code behind is also very complex (nested <div>s for the slider, a LOT of event listeners, very generic actions) which made me think most of what I see is from a web framework. Can a very simple code, controlling the animation time using a slider, be referenced in https://modelviewer.dev/examples/animation/index.html? With the following HTML as base and hard-coded animation name and time limits? <model-viewer id="model-viewer" src="..." camera-controls></model-viewer>
<input type="range" id="slider-animation" min="0" max="10" step="0.1" value="0"> |
Beta Was this translation helpful? Give feedback.
-
I am happy to share my solution to access animations within modelviewer and control their timing via sliders. This approach can not only handle one animation, but several independent ones.
Vidajo Wall-Ti
Feel free to check out the source code, I used this approach to be able to access the scene graph. Then I could access the animation mixer and add multiple animations of my model individually.
If you have any questions or suggestions, let me know.
P.S.: I still struggle with iOS compatibility, but I am aware of the flaws...
Beta Was this translation helpful? Give feedback.
All reactions