Skip to content

Commit

Permalink
Fix horizontal-tiles demo
Browse files Browse the repository at this point in the history
  • Loading branch information
rndexe committed Aug 11, 2024
1 parent f3d8c04 commit 27c1d84
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions demos/horizontal-tiles/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 27c1d84

Please sign in to comment.