dacha
    Preparing search index...

    Class BitmapFont

    Bitmap font asset. Points to a font descriptor file. Its MediaAsset.resource is a pixi.js bitmap font.

    A loaded font stays loaded until the game ends.

    Hierarchy (View Summary)

    Index
    id: string

    Unique identifier of the asset

    name: string

    Name of the asset

    src: string

    Path to the font descriptor file

    assetName: string

    The name the configuration uses for the asset kind, such as texture.

    DefineAsset sets it, so a game usually does not assign it.

    • get resource(): R | undefined

      The loaded resource, or undefined while it is not loaded.

      Returns R | undefined

    • Frees what the resource holds, such as GPU memory. Optional.

      Parameters

      • resource: BitmapFont

      Returns void

    • Fetches the file and returns the resource.

      Returns Promise<BitmapFont>