Hierarchy

  • Plugins

Constructors

Properties

_engine: Engine

The engine used for registering plugins

_initializers: Initializers
drawers: Map<string, IShapeDrawer>

The drawers (additional shapes) array

interactors: Map<Container, IInteractor[]>

The interaction managers array

movers: Map<Container, IParticleMover[]>
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

Methods

  • Adds an interaction manager to the current collection

    Parameters

    • name: string

      the interaction manager name

    • initInteractor: InteractorInitializer

      the interaction manager initializer

    Returns void

  • Parameters

    • name: string
    • initMover: MoverInitializer

    Returns void

  • Adds a particle updater to the collection

    Parameters

    • name: string

      the particle updater name used as a key

    • initUpdater: UpdaterInitializer

      the particle updater initializer

    Returns void

  • 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

    Returns void

  • Gets all the available plugins, for the specified container

    Parameters

    • container: Container

      the container used to check which are the valid plugins

    Returns Map<string, IContainerPlugin>

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

  • Returns all the container interaction managers

    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[]

    the array of interaction managers for the given container

  • Searches if the specified plugin exists and returns it

    Parameters

    • plugin: string

      the plugin name

    Returns undefined | IPlugin

    the plugin if found, or undefined

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

    Parameters

    • type: string

      the shape drawer type name

    Returns undefined | IShapeDrawer

    the shape drawer if found, or undefined

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

    Returns IterableIterator<string>

    all the supported shapes type name

  • Returns all the container particle updaters

    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[]

    the array of updaters for the given container