Skip to Content
Bear documentation

Assembly

Import from bear/engine/Assembly.

Interfaces

AssemblyProps

Defined in: bear/engine/Assembly.ts:7

Extended by

Indexable

[key: string]: unknown

Properties

PropertyTypeDescription
context?ContextMap-
hosts?HostedChildrenTyped declarations from descendants, used to build additional children.
label?string-
name?string-
refs?Readonly<Record<string, Surface>>Named reference planes this assembly publishes, in its local frame.
transform?TransformMatrixThis assembly's pose in its parent frame.

Variables

Assembly

const Assembly: PartDef<AssemblyProps, string, string>;

Defined in: bear/engine/Assembly.ts:34

Assembly — the generic host element for the Bear engine tree.

Like <div> in React: it creates a node in the tree and stores whatever props you give it. Assembly functions (plain functions) are transparent — they don't create nodes. If you want a node, return an <Assembly>.

Everything an assembly states about itself is a prop, decided in the function body from data: its pose (transform), the reference planes it publishes (refs), the context it provides. It spans its children.

<Assembly name="Wall" transform={pose} refs={{ coreExt, coreInt }}>

On this page