utsuboco / r3f-perf

Easily monitor your ThreeJS performances.
https://codesandbox.io/s/perlin-cubes-r3f-perf-wtp9t?file=/src/App.js
MIT License
573 stars 21 forks source link

Cannot read property 'render' of undefined #9

Closed mooflu closed 3 years ago

mooflu commented 3 years ago

Happens when you toggle canvas off/on.

See https://codesandbox.io/s/amazing-benz-f97gj?file=/src/App.tsx

Cannot read property 'render' of undefined
GLPerf.paramLogger
https://f97gj.csb.app/node_modules/r3f-perf/dist/r3f-perf.cjs.development.js:1260:45
_loop
https://f97gj.csb.app/node_modules/r3f-perf/dist/r3f-perf.cjs.development.js:1091:18
GLPerf.nextFrame
https://f97gj.csb.app/node_modules/r3f-perf/dist/r3f-perf.cjs.development.js:1109:11
Array.eval
https://f97gj.csb.app/node_modules/r3f-perf/dist/r3f-perf.cjs.development.js:1295:19
renderLoop
https://f97gj.csb.app/node_modules/react-three-fiber/web.js:262:26
RenaudRohlinger commented 3 years ago

Thanks for the example. I will fix that as soon as possible with the next patch .

RenaudRohlinger commented 3 years ago

@mooflu v0.79.0 released and support to dynamically add and remove the canvas from the dom.