From e206af3def365a54afcbd3c38d8a6127b694fcb7 Mon Sep 17 00:00:00 2001 From: "H. E." <6037756+rndexe@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:49:01 +0530 Subject: [PATCH] Fix horizontal-tiles demo (#66) --- demos/horizontal-tiles/src/App.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/demos/horizontal-tiles/src/App.jsx b/demos/horizontal-tiles/src/App.jsx index d1558763..5145ed67 100755 --- a/demos/horizontal-tiles/src/App.jsx +++ b/demos/horizontal-tiles/src/App.jsx @@ -47,8 +47,7 @@ function Item({ index, position, scale, c = new THREE.Color(), ...props }) { useFrame((state, delta) => { const y = scroll.curve(index / urls.length - 1.5 / urls.length, 4 / urls.length) easing.damp3(ref.current.scale, [clicked === index ? 4.7 : scale[0], clicked === index ? 5 : 4 + y, 1], 0.15, delta) - ref.current.material.scale[0] = ref.current.scale.x - ref.current.material.scale[1] = ref.current.scale.y + ref.current.material.scale.set(ref.current.scale.x, ref.current.scale.y) if (clicked !== null && index < clicked) easing.damp(ref.current.position, 'x', position[0] - 2, 0.15, delta) if (clicked !== null && index > clicked) easing.damp(ref.current.position, 'x', position[0] + 2, 0.15, delta) if (clicked === null || clicked === index) easing.damp(ref.current.position, 'x', position[0], 0.15, delta)