Use LoopOnce and LoopRepeat constants in action.loop assignment

This commit is contained in:
2026-04-01 04:05:25 +02:00
parent d6c2f81eb5
commit aca1d057ec

View File

@@ -542,7 +542,7 @@ export class RuntimeHost {
// LoopRepeat is the three.js default; LoopOnce plays the clip a single time then stops.
const action = mixer.clipAction(clip);
action.loop = loop === false ? 2200 /* THREE.LoopOnce */ : 2201 /* THREE.LoopRepeat */;
action.loop = loop === false ? LoopOnce : LoopRepeat;
action.clampWhenFinished = loop === false;
mixer.stopAllAction();
action.reset().play();