2
0
Эх сурвалжийг харах

Merge pull request #21168 from elalish/variantNormalsV2

fixed typo in last PR
Mr.doob 4 жил өмнө
parent
commit
c1f65ae106

+ 0 - 100
docs/api/en/core/Face3.html

@@ -1,100 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<p class="desc">
-		Triangular face used in deprecated geometry. These are created automatically for all
-		standard geometry types, however if you are building a custom geometry you will have to
-		create them manually.
-		</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>
-		<p>
-		a — Vertex A index.<br />
-		b — Vertex B index.<br />
-		c — Vertex C index.<br /><br />
-
-		normal — (optional) Face normal ([page:Vector3 Vector3]) or array of vertex normals.
-		If a single vector is passed in, this sets [page:.normal], otherwise if an array of three
-		vectors is passed in this sets [page:.vertexNormals]<br /><br />
-
-		color — (optional) Face [page:Color color] or array of vertex [page:Color colors].
-		If a single vector is passed in, this sets [page:.color], otherwise if an array of three
-		vectors is passed in this sets [page:.vertexColors]<br /><br />
-
-		materialIndex — (optional) which index of an array of materials to associate
-		with the face.
-		</p>
-
-		<h2>Properties</h2>
-
-		<h3>[property:Integer a]</h3>
-		<p>
-		Vertex A index.
-		</p>
-
-		<h3>[property:Integer b]</h3>
-		<p>
-		Vertex B index.
-		</p>
-
-		<h3>[property:Integer c]</h3>
-		<p>
-		Vertex C index.
-		</p>
-
-		<h3>[property:Vector3 normal]</h3>
-		<p>
-		Face normal - vector showing the direction of the Face3. If calculated automatically,
-		this is the normalized cross product of two edges of the
-		triangle. Default is *(0, 0, 0)*.
-		</p>
-
-		<h3>[property:Color color]</h3>
-		<p>
-		Face color - for this to be used a material's [page:Material.vertexColors vertexColors] property
-		must be set to *true*.
-		</p>
-
-		<h3>[property:Array vertexNormals]</h3>
-		<p>
-		Array of 3 [page:Vector3 vertex normals].
-		</p>
-
-		<h3>[property:Array vertexColors]</h3>
-		<p>
-		Array of 3 vertex colors - for these to be used a material's [page:Material.vertexColors vertexColors] property
-		must be set to *true*.
-		</p>
-
-
-		<h3>[property:Integer materialIndex]</h3>
-		<p>
-		Material index (points to an index in the associated array of materials). Default is *0*.
-		</p>
-
-		<h2>Methods</h2>
-
-		<h3>[method:Face3 clone]()</h3>
-		<p>Creates a new clone of the Face3 object.</p>
-
-		<h3>[method:Face3 copy]( [param:Face3 face3] )</h3>
-		<p>Copy the parameters of another Face3 into this.</p>
-
-
-		<h2>Source</h2>
-
-		<p>
-			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-		</p>
-	</body>
-</html>

+ 1 - 1
docs/api/en/core/Raycaster.html

@@ -172,7 +172,7 @@
 		<p>
 			[page:Float distance] – distance between the origin of the ray and the intersection<br />
 			[page:Vector3 point] – point of intersection, in world coordinates<br />
-			[page:Face3 face] – intersected face<br />
+			[page:Object face] – intersected face<br />
 			[page:Integer faceIndex] – index of the intersected face<br />
 			[page:Object3D object] – the intersected object<br />
 			[page:Vector2 uv] - U,V coordinates at point of intersection<br />

+ 0 - 96
docs/api/zh/core/Face3.html

@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<p class="desc">
-			在 deprecated geometry 中被使用到的三角形面。这些三角形面会为所有标准几何体自动创建。
-			然而,如果你正在构建一个自定义几何体,你需要手动创建这些三角形面。
-		</p>
-
-		<h2>构造函数</h2>
-
-		<h3>[name]( [param:Integer a], [param:Integer b], [param:Integer c], [param:Vector3 normal], [param:Color color], [param:Integer materialIndex] )</h3>
-		<p>
-			a — 顶点 A 的索引。<br />
-			b — 顶点 B 的索引。<br />
-			c — 顶点 C 的索引。<br /><br />
-
-			normal — (可选) 面的法向量 ([page:Vector3 Vector3]) 或顶点法向量队列。
-			如果参数传入单一矢量,则用该量设置面的法向量 [page:.normal],如果传入的是包含三个矢量的队列,
-			则用该量设置 [page:.vertexNormals]<br /><br />
-
-			color — (可选) 面的颜色值 [page:Color color] 或顶点颜色值的队列。
-			如果参数传入单一矢量,则用该量设置 [page:.color],如果传入的是包含三个矢量的队列,
-			则用该量设置 [page:.vertexColors]<br /><br />
-
-			materialIndex — (可选) 材质队列中与该面对应的材质的索引。
-		</p>
-
-		<h2>属性</h2>
-
-		<h3>[property:Integer a]</h3>
-		<p>
-			顶点 A 的索引。
-		</p>
-
-		<h3>[property:Integer b]</h3>
-		<p>
-			顶点 B 的索引。
-		</p>
-
-		<h3>[property:Integer c]</h3>
-		<p>
-			顶点 C 的索引。
-		</p>
-
-		<h3>[property:Vector3 normal]</h3>
-		<p>
-			面的法向量 - 矢量展示 Face3 的方向。如果该量是通过调用自动计算的,
-			该值等于归一化的两条边的差积。默认值是 *(0, 0, 0)*。
-		</p>
-
-		<h3>[property:Color color]</h3>
-		<p>
-			面的颜色值 - 在被用于指定材质的 [page:Material.vertexColors vertexColors] 属性时,该值必须被设置为
-			*true*。
-		</p>
-
-		<h3>[property:Array vertexNormals]</h3>
-		<p>
-			包含三个 [page:Vector3 vertex normals] 的队列。
-		</p>
-
-		<h3>[property:Array vertexColors]</h3>
-		<p>
-			包含 3 个顶点颜色值的队列 - 在被用于指定材质的 [page:Material.vertexColors vertexColors] 属性时,该值必须被设置为
-			*true*。
-		</p>
-
-		<h3>[property:Integer materialIndex]</h3>
-		<p>
-			材质队列中与该面相关的材质的索引。默认值为 *0*。
-		</p>
-
-		<h2>方法</h2>
-
-		<h3>[method:Face3 clone]()</h3>
-		<p>克隆该 Face3 对象。</p>
-
-		<h3>[method:Face3 copy]( [param:Face3 face3] )</h3>
-		<p>将参数指定的 Face3 对象的数据拷贝到当前对象。</p>
-
-
-		<h2>源代码</h2>
-
-		<p>
-			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-		</p>
-	</body>
-</html>

+ 1 - 1
docs/api/zh/core/Raycaster.html

@@ -175,7 +175,7 @@
 		<p>
 			[page:Float distance] —— 射线投射原点和相交部分之间的距离。<br />
 			[page:Vector3 point] —— 相交部分的点(世界坐标)<br />
-			[page:Face3 face] —— 相交的面<br />
+			[page:Object face] —— 相交的面<br />
 			[page:Integer faceIndex] —— 相交的面的索引<br />
 			[page:Object3D object] —— 相交的物体<br />
 			[page:Vector2 uv] —— 相交部分的点的UV坐标。<br />

+ 0 - 2
docs/list.json

@@ -87,7 +87,6 @@
 				"BufferGeometry": "api/en/core/BufferGeometry",
 				"Clock": "api/en/core/Clock",
 				"EventDispatcher": "api/en/core/EventDispatcher",
-				"Face3": "api/en/core/Face3",
 				"GLBufferAttribute": "api/en/core/GLBufferAttribute",
 				"InstancedBufferAttribute": "api/en/core/InstancedBufferAttribute",
 				"InstancedBufferGeometry": "api/en/core/InstancedBufferGeometry",
@@ -599,7 +598,6 @@
 				"BufferGeometry": "api/zh/core/BufferGeometry",
 				"Clock": "api/zh/core/Clock",
 				"EventDispatcher": "api/zh/core/EventDispatcher",
-				"Face3": "api/zh/core/Face3",
 				"GLBufferAttribute": "api/zh/core/GLBufferAttribute",
 				"InstancedBufferAttribute": "api/zh/core/InstancedBufferAttribute",
 				"InstancedBufferGeometry": "api/zh/core/InstancedBufferGeometry",

+ 2 - 0
editor/js/commands/SetMaterialMapCommand.js

@@ -31,6 +31,8 @@ SetMaterialMapCommand.prototype = {
 
 	execute: function () {
 
+		if ( this.oldMap !== null && this.oldMap !== undefined ) this.oldMap.dispose();
+
 		this.material[ this.mapName ] = this.newMap;
 		this.material.needsUpdate = true;
 

+ 2 - 2
examples/js/loaders/GLTFLoader.js

@@ -2632,8 +2632,8 @@ THREE.GLTFLoader = ( function () {
 					cachedMaterial.vertexTangents = true;
 
 					// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995
-					if ( material.normalScale ) material.normalScale.y *= -1;
-					if ( material.clearcoatNormalScale ) material.clearcoatNormalScale.y *= -1;
+					if ( cachedMaterial.normalScale ) cachedMaterial.normalScale.y *= -1;
+					if ( cachedMaterial.clearcoatNormalScale ) cachedMaterial.clearcoatNormalScale.y *= -1;
 
 				}
 

+ 97 - 4
examples/jsm/deprecated/Geometry.d.ts

@@ -1,7 +1,6 @@
 import {
 	Vector3,
 	Color,
-	Face3,
 	Vector2,
 	Vector4,
 	Box3,
@@ -17,7 +16,7 @@ import {
 } from '../../../src/Three';
 
 /**
- * @deprecated Use {@link Face3} instead.
+ * @deprecated Use Face3 instead.
  */
 
 export interface MorphTarget {
@@ -37,8 +36,6 @@ export interface MorphNormals {
 
 /**
  * Base class for geometries
- *
- * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Geometry.js|src/core/Geometry.js}
  */
 export class Geometry extends EventDispatcher {
 
@@ -279,3 +276,99 @@ export class Geometry extends EventDispatcher {
 	animations: AnimationClip[];
 
 }
+
+/**
+ * Triangle face.
+ */
+export class Face3 {
+
+	/**
+	 * @param a Vertex A index.
+	 * @param b Vertex B index.
+	 * @param c Vertex C index.
+	 * @param normal Face normal or array of vertex normals.
+	 * @param color Face color or array of vertex colors.
+	 * @param materialIndex Material index.
+	 */
+	constructor(
+		a: number,
+		b: number,
+		c: number,
+		normal?: Vector3,
+		color?: Color,
+		materialIndex?: number
+	);
+	constructor(
+		a: number,
+		b: number,
+		c: number,
+		normal?: Vector3,
+		vertexColors?: Color[],
+		materialIndex?: number
+	);
+	constructor(
+		a: number,
+		b: number,
+		c: number,
+		vertexNormals?: Vector3[],
+		color?: Color,
+		materialIndex?: number
+	);
+	constructor(
+		a: number,
+		b: number,
+		c: number,
+		vertexNormals?: Vector3[],
+		vertexColors?: Color[],
+		materialIndex?: number
+	);
+
+	/**
+	 * Vertex A index.
+	 */
+	a: number;
+
+	/**
+	 * Vertex B index.
+	 */
+	b: number;
+
+	/**
+	 * Vertex C index.
+	 */
+	c: number;
+
+	/**
+	 * Face normal.
+	 * @default new THREE.Vector3()
+	 */
+	normal: Vector3;
+
+	/**
+	 * Array of 3 vertex normals.
+	 * @default []
+	 */
+	vertexNormals: Vector3[];
+
+	/**
+	 * Face color.
+	 * @default new THREE.Color()
+	 */
+	color: Color;
+
+	/**
+	 * Array of 3 vertex colors.
+	 * @default []
+	 */
+	vertexColors: Color[];
+
+	/**
+	 * Material index (points to {@link Mesh.material}).
+	 * @default 0
+	 */
+	materialIndex: number;
+
+	clone(): Face3;
+	copy( source: Face3 ): this;
+
+}

+ 53 - 1
examples/jsm/deprecated/Geometry.js

@@ -4,7 +4,6 @@ import {
 	BufferGeometry,
 	Color,
 	EventDispatcher,
-	Face3,
 	Float32BufferAttribute,
 	Matrix3,
 	Matrix4,
@@ -1814,4 +1813,57 @@ class DirectGeometry {
 
 }
 
+class Face3 {
+
+	constructor( a, b, c, normal, color, materialIndex = 0 ) {
+
+		this.a = a;
+		this.b = b;
+		this.c = c;
+
+		this.normal = ( normal && normal.isVector3 ) ? normal : new Vector3();
+		this.vertexNormals = Array.isArray( normal ) ? normal : [];
+
+		this.color = ( color && color.isColor ) ? color : new Color();
+		this.vertexColors = Array.isArray( color ) ? color : [];
+
+		this.materialIndex = materialIndex;
+
+	}
+
+	clone() {
+
+		return new this.constructor().copy( this );
+
+	}
+
+	copy( source ) {
+
+		this.a = source.a;
+		this.b = source.b;
+		this.c = source.c;
+
+		this.normal.copy( source.normal );
+		this.color.copy( source.color );
+
+		this.materialIndex = source.materialIndex;
+
+		for ( let i = 0, il = source.vertexNormals.length; i < il; i ++ ) {
+
+			this.vertexNormals[ i ] = source.vertexNormals[ i ].clone();
+
+		}
+
+		for ( let i = 0, il = source.vertexColors.length; i < il; i ++ ) {
+
+			this.vertexColors[ i ] = source.vertexColors[ i ].clone();
+
+		}
+
+		return this;
+
+	}
+
+}
+
 export { Geometry };

+ 2 - 0
examples/jsm/exporters/USDZExporter.d.ts

@@ -1,3 +1,5 @@
+import { Object3D } from '../../../src/Three';
+
 export class USDZExporter {
 
 	constructor();

+ 2 - 2
examples/jsm/loaders/GLTFLoader.js

@@ -2697,8 +2697,8 @@ var GLTFLoader = ( function () {
 					cachedMaterial.vertexTangents = true;
 
 					// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995
-					if ( material.normalScale ) material.normalScale.y *= -1;
-					if ( material.clearcoatNormalScale ) material.clearcoatNormalScale.y *= -1;
+					if ( cachedMaterial.normalScale ) cachedMaterial.normalScale.y *= -1;
+					if ( cachedMaterial.clearcoatNormalScale ) cachedMaterial.clearcoatNormalScale.y *= -1;
 
 				}
 

+ 1 - 1
examples/jsm/renderers/webgpu/WebGPUUniformsGroup.js

@@ -197,7 +197,7 @@ class WebGPUUniformsGroup extends WebGPUBinding {
 			a[ offset + 0 ] = v.x;
 			a[ offset + 1 ] = v.y;
 			a[ offset + 2 ] = v.z;
-			a[ offset + 3 ] = v.z;
+			a[ offset + 3 ] = v.w;
 
 			updated = true;
 

+ 108 - 83
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "three",
-  "version": "0.124.0",
+  "version": "0.125.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -1430,9 +1430,9 @@
       }
     },
     "@eslint/eslintrc": {
-      "version": "0.2.2",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz",
-      "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==",
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz",
+      "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==",
       "dev": true,
       "requires": {
         "ajv": "^6.12.4",
@@ -1442,7 +1442,7 @@
         "ignore": "^4.0.6",
         "import-fresh": "^3.2.1",
         "js-yaml": "^3.13.1",
-        "lodash": "^4.17.19",
+        "lodash": "^4.17.20",
         "minimatch": "^3.0.4",
         "strip-json-comments": "^3.1.1"
       },
@@ -1465,28 +1465,28 @@
       }
     },
     "@nodelib/fs.scandir": {
-      "version": "2.1.3",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
-      "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
+      "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==",
       "dev": true,
       "requires": {
-        "@nodelib/fs.stat": "2.0.3",
+        "@nodelib/fs.stat": "2.0.4",
         "run-parallel": "^1.1.9"
       }
     },
     "@nodelib/fs.stat": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
-      "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz",
+      "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==",
       "dev": true
     },
     "@nodelib/fs.walk": {
-      "version": "1.2.4",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
-      "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
+      "version": "1.2.6",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz",
+      "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==",
       "dev": true,
       "requires": {
-        "@nodelib/fs.scandir": "2.1.3",
+        "@nodelib/fs.scandir": "2.1.4",
         "fastq": "^1.6.0"
       }
     },
@@ -1501,9 +1501,9 @@
       }
     },
     "@rollup/plugin-node-resolve": {
-      "version": "11.0.1",
-      "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.0.1.tgz",
-      "integrity": "sha512-ltlsj/4Bhwwhb+Nb5xCz/6vieuEj2/BAkkqVIKmZwC7pIdl8srmgmglE4S0jFlZa32K4qvdQ6NHdmpRKD/LwoQ==",
+      "version": "11.1.0",
+      "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.0.tgz",
+      "integrity": "sha512-ouBBppRdWJKCllDXGzJ7ZIkYbaq+5TmyP0smt1vdJCFfoZhLi31vhpmjLhyo8lreHf4RoeSNllaWrvSqHpHRog==",
       "dev": true,
       "requires": {
         "@rollup/pluginutils": "^3.1.0",
@@ -1544,9 +1544,9 @@
       "dev": true
     },
     "@types/json-schema": {
-      "version": "7.0.6",
-      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz",
-      "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==",
+      "version": "7.0.7",
+      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
+      "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
       "dev": true
     },
     "@types/node": {
@@ -1565,15 +1565,16 @@
       }
     },
     "@typescript-eslint/eslint-plugin": {
-      "version": "4.11.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.11.0.tgz",
-      "integrity": "sha512-x4arJMXBxyD6aBXLm3W7mSDZRiABzy+2PCLJbL7OPqlp53VXhaA1HKK7R2rTee5OlRhnUgnp8lZyVIqjnyPT6g==",
+      "version": "4.14.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.1.tgz",
+      "integrity": "sha512-5JriGbYhtqMS1kRcZTQxndz1lKMwwEXKbwZbkUZNnp6MJX0+OVXnG0kOlBZP4LUAxEyzu3cs+EXd/97MJXsGfw==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/experimental-utils": "4.11.0",
-        "@typescript-eslint/scope-manager": "4.11.0",
+        "@typescript-eslint/experimental-utils": "4.14.1",
+        "@typescript-eslint/scope-manager": "4.14.1",
         "debug": "^4.1.1",
         "functional-red-black-tree": "^1.0.1",
+        "lodash": "^4.17.15",
         "regexpp": "^3.0.0",
         "semver": "^7.3.2",
         "tsutils": "^3.17.1"
@@ -1591,55 +1592,55 @@
       }
     },
     "@typescript-eslint/experimental-utils": {
-      "version": "4.11.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.11.0.tgz",
-      "integrity": "sha512-1VC6mSbYwl1FguKt8OgPs8xxaJgtqFpjY/UzUYDBKq4pfQ5lBvN2WVeqYkzf7evW42axUHYl2jm9tNyFsb8oLg==",
+      "version": "4.14.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.1.tgz",
+      "integrity": "sha512-2CuHWOJwvpw0LofbyG5gvYjEyoJeSvVH2PnfUQSn0KQr4v8Dql2pr43ohmx4fdPQ/eVoTSFjTi/bsGEXl/zUUQ==",
       "dev": true,
       "requires": {
         "@types/json-schema": "^7.0.3",
-        "@typescript-eslint/scope-manager": "4.11.0",
-        "@typescript-eslint/types": "4.11.0",
-        "@typescript-eslint/typescript-estree": "4.11.0",
+        "@typescript-eslint/scope-manager": "4.14.1",
+        "@typescript-eslint/types": "4.14.1",
+        "@typescript-eslint/typescript-estree": "4.14.1",
         "eslint-scope": "^5.0.0",
         "eslint-utils": "^2.0.0"
       }
     },
     "@typescript-eslint/parser": {
-      "version": "4.11.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.11.0.tgz",
-      "integrity": "sha512-NBTtKCC7ZtuxEV5CrHUO4Pg2s784pvavc3cnz6V+oJvVbK4tH9135f/RBP6eUA2KHiFKAollSrgSctQGmHbqJQ==",
+      "version": "4.14.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.14.1.tgz",
+      "integrity": "sha512-mL3+gU18g9JPsHZuKMZ8Z0Ss9YP1S5xYZ7n68Z98GnPq02pYNQuRXL85b9GYhl6jpdvUc45Km7hAl71vybjUmw==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/scope-manager": "4.11.0",
-        "@typescript-eslint/types": "4.11.0",
-        "@typescript-eslint/typescript-estree": "4.11.0",
+        "@typescript-eslint/scope-manager": "4.14.1",
+        "@typescript-eslint/types": "4.14.1",
+        "@typescript-eslint/typescript-estree": "4.14.1",
         "debug": "^4.1.1"
       }
     },
     "@typescript-eslint/scope-manager": {
-      "version": "4.11.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.11.0.tgz",
-      "integrity": "sha512-6VSTm/4vC2dHM3ySDW9Kl48en+yLNfVV6LECU8jodBHQOhO8adAVizaZ1fV0QGZnLQjQ/y0aBj5/KXPp2hBTjA==",
+      "version": "4.14.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.14.1.tgz",
+      "integrity": "sha512-F4bjJcSqXqHnC9JGUlnqSa3fC2YH5zTtmACS1Hk+WX/nFB0guuynVK5ev35D4XZbdKjulXBAQMyRr216kmxghw==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.11.0",
-        "@typescript-eslint/visitor-keys": "4.11.0"
+        "@typescript-eslint/types": "4.14.1",
+        "@typescript-eslint/visitor-keys": "4.14.1"
       }
     },
     "@typescript-eslint/types": {
-      "version": "4.11.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.11.0.tgz",
-      "integrity": "sha512-XXOdt/NPX++txOQHM1kUMgJUS43KSlXGdR/aDyEwuAEETwuPt02Nc7v+s57PzuSqMbNLclblQdv3YcWOdXhQ7g==",
+      "version": "4.14.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.14.1.tgz",
+      "integrity": "sha512-SkhzHdI/AllAgQSxXM89XwS1Tkic7csPdndUuTKabEwRcEfR8uQ/iPA3Dgio1rqsV3jtqZhY0QQni8rLswJM2w==",
       "dev": true
     },
     "@typescript-eslint/typescript-estree": {
-      "version": "4.11.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.0.tgz",
-      "integrity": "sha512-eA6sT5dE5RHAFhtcC+b5WDlUIGwnO9b0yrfGa1mIOIAjqwSQCpXbLiFmKTdRbQN/xH2EZkGqqLDrKUuYOZ0+Hg==",
+      "version": "4.14.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.1.tgz",
+      "integrity": "sha512-M8+7MbzKC1PvJIA8kR2sSBnex8bsR5auatLCnVlNTJczmJgqRn8M+sAlQfkEq7M4IY3WmaNJ+LJjPVRrREVSHQ==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.11.0",
-        "@typescript-eslint/visitor-keys": "4.11.0",
+        "@typescript-eslint/types": "4.14.1",
+        "@typescript-eslint/visitor-keys": "4.14.1",
         "debug": "^4.1.1",
         "globby": "^11.0.1",
         "is-glob": "^4.0.1",
@@ -1660,12 +1661,12 @@
       }
     },
     "@typescript-eslint/visitor-keys": {
-      "version": "4.11.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.0.tgz",
-      "integrity": "sha512-tRYKyY0i7cMk6v4UIOCjl1LhuepC/pc6adQqJk4Is3YcC6k46HvsV9Wl7vQoLbm9qADgeujiT7KdLrylvFIQ+A==",
+      "version": "4.14.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.1.tgz",
+      "integrity": "sha512-TAblbDXOI7bd0C/9PE1G+AFo7R5uc+ty1ArDoxmrC1ah61Hn6shURKy7gLdRb1qKJmjHkqu5Oq+e4Kt0jwf1IA==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.11.0",
+        "@typescript-eslint/types": "4.14.1",
         "eslint-visitor-keys": "^2.0.0"
       }
     },
@@ -2258,13 +2259,13 @@
       "dev": true
     },
     "eslint": {
-      "version": "7.16.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.16.0.tgz",
-      "integrity": "sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw==",
+      "version": "7.18.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz",
+      "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==",
       "dev": true,
       "requires": {
         "@babel/code-frame": "^7.0.0",
-        "@eslint/eslintrc": "^0.2.2",
+        "@eslint/eslintrc": "^0.3.0",
         "ajv": "^6.10.0",
         "chalk": "^4.0.0",
         "cross-spawn": "^7.0.2",
@@ -2288,7 +2289,7 @@
         "js-yaml": "^3.13.1",
         "json-stable-stringify-without-jsonify": "^1.0.1",
         "levn": "^0.4.1",
-        "lodash": "^4.17.19",
+        "lodash": "^4.17.20",
         "minimatch": "^3.0.4",
         "natural-compare": "^1.4.0",
         "optionator": "^0.9.1",
@@ -2591,9 +2592,9 @@
       "dev": true
     },
     "fast-glob": {
-      "version": "3.2.4",
-      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz",
-      "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==",
+      "version": "3.2.5",
+      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
+      "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
       "dev": true,
       "requires": {
         "@nodelib/fs.stat": "^2.0.2",
@@ -2695,9 +2696,9 @@
       }
     },
     "flatted": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
-      "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==",
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
+      "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
       "dev": true
     },
     "forwarded": {
@@ -2790,9 +2791,9 @@
       "dev": true
     },
     "globby": {
-      "version": "11.0.1",
-      "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
-      "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz",
+      "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==",
       "dev": true,
       "requires": {
         "array-union": "^2.1.0",
@@ -3504,6 +3505,12 @@
       "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
       "dev": true
     },
+    "require-from-string": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+      "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+      "dev": true
+    },
     "require-main-filename": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
@@ -3541,9 +3548,9 @@
       }
     },
     "rollup": {
-      "version": "2.35.1",
-      "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.35.1.tgz",
-      "integrity": "sha512-q5KxEyWpprAIcainhVy6HfRttD9kutQpHbeqDTWnqAFNJotiojetK6uqmcydNMymBEtC4I8bCYR+J3mTMqeaUA==",
+      "version": "2.38.0",
+      "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.38.0.tgz",
+      "integrity": "sha512-ay9zDiNitZK/LNE/EM2+v5CZ7drkB2xyDljvb1fQJCGnq43ZWRkhxN145oV8GmoW1YNi4sA/1Jdkr2LfawJoXw==",
       "dev": true,
       "requires": {
         "fsevents": "~2.1.2"
@@ -3985,17 +3992,29 @@
       }
     },
     "table": {
-      "version": "6.0.4",
-      "resolved": "https://registry.npmjs.org/table/-/table-6.0.4.tgz",
-      "integrity": "sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==",
+      "version": "6.0.7",
+      "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
+      "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
       "dev": true,
       "requires": {
-        "ajv": "^6.12.4",
+        "ajv": "^7.0.2",
         "lodash": "^4.17.20",
         "slice-ansi": "^4.0.0",
         "string-width": "^4.2.0"
       },
       "dependencies": {
+        "ajv": {
+          "version": "7.0.3",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz",
+          "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==",
+          "dev": true,
+          "requires": {
+            "fast-deep-equal": "^3.1.1",
+            "json-schema-traverse": "^1.0.0",
+            "require-from-string": "^2.0.2",
+            "uri-js": "^4.2.2"
+          }
+        },
         "ansi-regex": {
           "version": "5.0.0",
           "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
@@ -4014,6 +4033,12 @@
           "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
           "dev": true
         },
+        "json-schema-traverse": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+          "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+          "dev": true
+        },
         "string-width": {
           "version": "4.2.0",
           "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
@@ -4087,9 +4112,9 @@
       "dev": true
     },
     "tsutils": {
-      "version": "3.17.1",
-      "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz",
-      "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==",
+      "version": "3.20.0",
+      "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz",
+      "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==",
       "dev": true,
       "requires": {
         "tslib": "^1.8.1"
@@ -4161,9 +4186,9 @@
       "dev": true
     },
     "uri-js": {
-      "version": "4.4.0",
-      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz",
-      "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==",
+      "version": "4.4.1",
+      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+      "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
       "dev": true,
       "requires": {
         "punycode": "^2.1.0"

+ 5 - 5
package.json

@@ -99,15 +99,15 @@
     "@babel/plugin-proposal-class-properties": "^7.12.1",
     "@babel/preset-env": "^7.12.11",
     "@rollup/plugin-babel": "^5.2.2",
-    "@rollup/plugin-node-resolve": "^11.0.1",
-    "@typescript-eslint/eslint-plugin": "^4.11.0",
-    "@typescript-eslint/parser": "^4.11.0",
+    "@rollup/plugin-node-resolve": "^11.1.0",
+    "@typescript-eslint/eslint-plugin": "^4.14.1",
+    "@typescript-eslint/parser": "^4.14.1",
     "concurrently": "^5.3.0",
-    "eslint": "^7.16.0",
+    "eslint": "^7.18.0",
     "eslint-config-mdcs": "^5.0.0",
     "eslint-plugin-html": "^6.1.1",
     "regenerator-runtime": "^0.13.7",
-    "rollup": "^2.35.1",
+    "rollup": "^2.38.0",
     "rollup-plugin-terser": "^7.0.2",
     "servez": "^1.11.0",
     "typescript": "^4.1.3"

+ 0 - 8
src/Three.Legacy.js

@@ -24,7 +24,6 @@ import {
 import { BufferGeometry } from './core/BufferGeometry.js';
 import { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
 import { InterleavedBuffer } from './core/InterleavedBuffer.js';
-import { Face3 } from './core/Face3.js';
 import { Object3D } from './core/Object3D.js';
 import { Uniform } from './core/Uniform.js';
 import { Raycaster } from './core/Raycaster.js';
@@ -87,13 +86,6 @@ import { Scene } from './scenes/Scene.js';
 
 export { MathUtils as Math };
 
-export function Face4( a, b, c, d, normal, color, materialIndex ) {
-
-	console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );
-	return new Face3( a, b, c, normal, color, materialIndex );
-
-}
-
 export const LineStrip = 0;
 export const LinePieces = 1;
 export const NoColors = 0;

+ 0 - 1
src/Three.d.ts

@@ -98,7 +98,6 @@ export * from './core/InstancedInterleavedBuffer';
 export * from './core/InterleavedBuffer';
 export * from './core/InstancedBufferAttribute';
 export * from './core/BufferAttribute';
-export * from './core/Face3';
 export * from './core/Object3D';
 export * from './core/Raycaster';
 export * from './core/Layers';

+ 0 - 1
src/Three.js

@@ -95,7 +95,6 @@ export { InterleavedBuffer } from './core/InterleavedBuffer.js';
 export { InstancedBufferAttribute } from './core/InstancedBufferAttribute.js';
 export { GLBufferAttribute } from './core/GLBufferAttribute.js';
 export * from './core/BufferAttribute.js';
-export { Face3 } from './core/Face3.js';
 export { Object3D } from './core/Object3D.js';
 export { Raycaster } from './core/Raycaster.js';
 export { Layers } from './core/Layers.js';

+ 0 - 100
src/core/Face3.d.ts

@@ -1,100 +0,0 @@
-import { Vector3 } from './../math/Vector3';
-import { Color } from './../math/Color';
-
-/**
- * Triangle face.
- *
- * @source https://github.com/mrdoob/three.js/blob/master/src/core/Face3.js
- */
-export class Face3 {
-
-	/**
-	 * @param a Vertex A index.
-	 * @param b Vertex B index.
-	 * @param c Vertex C index.
-	 * @param normal Face normal or array of vertex normals.
-	 * @param color Face color or array of vertex colors.
-	 * @param materialIndex Material index.
-	 */
-	constructor(
-		a: number,
-		b: number,
-		c: number,
-		normal?: Vector3,
-		color?: Color,
-		materialIndex?: number
-	);
-	constructor(
-		a: number,
-		b: number,
-		c: number,
-		normal?: Vector3,
-		vertexColors?: Color[],
-		materialIndex?: number
-	);
-	constructor(
-		a: number,
-		b: number,
-		c: number,
-		vertexNormals?: Vector3[],
-		color?: Color,
-		materialIndex?: number
-	);
-	constructor(
-		a: number,
-		b: number,
-		c: number,
-		vertexNormals?: Vector3[],
-		vertexColors?: Color[],
-		materialIndex?: number
-	);
-
-	/**
-	 * Vertex A index.
-	 */
-	a: number;
-
-	/**
-	 * Vertex B index.
-	 */
-	b: number;
-
-	/**
-	 * Vertex C index.
-	 */
-	c: number;
-
-	/**
-	 * Face normal.
-	 * @default new THREE.Vector3()
-	 */
-	normal: Vector3;
-
-	/**
-	 * Array of 3 vertex normals.
-	 * @default []
-	 */
-	vertexNormals: Vector3[];
-
-	/**
-	 * Face color.
-	 * @default new THREE.Color()
-	 */
-	color: Color;
-
-	/**
-	 * Array of 3 vertex colors.
-	 * @default []
-	 */
-	vertexColors: Color[];
-
-	/**
-	 * Material index (points to {@link Mesh.material}).
-	 * @default 0
-	 */
-	materialIndex: number;
-
-	clone(): Face3;
-	copy( source: Face3 ): this;
-
-}

+ 0 - 58
src/core/Face3.js

@@ -1,58 +0,0 @@
-import { Color } from '../math/Color.js';
-import { Vector3 } from '../math/Vector3.js';
-
-class Face3 {
-
-	constructor( a, b, c, normal, color, materialIndex = 0 ) {
-
-		this.a = a;
-		this.b = b;
-		this.c = c;
-
-		this.normal = ( normal && normal.isVector3 ) ? normal : new Vector3();
-		this.vertexNormals = Array.isArray( normal ) ? normal : [];
-
-		this.color = ( color && color.isColor ) ? color : new Color();
-		this.vertexColors = Array.isArray( color ) ? color : [];
-
-		this.materialIndex = materialIndex;
-
-	}
-
-	clone() {
-
-		return new this.constructor().copy( this );
-
-	}
-
-	copy( source ) {
-
-		this.a = source.a;
-		this.b = source.b;
-		this.c = source.c;
-
-		this.normal.copy( source.normal );
-		this.color.copy( source.color );
-
-		this.materialIndex = source.materialIndex;
-
-		for ( let i = 0, il = source.vertexNormals.length; i < il; i ++ ) {
-
-			this.vertexNormals[ i ] = source.vertexNormals[ i ].clone();
-
-		}
-
-		for ( let i = 0, il = source.vertexColors.length; i < il; i ++ ) {
-
-			this.vertexColors[ i ] = source.vertexColors[ i ].clone();
-
-		}
-
-		return this;
-
-	}
-
-}
-
-
-export { Face3 };

+ 9 - 2
src/core/Raycaster.d.ts

@@ -1,17 +1,24 @@
 import { Vector3 } from './../math/Vector3';
-import { Face3 } from './Face3';
 import { Object3D } from './Object3D';
 import { Vector2 } from './../math/Vector2';
 import { Ray } from './../math/Ray';
 import { Camera } from './../cameras/Camera';
 import { Layers } from './Layers';
 
+export interface Face {
+	a: number;
+	b: number;
+	c: number;
+	normal: Vector3;
+	materialIndex: number;
+}
+
 export interface Intersection {
 	distance: number;
 	distanceToRay?: number;
 	point: Vector3;
 	index?: number;
-	face?: Face3 | null;
+	face?: Face | null;
 	faceIndex?: number;
 	object: Object3D;
 	uv?: Vector2;

+ 8 - 2
src/objects/Mesh.js

@@ -5,7 +5,6 @@ import { Ray } from '../math/Ray.js';
 import { Matrix4 } from '../math/Matrix4.js';
 import { Object3D } from '../core/Object3D.js';
 import { Triangle } from '../math/Triangle.js';
-import { Face3 } from '../core/Face3.js';
 import { DoubleSide, BackSide } from '../constants.js';
 import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
@@ -401,7 +400,14 @@ function checkBufferGeometryIntersection( object, material, raycaster, ray, posi
 
 		}
 
-		const face = new Face3( a, b, c );
+		const face = {
+			a: a,
+			b: a,
+			c: c,
+			normal: new Vector3(),
+			materialIndex: 0
+		};
+
 		Triangle.getNormal( _vA, _vB, _vC, face.normal );
 
 		intersection.face = face;

+ 0 - 86
test/unit/src/core/Face3.tests.js

@@ -1,86 +0,0 @@
-/* global QUnit */
-
-import { Face3 } from '../../../../src/core/Face3';
-import { Color } from '../../../../src/math/Color';
-import { Vector3 } from '../../../../src/math/Vector3';
-
-export default QUnit.module( 'Core', () => {
-
-	QUnit.module( 'Face3', () => {
-
-		// INSTANCING
-		QUnit.todo( "Instancing", ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-		// PUBLIC STUFF
-		QUnit.test( "copy", ( assert ) => {
-
-			var instance = new Face3( 0, 1, 2, new Vector3( 0, 1, 0 ), new Color( 0.25, 0.5, 0.75 ), 2 );
-			var copiedInstance = new Face3().copy( instance );
-
-			checkCopy( copiedInstance, assert );
-			checkVertexAndColors( copiedInstance, assert );
-
-		} );
-
-		QUnit.test( "copy (more)", ( assert ) => {
-
-			var instance = new Face3( 0, 1, 2,
-				[ new Vector3( 0, 1, 0 ), new Vector3( 1, 0, 1 ) ],
-				[ new Color( 0.25, 0.5, 0.75 ), new Color( 1, 0, 0.4 ) ],
-				2 );
-			var copiedInstance = new Face3().copy( instance );
-
-			checkCopy( copiedInstance, assert );
-			checkVertexAndColorArrays( copiedInstance, assert );
-
-		} );
-
-		QUnit.test( "clone", ( assert ) => {
-
-			var instance = new Face3( 0, 1, 2, new Vector3( 0, 1, 0 ), new Color( 0.25, 0.5, 0.75 ), 2 );
-			var copiedInstance = instance.clone();
-
-			checkCopy( copiedInstance, assert );
-			checkVertexAndColors( copiedInstance, assert );
-
-		} );
-
-		function checkCopy( copiedInstance, assert ) {
-
-			assert.ok( copiedInstance instanceof Face3, "copy created the correct type" );
-			assert.ok(
-				copiedInstance.a === 0 &&
-				copiedInstance.b === 1 &&
-				copiedInstance.c === 2 &&
-				copiedInstance.materialIndex === 2
-				, "properties where copied" );
-
-		}
-
-		function checkVertexAndColors( copiedInstance, assert ) {
-
-			assert.ok(
-				copiedInstance.normal.x === 0 && copiedInstance.normal.y === 1 && copiedInstance.normal.z === 0 &&
-				copiedInstance.color.r === 0.25 && copiedInstance.color.g === 0.5 && copiedInstance.color.b === 0.75
-				, "properties where copied" );
-
-		}
-
-		function checkVertexAndColorArrays( copiedInstance, assert ) {
-
-			assert.ok(
-				copiedInstance.vertexNormals[ 0 ].x === 0 && copiedInstance.vertexNormals[ 0 ].y === 1 && copiedInstance.vertexNormals[ 0 ].z === 0 &&
-				copiedInstance.vertexNormals[ 1 ].x === 1 && copiedInstance.vertexNormals[ 1 ].y === 0 && copiedInstance.vertexNormals[ 1 ].z === 1 &&
-				copiedInstance.vertexColors[ 0 ].r === 0.25 && copiedInstance.vertexColors[ 0 ].g === 0.5 && copiedInstance.vertexColors[ 0 ].b === 0.75 &&
-				copiedInstance.vertexColors[ 1 ].r === 1 && copiedInstance.vertexColors[ 1 ].g === 0 && copiedInstance.vertexColors[ 1 ].b === 0.4
-				, "properties where copied" );
-
-		}
-
-	} );
-
-} );

+ 0 - 1
test/unit/three.source.unit.js

@@ -48,7 +48,6 @@ import './src/core/BufferAttribute.tests';
 import './src/core/BufferGeometry.tests';
 import './src/core/Clock.tests';
 import './src/core/EventDispatcher.tests';
-import './src/core/Face3.tests';
 import './src/core/InstancedBufferAttribute.tests';
 import './src/core/InstancedBufferGeometry.tests';
 import './src/core/InstancedInterleavedBuffer.tests';