We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrading to r154, animations go wrong:
this with <= r153
playAnimations(reverse = false, ...animations:(string | THREE.AnimationClip | undefined)[]):Promise<void>{ return new Promise((resolve, reject) => { animations = animations.map((animation) => typeof animation == "string" ? this.animations.find(item => item.name == animation) : animation) if (animations.find(animation => !animation)) return reject("Invalid animation"); const clock = new THREE.Clock(); const mixer = new THREE.AnimationMixer(this.scene); let isLoop = true; let toGo = animations.length; animations.forEach(animation => { const action = mixer.clipAction(animation as THREE.AnimationClip); action.loop = THREE.LoopOnce; action.clampWhenFinished = true; if (reverse){ action.timeScale = -1; action.paused = false; if(action.time === 0) action.time = action.getClip().duration; } action.play(); }); mixer.addEventListener("finished", () => { toGo--; if (toGo) return; isLoop = false; resolve(); }); const loop = () => { mixer.update(clock.getDelta()); this.requestRender(); if (isLoop) requestAnimationFrame(loop); } loop(); }); }
n.a.
No response
r154
Desktop
Chrome, Firefox, Edge
Windows, MacOS, Linux
The text was updated successfully, but these errors were encountered:
Looking at the release notes there were no animation related changes. Do you mind sharing the model so we can reproduce the issue?
Sorry, something went wrong.
I can reproduce the issue with the test asset from donmccurdy/three-gltf-viewer#344.
Reverting #26126 actually fixes the issue.
/ping @hybridherbst
loadAnimation()
Successfully merging a pull request may close this issue.
Description
After upgrading to r154, animations go wrong:
this with <= r153
Reproduction steps
Code
Live example
n.a.
Screenshots
No response
Version
r154
Device
Desktop
Browser
Chrome, Firefox, Edge
OS
Windows, MacOS, Linux
The text was updated successfully, but these errors were encountered: