Diaco last won the day on
Diaco had the most liked content!
-
Posts
1,215 -
Joined
-
Last visited
-
Days Won
86
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
ScrollTrigger Demos
Downloads
Everything posted by Diaco
-
Hi Matt Hoover pls check this out : http://codepen.io/MAW/pen/MwbRoL
-
it's native javascript event : https://developer.mozilla.org/en-US/docs/Web/Events/touchstart
-
Hi Valelacerte you need to add " touchstart " listener too : http://codepen.io/MAW/pen/QwxXgx
-
Hi ElliotGeno pls check this topic : http://greensock.com/forums/topic/14003-offsetting-the-center-point-for-an-element-moving-along-a-bezier/
-
Hi chriswyl it's about transform matrix multiplication , in your third example , pls check the result with remove x,y attributes from text and set transform to this : transform=" translate(100,100) rotate(40 100,100) " but if you want to have that result you liked , pls try this : TweenMax.set($("#t2"), { attr:{ x:x , y:y } , rotation:rot , svgOrigin:x+' '+y });
-
in addition to Carl and Rodrigo , if i understand correctly , you can simply use SlowMo ease type too : tl .to('#el', 3, {x:200, ease:Linear.easeNone}) .to('#el', 3, {x:0, ease:Linear.easeNone}) .to('#el', 3, {y:200, ease:Linear.easeNone}) .to('#el', 3, {y:0, ease:Linear.easeNone}) .from(tl,tl.duration(),{timeScale:5,ease:SlowMo.ease.config(.6,.7, true)},0) //.from(tl,tl.duration()-2,{timeScale:5,ease:SlowMo.ease.config(.6,.7, true)},1) http://codepen.io/MAW/pen/qZVgpv
-
Combining the Attr and Bezier plugins for SVG clip path animations
Diaco replied to zachschnackel's topic in GSAP
Hi zachschnackel you can simply use onUpdate callback with a tween of simple object , like this : var XY = {x:0,y:0}; TweenLite.to(XY,1,{bezier:{values:[...]},onUpdate:function(){ console.log(XY.x) yourElem.setAttribute( "attribute" , XY.x ); }}) -
Hi hanslibuzli pls add tiny amount of rotation to your tween , like this : TweenLite.set(".band", { scale : 1 , rotation:0.01 });
-
Hi dwillis pls try : this.target
-
Hi SoL2Squiz var animate = TweenMax.to('.MySprite2', 1, { repeat: -1, // >> loops the sprite ( -1 = infinity loop ) x: -2250, // >> -( width - width/frame ) ease: SteppedEase.config(15) // >> total frame - 1 }); pls load TweenMax too
-
Hi ochalmers pls check this out : http://codepen.io/MAW/pen/bprjrz
-
as blake suggested before , you can use _gsTransform object for most of css transform properties , and for other properties like left ,width , ...etc you can use one of these methods : 1- elem.style['propery name'] , like this : elem.style['width'] 2 - CSSPlugin.getStyle() , like this : CSSPlugin.getStyle( elem , "width" ); 3 - getComputedStyle(elem) , like this : var style = getComputedStyle(elem); console.log( style['width'] ) don't forget every TweenLite instance handles tweening of js objects as raw data ( whithout css prefixes , unit of measurement ) and getting/setting of css properties is CssPlugin's duty . actually you can get raw values from GSAP engine , but it's too deep and needs some really unnecessary functions when you can simply get data with above methods .
-
Hi 2474 pls check this out : http://codepen.io/MAW/pen/wGezEd
-
in addition to Carl's Great advise ; you need to kill or pause tween/timeline too , after set to timeScale(0) , like this : TweenLite.to( Tween, 1, { timeScale:0 , onComplete : function(){ Tween.kill() } }); http://codepen.io/MAW/pen/oxwxKG
-
yep , today Jonathan 's solution is really handy and cool with stagger/cycle method ( v1.18.2 )
-
yep and another simplest solution ( without js ) is simply change your img css to this : img { max-width: 100%; height: auto; top:50%; transform:translate(0%,-50%); position:absolute; } http://codepen.io/MAW/pen/Kzmxay
-
Hi Lynx pls check this topic : http://greensock.com/forums/topic/11828-back-with-gradient-changing-offset-value/