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

    Stores and resolves plugins, shapes, effects, palettes and updaters.

    Index

    Constructors

    Properties

    colorManagers: Map<string, IColorManager> = ...

    The color managers map

    easingFunctions: Map<EasingTypeAlt | EasingType, EasingFunction> = ...

    The easing functions map

    effectDrawers: Map<Container, Map<string, IEffectDrawer<Particle>>> = ...

    The drawers (additional effects) array

    initializers: Initializers = ...

    The initializers map

    palettes: Map<string, IPalette> = ...

    The palettes map

    plugins: IPlugin[] = []

    The plugins array

    presets: Map<string, RecursivePartial<IOptions>> = ...

    The presets map

    shapeDrawers: Map<Container, Map<string, IShapeDrawer<Particle>>> = ...

    The drawers (additional shapes) array

    updaters: Map<Container, IParticleUpdater[]> = ...

    The updaters array

    Accessors

    Methods

    • addEffect adds effect to tsParticles, it will be available to all future instances created

      Parameters

      • effect: string

        the effect name

      • drawer: EffectInitializer

        the effect drawer function or class instance that draws the effect in the canvas

      Returns void

    • addPreset adds preset to tsParticles, it will be available to all future instances created

      Parameters

      • preset: string

        the preset name

      • options: Readonly<ISourceOptions>

        the options to add to the preset

      • override: boolean = false

        if true, the preset will override any existing with the same name

      Returns void

    • addShape adds shape to tsParticles, it will be available to all future instances created

      Parameters

      • shapes: string[]

        the shape names to add, it can be a single shape or an array of shapes

      • drawer: ShapeInitializer

        the shape drawer function or class instance that draws the shape in the canvas

      Returns void

    • Searches if the specified plugin exists and returns it

      Parameters

      • plugin: string

        the plugin name

      Returns IPlugin | undefined

      the plugin if found, or undefined