Share Posted March 19 I forked the 'draggable knob...' pen to show you my problem I can get my knob to spin but only on a corner! I need it to spin on its center axis See the Pen OJbeGvQ by bennysutton (@bennysutton) on CodePen Link to post Share on other sites
Share Posted March 19 You'd need to set the transformOrigin to center. You'll also want to use the GSAP 3 scripts instead of 2 and load inertia. Here's a fork with those changes. See the Pen 34e476b8db5cf305361230fb377e67fc by PointC (@PointC) on CodePen Happy tweening. 5 Link to post Share on other sites
Author Share Posted March 19 cool! is there any way I can get values to control another animation? Link to post Share on other sites
Solution Share Posted March 19 Sure. You can map the rotation to any other animation or value you like. I actually have an entire tutorial about mapping dials to change HSLA color values. https://www.motiontricks.com/hsla-color-dials-with-maprange/ There are multiple demos in the tutorial, but this is the final result. See the Pen ExKRrEX by PointC (@PointC) on CodePen Happy tweening. 3 1 Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now