mrdoob/three.js — Issue #1318: How to create a custom mesh?
Author: vhsmaia
Created: 2012-02-12 21:30:56+00:00
State: open

This didn't work:

var geom = new THREE.Geometry();
var v1 = new THREE.Vector3(0,0,10);
var v2 = new THREE.Vector3(0,500,10);
var v3 = new THREE.Vector3(500,500,10);

geom.vertices.push(new THREE.Vertex(v1));
geom.vertices.push(new THREE.Vertex(v2));
geom.vertices.push(new THREE.Vertex(v3));
geom.faces.push( new THREE.Face3( 0, 1, 2 ) );

var object = new THREE.Mesh( geom, new THREE.MeshNormalMaterial() );
scene.addObject(object);