gre / gl-react

gl-react – React library to write and compose WebGL shaders

Home Page:https://gl-react-cookbook.surge.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-three-fiber support

drcmda opened this issue · comments

commented

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 ......

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.