Here’s an example how I initialise Lottie on normal .js
const anim = lottie.loadAnimation({
container: document.getElementById("lottie"), // the dom element that will contain the anim
renderer: "svg", // Required "svg/canvas/html"
loop: 0, // Optional
autoplay: 0, // Optional
name: "Patient Circle", // Name for future reference. Optional.
path: "assets/json/data.json", // the path to the anim json
rendererSettings: {
//context: canvasContext, // the canvas context
//scaleMode: "noScale",
//clearCanvas: false,
//progressiveLoad: false, // Boolean, only svg renderer, loads dom elements when needed. Might speed up initialization for large number of elements.
//hideOnTransparent: false //Boolean, only svg renderer, hides elements when opacity reaches 0 (defaults to true)
}
});