tsParticles - v0.0.0
    Preparing search index...

    Canvas manager

    Index

    Constructors

    Properties

    element?: HTMLCanvasElement

    The particles canvas

    The particles canvas dimension

    Accessors

    • get settings(): CanvasRenderingContext2DSettings | undefined

      Returns CanvasRenderingContext2DSettings | undefined

    Methods

    • Generic draw method for drawing stuff on the canvas context

      Type Parameters

      • T

      Parameters

      • cb: (context: CanvasRenderingContext2D) => T

      Returns T | undefined

      the result of the callback

    • Draws stuff using the given plugin, using the given particle

      Parameters

      • particle: Particle

        the particle used

      • delta: IDelta

        the frame delta time values

      Returns void

    • Initializes the canvas background

      Returns void

    • Initializes the plugins needed by canvas

      Returns void

    • Initializes the updaters needed by canvas

      Returns void

    • Loads the canvas HTML element

      Parameters

      • canvas: HTMLCanvasElement

        the canvas HTML element

      Returns void

    • Parameters

      • OptionalbaseColor: string

      Returns void

    • Parameters

      • image: HTMLImageElement
      • opacity: number

      Returns void

    • Calculates the size of the canvas

      Returns boolean

      true if the size changed

    • Parameters

      • type: string

      Returns void

    • The window resize event handler

      Returns Promise<void>