three.js dom id of canvas element used for webgl renderer -
i'd id of canvas element automatically created three.js.
alternately, equally happy (perhaps more so) ability pass along preexisting canvas element id during construction.
after researching, tried this:
renderer = new three.webglrenderer( { canvas: my_canvas } );
without success (it pretty old build, hoping work). perhaps parameter syntax has changed since 2 years ago?
(my_canvas being id of canvas, tried passing along context, no luck)
finally tried:
document.getelementsbytagname('canvas');
which returned nothing... puzzler , proverbial straw led me post here.
any insight appreciated, thanks! (i have voting rights)
var canvas = document.getelementbyid("canvasid"); renderer = new three.webglrenderer({ canvas: canvas });
Comments
Post a Comment