Hello, sorry if I am bothering too much this forum but I am eager to learn.
I have the following code:
import { gsap } from 'gsap'
export const SPINNER_TIMELINE = gsap.timeline({ paused: true })
export const LOADER_TIMELINE = gsap.timeline({ paused: true })
export const HERO_TIMELINE = gsap.timeline({ paused: true })
export const HEADER_TIMELINE = gsap.timeline({ paused: true })
export const MASTER_TIMELINE = gsap.timeline({ paused: true })
then I am doing this in a Spinner class:
import { SPINNER_TIMELINE } from '@options/timelines'
class Spinner {
constructor(element) {
this.setLoader()
}
setLoader(spinner, spinnerBot) {
SPINNER_TIMELINE.to(
spinner.left.start,
{
x: 10
duration: '1',
ease: 'none',
},
)
}
}
and then I am having another class that creates and instance of this spinner class
import {
SPINNER_TIMELINE,
MASTER_TIMELINE,
} from '@options/timelines'
class Intro {
constructor() {
new Spinner()
this.animateMasterTimeline()
}
animateMasterTimeline() {
MASTER_TIMELINE.add(SPINNER_TIMELINE, {
time: SPINNER_TIMELINE.duration(),
duration: SPINNER_TIMELINE.duration(),
ease: 'power3.inOut',
})
}
}
Spinner and Intro class are starting properly but the animation it's not.
What I am doing wrong?
Warm regards and thanks in advance