From c45e41827b356de326fbd63baf32a35221767cfe Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 28 Jun 2024 12:28:11 +0300 Subject: [PATCH] watch --- components/model/fence.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/model/fence.vue b/components/model/fence.vue index a8dc6e9..6077ad9 100644 --- a/components/model/fence.vue +++ b/components/model/fence.vue @@ -42,13 +42,13 @@ const instanced_lamelle_geometry = Object.assign(new BufferGeometry, props.model const instanced_lamelle_material = props.models.lamelle.children[0].material const instanced_lamelle_count = 24 const instanced_v = [instanced_lamelle_geometry, instanced_lamelle_material, instanced_lamelle_count] -watch([instanced_lamelle, fence_section, extra_section, lamelles_count], (mesh) => { +watch([instanced_lamelle, fence_section, extra_section, lamelles_count, extra], () => { for (let i = 0; i < instanced_lamelle_count; i++) { if (instanced_lamelle.value) { const scale_x = (((extra.value as number) || fence_section.value) * 10) const pos_x = pillar_size * 0.5 const pos_y = (lSize * i) - const pos_z = -0.02 + const pos_z = 0.02 const newmatrix = new Matrix4().fromArray([ scale_x, 0, 0, 0, 0, 1, 0, 0,