Rapid Render API
    Preparing search index...

    Class TextureManager

    Manages texture loading, caching, and creation.

    Index

    Constructors

    Methods

    • Destroys a texture and potentially removes its BaseTexture from the cache. If a Texture instance is provided, it decrements the reference count of the BaseTexture. The BaseTexture will only be destroyed if its reference count drops to 0, or if force is true.

      Parameters

      • textureOrUrl: string | BaseTexture | Texture

        The texture instance, base texture, or cache key (URL) to destroy.

      • force: boolean = false

        If true, destroys the underlying BaseTexture immediately regardless of reference count.

      Returns void

    • Destroys all cached textures and clears the cache, ignoring reference counts.

      Returns void

    • Asynchronously loads a texture from a URL.

      Parameters

      • url: string

        The image URL to load.

      • Optionaloptions: ITextureOptions

        Optional configuration for the texture.

      Returns Promise<Texture>

      A promise that resolves to the loaded Texture.