I would like to get the identifier of a canvas element automatically created using three .js.
Alternatively, I would be equally happy (perhaps more than that) with the ability to walk along an existing canvas element id at build time.
After researching, I tried this:
renderer = new THREE.WebGLRenderer( { canvas: my_canvas } );
without success (this is from a rather old build, but hoped it would work). Perhaps some parameter syntax has changed from 2 years ago?
(my_canvas, being the identifier of the canvas, also tried to walk through the context, no luck)
Finally, I tried:
document.getElementsByTagName('canvas');
which returned nothing ... it was a puzzle and the notorious straw that made me publish here.
Any insight appreciated, thanks! (I now have voting rights)