Is there a way to create a progress bar animation in three.js? I've been grappling with this issue for quite some time now. I attempted to replicate the html5 video player progress bar method, but unfortunately, it doesn't seem to be compatible with 3D animations.
var loader = new GLTFLoader()
loader.load( './resources/full_case/mymodel.glb', function ( gltf ) {
gltf.scene.scale.set(0.1,0.1,0.1)
gltf.scene.position.set(0,0,-150)
gltf.scene.rotation.set(0, Math.PI * 2, 0)
scene.add( gltf.scene );
mixer = new THREE.AnimationMixer( gltf.scene );
gltf.animations.forEach( ( clip ) => {
let animation = mixer.clipAction( clip );
animation.setLoop(THREE.LoopOnce)
animation.clampWhenFinished = true;
animation.timeScale = 1
animation.play()
} );
} );