Node.js & three.js load Texture on cube -


essentially, generating static scene using three.js module node.js.

unfortunately, scene being rendered without browser, can not use three.imageutils.loadtexture.

i given error when using - understand document not exist rendering server side.

var materials = [ new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here')}) ]; 

returns

/usr/src/node-v0.10.40/node_modules/three/three.js:13028             var image = document.createelement( 'img' );                         ^ referenceerror: document not defined 

so in sum - need load texture onto cube using softwarerenderer in three.js, catch rendering node, not loading in browser. how go doing this?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -