Options
All
  • Public
  • Public/Protected
  • All
Menu

Main class for creating the Container objects

Hierarchy

  • Loader

Index

Constructors

Properties

#engine: Engine

The engine containing this Loader instance

Methods

  • 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

    Parameters

    • tagId: SingleOrMultiple<string>

      the particles container element id

    • Optional jsonUrl: number | SingleOrMultiple<string>

      the json path (or paths array) to use in the GET request

    • Optional index: number

      the index of the paths array, if a single path is passed this value is ignored

    Returns Promise<undefined | Container>

    A Promise with the Container object created

  • Starts an animation in a container, starting from the given options

    Parameters

    • params: LoaderParams

      all the parameters required for loading options in the current animation

    Returns Promise<undefined | Container>

  • Starts an animation in a container, starting from the given remote options

    Parameters

    • params: LoaderParams

      all the parameters required for loading a remote url into options in the current animation

    Returns Promise<undefined | Container>

  • 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

    Parameters

    • id: string | <internal>.HTMLElement

      the particles container element id

    • domContainer: <internal>.HTMLElement | SingleOrMultiple<string>

      the container used to contains the particles

    • jsonUrl: undefined | number | SingleOrMultiple<string>

      the json path (or paths array) to use in the GET request

    • Optional index: number

      the index of the paths array, if a single path is passed this value is ignored

    Returns Promise<undefined | Container>

    A Promise with the Container object created