I am trying to add Lottie animation in the Phaser 3 in my game. But I am not able to add.
Lottie Animation link.
This is how I am adding into my code :
this.animation = bodymovin.loadAnimation({
container: document.getElementById("game"), // Required
path: "assets/json/RainLoop.json", // Required
renderer: "canvas", // Required
loop: true, // Optional
autoplay: true, // Optional
name: "Hello World", // Name for future reference. Optional.
});
But here problem is, this animation is attaching to the HTML DOM elements and so that the animation comes above the Phaser game canvas, Due to what I am not able to interact with my phaser game elements.