API referenceEngine
materialize
Import from bear/engine/materialize.
Interfaces
MaterializeOptions
Defined in: bear/engine/materialize.ts:23
Properties
| Property | Type | Description |
|---|---|---|
logger? | DiagnosticsLogger | Sink for materialize diagnostics. Defaults to the console. |
shapes? | ShapeCache | Where keyed loads are kept across builds. Without one, a shape is still loaded once for this model, and kept no longer than the call. |
Functions
materialize()
function materialize(element, options?): Promise<Model>;Defined in: bear/engine/materialize.ts:55
Runs collect → relations → solve to a fixed point: the solver's anchor bindings are the only cross-pass input, so stable bindings imply a stable tree. Each pass is a value; geometry is built once, for the converged tree, and only that result is ever observable.
The pipeline is synchronous except for fetching loaded solids, which happens between convergence and geometry. Every Manifold and CrossSection made along the way belongs to this call: intermediates are freed before it returns, and the model's solids when the caller disposes the model.
Parameters
| Parameter | Type |
|---|---|
element | BearElement |
options? | MaterializeOptions |
Returns
Promise<Model>