Share Posted December 29, 2021 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 More sharing options...
Share Posted December 30, 2021 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. 1 Link to comment Share on other sites More sharing options...
Solution Author Solution Share Posted December 30, 2021 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 More sharing options...
Share Posted December 30, 2021 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. 1 Link to comment Share on other sites More sharing options...
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