Jump to content
Search Community

Similar knob rotation code yields different results

MusketeerHo test
Moderator Tag

Recommended Posts

First Codepen (The target)

 

See the Pen oNgaQWN by MusketeerHo (@MusketeerHo) on CodePen

I saw the smooth knob rotation as shown in first  codepen . I tried to achieve it so I created another codepen but all I could manage was the two kinds of rotation:

1) the knob rotation is set to 45 degrees but it too quick and not smooth and slow like the first codepen.

2) the second knob rotation is more free flowing but is not set to 45 degrees which is what I was targetting.

 

What's even more confusing is that the code for the first figure in the second codepen is exactly like the first codepen but the rotation still is not that smooth.
Can anyone help me out here, where did I went wrong?

 

EDIT: The first codepen is the link at the very start of the question.

See the Pen wvBYKXy by MusketeerHo (@MusketeerHo) on CodePen

Link to comment
Share on other sites

Hey MusketeerHo and welcome.

 

The main issue is that you didn't load InertiaPlugin (previously known as ThrowPropsPlugin). Adding that and changes endValue to the correct value in your callback fixes your issues :)

See the Pen rNaqoeN?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Keep in mind that using InertiaPlugin on your site requires at least a Shockingly Green Club GreenSock membership. We'd love to have you join the club!

  • Like 1
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...