DotLottiePlugin

DotLottiePluginOptions

interface DotlottiePluginOptions {
parallel?: boolean;
}
parallel?: boolean

Run in parallel or not.

Methods

install(dotlottie: Dotlottie): void

Sets the DotLottie context to the plugin.

uninstall(): void
get parallel(): boolean
set parallel(value: boolean)
abstract onBuild(): Promise<void>

Abstract method that is called by the DotLottie class. This is where your plugin needs to implement its logic.

Creating a custom plugin

  1. Create your plugin class
export class ... extends DotlottiePlugin
  1. Implement your onBuild(): Promise<void> method
  2. Don’t forget to add your plugin to your DotLottie instance
const dotLottie = new DotLottie();
const myPlugin = new AwesomePlugin();
dotLottie.addPlugins(myPlugin);