From bd2fc81d29fecbfce2a8e17a1086fe46520174c2 Mon Sep 17 00:00:00 2001 From: Yuri Kushnir <67687681+yuri-wolf3d@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:13:55 +0300 Subject: [PATCH] fix(idle-expression): ACT-889 update animation when new model is loaded (#90) --- src/services/Models.service.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/Models.service.tsx b/src/services/Models.service.tsx index 6e87b730..ea7f97b3 100644 --- a/src/services/Models.service.tsx +++ b/src/services/Models.service.tsx @@ -357,7 +357,7 @@ export const useIdleExpression = (expression: keyof typeof expressions, nodes: N selectedExpression[i].morphTargetIndex = headMesh.morphTargetDictionary[selectedExpression[i].morphTarget]; } } - }, [selectedExpression?.length]); + }, [selectedExpression, headMesh?.morphTargetDictionary]); const animateExpression = useCallback( (delta: number) => {