Replies: 3 comments
-
Hello @jasonlong, actually I think I'm trying to do the same thing as you : This part is responsible for the hovered instance, but I don't see how to trigger it const scale = id === hovered ? 3 : 1
CONFIG.tempObject.position.set(x, 0, y)
CONFIG.tempObject.scale.y = scale
CONFIG.tempObject.updateMatrix()
meshRef.current.setMatrixAt(id, CONFIG.tempObject.matrix) |
Beta Was this translation helpful? Give feedback.
-
you'll find examples here: https://docs.pmnd.rs/react-three-fiber/examples/basics |
Beta Was this translation helpful? Give feedback.
-
Thanks for the examples, I already looked at them. I found a brute workaround, but it nearly works... now, the only thing that remains, is to animate reverse the scale, once out : |
Beta Was this translation helpful? Give feedback.
-
Would anyone have a simple example of using react-spring with an
instancedMesh
in r3f? I'm trying to create a demo where several cubes have the same spring config and activate on hover. Thank you in advance! 🙏🏼Beta Was this translation helpful? Give feedback.
All reactions