I am facing "Invalid Property x set to 3.57 Missing plugin? gsap.registerPlugin()" and "Invalid property section set to 0 Missing plugin? gsap.registerPlugin()" in the console. I came much further in the project but now I am facing this issue. Please Help!!
import {gsap} from "gsap"
import {ScrollTrigger} from 'gsap/ScrollTrigger'
gsap.registerPlugin(ScrollTrigger)
const setupAnimation = ( ) =>{
camera.position.x = 25.7;
ScrollTrigger.matchMedia( {"(prefers-reduced-motion: no-preference)":desktopAnimation})
}
const desktopAnimation = ()=>{
let section = 0
const tl = new gsap.timeline({
default : {
duration: 1,
ease: "power2.inOut"
},
scrollTrigger: {
trigger: ".page",
start : "top top",
end: "bottom bottom",
scrub: 0.1,
markers: true
}
})
console.log("ScrollTrigger", ScrollTrigger)
tl.to( camera.position.x,{
x: 3.57,
section
})
}