Skip to content

API Class Plane

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

Class: Plane

Defined in: src/engine/core/geometry.ts:31

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/geometry.ts:35

Parameters

normal?

Vec3Input = ...

distance?

number = 0

Returns

Plane

Properties

distance

distance: number;

Defined in: src/engine/core/geometry.ts:33


normal

readonly normal: Vector3;

Defined in: src/engine/core/geometry.ts:32

Methods

distanceToPoint()

distanceToPoint(point): number;

Defined in: src/engine/core/geometry.ts:46

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/geometry.ts:51

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/geometry.ts:40

Parameters

normal

Vec3Input

point

Vec3Input

Returns

Plane

Clone this wiki locally