TexturePacker | Babylon.js API documentation

API
Babylon.js API documentation
    Preparing search index...

    Class TexturePacker

    This is a support class that generates a series of packed texture sets.

    Index

    The Container array for the frames that are generated

    meshes: AbstractMesh[]

    The Meshes to target

    name: string

    The Name of the Texture Package

    Arguments passed with the Constructor

    promise: Nullable<Promise<string | TexturePacker>>

    The promise that is started upon initialization

    scene: Scene

    The scene scope of the TexturePacker

    sets: object

    The Container object for the channel sets that are generated

    LAYOUT_COLNUM: 2

    Packer Layout Constant 2

    LAYOUT_POWER2: 1

    Packer Layout Constant 1

    LAYOUT_STRIP: 0

    Packer Layout Constant 0

    SUBUV_COLOR: 2

    Packer Layout Constant 2

    SUBUV_EXTEND: 1

    Packer Layout Constant 1

    SUBUV_WRAP: 0

    Packer Layout Constant 0

    • Starts the download process for all the channels converting them to base64 data and embedding it all in a JSON file.

      Parameters

      • imageType: string = "png"

        is the image type to use.

      • quality: number = 1

        of the image if downloading as jpeg, Ranges from >0 to 1.

      Returns void

    Starts the async promise to compile the texture packer.

    Returns Promise<void>

    Promise