@ujjwalvivek/tinyts
    Preparing search index...

    Interface TileDef

    Configuration definition for a tile type.

    interface TileDef {
        color?: string;
        friction?: number;
        mask?: number;
        oneWay?: boolean;
        restitution?: number;
        solid?: boolean;
        spawn?: string;
        sprite?: number;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown
    Index

    Properties

    color?: string

    Color for debug rendering.

    friction?: number

    Friction coefficient in [0, 1]. 0 = no friction, 1 = full stop on contact.

    mask?: number

    Bitmask for collision layer filtering. Only checked when solid is true.

    oneWay?: boolean

    If true, this tile acts as a one-way platform - bodies can jump through from below but stand on top.

    restitution?: number

    Bounce coefficient in [0, 1]. 0 = no bounce, 1 = perfect bounce.

    solid?: boolean

    Whether the tile blocks movement.

    spawn?: string

    Spawn point name.

    sprite?: number

    Sprite index.