Skip to content

Commit

Permalink
Merge pull request #21116 from Mugen87/dev2
Browse files Browse the repository at this point in the history
Docs: Clean up.
  • Loading branch information
mrdoob committed Jan 20, 2021
2 parents 3142581 + 321fd37 commit 2e45bea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 70 deletions.
35 changes: 0 additions & 35 deletions docs/api/en/core/Face3.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,6 @@ <h1>[name]</h1>
create them manually.
</p>

<h2>Code Example</h2>

<code>
const material = new THREE.MeshStandardMaterial( { color : 0x00cc00 } );

//create a triangular geometry
const geometry = new THREE.Geometry();
geometry.vertices.push( new THREE.Vector3( -50, -50, 0 ) );
geometry.vertices.push( new THREE.Vector3( 50, -50, 0 ) );
geometry.vertices.push( new THREE.Vector3( 50, 50, 0 ) );

//create a new face using vertices 0, 1, 2
const normal = new THREE.Vector3( 0, 0, 1 ); //optional
const color = new THREE.Color( 0xffaa00 ); //optional
const materialIndex = 0; //optional
const face = new THREE.Face3( 0, 1, 2, normal, color, materialIndex );

//add the face to the geometry's faces array
geometry.faces.push( face );

//the face normals and vertex normals can be calculated automatically if not supplied above
geometry.computeFaceNormals();
geometry.computeVertexNormals();

scene.add( new THREE.Mesh( geometry, material ) );
</code>

<h2>Examples</h2>

<p>
[example:svg_sandbox svg / sandbox ]<br />
[example:misc_exporter_obj exporter / obj ]<br />
[example:webgl_shaders_vector WebGL / shaders / vector ]
</p>

<h2>Constructor</h2>

<h3>[name]( [param:Integer a], [param:Integer b], [param:Integer c], [param:Vector3 normal], [param:Color color], [param:Integer materialIndex] )</h3>
Expand Down
35 changes: 0 additions & 35 deletions docs/api/zh/core/Face3.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,6 @@ <h1>[name]</h1>
然而,如果你正在构建一个自定义几何体,你需要手动创建这些三角形面。
</p>

<h2>代码示例</h2>

<code>
const material = new THREE.MeshStandardMaterial( { color : 0x00cc00 } );

// 创建仅有一个三角形面的几何体
const geometry = new THREE.Geometry();
geometry.vertices.push( new THREE.Vector3( -50, -50, 0 ) );
geometry.vertices.push( new THREE.Vector3( 50, -50, 0 ) );
geometry.vertices.push( new THREE.Vector3( 50, 50, 0 ) );

// 利用顶点 0, 1, 2 创建一个面
const normal = new THREE.Vector3( 0, 0, 1 ); //optional
const color = new THREE.Color( 0xffaa00 ); //optional
const materialIndex = 0; //optional
const face = new THREE.Face3( 0, 1, 2, normal, color, materialIndex );

// 将创建的面添加到几何体的面的队列
geometry.faces.push( face );

// 如果没有特别指明,面和顶点的法向量可以通过如下代码自动计算
geometry.computeFaceNormals();
geometry.computeVertexNormals();

scene.add( new THREE.Mesh( geometry, material ) );
</code>

<h2>例子</h2>

<p>
[example:svg_sandbox svg / sandbox ]<br />
[example:misc_exporter_obj exporter / obj ]<br />
[example:webgl_shaders_vector WebGL / shaders / vector ]
</p>

<h2>构造函数</h2>

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

0 comments on commit 2e45bea

Please sign in to comment.