I'm trying to create a simple application that displays a cube with the .js tag on node.js, for this I tried node-three.js , which basically wraps three.js, creates a simulated browser window and provides a THREE variable so you can use it .
The problem is that I keep getting "TypeError: I can not read the property" x "from undefined", so I narrowed it down to this code:
var THREE = require('three.js');
firstVec = new THREE.Vector3(2,2,2);
secondVec = new THREE.Vector3(1,1,1);
clonedVec = firstVec.clone();
clonedVec.sub(secondVec);
error message:
undefined:818
this.x = a.x - b.x;
^
TypeError: Cannot read property 'x' of undefined
( ) , THREE.
, : ?
* Linux, /lib/three.js:
# 10 :
, src = fs.readFileSync(__dirname + '/../deps/three.js/build/three.js') //three.js instead of Three.js