tsParticles - v0.0.0
    Preparing search index...
    • decodes a GIF into its components for rendering on a canvas

      Parameters

      • gifURL: string

        the URL of a GIF file

      • canvasSettings: CanvasRenderingContext2DSettings

        settings for the canvas used to render the GIF frames

      • OptionalprogressCallback: GIFProgressCallbackFunction

        [optional] callback for showing progress of decoding process (when GIF is interlaced calls after each pass (4x on the same frame))

      • OptionalavgAlpha: boolean

        [optional] if this is true then, when encountering a transparent pixel, it uses the average value of the pixels RGB channels to calculate the alpha channels value, otherwise alpha channel is either 0 or 1 - default false

      Returns Promise<GIF>

      the GIF with each frame decoded separately