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

Merge pull request #17786 from ikrong/dev

THREE.Triangle: .getPlane() needs a Plane as a target
Michael Herzog 5 жил өмнө
parent
commit
e54a068756

+ 1 - 1
docs/api/en/math/Triangle.html

@@ -109,7 +109,7 @@
 
 		<h3>[method:Plane getPlane]( [param:Plane target] )</h3>
 		<p>
-		[page:Vector3 target] — the result will be copied into this Plane.<br /><br />
+		[page:Plane target] — the result will be copied into this Plane.<br /><br />
 
 		Calculate a [page:Plane plane] based on the triangle. .
 		</p>

+ 1 - 1
docs/api/zh/math/Triangle.html

@@ -106,7 +106,7 @@
 
 		<h3>[method:Plane getPlane]( [param:Plane target] )</h3>
 		<p>
-		[page:Vector3 target] — 结果将会被拷贝到这一Plane中。<br /><br />
+		[page:Plane target] — 结果将会被拷贝到这一Plane中。<br /><br />
 
 		基于三角形计算出一个平面([page:Plane plane])。
 		</p>

+ 1 - 1
src/math/Triangle.d.ts

@@ -29,7 +29,7 @@ export class Triangle {
 	getArea(): number;
 	getMidpoint( target: Vector3 ): Vector3;
 	getNormal( target: Vector3 ): Vector3;
-	getPlane( target: Vector3 ): Plane;
+	getPlane( target: Plane ): Plane;
 	getBarycoord( point: Vector3, target: Vector3 ): Vector3;
 	getUV( point: Vector3, uv1: Vector2, uv2: Vector2, uv3: Vector2, target: Vector2 ): Vector2;
 	containsPoint( point: Vector3 ): boolean;

+ 2 - 1
src/math/Triangle.js

@@ -1,4 +1,5 @@
 import { Vector3 } from './Vector3.js';
+import { Plane } from './Plane.js';
 
 /**
  * @author bhouston / http://clara.io
@@ -196,7 +197,7 @@ Object.assign( Triangle.prototype, {
 		if ( target === undefined ) {
 
 			console.warn( 'THREE.Triangle: .getPlane() target is now required' );
-			target = new Vector3();
+			target = new Plane();
 
 		}