DotLottiePlugin
DotLottiePluginOptions
interface DotlottiePluginOptions { parallel?: boolean;}parallel?: booleanRun in parallel or not.
Methods
install(dotlottie: Dotlottie): voidSets the DotLottie context to the plugin.
uninstall(): voidget parallel(): booleanset 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
DotLottieinstance
const dotLottie = new DotLottie();const myPlugin = new AwesomePlugin();
dotLottie.addPlugins(myPlugin);