Skip to content

Commit 5cdbd46

Browse files
author
ledouxm
committed
fix: go back to 0 instead undefined for .setLoop
1 parent 96973d6 commit 5cdbd46

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

ecctrlNPMPackage/EcctrlAnimation.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ export function EcctrlAnimation(props: EcctrlAnimationProps) {
3838
curAnimation === props.animationSet.action3 ||
3939
curAnimation === props.animationSet.action4
4040
) {
41-
action.reset().fadeIn(0.2).setLoop(THREE.LoopOnce, 0).play();
41+
action
42+
.reset()
43+
.fadeIn(0.2)
44+
.setLoop(THREE.LoopOnce, undefined as number)
45+
.play();
4246
action.clampWhenFinished = true;
4347
} else {
4448
action.reset().fadeIn(0.2).play();

src/CharacterModel.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,11 @@ export default function CharacterModel(props: CharacterModelProps) {
162162
curAnimation === animationSet.action3 ||
163163
curAnimation === animationSet.action4
164164
) {
165-
// TODO: check if 0 works the same as undefined
166-
action.reset().fadeIn(0.2).setLoop(THREE.LoopOnce, 0).play();
165+
action
166+
.reset()
167+
.fadeIn(0.2)
168+
.setLoop(THREE.LoopOnce, undefined as number)
169+
.play();
167170
action.clampWhenFinished = true;
168171
// Only show mug during cheer action
169172
if (curAnimation === animationSet.action3) {

src/EcctrlAnimation.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ export function EcctrlAnimation(props: EcctrlAnimationProps) {
3838
curAnimation === props.animationSet.action3 ||
3939
curAnimation === props.animationSet.action4
4040
) {
41-
action.reset().fadeIn(0.2).setLoop(THREE.LoopOnce, 0).play();
41+
action
42+
.reset()
43+
.fadeIn(0.2)
44+
.setLoop(THREE.LoopOnce, undefined as number)
45+
.play();
4246
action.clampWhenFinished = true;
4347
} else {
4448
action.reset().fadeIn(0.2).play();

0 commit comments

Comments
 (0)