Skip to Content
Bear documentation

mate

Import from bear/engine/mate.

Interfaces

Hosted

Defined in: bear/engine/mate.ts:32

A hosted part: its host's faces it reads, each the named ref of the nearest enclosing element of a component, and its own planes laid on them. The faces land in the part's resolved; the planes pose it when nothing authored a transform.

Type Parameters

Type ParameterDefault type
PRecord<string, unknown>

Properties

PropertyType
facesReadonly<Record<string, readonly [host: (props) => unknown, ref: string]>>
mates(props, resolved) => readonly (Omit<Mate, "on"> & object)[]

Mate

Defined in: bear/engine/mate.ts:18

One of a part's planes, in its own frame, and the surface it lies on.

Properties

PropertyTypeDescription
center?booleanA center plane: it places the part along its normal but doesn't turn it.
normalVector3-
onSurface-
pointVector3-

Functions

mate()

function mate(mates): TransformMatrix;

Defined in: bear/engine/mate.ts:46

The pose (in the targets' frame) that lays every plane on its target.

Parameters

ParameterType
matesreadonly Mate[]

Returns

TransformMatrix

On this page