Skip to main content

@novorender/web_app / Matrices

Interface: Matrices

A helper object for computing transformation matrices between spaces on demand.

Methods

getMatrix()

getMatrix(from, to): ReadonlyMat4

Return a 4x4 matrix for transforming coordinate from one space to another.

Parameters

ParameterTypeDescription
fromCoordSpaceThe original space.
toCoordSpaceThe destination space.

Returns

ReadonlyMat4

Defined in

@novorender/core3d/state/index.ts:154


getMatrixNormal()

getMatrixNormal(from, to): ReadonlyMat3

Return a 3X3 matrix for transforming normals from one space to another.

Parameters

ParameterTypeDescription
fromCoordSpaceThe original space.
toCoordSpaceThe destination space.

Returns

ReadonlyMat3

Remarks

Normals has to be normalized after transformation.

Defined in

@novorender/core3d/state/index.ts:163