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