pmndrs / react-zdog

⚡️🐶 React bindings for zdog
MIT License
443 stars 21 forks source link

Add renderOnce Option to Illustration #15

Closed ryanrossiter closed 1 year ago

ryanrossiter commented 5 years ago

[refs drcmda/react-zdog#13] Add a renderOnce option to Illustration props. When enabled, it will only render on resize.

bhushan6 commented 1 year ago

Hi @ryanrossiter , I have added feature to trigger frames when prop changes or manually by setting the frameloop prop to demand, it covers your use case too and apart from that it also gives access to render the frames manually using new hook called useInavalidate. I'll be adding docs for that soon but you can see the example for that in RenderOnDemand.js file within example folder.