Open FalconNL opened 8 years ago
I am having this problem too.
I am having the same problem with a simple react application.
I would guess this is because this extension scans the page for <canvas>
elements. However, three.js creates the canvas element dynamically after the page has loaded.
If this is indeed the problem, then maybe the user should be given the option to manually trigger the scan for webgl contexts. Creating <canvas>
elements dynamically should be very common (three.js, react, single page applications).
I am able to get it working on this Three.js example without any problems: http://threejs.org/examples/webgl_loader_obj_mtl.html
But it's probably worth noting that a few things don't seem to work properly like the texture browsing. On the example application that I wrote myself, the owerdraw inspector and depth inspector don't seem to work properly. I was wondering if this was a side effect of the fact that I was just using simple geometry (cylinders) and colored materials without textures.
This works: http://threejs.org/examples/webgl_loader_obj_mtl.html This doesn't: http://threejs.org/examples/#webgl_loader_obj_mtl
The second link basically uses an <iframe>
to embed the first link.
I can't reproduce my problem with react+webgl+insight with other projects. I'll try to find out why it doesn't work on mine.
Content inside of an <iframe>
tag isn’t currently supported. We simply scan the page for <canvas>
elements. It would be possible to extend support in the future, enabling our content script to run on iframe pages and handling this on our devtools panel.
In regards to dynamically added <canvas>
elements, we should add a refresh button to the bar at the bottom of the devtools page and a refresh button on the “No contexts found” page.
Thanks for pointing out these issues! We’ve added issues for these two specific problems (https://github.com/3Dparallax/insight/issues/115 and https://github.com/3Dparallax/insight/issues/116) . Please let us know if these aren’t the specific issues you want us to address, thanks!
Voting up ffor refresh button!
any word about that refresh button? This isn't any use to me until it can pick up contexts that are initiated dynamically after page load.
Currently WebGL Insight only produces the error message "No contexts found on page. Please try refreshing your page." when trying to use it to debug a three.js application, even after reloading the page. I was able to reproduce this issue both on an application I developed myself and on the examples on the official three.js site.