Hierarchy

  • Plugins

Constructors

  • The constructor of the plugin manager

    Parameters

    • engine: Engine

      the parent engine

    Returns Plugins

Properties

#engine: Engine

The engine used for registering plugins

drawers: Map<string, IShapeDrawer>

The drawers (additional shapes) array

interactors: Map<Container, IInteractor[]>

The interaction managers array

interactorsInitializers: Map<string, InteractorInitializer>

The interaction manager initializers array

movers: Map<Container, IParticleMover[]>
moversInitializers: Map<string, MoverInitializer>
pathGenerators: Map<string, IMovePathGenerator>

The path generators array

plugins: IPlugin[]

The plugins array

presets: Map<string, RecursivePartial<IOptions>>

The presets array

updaters: Map<Container, IParticleUpdater[]>

The updaters array

updatersInitializers: Map<string, UpdaterInitializer>

The updater initializers array

Methods

  • Adds a path generator to the current collection

    Parameters

    • type: string

      the type used as a key in the collection

    • pathGenerator: IMovePathGenerator

      the path generator to add

    Returns void

  • Adds a plugin to the plugin system, if the plugin already exists, is not added

    Parameters

    • plugin: IPlugin

      the plugin to add

    Returns void

  • Adds a preset to the existing collection

    Parameters

    • presetKey: string

      the preset name

    • options: RecursivePartial<IOptions>

      the options to load with the preset name

    • override: boolean = false

      if true, overwrites the existing preset

    Returns void

  • Adds a shape drawer (additional particle shape) to the current collection

    Parameters

    • type: string

      the shape drawer type (particle shape name)

    • drawer: IShapeDrawer

      the shape drawer

    Returns void

  • Gets all the available plugins, for the specified container

    Returns

    a map containing all enabled plugins, with the id as a key

    Parameters

    • container: Container

      the container used to check which are the valid plugins

    Returns Map<string, IContainerPlugin>

  • Returns all the container interaction managers

    Returns

    the array of interaction managers for the given container

    Parameters

    • container: Container

      the container used to check which interaction managers are compatible

    • force: boolean = false

      if true reloads the interaction managers collection for the given container

    Returns IInteractor[]

  • Searches the path generator with the given type name

    Returns

    the path generator if found, or undefined

    Parameters

    • type: string

      the path generator type to search

    Returns undefined | IMovePathGenerator

  • Searches if the specified plugin exists and returns it

    Returns

    the plugin if found, or undefined

    Parameters

    • plugin: string

      the plugin name

    Returns undefined | IPlugin

  • Searches the preset with the given name

    Returns

    the preset if found, or undefined

    Parameters

    • preset: string

      the preset name to search

    Returns undefined | RecursivePartial<IOptions>

  • Searches the given shape drawer type with the given type name

    Returns

    the shape drawer if found, or undefined

    Parameters

    • type: string

      the shape drawer type name

    Returns undefined | IShapeDrawer

  • This method returns all the supported shapes with this Plugins instance

    Returns

    all the supported shapes type name

    Returns IterableIterator<string>

  • Returns all the container particle updaters

    Returns

    the array of updaters for the given container

    Parameters

    • container: Container

      the container used to check which particle updaters are enabled

    • force: boolean = false

      if true reloads the updater collection for the given container

    Returns IParticleUpdater[]