Private
Readonly
_configsPrivate
Readonly
_domContains all the Container instances of the current engine instance
Private
Readonly
_eventPrivate
_initializedChecks if the engine instance is initialized
Private
Readonly
Internal
_loaderContains the Loader engine instance
Readonly
pluginsContains the Plugins engine instance
Optional
config: RecursivePartial<IOptions>Adds a listener to the specified event
The event to listen to
The listener of the specified event
addPathGenerator adds a named path generator to tsParticles, this can be called by options
the path generator name
the path generator object
addPreset adds preset to tsParticles, it will be available to all future instances created
the preset name
the options to add to the preset
if true, the preset will override any existing with the same name
addShape adds shape to tsParticles, it will be available to all future instances created
the shape name
the shape drawer function or class instance that draws the shape in the canvas
Optional
init: ShapeDrawerInitFunctionOptional: the shape drawer init function, used only if the drawer parameter is a function
Optional
afterEffect: ShapeDrawerAfterEffectFunctionOptional: the shape drawer after effect function, used only if the drawer parameter is a function
Optional
destroy: ShapeDrawerDestroyFunctionOptional: the shape drawer destroy function, used only if the drawer parameter is a function
Dispatches an event that will be listened from listeners
The event to dispatch
The event parameters
Loads the provided options to create a Container object.
The particles container element id
Optional
options: SingleOrMultiple<RecursivePartial<IOptions>>The options object to initialize the Container
A Promise with the Container object created
Loads an options object from the provided array to create a Container object.
The particles container element id
The options array to get the item from
Optional
index: numberIf provided gets the corresponding item from the array
A Promise with the Container object created
Loads the provided json with a GET request. The content will be used to create a Container object.
This method is async, so if you need a callback refer to JavaScript function fetch
the particles container element id
Optional
pathConfigJson: number | SingleOrMultiple<string>the json path (or paths array) to use in the GET request
Optional
index: numberthe index of the paths array, if a single path is passed this value is ignored
A Promise with the Container object created
Removes a listener from the specified event
The event to stop listening to
The listener of the specified event
Loads the provided option to create a Container object using the element parameter as a container
The particles container id
The dom element used to contain the particles
Optional
options: RecursivePartial<IOptions>The options object to initialize the Container
A Promise with the Container object created
Loads the provided option to create a Container object using the element parameter as a container
The particles container id
The dom element used to contain the particles
Optional
pathConfigJson: number | SingleOrMultiple<string>the json path (or paths array) to use in the GET request
Optional
index: numberthe index of the paths array, if a single path is passed this value is ignored
A Promise with the Container object created
Engine class for creating the singleton on window. It's a singleton proxy to the Loader class for initializing Container instances, and for Plugins class responsible for every external feature