Skip to content

Commit 2e45bea

Browse files
authored
Merge pull request #21116 from Mugen87/dev2
Docs: Clean up.
2 parents 3142581 + 321fd37 commit 2e45bea

File tree

2 files changed

+0
-70
lines changed

2 files changed

+0
-70
lines changed

docs/api/en/core/Face3.html

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -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>

docs/api/zh/core/Face3.html

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,6 @@ <h1>[name]</h1>
1414
然而,如果你正在构建一个自定义几何体,你需要手动创建这些三角形面。
1515
</p>
1616

17-
<h2>代码示例</h2>
18-
19-
<code>
20-
const material = new THREE.MeshStandardMaterial( { color : 0x00cc00 } );
21-
22-
// 创建仅有一个三角形面的几何体
23-
const geometry = new THREE.Geometry();
24-
geometry.vertices.push( new THREE.Vector3( -50, -50, 0 ) );
25-
geometry.vertices.push( new THREE.Vector3( 50, -50, 0 ) );
26-
geometry.vertices.push( new THREE.Vector3( 50, 50, 0 ) );
27-
28-
// 利用顶点 0, 1, 2 创建一个面
29-
const normal = new THREE.Vector3( 0, 0, 1 ); //optional
30-
const color = new THREE.Color( 0xffaa00 ); //optional
31-
const materialIndex = 0; //optional
32-
const face = new THREE.Face3( 0, 1, 2, normal, color, materialIndex );
33-
34-
// 将创建的面添加到几何体的面的队列
35-
geometry.faces.push( face );
36-
37-
// 如果没有特别指明,面和顶点的法向量可以通过如下代码自动计算
38-
geometry.computeFaceNormals();
39-
geometry.computeVertexNormals();
40-
41-
scene.add( new THREE.Mesh( geometry, material ) );
42-
</code>
43-
44-
<h2>例子</h2>
45-
46-
<p>
47-
[example:svg_sandbox svg / sandbox ]<br />
48-
[example:misc_exporter_obj exporter / obj ]<br />
49-
[example:webgl_shaders_vector WebGL / shaders / vector ]
50-
</p>
51-
5217
<h2>构造函数</h2>
5318

5419
<h3>[name]( [param:Integer a], [param:Integer b], [param:Integer c], [param:Vector3 normal], [param:Color color], [param:Integer materialIndex] )</h3>

0 commit comments

Comments
 (0)