konfeti - v0.6.0
    Preparing search index...

    Function loadImage

    • Preload Image by URL. Uses the same cache as image / spritesheet shapes, so firing afterwards draws immediately.

      Parameters

      • url: string

        Image URL

      Returns Promise<HTMLImageElement>

      Promise Resolving with the Loaded Image

      await loadImage("/coin.png");
      Konfeti.fire({ shapes: [{ type: "image", src: "/coin.png" }] });