React component to render a GL Transition in gl-react
npm install react-gl-transitiona React component to render a GL Transition in gl-react v3.
https://gl-react-cookbook.surge.sh/transitions
This exposes a simple GLTransition react component you have to use inside gl-react Surface.
It renders one frame of the transition (up to you to run the animation loop the way you want).
``html`
- from: the source texture to transition from. an image URL or any texture format accepted by gl-react! (e.g. a
There is a setProgress(progress) method available via glTransitionRef.getComponent().setProgress(progress). It's an escape hatch, only use it if you identified a bottleneck in the "normal way". If you do, make sure the progress value you sent in props always comes from the same variable you gave to setProgress or you will see jumps if you have a React re-render.
> NB disclaimer: use this escape hatch wisely! There should be ways to go before using it. What you can also do is a