From 1e0ed4cd80b1cf4aa0f6020e7f926837f5322182 Mon Sep 17 00:00:00 2001 From: Yeicor <4929005+Yeicor@users.noreply.github.com> Date: Sat, 2 Mar 2024 13:42:40 +0100 Subject: [PATCH] fix animation + clipping --- src/models/Model.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/Model.vue b/src/models/Model.vue index 7dec8e8..ef0ffa0 100644 --- a/src/models/Model.vue +++ b/src/models/Model.vue @@ -184,10 +184,10 @@ function onModelLoad() { if (modelName !== "__helpers") { // The back of the material only writes to the stencil buffer the areas // that should be covered by the plane, but does not render anything - let backMaterial = child.material.clone(); - backMaterial.side = BackSide; - backMaterial.color = new Color(0.25, 0.25, 0.25) - let backChild = new TMesh(child.geometry, backMaterial); + let backChild = child.clone(); + backChild.material = child.material.clone(); + backChild.material.side = BackSide; + backChild.material.color = new Color(0.25, 0.25, 0.25) child.userData.backChild = backChild; childrenToAdd.push(backChild); }