Interface TerrainRendererOptions

Construction options for TerrainRenderer.

interface TerrainRendererOptions {
    bitmap: ChunkedBitmap;
    materials: MaterialRegistry;
    scene: Scene;
    textureKeyPrefix?: string;
    x?: number;
    y?: number;
}

Properties

The bitmap to render.

materials: MaterialRegistry

Material registry the bitmap shares (used for color lookup).

scene: Scene

The Phaser scene that owns the visual game objects.

textureKeyPrefix?: string

Texture-key prefix. Each chunk's canvas texture is keyed ${prefix}-${cx}-${cy}. Defaults to a unique random token.

x?: number

World x/y to position the rendered terrain at. Defaults to (0, 0).

y?: number

World y.