Documentation - v20.0.0-dev
    Preparing search index...

    Draws the image of a sprite (see TextureOption) to a canvas: the engine's TextureImage, keyed by its url and text, so that the sprites showing the same share it. An image the engine holds already is neither loaded nor drawn again.

    Index

    Constructors

    Methods

    • The image of option, once its url is loaded.

      Parameters

      Returns Promise<TextureImage>

      Without an image url nor a text.

    • Gives the sprite the image of option: at once when the engine holds it (neither loaded nor drawn again), else once drawn (draw).

      Parameters

      Returns Promise<void>

      Without an image url nor a text, or when its url cannot be loaded.

    • An image of 1 pixel, transparent: a sprite's until its own is drawn.

      Returns TextureImage