dacha
    Preparing search index...

    Class Assets

    The project assets. Systems get it in options.assets.

    The engine creates an Asset for every entry in assets of the configuration.

    const texture = this.assets.get(TEXTURE_ID, Texture);
    
    Index
    • Returns an asset by its id.

      Parameters

      • id: string

      Returns Asset

      Error If there is no asset with this id.

    • Returns an asset by its id and checks its class.

      Type Parameters

      Parameters

      Returns T

      Error If there is no asset with this id, or it is not an instance of assetClass.

    • Checks if there is an asset with this id.

      Parameters

      • id: string

      Returns boolean