Search the Community
Showing results for tags 'modifiers plugin'.
-
Hi. I was trying to reverse engineer this demo using the Modifiers plugin: https://codepen.io/GreenSock/pen/QEdpLe I got it to go downwards on the Y access okay, but I'm running into issues getting to get it to go up. Any help? Also, if you could explain how the % mod works, that would be great. Please no jquery.
- 15 replies
-
- loop
- modifiersplugin
-
(and 4 more)
Tagged with:
-
Hello, I am getting this error for an animation -> invalid modifiers tween value: [object Object]. I am using gsap version 2 inside a React project. I've read from another forum post that its because the plugin is not loaded. My question is how do you load it inside an actual project, not codepen?
- 2 replies
-
- modifiers
- modifiersplugin
-
(and 2 more)
Tagged with:
-
Using the modifiers plugin I often thought about how cool it would be to have access to more than one variable at the same time. How could this be achieved in a way that would be simple to understand? I think this syntax would be cool: TweenMax.to($obj,5,{ modifiers:{ "x,y,rotation":function(x,y,rotation,target) { return { // Doesn't make much sense, but ... the possibilities! x:rotation > 90 ? x : -x, y:y+Math.random()*50, rotation:rotation % 90 + x*y } } } }); The modifier function would be automatically passed the variables defined in the key (x,y,rotation in this case) and then the target object and return them as an object. And then, added to that, bind "this" in the modifier-function to the TweenLite-Object so you can access stuff like this.progress() But otherwise... isn't it a little bit overkill? And who would really need something like this?