Skip to content

Intermact API Reference / @intermact/core / AnimationCompiler

Interface: AnimationCompiler ​

Defined in: packages/core/src/animation/track.ts:128

A plugin-registered compiler turning a custom AnimationSpec into seekable tracks (design.md §18). Registered under a type key in the animations registry; invoked by compileSpec when it meets a matching custom spec. The result must be pure/seekable like every built-in track.

Properties ​

describe? ​

readonly optional describe?: string

Defined in: packages/core/src/animation/track.ts:130

Optional human-readable summary for tooling.

Methods ​

compile() ​

compile(spec, ctx): CompileResult

Defined in: packages/core/src/animation/track.ts:132

Compile spec at ctx.startTime into tracks/signal-tracks/effects.

Parameters ​

spec ​
duration ​

number

kind ​

"custom"

Plugin-supplied animation (design.md §18). Compiled by an AnimationCompiler registered under type in the animations registry; carries only serializable params so it round-trips through serialize.

params? ​

unknown

targetId? ​

string

type ​

string

ctx ​

CustomAnimationContext

Returns ​

CompileResult

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