Skip to content

Intermact API Reference / @intermact/core / LayoutHandle

Interface: LayoutHandle

Defined in: packages/core/src/scene/layout.ts:21

RectTransform-/Manim-style layout (design.md §9.4). LayoutHandle methods compute target transforms from world-space bounds and return Animation handles (duration: 0 ⇒ instant; play/commit to apply). They also commit the new authoring transform so subsequent getBounds/layout calls chain deterministically within the build pass.

Methods

alignTo()

alignTo(point, opts?): Animation

Defined in: packages/core/src/scene/layout.ts:25

Place the object's anchor (self-bounds UV, default center) at a world point.

Parameters

point

AbsXY

opts?

AlignOptions

Returns

Animation


arrange()

arrange(children, opts?): Animation

Defined in: packages/core/src/scene/layout.ts:31

Arrange children in a row/column/grid; returns a parallel Animation.

Parameters

children

readonly LayoutTargetLike[]

opts?

ArrangeOptions

Returns

Animation


fitTo()

fitTo(bounds, opts?): Animation

Defined in: packages/core/src/scene/layout.ts:29

Scale (uniform) + center so the object fits within bounds.

Parameters

bounds

Bounds2D

opts?

FitOptions

Returns

Animation


getBounds()

getBounds(): Bounds2D

Defined in: packages/core/src/scene/layout.ts:23

World-space axis-aligned bounds (parents composed).

Returns

Bounds2D


nextTo()

nextTo(target, direction, opts?): Animation

Defined in: packages/core/src/scene/layout.ts:27

Position adjacent to another object along direction (e.g. [1,0] = right).

Parameters

target

LayoutTargetLike

direction

Vec2

opts?

NextToOptions

Returns

Animation

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)