Hello,
I do include the lottie scripts. But for some reason I cannot get it to work with require.js. For example:
let playhead = {frame: 0},
animation = lottie.loadAnimation({
container: document.querySelector(".lottie"),
renderer: "svg",
loop: false,
autoplay: false,
path: "https://assets.codepen.io/35984/tapered_hello.json"
//path: "https://assets10.lottiefiles.com/packages/lf20_syirmiva.json"
});
It does not recognize what lottie is. It says it is not defined.
This is how the first line of my js file looks:
define(["jquery", "gsap", "gsapScrollTrigger", "lottieReference"], function ($, { gsap }, { ScrollTrigger }, { lottie1 }) {
lottie1 is always undefined. It would be nice to type something in like lottie1.lottie.loadAnimation() or something but in all the samples that I have seen they just say to include the lottie scripts and type lottie.loadAnimation().
lottieReference (I know the naming is getting out of control I'm getting desperate debugging) is defined as lottieReference = "https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.12/lottie.min"; in our require js config file.
Thanks!