-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
Closed
Labels
Description
Hi all,
I am pretty new to 3D, but I have some experience using away3D in flash and drawing with vertices etc. I am trying to draw a very basic triangle using THREE.js, and I just can't seem to get something on the screen. If someone can push me in the right direction, it would be very much appreciated. Here is my code:
var geom = new THREE.Geometry();
var v1 = new THREE.Vector3(0,0,0);
var v2 = new THREE.Vector3(0,500,0);
var v3 = new THREE.Vector3(0,500,500);
geom.vertices.push(new THREE.Vertex(v1));
geom.vertices.push(new THREE.Vertex(v2));
geom.vertices.push(new THREE.Vertex(v3));
var object = new THREE.Mesh( geom, new THREE.MeshNormalMaterial() );
scene.addObject(object);
Thanks a lot!