API referenceEngine
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
Properties
| Property | Type |
|---|---|
faces | Readonly<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
| Property | Type | Description |
|---|---|---|
center? | boolean | A center plane: it places the part along its normal but doesn't turn it. |
normal | Vector3 | - |
on | Surface | - |
point | Vector3 | - |
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
| Parameter | Type |
|---|---|
mates | readonly Mate[] |