AutoMovie API
    Preparing search index...

    Bake a supplied height callback into a row-major terrain lattice.

    type IInput = {
        columns: number;
        height: (point: { x: number; z: number }) => number;
        id: string;
        origin: { x: number; z: number };
        polygon: { x: number; z: number }[];
        rows: number;
        spacing: { x: number; z: number };
        walkable: boolean;
    }
    Index
    columns: number

    Safe integer at least two. Each row contains this many samples; the product with rows has no separate allocation budget here.

    height: (point: { x: number; z: number }) => number

    Called once at each lattice point in row-major order; return finite world Y in metres. Nonfinite return throws, and exceptions propagate without retry. Purity is required for deterministic baking but not enforced.

    id: string

    Surface identity containing non-whitespace text; worldHeightfield rejects blank input and preserves the original spelling.

    origin: { x: number; z: number }

    Finite world XZ position of lattice column zero, row zero. The constructor checks both coordinates before invoking height.

    Type Declaration

    • x: number

      World X in metres at column zero.

    • z: number

      World Z in metres at row zero.

    polygon: { x: number; z: number }[]

    World XZ footprint in metres, cloned into the returned surface. This constructor does not admit polygon geometry; downstream world validation owns footprint validity.

    Type Declaration

    • x: number

      World X coordinate in metres for this footprint vertex.

    • z: number

      World Z coordinate in metres for this footprint vertex.

    rows: number

    Safe integer at least two. Rows are sampled in increasing positive-Z order, with columns increasing inside each row.

    spacing: { x: number; z: number }

    Strictly positive finite axis pitches in metres. Individually admitted pitches and dimensions do not guarantee representable derived coordinates.

    Type Declaration

    • x: number

      Metres per column in the positive world X direction.

    • z: number

      Metres per row in the positive world Z direction.

    walkable: boolean

    Authored support permission copied unchanged to the surface; lattice slope does not infer or override it.