I have downloaded all the packages for Tweenlite. npm install
and and yarn add
all my REACT
and node dependencies
. For Some reason an error in the console tells me: Quint is undefined
Heres the code that its specifically pointing to:
function setupParallax(){
document.addEventListener('mousemove',(event)=>{
let x=event.pageX;
let y=event.pageY;
TweenLite.to(parallax,1,{
x:((x/canvas.width)*2)-1,
y:((y/canvas.height)*2)-1,
ease:Quint.easeOut,
onUpdate:()=>{
renderer.parallaxX=parallax.x;
renderer.parallaxY=parallax.y;
}
})
});
}
Has anyone gone into the same problem? Please help - THANKS in advance.
That is because TweenMax uses its own syntax for Easing.
Quint is not part of the syntax. your choices are:
Power0 Power1 Power2 Power3 Power4 Back Elastic Bounce Rough SlowMo Stepped Circ Expo Sine and Custom
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.