Reputation: 14848
Hi I am passing in a canvas DOMelement to my call to the WebGLRenderer() like this:
var jqc = $('#myCanvas'); //get canvas with jQuery;
var par = {canvas:jqc.get()}; //create parameter object with canvas DOMElement in it
var renderer = new THREE.WebGLRenderer(par); //create new WebGLRenderer using myCanvas
//program fails in constructor
Is there something that I am missing?
I have tried the above whilst not giving the constructor any parameters and the code works fine it's just when using the par object to try and get it to use the canvas I already have on the page, that it breaks.
Upvotes: 0
Views: 2228