tsParticles - v4.0.0-beta.12
    Preparing search index...

    Canvas manager

    Index

    Constructors

    Properties

    domElement?: HTMLCanvasElement

    The source DOM canvas element, if available.

    The render manager

    renderCanvas?: OffscreenCanvas

    The canvas used for rendering and as source for the 2D context. This is an OffscreenCanvas when a DOM canvas is provided.

    The particles canvas dimension

    zoom: number = defaultZoom

    Current zoom level

    Methods

    • Calculates the size of the canvas

      Returns boolean

      true if the size changed

    • Sets the pointer events style on the canvas

      Parameters

      • type: string

        The pointer-events value to apply.

      Returns void

    • Sets the zoom level and center point

      Parameters

      • zoomLevel: number

        the new zoom level

      • Optionalcenter: ICoordinates

        optional center point for zoom (default is canvas center)

      Returns void