@@ -15,41 +15,6 @@ <h1>[name]</h1>
1515 create them manually.
1616 </ p >
1717
18- < h2 > Code Example</ h2 >
19-
20- < code >
21- const material = new THREE.MeshStandardMaterial( { color : 0x00cc00 } );
22-
23- //create a triangular geometry
24- const geometry = new THREE.Geometry();
25- geometry.vertices.push( new THREE.Vector3( -50, -50, 0 ) );
26- geometry.vertices.push( new THREE.Vector3( 50, -50, 0 ) );
27- geometry.vertices.push( new THREE.Vector3( 50, 50, 0 ) );
28-
29- //create a new face using vertices 0, 1, 2
30- const normal = new THREE.Vector3( 0, 0, 1 ); //optional
31- const color = new THREE.Color( 0xffaa00 ); //optional
32- const materialIndex = 0; //optional
33- const face = new THREE.Face3( 0, 1, 2, normal, color, materialIndex );
34-
35- //add the face to the geometry's faces array
36- geometry.faces.push( face );
37-
38- //the face normals and vertex normals can be calculated automatically if not supplied above
39- geometry.computeFaceNormals();
40- geometry.computeVertexNormals();
41-
42- scene.add( new THREE.Mesh( geometry, material ) );
43- </ code >
44-
45- < h2 > Examples</ h2 >
46-
47- < p >
48- [example:svg_sandbox svg / sandbox ]< br />
49- [example:misc_exporter_obj exporter / obj ]< br />
50- [example:webgl_shaders_vector WebGL / shaders / vector ]
51- </ p >
52-
5318 < h2 > Constructor</ h2 >
5419
5520 < h3 > [name]( [param:Integer a], [param:Integer b], [param:Integer c], [param:Vector3 normal], [param:Color color], [param:Integer materialIndex] )</ h3 >
0 commit comments