dacha
    Preparing search index...

    Class Texture

    Texture asset. Points to an image file. Its MediaAsset.resource is a pixi.js texture.

    Hierarchy (View Summary)

    Index

    How the texture is sampled when it is scaled

    id: string

    Unique identifier of the asset

    name: string

    Name of the asset

    src: string

    Path to the image file

    What the texture gives outside its image

    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: Texture

      Returns void

    • Fetches the file and returns the resource.

      Returns Promise<Texture<TextureSource<any>>>