From 096fb1626ae022159e3673a0c6875b12faa7dd3e Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Thu, 14 Dec 2023 20:22:52 -0500 Subject: [PATCH] Triangle: Return null in getBarycoord() if the triangle is degenerated. (#707) --- types/three/src/math/Triangle.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/three/src/math/Triangle.d.ts b/types/three/src/math/Triangle.d.ts index e22aac17a..f790ace10 100644 --- a/types/three/src/math/Triangle.d.ts +++ b/types/three/src/math/Triangle.d.ts @@ -54,7 +54,7 @@ export class Triangle { equals(triangle: Triangle): boolean; static getNormal(a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3; - static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3; + static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3 | null; static containsPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3): boolean; /** * @deprecated THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().