From 469c05114b4cdadd8b21c954c01c12e1eb9b9a0c Mon Sep 17 00:00:00 2001 From: Damien Montastier Date: Fri, 3 Jan 2025 21:05:05 +0100 Subject: [PATCH 1/2] update lab + fix scale instance mesh issue --- components/content/magical-marbles/index.vue | 173 ++++++++----------- 1 file changed, 69 insertions(+), 104 deletions(-) diff --git a/components/content/magical-marbles/index.vue b/components/content/magical-marbles/index.vue index 6f98ecec..7ac851e0 100644 --- a/components/content/magical-marbles/index.vue +++ b/components/content/magical-marbles/index.vue @@ -135,6 +135,9 @@ const updateBackground = (immediate = false) => { } else { ctx.add(() => { + console.log(backgroundRef.value) + console.log(backgroundGradient.value) + console.log(sphereRef.value.instance) tl = gsap.timeline({ onStart: () => { tlInProgress.value = true @@ -156,14 +159,14 @@ const updateBackground = (immediate = false) => { duration: .75, ease: 'power1.out', }, 'sphereAnimation+=.15') - .to(sphereRef.value.value.scale, { + .to(sphereRef.value.instance.scale, { x: .95, y: .95, z: .95, duration: 0.35, ease: 'power1.inOut', }, 'sphereAnimation+=.15') - .to(sphereRef.value.value.scale, { + .to(sphereRef.value.instance.scale, { x: 1, y: 1, z: 1, @@ -190,24 +193,12 @@ onLoop(({ delta }) => {