<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:wfw="http://wellformedweb.org/CommentAPI/"
     >
  <channel>
    <title>SVG Wow!</title>
    <link>http://svg-wow.org/blog</link>
    <description></description>
    <pubDate>Mon, 03 Mar 2014 21:47:48 GMT</pubDate>
    <generator>Blogofile</generator>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Gandhi Quotes</title>
      <link>http://svg-wow.org/blog/2010/10/05/gandhi-quotes</link>
      <pubDate>Tue, 05 Oct 2010 18:00:00 EDT</pubDate>
      <category><![CDATA[animation]]></category>
      <category><![CDATA[ui]]></category>
      <category><![CDATA[morphing]]></category>
      <category><![CDATA[audio]]></category>
      <guid isPermaLink="true">http://svg-wow.org/blog/2010/10/05/gandhi-quotes</guid>
      <description>Gandhi Quotes</description>
      <content:encoded><![CDATA[
<div id="description">

    <p>
        This is more of a showcase than a demo as it assembles multiple techniques
        discussed in other blogs.
    </p>
    <p>
        The demo first uses a 'camera' to zoom and pan around quotes from
        <a href="http://en.wikipedia.org/wiki/Gandhi">Mohandas Karamchand Gandhi</a>.
        This uses the camera utility described in a different
        <a href="http://svg-wow.org/blog/2010/08/14/camera/">blog entry</a>.
    </p>
    <p>
        After the camera has lingered on each quote long enough for the viewer
        to read through it, the final dot is displayed. When all quotes have
        been read, the camera zooms out, the quotes roll out and fade out but
        the dots stay and morph in a set of pebbles in the center of the screen.
        These pebbles in turn morph into Gandhi's stylized portrait.
    </p>
    <p>
        All the animation effects are implemented using <a href="/attributions.html#yui">YUI 3</a>
        with specific SVG extensions, in particular to allow the animation of
        the <code>transform</code> attribute and the animation of the
        <code>d</code> attribute on the <code>&lt;path&gt;</code> element for
        morphing animations.
    </p>
    <p>
        Gandhi's portrait was created in Illustrator from a scan of a drawing
        made by a friend.
    </p>
    <p>
        The audio track is a guitar arrangement created specially for this demo
        by a another friend (who prefers anonymity).
    </p>
    <p>
        Gandhi's quotes were found on <a href="http://www.quotationspage.com/quotes/Mahatma_Gandhi/">
            The Quotations Page</a> web site.
    </p>
    <p>
        The font used for the text is <a href="/attributions.html#fonts">GoodDog</a>.
    </p>

    <h3>Running the demo</h3>

    <p>Click on the "Start SVG Demo" at the top of this page. Wait for the
    audio to load, then click the 'play' button when it appears.</p>
</div>
]]></content:encoded>
    </item>
    <item>
      <title>Camera</title>
      <link>http://svg-wow.org/blog/2010/08/14/camera</link>
      <pubDate>Sat, 14 Aug 2010 18:00:00 EDT</pubDate>
      <category><![CDATA[interactivity]]></category>
      <category><![CDATA[camera]]></category>
      <category><![CDATA[animation]]></category>
      <category><![CDATA[yui]]></category>
      <category><![CDATA[audio]]></category>
      <guid isPermaLink="true">http://svg-wow.org/blog/2010/08/14/camera</guid>
      <description>Camera</description>
      <content:encoded><![CDATA[
<div id="description">

    <h3>Running the demo</h3>

    <p>Click on the "Start SVG Demo" at the top of this page. After the loading
    message disappears, click in the display area to start the demo.</p>

    <h3>Using the camera metaphore to script zoom and pan</h3>

    <p>
        Sometimes, we only think of animation as moving objects, changing their
        sizes, positions or other properties. This demo shows that we can also
        create animation effects by moving a 'camera' around.
    </p>
    <p>
        The camera effect is  created
        by animating the 
        <a href="http://www.w3.org/TR/SVG/coords.html#TransformAttribute">transform</a>
        on a target <a href="http://www.w3.org/TR/SVG/struct.html#Groups"><code>&lt;g&gt;</code></a> in the SVG content,
        which creates the illusion of a camera moving over the group of
        elements contained in the target group.
    </p>
    
    <h4>Camera utility</h4>
    <p>
        The demo uses a small utility
        <a href="../res/3.0/scripts/tools/camera.js">camera.js</a> which
        makes it easy to create this type of effect.
    </p>
    <p>
        Following is a sample of how to instantiate, configure and start
        the camera with the <code>action</code> method.
    </p>

    <p>

<div class="pygments_monokai"><pre><span class="kd">var</span> <span class="nx">cameraTarget</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="s1">&#39;#cameraTarget&#39;</span><span class="p">),</span> <span class="c1">// Uses YUI 3.0 for DOM access.</span>
    <span class="nx">Easing</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Easing</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">defaultInterpolators</span> <span class="o">=</span> <span class="p">{</span>
    <span class="nx">zoom</span><span class="o">:</span> <span class="nx">Easing</span><span class="p">.</span><span class="nx">easeNone</span><span class="p">,</span>
    <span class="nx">direction</span><span class="o">:</span> <span class="nx">Easing</span><span class="p">.</span><span class="nx">easeBothStrong</span> <span class="p">,</span>
    <span class="nx">position</span><span class="o">:</span> <span class="nx">Easing</span><span class="p">.</span><span class="nx">easeBothStrong</span>
<span class="p">};</span>
<span class="kd">var</span> <span class="nx">camera</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">sw</span><span class="p">.</span><span class="nx">tools</span><span class="p">.</span><span class="nx">Camera</span><span class="p">({</span>
    <span class="nx">target</span><span class="o">:</span> <span class="nx">cameraTarget</span><span class="p">,</span> <span class="c1">// The element containing the content to navigate over</span>
    <span class="nx">viewport</span><span class="o">:</span> <span class="p">{</span><span class="nx">width</span><span class="o">:</span> <span class="mi">800</span><span class="p">,</span> <span class="nx">height</span><span class="o">:</span> <span class="mi">600</span><span class="p">},</span> <span class="c1">// The camera&#39;s viewport</span>
    <span class="nx">frameLength</span><span class="o">:</span> <span class="mi">10</span><span class="p">,</span>  <span class="c1">// Controls the camera&#39;s movement speed.</span>
    <span class="nx">position</span><span class="o">:</span> <span class="p">{</span><span class="nx">x</span><span class="o">:</span> <span class="mi">243</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span> <span class="mi">68</span><span class="p">},</span> <span class="c1">// The camera&#39;s initial position</span>
    <span class="nx">direction</span><span class="o">:</span> <span class="mi">90</span><span class="p">,</span> <span class="c1">// The camera angle</span>
    <span class="nx">zoom</span><span class="o">:</span> <span class="mi">7</span> <span class="c1">// The camera&#39;s zoom level.</span>
    <span class="p">});</span>

    <span class="nx">camera</span><span class="p">.</span><span class="nx">addTravelSegments</span><span class="p">([{</span>
        <span class="nx">name</span><span class="o">:</span> <span class="s2">&quot;wherever&quot;</span><span class="p">,</span>
        <span class="nx">position</span><span class="o">:</span> <span class="p">{</span><span class="nx">x</span><span class="o">:</span> <span class="mi">243</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span> <span class="mi">384</span><span class="p">},</span>
        <span class="nx">direction</span><span class="o">:</span> <span class="mi">90</span><span class="p">,</span>
        <span class="nx">zoom</span><span class="o">:</span> <span class="mi">7</span><span class="p">,</span>
        <span class="nx">runLength</span><span class="o">:</span> <span class="mi">1000</span><span class="p">,</span>
        <span class="nx">interpolators</span><span class="o">:</span> <span class="nx">defaultInterpolators</span>
    <span class="p">},</span> <span class="p">{</span>
        <span class="nx">name</span><span class="o">:</span> <span class="s2">&quot;you&quot;</span><span class="p">,</span>
        <span class="nx">position</span><span class="o">:</span> <span class="p">{</span><span class="nx">x</span><span class="o">:</span> <span class="mi">440</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span> <span class="mi">368</span><span class="p">},</span>
        <span class="nx">direction</span><span class="o">:</span> <span class="mi">180</span><span class="p">,</span>
        <span class="nx">zoom</span><span class="o">:</span> <span class="mf">1.6</span><span class="p">,</span>
        <span class="nx">runLength</span><span class="o">:</span> <span class="mi">2000</span><span class="p">,</span>
        <span class="nx">interpolators</span><span class="o">:</span> <span class="nx">defaultInterpolators</span>
    <span class="p">},</span> <span class="p">...</span> <span class="c1">// More camera positions</span>
<span class="p">});</span>

<span class="nx">camera</span><span class="p">.</span><span class="nx">action</span><span class="p">();</span>
</pre></div>



    </p>

    <p>
        The following figure illustrates how the zoom level, direction and
        position specify the successive positions of the camera over the
        composition.
    </p>

    <img class="illustration" src="/camera/camera-positions.png" width="600" />

    <h3>Attributions</h3>

    <p>Many thanks to <a href="/attributions.html#wherever-audio">Roger Kidd</a> for
    creating this demo's rythmic arrangment.</p>

</div>
]]></content:encoded>
    </item>
    <item>
      <title>Animated Lyrics</title>
      <link>http://svg-wow.org/blog/2009/10/04/animated-lyrics</link>
      <pubDate>Sun, 04 Oct 2009 15:00:00 EDT</pubDate>
      <category><![CDATA[audio]]></category>
      <category><![CDATA[animation]]></category>
      <category><![CDATA[interactive]]></category>
      <guid isPermaLink="true">http://svg-wow.org/blog/2009/10/04/animated-lyrics</guid>
      <description>Animated Lyrics</description>
      <content:encoded><![CDATA[
<div id="description">
    <p>
        This example illustrates the use of the following features:
    </p>
    <ul>
        <li>
            Depending on the implementation, SVG or HTML 5 <span class="code">&lt;audio&gt;</span> in
            a <span class="code">&lt;foreignObject&gt;</span>
        </li>
        <li>
            Web fonts
        </li>
        <li>
            Text on a path
        </li>
        <li>
            Scripted animation
        </li>
    </ul>

    <p>Note that the demo uses <a href="http://www.w3schools.com/js/js_timing.asp"><span class="code">setTimer</span></a> to synchronize
        the lyrics with the audio because
        the new audio <a href="http://www.w3.org/TR/html5/Overview.html#event-media-timeupdate">timeupdate</a> event is not supported in
        all the browsers yet. However, as explained on
        <a href="http://blog.gingertech.net/2009/08/19/jumping-to-time-offsets-in-videos/">Silvia Pfeiffer's site</a>
        it would be a better way to synchronize the lyrics in a pure HTML5 context.</p>
    <p>See <a href="/attributions.html">attributions</a> about
        the song and fonts used in this demo (also showing at the
    end of the demo). The code leverages the YUI library with
    an extension to allow animation of SVG transform attributes.</p>

    <h3>Running the demo</h3>

    <p>Click on the "Start SVG Demo" at the top of this page.
       When the demo has loaded, click in the center of the
       image. Then, once the menu has settled, click on the
    "ancient sun" item.</p>
</div>
]]></content:encoded>
    </item>
  </channel>
</rss>
