Skip to Content
Bear documentation

solve

Import from bear/engine/solve.

Interfaces

Solved

Defined in: bear/engine/solve.ts:150

What solve produces for one pass.

Properties

PropertyTypeDescription
bindingsMap<string, Record<string, Vec2>>The input to the next render pass.
constraintsreadonly ResolvedConstraint[]-
diagnosticsreadonly Diagnostic[]-

Variables

SOLVE_EPSILON

const SOLVE_EPSILON: 1 = 1;

Defined in: bear/engine/solve.ts:92

Residuals under one project unit (1/32") are noise, not findings.

Functions

describeDim()

function describeDim(eff): string;

Defined in: bear/engine/solve.ts:1300

One line naming a dim: endpoints and axis.

Parameters

ParameterType
effEffectiveDim

Returns

string


solve()

function solve(
   root, 
   map, 
   instances?, 
   previous?
): Solved;

Defined in: bear/engine/solve.ts:158

Run the solve phase: a pure function of the finished tree.

Parameters

ParameterTypeDefault value
rootTreeNodeundefined
mapElementMapundefined
instances?readonly SolvableInstance[][]
previous?SolvedBindingsundefined

Returns

Solved

On this page