Skip to content

Intermact API Reference / @intermact/core / CA1DSpec

Interface: CA1DSpec ​

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

Spec for a 1D elementary cellular automaton.

Properties ​

cellSize? ​

readonly optional cellSize?: number

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

Cell size in world units (default 0.1).


generations ​

readonly generations: number

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

Number of generations (rows) to evolve.


init? ​

readonly optional init?: readonly number[] | "single" | "random"

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

Initial row: explicit cells, a single centered cell, or random (needs rng).


kind ​

readonly kind: "1d"

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


origin? ​

readonly optional origin?: AbsXY

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

Top-left origin (default [0,0]); rows grow downward.


rng? ​

readonly optional rng?: Rng

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


rule ​

readonly rule: number

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

Wolfram rule number 0–255.


style? ​

readonly optional style?: ObjectStyle

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


width ​

readonly width: number

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

Number of cells per row.

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