Skip to content

Commit 945ecfd

Browse files
authored
Merge pull request #21164 from Mugen87/dev51
Face3: Remove from core.
2 parents 9ccd2b7 + 2638efa commit 945ecfd

File tree

14 files changed

+152
-460
lines changed

14 files changed

+152
-460
lines changed

docs/api/en/core/Face3.html

Lines changed: 0 additions & 100 deletions
This file was deleted.

docs/api/en/core/Raycaster.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ <h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recu
172172
<p>
173173
[page:Float distance] – distance between the origin of the ray and the intersection<br />
174174
[page:Vector3 point] – point of intersection, in world coordinates<br />
175-
[page:Face3 face] – intersected face<br />
175+
[page:Object face] – intersected face<br />
176176
[page:Integer faceIndex] – index of the intersected face<br />
177177
[page:Object3D object] – the intersected object<br />
178178
[page:Vector2 uv] - U,V coordinates at point of intersection<br />

docs/api/zh/core/Face3.html

Lines changed: 0 additions & 96 deletions
This file was deleted.

docs/api/zh/core/Raycaster.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ <h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recu
175175
<p>
176176
[page:Float distance] —— 射线投射原点和相交部分之间的距离。<br />
177177
[page:Vector3 point] —— 相交部分的点(世界坐标)<br />
178-
[page:Face3 face] —— 相交的面<br />
178+
[page:Object face] —— 相交的面<br />
179179
[page:Integer faceIndex] —— 相交的面的索引<br />
180180
[page:Object3D object] —— 相交的物体<br />
181181
[page:Vector2 uv] —— 相交部分的点的UV坐标。<br />

docs/list.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
"BufferGeometry": "api/en/core/BufferGeometry",
8888
"Clock": "api/en/core/Clock",
8989
"EventDispatcher": "api/en/core/EventDispatcher",
90-
"Face3": "api/en/core/Face3",
9190
"GLBufferAttribute": "api/en/core/GLBufferAttribute",
9291
"InstancedBufferAttribute": "api/en/core/InstancedBufferAttribute",
9392
"InstancedBufferGeometry": "api/en/core/InstancedBufferGeometry",
@@ -599,7 +598,6 @@
599598
"BufferGeometry": "api/zh/core/BufferGeometry",
600599
"Clock": "api/zh/core/Clock",
601600
"EventDispatcher": "api/zh/core/EventDispatcher",
602-
"Face3": "api/zh/core/Face3",
603601
"GLBufferAttribute": "api/zh/core/GLBufferAttribute",
604602
"InstancedBufferAttribute": "api/zh/core/InstancedBufferAttribute",
605603
"InstancedBufferGeometry": "api/zh/core/InstancedBufferGeometry",

examples/jsm/deprecated/Geometry.d.ts

Lines changed: 97 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
Vector3,
33
Color,
4-
Face3,
54
Vector2,
65
Vector4,
76
Box3,
@@ -17,7 +16,7 @@ import {
1716
} from '../../../src/Three';
1817

1918
/**
20-
* @deprecated Use {@link Face3} instead.
19+
* @deprecated Use Face3 instead.
2120
*/
2221

2322
export interface MorphTarget {
@@ -37,8 +36,6 @@ export interface MorphNormals {
3736

3837
/**
3938
* Base class for geometries
40-
*
41-
* see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Geometry.js|src/core/Geometry.js}
4239
*/
4340
export class Geometry extends EventDispatcher {
4441

@@ -279,3 +276,99 @@ export class Geometry extends EventDispatcher {
279276
animations: AnimationClip[];
280277

281278
}
279+
280+
/**
281+
* Triangle face.
282+
*/
283+
export class Face3 {
284+
285+
/**
286+
* @param a Vertex A index.
287+
* @param b Vertex B index.
288+
* @param c Vertex C index.
289+
* @param normal Face normal or array of vertex normals.
290+
* @param color Face color or array of vertex colors.
291+
* @param materialIndex Material index.
292+
*/
293+
constructor(
294+
a: number,
295+
b: number,
296+
c: number,
297+
normal?: Vector3,
298+
color?: Color,
299+
materialIndex?: number
300+
);
301+
constructor(
302+
a: number,
303+
b: number,
304+
c: number,
305+
normal?: Vector3,
306+
vertexColors?: Color[],
307+
materialIndex?: number
308+
);
309+
constructor(
310+
a: number,
311+
b: number,
312+
c: number,
313+
vertexNormals?: Vector3[],
314+
color?: Color,
315+
materialIndex?: number
316+
);
317+
constructor(
318+
a: number,
319+
b: number,
320+
c: number,
321+
vertexNormals?: Vector3[],
322+
vertexColors?: Color[],
323+
materialIndex?: number
324+
);
325+
326+
/**
327+
* Vertex A index.
328+
*/
329+
a: number;
330+
331+
/**
332+
* Vertex B index.
333+
*/
334+
b: number;
335+
336+
/**
337+
* Vertex C index.
338+
*/
339+
c: number;
340+
341+
/**
342+
* Face normal.
343+
* @default new THREE.Vector3()
344+
*/
345+
normal: Vector3;
346+
347+
/**
348+
* Array of 3 vertex normals.
349+
* @default []
350+
*/
351+
vertexNormals: Vector3[];
352+
353+
/**
354+
* Face color.
355+
* @default new THREE.Color()
356+
*/
357+
color: Color;
358+
359+
/**
360+
* Array of 3 vertex colors.
361+
* @default []
362+
*/
363+
vertexColors: Color[];
364+
365+
/**
366+
* Material index (points to {@link Mesh.material}).
367+
* @default 0
368+
*/
369+
materialIndex: number;
370+
371+
clone(): Face3;
372+
copy( source: Face3 ): this;
373+
374+
}

0 commit comments

Comments
 (0)