JSM Developer API Documentation
    Preparing search index...

    Interface PreBlock

    A PreBlock is what must be provided to the Game.registerBlock function. Do not use a PreBlock for mutating the level, instead use the Block returned by the Game.registerBlock function.

    interface PreBlock {
        identifier: string;
        name: string;
        texture: PixelArray;
    }
    Index

    Properties

    identifier: string

    The identifier of the block.

    The identifier must only have lowercase letters and underscores.

    name: string

    The human-readable name of the block.

    This is the name that will be shown to users.

    texture: PixelArray

    The block's texture on all sides.

    This texture must be 16 by 16 pixels.