gl-react icon indicating copy to clipboard operation
gl-react copied to clipboard

react-three-fiber support

Open drcmda opened this issue 5 years ago • 1 comments
trafficstars

Would it be possible to also create a surface for r3f: https://github.com/react-spring/react-three-fiber ? If that component is inside <Canvas/> it has access to practically everything it would need, like the gl instance/render context, etc

function({ width, height }) {
  const { gl } = useThree()
  return (
    <mesh scale={[width, height, 1]}>
      <shaderMaterial ......

drcmda avatar Aug 27 '20 21:08 drcmda

I'm not exactly sure how things could interoperate, but maybe there is something to do indeed. I feel there could be a third party library that achieve that (doing the glue between the two libraries). I'm not exactly sure how things can interoperate the best on both side but no technical blocker I feel. I'm happy to also accept a library added in packages/ that would achieve this. If no one take it, I might eventually try it out, no ETA on my end yet.

gre avatar Dec 23 '20 20:12 gre