Jump to content
GreenSock

Dennyno

Gsap Drag Canvas Rotation

Go to solution Solved by Dennyno,

Recommended Posts

Hi, on this demo, do you think is possible to handle the rotation on the canvas cube by dragging it or by scrolling, using GSAP (and/or any of its plugin) ?

images: let imageCycle = ["slide1", "slide2", "slide3", "slide4", "slide1"];
cubefaces are under "visible cube masks"...

This test seems harder then many other I asked here :) btw thanks for any help

See the Pen gORjezj by DedaloD (@DedaloD) on CodePen

Link to comment
Share on other sites

It's possible. GSAP can animate any property of an object, so you would have to create your own custom objects and animate them with GSAP, and then on every tick, perform the needed matrix calculations. However, how to proceed with that is way beyond the scope of these forums as we try to keep these forums focus on GSAP specific questions, and not how to work with 3rd party libraries.

  • Like 1
Link to comment
Share on other sites

  • Solution
8 hours ago, OSUblake said:

It's possible. GSAP can animate any property of an object, so you would have to create your own custom objects and animate them with GSAP, and then on every tick, perform the needed matrix calculations. However, how to proceed with that is way beyond the scope of these forums as we try to keep these forums focus on GSAP specific questions, and not how to work with 3rd party libraries.


Well then, tx anyway @OSUblake !
I even gonna give up on this, cuz Regl gives many errors on console and makes Safari crashing on mobile

Link to comment
Share on other sites

I'm not familiar with Regl, but just from a cursory glance at their API, it looks like it would require a bunch of extra code. It would definitely be a lot easier using WebGL library that already provides objects that you can animate, like three.js.

 

  • 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.
×