From eb449ed100078f9df7747c0672c8dba644849fd3 Mon Sep 17 00:00:00 2001 From: Taylor Gratzer Date: Mon, 20 Jan 2025 16:30:09 -0500 Subject: [PATCH] fix: Outlines on meshes with morphTargets (#2317) --- src/core/Outlines.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/Outlines.tsx b/src/core/Outlines.tsx index f85185aba..2c571a9de 100644 --- a/src/core/Outlines.tsx +++ b/src/core/Outlines.tsx @@ -135,6 +135,8 @@ export function Outlines({ group.add(mesh) } mesh.geometry = angle ? toCreasedNormals(parent.geometry, angle) : parent.geometry + mesh.morphTargetInfluences = parent.morphTargetInfluences + mesh.morphTargetDictionary = parent.morphTargetDictionary } } }) @@ -146,6 +148,12 @@ export function Outlines({ const mesh = group.children[0] as THREE.Mesh if (mesh) { mesh.renderOrder = renderOrder + + const parent = group.parent as THREE.Mesh & THREE.SkinnedMesh & THREE.InstancedMesh + applyProps(mesh as any, { + morphTargetInfluences: parent.morphTargetInfluences, + morphTargetDictionary: parent.morphTargetDictionary, + }) applyProps(mesh.material as any, { transparent, thickness,