Skip to content

API Class Plane

github-actions[bot] edited this page Nov 28, 2026 · 3 revisions

Class: Plane

Defined in: src/engine/core/math.ts:256

An infinite plane (ADR 0073): the points p where normal . p + distance = 0, like Unity's Plane. normal is kept normalized; distance is the signed distance from the origin to the plane, measured against the normal (Plane.fromNormalAndPoint(up, [0, 2, 0]) has distance -2).

Constructors

Constructor

new Plane(normal?, distance?): Plane;

Defined in: src/engine/core/math.ts:260

Parameters

normal?

Vec3Input = ...

distance?

number = 0

Returns

Plane

Properties

distance

distance: number;

Defined in: src/engine/core/math.ts:258


normal

readonly normal: Vector3;

Defined in: src/engine/core/math.ts:257

Methods

distanceToPoint()

distanceToPoint(point): number;

Defined in: src/engine/core/math.ts:271

Signed distance from the plane to point: positive on the side the normal faces.

Parameters

point

Vec3Like

Returns

number


raycast()

raycast(ray): number | null;

Defined in: src/engine/core/math.ts:276

The distance along ray to the plane, or null if the ray is parallel to it or points away.

Parameters

ray

Ray

Returns

number | null


fromNormalAndPoint()

static fromNormalAndPoint(normal, point): Plane;

Defined in: src/engine/core/math.ts:265

Parameters

normal

Vec3Input

point

Vec3Input

Returns

Plane

Clone this wiki locally