threejs triangle geometry code example
Example: make triangle with threejs
let geom = new THREE.Geometry();
let v1 = new THREE.Vector3(0,0,0);
let v2 = new THREE.Vector3(30,0,0);
let v3 = new THREE.Vector3(30,30,0);
geom.vertices.push(v1);
geom.vertices.push(v2);
geom.vertices.push(v3);
geom.faces.push( new THREE.Face3( 0, 1, 2 ) );
geom.computeFaceNormals();
let mesh= new THREE.Mesh( geom, new THREE.MeshNormalMaterial() );