Jump to content
Search Community

tracker[0].getVelocity is not a function

HelloMojito test
Moderator Tag

Recommended Posts

Hello All,

I use inertiaPlugin but when i want to use getVelocity() methods this dont work !! 

 

can you help me,  maybe in GSAP 3 getVelovity() not exist ? 


my error is  tracker[0].getVelocity is not a function 


tracker is :

 

  1. VelocityTracker {target: div.c-exp-gallery__inner.js-experience-slider__inner, _props: {…}}
    1. target: div.c-exp-gallery__inner.js-experience-slider__inner
    2. _props: {x: u}
    3. __proto__: Object
Link to comment
Share on other sites

@HelloMojito thanks for joining the club!

 

Can you please provide a minimal demo so we can see what exactly you're doing and what's generating the error?  I imagine you just need to switch to get(), but it's hard for me to say without seeing your code. There is a getVelocity() method on InertiaPlugin (static) but if you're trying to access an individual VelocityTracker instance, get() is what you need. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...