javascript - how to assign a id to canvas in the three.js application -
i have created render object in three.js , connect domelment, shown followed
var renderer = new three.webglrenderer({ antialias: true }); renderer.setclearcolor( 0xaaaaaa, 1 ); renderer.setsize(window.innerwidth, window.innerheight); document.getelementbyid('webgl-container').appendchild(renderer.domelement);
so three.js automatically create canvas within webgl-container div, want give canvas id, how it
have tried :
renderer.domelement.id = 'youridname';
javascript three.js html5-canvas
No comments:
Post a Comment