
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GreenSock Archives - TECHNIG</title>
	<atom:link href="https://www.technig.com/tag/greensock/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.technig.com/tag/greensock/</link>
	<description>Gateway for IT Experts and Tech Geeks</description>
	<lastBuildDate>Sat, 01 Jun 2019 01:14:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://www.technig.com/wp-content/uploads/2020/04/32x32.png</url>
	<title>GreenSock Archives - TECHNIG</title>
	<link>https://www.technig.com/tag/greensock/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">162720667</site>	<item>
		<title>How to Repeat Animation in GreenSock?</title>
		<link>https://www.technig.com/repeat-greensock-animations/</link>
					<comments>https://www.technig.com/repeat-greensock-animations/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Thu, 23 Jun 2016 15:30:49 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[GreenSock]]></category>
		<category><![CDATA[GSAP]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7858</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>Repeating animation in GreenSock is very easy and useful. If you want to repeat any animation for twice or more than once, you can use the repeat GreenSock animations feature. This tutorial will teach you the step by step process on how to use this amazing feature for you next animation project. Though their are [&#8230;]</p>
<p>The post <a href="https://www.technig.com/repeat-greensock-animations/">How to Repeat Animation in GreenSock?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>Repeating animation in GreenSock is very easy and useful. If you want to repeat any animation for twice or more than once, you can use the repeat GreenSock animations feature. This tutorial will teach you the step by step process on how to use this amazing feature for you next animation project. Though their are different ways of repeating animations in GreenSock, we will show you the most easy and precise ways. We assume you have the basic knowledge of using GreenSock technology, if you don&#8217;t, please take a look at our previous tutorials of on <a href="https://www.technig.com/tag/greensock">GSAP </a>first, than come to this tutorial.</p>
<h2>How to Repeat GreenSock Animations?</h2>
<p>Let&#8217;s start by writing some html markups to work with. At the end we will put all the codes together and make a live demo. So here is the html code.</p>
<pre class="theme:sublime-text lang:default decode:true ">&lt;div id="teching"&gt;
  &lt;div class="letter t"&gt;T&lt;/div&gt;
  &lt;div class="letter e"&gt;E&lt;/div&gt;
  &lt;div class="letter c"&gt;C&lt;/div&gt;
  &lt;div class="letter h"&gt;H&lt;/div&gt;
  &lt;div class="letter n"&gt;N&lt;/div&gt;
  &lt;div class="letter i"&gt;I&lt;/div&gt;
  &lt;div class="letter g"&gt;G&lt;/div&gt;
&lt;/div&gt;</pre>
<p>Let&#8217;s design it a litte so that we can apply animation on it.</p>
<pre class="theme:sublime-text lang:css decode:true ">body{
  background-color: #8c47c2;
  text-align: center;
  padding: 30px;
}
.letter {
  display:inline-block;
  font-family: sans-serif;
  font-weight: bold;
  font-size:120px
}
.t{color:#5BC0EB}
.e{color:#FDE74C}
.c{color:#9BC53D}
.h{color:#E55934}
.n{color:#FA7921}
.i{color:#ffffff}
.g{color:#FF6696}

</pre>
<p>Now, let&#8217;s add a basic animation to this letters.</p>
<pre class="theme:sublime-text lang:js decode:true">var letters = $('.letter').toArray();
var timeLine = new TimelineLite();

timeLine.staggerFrom(letters,2,{
  y:"-100px",
  ease: Elastic.easOut,
},0.15);</pre>
<p>Here is the live demo.</p>
<p>[codepen_embed height=&#8221;265&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;KMzZvo&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen GreenSock Practice #7 Timeline animation by Hujjat Nazari (<a href="http://codepen.io/Hujjat">@Hujjat</a>) on <a href="http://codepen.io">CodePen</a>.[/codepen_embed]</p>
<p>As you can see, It&#8217;s showing-up only once. What if we want to repeat the same animation for a number of times? We can do it simply by adding the repeat and repeatDelay properties.</p>
<p>repeat will accept a number that indicate the number of times you want to repeat the animation. The repeatDelay on the other hand will indicate the delay between each animation.</p>
<p>Here is how we do it.  Let&#8217;s imagine you want to repeat this animation for 6 times, you will write the number 5 for repeat property. We will explain why now.</p>
<pre class="theme:sublime-text lang:js decode:true ">var letters = $('.letter').toArray();
var timeLine = new TimelineLite();

timeLine.staggerFrom(letters,2,{
  y:"-100px",
  ease: Elastic.easOut,
  repeat:5,
  repeatDelay:1
},0.15);</pre>
<p>Here is the demo.</p>
<p>[codepen_embed height=&#8221;376&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;MebXwQ&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen GreenSock Practice #8 repeating animations by Hujjat Nazari (<a href="http://codepen.io/Hujjat">@Hujjat</a>) on <a href="http://codepen.io">CodePen</a>.[/codepen_embed]</p>
<h3>Explain</h3>
<p>By default, It will animate once, so when you write the number, it will add the default number as well. That&#8217;s why, when we write 5 it will repeat 6 times.</p>
<blockquote><p>If you want to repeat an animation for infinite amounts of time, just give it a negative number like -1.</p></blockquote>
<h2>Second Way to Repeat GreenSock Animations.</h2>
<p>Their is another way that you can repeat GreenSock animations. This way is more useful specially when you have more than one objects and tweens to animate. You will use TimelineMax instead of TimelineLite. It&#8217;s not possible with TimelineLite.</p>
<p>Here is how you do that.</p>
<pre class="theme:sublime-text lang:js decode:true ">var letters = $('.letter').toArray();

var timeLine = new TimelineMax({repeat:4,repeatDelay:1});

timeLine.staggerFrom(letters,2,{
  y:"-100px",
  ease: Elastic.easOut,
},0.15);</pre>
<p>It&#8217;s that easy. When you instantiate the TimelineMax, pass the repeat and repeatDelay properties. It will work the same, but more power. Because it will apply to all animation that use timeLine object.</p>
<h2>Conclusion</h2>
<p>It was all about repeating animation with GreenSock Technology. If you have any question related to GreenSock, feel free to comment it bellow. We hope has been informative for you. 🙂</p>
<p>The post <a href="https://www.technig.com/repeat-greensock-animations/">How to Repeat Animation in GreenSock?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/repeat-greensock-animations/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7858</post-id>	</item>
		<item>
		<title>GreenSock TimelineLite Animation Step by Step.</title>
		<link>https://www.technig.com/greensock-timelinelite-animation/</link>
					<comments>https://www.technig.com/greensock-timelinelite-animation/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Tue, 14 Jun 2016 15:00:07 +0000</pubDate>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[GreenSock]]></category>
		<category><![CDATA[GSAP]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7772</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>If you want to automate the step by step animation frame, GreenSock TimelineLite animation is going to do that for you. In this part of the GreenSock tutorial series, we are going to cover the step by step of TimelineLite in GreenSock. If you are new to GreenSock technology, we recommend you to take a [&#8230;]</p>
<p>The post <a href="https://www.technig.com/greensock-timelinelite-animation/">GreenSock TimelineLite Animation Step by Step.</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>If you want to automate the step by step animation frame, GreenSock TimelineLite animation is going to do that for you. In this part of the <a href="https://www.technig.com/tag/greensock/">GreenSock </a>tutorial series, we are going to cover the step by step of TimelineLite in GreenSock. If you are new to GreenSock technology, we recommend you to take a  look at our beginner tutorial on <a href="https://www.technig.com/tag/gsap/">GSAP </a>first, then come to this part.</p>
<figure id="attachment_7777" aria-describedby="caption-attachment-7777" style="width: 800px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/06/GreenSock-TimelineLite-Animation.gif"><img fetchpriority="high" decoding="async" class="size-full wp-image-7777" src="https://www.technig.com/wp-content/uploads/2016/06/GreenSock-TimelineLite-Animation.gif" alt="GreenSock TimelineLite Animation" width="800" height="600" /></a><figcaption id="caption-attachment-7777" class="wp-caption-text">GreenSock TimelineLite Animation</figcaption></figure>
<h2>What is GreenSock TimelineLite Animation?</h2>
<p>We have already covered the <a href="http://greensock.com/tweenlite" target="_blank" rel="noopener noreferrer">TweenLite </a>and <a href="https://greensock.com/tweenmax" target="_blank" rel="noopener noreferrer">TweenMax </a>. TimelineLite is similar to those class. GreenSock TimelineLite animation feature will help you managing sequences of TweenLite, TweenMax, TimelineLite, and/or TimelineMax instances. If you have worked with Adobe Flash or any other animation studio, you are familiar with the timeline concept.</p>
<h3>How it works?</h3>
<p>First, we create an instance of TimelineLite class.</p>
<pre class="theme:sublime-text lang:js decode:true">var timeLine = new TimelineLite();</pre>
<p>Second, let&#8217;s select the objects to an array.</p>
<pre class="theme:sublime-text lang:js decode:true">var letters = $('.letter').toArray();</pre>
<p>Now we can apply the to(), from or staggerFrom functions. You already know that staggerFrom function will accept an array argument and it will automate the sequences for animation to happen. Here is how we do that.</p>
<pre class="theme:sublime-text lang:js decode:true">timeLine.staggerFrom(letters,2,{
  y:"-100px",
  ease: Elastic.easOut
},1);</pre>
<p>As you can see, we used the timeline object we have created and applied the staggerFrom function to it. The Last value for staggerFrom function will specify the time interval between each object to animate. You can use floating point number if you want.</p>
<p>Alternatively, you can use to() or from() function. But, you know that if you use those functions, you will need to select every object separately. For example:</p>
<pre class="theme:sublime-text lang:js decode:true ">timeLine.from(letter[0],2,{
  y:"-200px",
  ease: Elastic.easeOut
});

timeLine.from(letter[1],2,{
  y:"-200px",
  ease: Elastic.easeOut
});

timeLine.from(letter[2],2,{
  y:"-200px",
  ease: Elastic.easeOut
});


</pre>
<p>The staggerFrom is a lot easy and flexible to use.</p>
<p>Here is the final demo.</p>
<p>[codepen_embed height=&#8221;265&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;KMzZvo&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen &lt;a href=&#8217;http://codepen.io/Hujjat/pen/KMzZvo/&#8217;&gt;GreenSock Practice #7 Timeline animation&lt;/a&gt; by Hujjat Nazari (&lt;a href=&#8217;http://codepen.io/Hujjat&#8217;&gt;@Hujjat&lt;/a&gt;) on &lt;a href=&#8217;http://codepen.io&#8217;&gt;CodePen&lt;/a&gt;.[/codepen_embed]</p>
<h2>Conclusion</h2>
<p>It was how you can use TimelineLite instead of TweenMax or TweenLite. We hope it has been informative for you, if you have any questions related to this topic, feel free to comment bellow. 🙂</p>
<p>The post <a href="https://www.technig.com/greensock-timelinelite-animation/">GreenSock TimelineLite Animation Step by Step.</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/greensock-timelinelite-animation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7772</post-id>	</item>
		<item>
		<title>How to Animating Multiple Objects with GreenSock?</title>
		<link>https://www.technig.com/greensock-multiple-objects-animation/</link>
					<comments>https://www.technig.com/greensock-multiple-objects-animation/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Sun, 12 Jun 2016 16:00:29 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[GreenSock]]></category>
		<category><![CDATA[GSAP]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7734</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>Animation mulitple object with GreenSock will help you power up your animation skill with GreenSock. In this part of the GreenSock tutorial series, we are goint to focus on GreenSock multiple objects animation features. We will create an amazing animated text with GreenSock. We assume you have the basic knowledge of using GreenSock technology. If [&#8230;]</p>
<p>The post <a href="https://www.technig.com/greensock-multiple-objects-animation/">How to Animating Multiple Objects with GreenSock?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>Animation mulitple object with GreenSock will help you power up your animation skill with GreenSock. In this part of the <a href="https://www.technig.com/tag/greensock/" target="_blank" rel="noopener noreferrer">GreenSock</a> tutorial series, we are goint to focus on GreenSock multiple objects animation features. We will create an amazing animated text with GreenSock. We assume you have the basic knowledge of using GreenSock technology. If not, please talk a look at the basic tutorials here at technig and than continue to this article.</p>
<p>Here is the final project we are going to build together from scratch.</p>
<p>[codepen_embed height=&#8221;362&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;WxrMWb&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen GreenSock Practice #6 multiple object animation by Hujjat Nazari (<a href="http://codepen.io/Hujjat">@Hujjat</a>) on <a href="http://codepen.io">CodePen</a>.[/codepen_embed]</p>
<h2>GreenSock Multiple Objects Animation</h2>
<p>To animate multiple object, you have two ways. Either use TweenLight class make apply separate Tweens to every object or use TweenMax class and automate the process. We are going to show you both ways. At the end you learn both ways.</p>
<h3>Using TweenLight</h3>
<p>If you use TweenLight, you will write more code. But this more code will give you more flexibility to make more amazing animations. Here, You select every object and apply different animation properties. Here an example.</p>
<p>Imagine if you want to animate a sets of alphabet letters.</p>
<pre class="theme:sublime-text lang:default decode:true ">&lt;div id="teching"&gt;
  &lt;div class="letter t"&gt;T&lt;/div&gt;
  &lt;div class="letter e"&gt;E&lt;/div&gt;
  &lt;div class="letter c"&gt;C&lt;/div&gt;
  &lt;div class="letter h"&gt;H&lt;/div&gt;
  &lt;div class="letter n"&gt;N&lt;/div&gt;
  &lt;div class="letter i"&gt;I&lt;/div&gt;
  &lt;div class="letter g"&gt;G&lt;/div&gt;
&lt;/div&gt;</pre>
<p>Now, if I want to animate each and every letter, I must select and apply animations individually. Here is the example code for above html markup.</p>
<pre class="theme:sublime-text lang:js decode:true ">var t = $('.letter.t');
var e = $('.letter.e');
var c = $('.letter.c');
var h = $('.letter.h');
var n = $('.letter.n');
var i = $('.letter.i');
var g = $('.letter.g');

TweenLite.from(t, 2, {y:"200",opacity:0.1});
TweenLite.from(e, 2, {y:"-200"});
TweenLite.from(c, 2, {y:"200"});
TweenLite.from(h, 2, {y:"-200"});
TweenLite.from(n, 2, {y:"200"});
TweenLite.from(i, 2, {y:"-200"});
TweenLite.from(g, 2, {y:"200"});</pre>
<p>The good thing about this method is here that, you can add different property for each object. If you make a complex animation, you will definitely need to use this method.</p>
<h3>Using TweenMax</h3>
<p>Using TweenMax class help you make the animation easier. With less code, you can write do more thins done. The cons of using this method is that you can&#8217;t apply different property separately for each object. If you want to give the same animation property for all object, this method is going to for you.</p>
<p>We assume you have the above html markup. Here is how we write the JavaScript code.</p>
<pre class="theme:sublime-text lang:js decode:true ">var letters = $('.letter').toArray();

TweenMax.staggerFrom(letters,1,{
  y: '-110',
  ease: Bounce.easeOut
},0.18);</pre>
<p>As we said in introduction tutorial, TweenMax have some more feature and functionality. The staggerFrom function will talk the fourth argument.</p>
<p>This argument will specify the timing in which animation repeat on the next object. It will repeat those two property for every single letter after 0.18 second. Don&#8217;t forget that we have passed an array of object to straggerFrom function.</p>
<p>Here is the final demo.</p>
<p>[codepen_embed height=&#8221;331&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;WxrMWb&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen &lt;a href=&#8217;http://codepen.io/Hujjat/pen/WxrMWb/&#8217;&gt;GreenSock Practice #6 multiple object animation&lt;/a&gt; by Hujjat Nazari (&lt;a href=&#8217;http://codepen.io/Hujjat&#8217;&gt;@Hujjat&lt;/a&gt;) on &lt;a href=&#8217;http://codepen.io&#8217;&gt;CodePen&lt;/a&gt;.[/codepen_embed]</p>
<h2>Conclusion</h2>
<p>GreenSock multiple objects animation will help you build powerful yet flexible animations. We hope you have learned something new. If you any question, feel free to comment it bellow. 🙂</p>
<p>The post <a href="https://www.technig.com/greensock-multiple-objects-animation/">How to Animating Multiple Objects with GreenSock?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/greensock-multiple-objects-animation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7734</post-id>	</item>
		<item>
		<title>Learn GreenSock Easing Visualization Step by Step</title>
		<link>https://www.technig.com/greensock-easing-tutorial/</link>
					<comments>https://www.technig.com/greensock-easing-tutorial/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Fri, 27 May 2016 16:30:02 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[GreenSock]]></category>
		<category><![CDATA[GSAP]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7528</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>Easing is one of another powerful functionality of GreenSock animation platform. In this GreenSock easing tutorial you will learn different types of easing and how they work in gsap. We have covered the basic of GreenSock  previously. This will be the continue part of those tutorials. If you have problem in basic of GreenSock, you can [&#8230;]</p>
<p>The post <a href="https://www.technig.com/greensock-easing-tutorial/">Learn GreenSock Easing Visualization Step by Step</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>Easing is one of another powerful functionality of GreenSock animation platform. In this GreenSock easing tutorial you will learn different types of easing and how they work in gsap. We have covered the basic of GreenSock  previously. This will be the continue part of those tutorials. If you have problem in basic of GreenSock, you can refer to those articles.</p>
<h2>GreenSock Easing Tutorial</h2>
<p>Easing functions specify the rate of change of a parameter over time. In GreenSock, we use it to specify how an object is moving from one point to another point. There are a lot of different easing function, in this GreenSock easing tutorial we will discuss a few of them. If you want to know more about different kinds of easing, I recommend take a look at <a href="http://easings.net/" target="_blank" rel="noopener noreferrer">easing</a>s.net site to see all examples. Here is a live examples of easing.</p>
<p>[codepen_embed height=&#8221;482&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;OPewzj&#8221; default_tab=&#8221;result&#8221; user=&#8221;edankwan&#8221;]See the Pen &lt;a href=&#8217;http://codepen.io/edankwan/pen/OPewzj/&#8217;&gt;Robert Penner&#8217;s easing cheatsheet&lt;/a&gt; by Edan Kwan (&lt;a href=&#8217;http://codepen.io/edankwan&#8217;&gt;@edankwan&lt;/a&gt;) on &lt;a href=&#8217;http://codepen.io&#8217;&gt;CodePen&lt;/a&gt;.[/codepen_embed]</p>
<p>I hope the example gives you a clear concept of what easing is. Not let&#8217;s learn how to use in GreenSock</p>
<h2>How to Use Easing in GreenSock?</h2>
<p>So far we have learn how to use GreenSock. Now let&#8217;s create a pen on codepen and continue learning. Using easing is very easy in GreenSock, all you need is to add value for ease property. Here is an example.</p>
<pre class="theme:sublime-text lang:js decode:true ">var item = $('.object');
TweenLite.to(item, 1, {
  x: "400px",
  color:'red',
  ease: Power2.easeInOut,
});</pre>
<p>As you can see, we have wrote the ease property with value of Power2.easeInOut. We have 5 different power in GreenSock. Beside that, we have Back, Elastic, Bounce, Rough, SlowMo, Stepped, Circ, Expo and Sine too. You can use any of them depending on which type of animation you want to make.</p>
<p>If you want to practice live, how all of this easing functions works, you check this <a href="http://greensock.com/ease-visualizer" target="_blank" rel="noopener noreferrer">link</a>.</p>
<figure id="attachment_7545" aria-describedby="caption-attachment-7545" style="width: 863px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/05/GreenSock-Easing-tutorial-options.jpg"><img decoding="async" class="size-full wp-image-7545" src="https://www.technig.com/wp-content/uploads/2016/05/GreenSock-Easing-tutorial-options.jpg" alt="GreenSock Easing tutorial options" width="863" height="642" /></a><figcaption id="caption-attachment-7545" class="wp-caption-text">GreenSock Easing tutorial options</figcaption></figure>
<p>So let&#8217;s end of this GreenSock easing tutorial with a live example. We have three space shuttle that have different easing function let&#8217;s see how they more.</p>
<p>[codepen_embed height=&#8221;488&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;WxeVqo&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen &lt;a href=&#8217;http://codepen.io/Hujjat/pen/WxeVqo/&#8217;&gt;GreenSock Practice #5 Easing&lt;/a&gt; by Hujjat Nazari (&lt;a href=&#8217;http://codepen.io/Hujjat&#8217;&gt;@Hujjat&lt;/a&gt;) on &lt;a href=&#8217;http://codepen.io&#8217;&gt;CodePen&lt;/a&gt;.[/codepen_embed]</p>
<h2>Conclusion</h2>
<p>We hope this short GreenSock easing tutorial gave you the idea of how to use easing in different projects. If you have any types of question regarding to this topic, feel free to comment it bellow. 🙂</p>
<p>The post <a href="https://www.technig.com/greensock-easing-tutorial/">Learn GreenSock Easing Visualization Step by Step</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/greensock-easing-tutorial/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7528</post-id>	</item>
		<item>
		<title>Setting up GreenSock Animation Part 2</title>
		<link>https://www.technig.com/greensock-animation-setting-configuration/</link>
					<comments>https://www.technig.com/greensock-animation-setting-configuration/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Tue, 10 May 2016 05:30:45 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[GreenSock]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7352</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>In previous tutorial you have learned what GreenSock animation platform is and why we use it. In this article, you will learn how to use GreenSock animation in your first project. You will also learn GreenSock animation setting up and configurations. Overall, we will make our first project and environment for our project. Beside this, you [&#8230;]</p>
<p>The post <a href="https://www.technig.com/greensock-animation-setting-configuration/">Setting up GreenSock Animation Part 2</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>In <a href="https://www.technig.com/introduction-gsap-animation/" target="_blank" rel="noopener noreferrer">previous</a> tutorial you have learned what GreenSock animation platform is and why we use it. In this article, you will learn how to use GreenSock animation in your first project. You will also learn GreenSock animation setting up and configurations. Overall, we will make our first project and environment for our project. Beside this, you will learn how to animate elements or any other object with GreenSock.</p>
<h2>GreenSock Animation Setting up</h2>
<p>As promised, we will will write clean and to the point. So, to use GreenSock, all you need is to download the framework and add it in your project and than write your animation code. We will use codepen instead of saving the file locally. If you want to so, you can fork our project and make changes for your own. Let&#8217;s start doing it step by step.</p>
<ul>
<li>Create a pen on <a href="https://codepen.com" target="_blank" rel="noopener noreferrer">Codepen</a>. ( if you want, you can fork our project <a href="https://codepen.io/Hujjat/pen/pyGdjd" target="_blank" rel="noopener noreferrer">here </a>).</li>
<li>Add the GreenSock and jQuery.</li>
</ul>
<p>Of course you will need jQuery as well, so we will add jQuery first, than GSAP. In codepen, you can like this.</p>
<figure id="attachment_7361" aria-describedby="caption-attachment-7361" style="width: 1036px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/05/GreenSock-animation-setting-on-codepen.jpg"><img decoding="async" class="wp-image-7361 size-full" src="https://www.technig.com/wp-content/uploads/2016/05/GreenSock-animation-setting-on-codepen.jpg" alt="GreenSock animation setting on codepen" width="1036" height="553" /></a><figcaption id="caption-attachment-7361" class="wp-caption-text">GreenSock animation setting on codepen</figcaption></figure>
<ol>
<li>Settings</li>
<li>JavaScript tab</li>
<li>jQuery cdn link</li>
<li>TweenMax cdn link</li>
<li>We have added it through Quick-add.</li>
</ol>
<p>Once you have added them, you are done with GreenSock animation setting up. Now you can start writing your code.</p>
<p>Here a simple html code:</p>
<pre class="theme:sublime-text lang:xhtml decode:true ">&lt;div class="object"&gt;
  &lt;p&gt;
     Move me with GreenSock
  &lt;/p&gt;
&lt;/div&gt;</pre>
<p>Here is some basic CSS style.</p>
<pre class="theme:sublime-text lang:css decode:true ">.object{
  background-color: blue;
  width:170px;
  padding:30px;
  color:#fff;
}</pre>
<p>So far we had just write the basic codes. Now let&#8217;s start learning the GreenSock syntax.</p>
<p>First, let&#8217;s select the item class with jQuery</p>
<pre class="theme:sublime-text lang:js decode:true ">var item = $('.object');</pre>
<p>Now, you can apply the GreenSock functions to variable item. The most common type of tween is a to () tween which allows you to define the destination values:</p>
<pre class="theme:sublime-text lang:js decode:true">TweenLite.to(myObject, 2, {x:100, y:200});</pre>
<p>For our example, let&#8217;s more our item 300px to the right direction. To do that, add the following code to your JavaScript code.</p>
<pre class="theme:sublime-text lang:js decode:true">TweenLite.to(item, 2, {x:300});</pre>
<p>The TweenLite is the class name and the to() is the function.</p>
<p>The first arguement is the object you want to apply the animation on.</p>
<p>The second arguement is for time set or How much time it should take.</p>
<p>The third arguement, you can add an array of different affects.</p>
<p>In our example, it will more the item element to x direction in 2 second.</p>
<p>Here is the completed pen.</p>
<h2>Conclusion</h2>
<p>It was about the basic of GreenSock animation and GreenSock animation setting. We will continue this tutorial series with intermediate and advance level of GreenSock animation. I hope it has been informative for you, if you any question, feel free to comment it bellow. 🙂</p>
<p>The post <a href="https://www.technig.com/greensock-animation-setting-configuration/">Setting up GreenSock Animation Part 2</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/greensock-animation-setting-configuration/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7352</post-id>	</item>
	</channel>
</rss>
