Skip to content

Intermact API Reference / @intermact/core / CA2DSpec

Interface: CA2DSpec

Defined in: packages/core/src/pcg/cellular-automaton.ts:36

Spec for a 2D life-like cellular automaton.

Properties

cellSize?

readonly optional cellSize?: number

Defined in: packages/core/src/pcg/cellular-automaton.ts:46

Cell size in world units (default 0.1).


height

readonly height: number

Defined in: packages/core/src/pcg/cellular-automaton.ts:39


init?

readonly optional init?: readonly number[] | { density: number; }

Defined in: packages/core/src/pcg/cellular-automaton.ts:43

Initial grid: explicit cells (row-major) or random fill ratio (needs rng).


kind

readonly kind: "2d"

Defined in: packages/core/src/pcg/cellular-automaton.ts:37


origin?

readonly optional origin?: AbsXY

Defined in: packages/core/src/pcg/cellular-automaton.ts:47


rng?

readonly optional rng?: Rng

Defined in: packages/core/src/pcg/cellular-automaton.ts:44


steps

readonly steps: number

Defined in: packages/core/src/pcg/cellular-automaton.ts:41

Number of evolution steps applied before rendering.


style?

readonly optional style?: ObjectStyle

Defined in: packages/core/src/pcg/cellular-automaton.ts:48


width

readonly width: number

Defined in: packages/core/src/pcg/cellular-automaton.ts:38

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