简体   繁体   中英

Im integrating GSAP from Greenshock, in my REACT Web App. I get an error: Quint is not defined?

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

Use this URL to get your easing equasion

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM