<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Simple Animation</title>
	<atom:link href="http://nerd.metrocat.org/2007/07/simple-animation/feed" rel="self" type="application/rss+xml" />
	<link>http://nerd.metrocat.org/2007/07/simple-animation</link>
	<description>You're reading Jeff Watkins' thoughts about Web application design and development with a little bit of technology ranting thrown in for free.</description>
	<lastBuildDate>Sun, 08 Jun 2008 07:06:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jeff Watkins</title>
		<link>http://nerd.metrocat.org/2007/07/simple-animation/comment-page-1#comment-3098</link>
		<dc:creator>Jeff Watkins</dc:creator>
		<pubDate>Thu, 19 Jul 2007 01:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.metrocat.org/2007/07/simple-animation#comment-3098</guid>
		<description>&lt;p&gt;Well, I didn&#039;t say I wasn&#039;t going to have an Animator object. Just that the individual animation steps weren&#039;t objects. Take a look at my &lt;a href=&quot;http://metrocat.org/svn/bindings/src/fx/Animator.js&quot; rel=&quot;nofollow&quot;&gt;Animator class&lt;/a&gt;. It&#039;s still under development, but you&#039;ll get where I&#039;m coming from.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Well, I didn&#8217;t say I wasn&#8217;t going to have an Animator object. Just that the individual animation steps weren&#8217;t objects. Take a look at my <a href="http://metrocat.org/svn/bindings/src/fx/Animator.js" rel="nofollow">Animator class</a>. It&#8217;s still under development, but you&#8217;ll get where I&#8217;m coming from.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Karl G</title>
		<link>http://nerd.metrocat.org/2007/07/simple-animation/comment-page-1#comment-3093</link>
		<dc:creator>Karl G</dc:creator>
		<pubDate>Tue, 17 Jul 2007 20:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.metrocat.org/2007/07/simple-animation#comment-3093</guid>
		<description>&lt;p&gt;I figured you knew, I&#039;m just interested in the different approaches people take. I found the complexity/cycle burning to be a common feature of a number of things in dojo. Supposedly this is better in the current release...&lt;/p&gt;

&lt;p&gt;As for the reason to roll your own, I can empathize. My adventure started out when they added a Scriptaculous port to MochiKit. I tried making my own animations and was greatly annoyed at how hard it  is. I then ran across Animator.js, was impressed, and decided to port it to MochiKit and make the same animation work on multiple elements. That&#039;s great until the elements have different starting values. Things cascaded from there to where I am today.&lt;/p&gt;

&lt;p&gt;I am curious about the no-object design decision. Doesn&#039;t lacking an animation object force you into maintaining the state elsewhere? Or do you set up your code so this isn&#039;t a problem?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I figured you knew, I&#8217;m just interested in the different approaches people take. I found the complexity/cycle burning to be a common feature of a number of things in dojo. Supposedly this is better in the current release&#8230;</p>

<p>As for the reason to roll your own, I can empathize. My adventure started out when they added a Scriptaculous port to MochiKit. I tried making my own animations and was greatly annoyed at how hard it  is. I then ran across Animator.js, was impressed, and decided to port it to MochiKit and make the same animation work on multiple elements. That&#8217;s great until the elements have different starting values. Things cascaded from there to where I am today.</p>

<p>I am curious about the no-object design decision. Doesn&#8217;t lacking an animation object force you into maintaining the state elsewhere? Or do you set up your code so this isn&#8217;t a problem?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Watkins</title>
		<link>http://nerd.metrocat.org/2007/07/simple-animation/comment-page-1#comment-3092</link>
		<dc:creator>Jeff Watkins</dc:creator>
		<pubDate>Tue, 17 Jul 2007 19:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.metrocat.org/2007/07/simple-animation#comment-3092</guid>
		<description>&lt;p&gt;Thanks for the good points, Karl. I didn&#039;t intend to lay claim to anything particularly novel. I&#039;m well aware of how the major libraries implement animation. The main reason I&#039;ve been writing my own animation code is because the framework provided by Dojo (which is what the online Apple store uses), is incredibly complex and burns a lot of cycles for no benefit.&lt;/p&gt;

&lt;p&gt;You&#039;re very right that the &lt;em&gt;real&lt;/em&gt; fun comes when you put together meaningful chunks of animation.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the good points, Karl. I didn&#8217;t intend to lay claim to anything particularly novel. I&#8217;m well aware of how the major libraries implement animation. The main reason I&#8217;ve been writing my own animation code is because the framework provided by Dojo (which is what the online Apple store uses), is incredibly complex and burns a lot of cycles for no benefit.</p>

<p>You&#8217;re very right that the <em>real</em> fun comes when you put together meaningful chunks of animation.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Karl G</title>
		<link>http://nerd.metrocat.org/2007/07/simple-animation/comment-page-1#comment-3091</link>
		<dc:creator>Karl G</dc:creator>
		<pubDate>Tue, 17 Jul 2007 18:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.metrocat.org/2007/07/simple-animation#comment-3091</guid>
		<description>&lt;p&gt;For the interested, this is more or less the core of every javascript animation engine. &lt;/p&gt;

&lt;p&gt;The big variance is on how you define animations and how they are put together. The one-off nature of the animation, rather than keeping the setup stored in an object for reuse, is unique among the js animation frameworks that I know about. Animator.js, which is the framework closest to this approach that I know of, and Dojo.fx (I believe) uses the subject iteration approach shown here while moo.fx and (I believe) YUI use the factory approach mentioned. Scriptaculous avoids this by simply rewriting the animate() method for every type of animation.&lt;/p&gt;

&lt;p&gt;Apologies for the vagueness above, it&#039;s been almost a year since I looked at the code for the above.&lt;/p&gt;

&lt;p&gt;The bulk of the code in these libraries (except for scriptaculous) lies in helping set up the &#039;actions&#039; array mentioned here and in supplying pre-made easing functions. To use my library -- MochiKit.Animator** -- as an example, 50% of the code is in converting input to subjects (actions) and 25% is easing functions. Most of the rest is used in handling chained animations and minimizing the number of calculations performed at each animation step when multiple objects are animated. The animation core, which is more or less identical to the one shown here, is about 10% of the total.&lt;/p&gt;

&lt;p&gt;** My library is one of the heaviest. I think only scriptaculous and dojo are larger and they provide preset animations while I do not. It&#039;s optimized towards creating complex one-off animations, which I do frequently, while this one and most others are optimized for reusing a library of simpler canned animations. By way of comparison, the code at the top for fadeIn and fadeOut in my lib would be: fade = partial(cssAnimation, &quot;opacity: 0;&quot;);&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For the interested, this is more or less the core of every javascript animation engine. </p>

<p>The big variance is on how you define animations and how they are put together. The one-off nature of the animation, rather than keeping the setup stored in an object for reuse, is unique among the js animation frameworks that I know about. Animator.js, which is the framework closest to this approach that I know of, and Dojo.fx (I believe) uses the subject iteration approach shown here while moo.fx and (I believe) YUI use the factory approach mentioned. Scriptaculous avoids this by simply rewriting the animate() method for every type of animation.</p>

<p>Apologies for the vagueness above, it&#8217;s been almost a year since I looked at the code for the above.</p>

<p>The bulk of the code in these libraries (except for scriptaculous) lies in helping set up the &#8216;actions&#8217; array mentioned here and in supplying pre-made easing functions. To use my library &#8212; MochiKit.Animator** &#8212; as an example, 50% of the code is in converting input to subjects (actions) and 25% is easing functions. Most of the rest is used in handling chained animations and minimizing the number of calculations performed at each animation step when multiple objects are animated. The animation core, which is more or less identical to the one shown here, is about 10% of the total.</p>

<p>** My library is one of the heaviest. I think only scriptaculous and dojo are larger and they provide preset animations while I do not. It&#8217;s optimized towards creating complex one-off animations, which I do frequently, while this one and most others are optimized for reusing a library of simpler canned animations. By way of comparison, the code at the top for fadeIn and fadeOut in my lib would be: fade = partial(cssAnimation, &#8220;opacity: 0;&#8221;);</p>]]></content:encoded>
	</item>
</channel>
</rss>
