<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.1.2" -->
<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/"
>

<channel>
	<title>SVG Declarative Animation in Mozilla</title>
	<link>http://brian.sol1.net/svg</link>
	<description>News about my attempts to implement SVG Declarative (SMIL) Animation in Mozilla</description>
	<pubDate>Mon, 21 Apr 2008 09:58:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1.2</generator>
	<language>en</language>

		<item>
		<title>Range for keyTimes</title>
		<link>http://brian.sol1.net/svg/range-for-keytimes/</link>
		<comments>http://brian.sol1.net/svg/range-for-keytimes/#comments</comments>
		<pubDate>Wed, 02 Nov 2005 05:02:44 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
	<category>Status updates</category>
		<guid>http://brian.sol1.net/svg/range-for-keytimes/</guid>
		<description><![CDATA[	Following are a couple of issues I&#8217;ve come across with regards to keyTimes.
	1. In section 3.2.3 of the SMIL Animation specification the keyTimes attribute is described and the following constraint is given:
	&#8220;For linear and spline animation, the first time value in the list must be 0, and the last time value in the list must [...]]]></description>
			<content:encoded><![CDATA[	<p>Following are a couple of issues I&#8217;ve come across with regards to <code>keyTimes</code>.</p>
	<p>1. In <a href="http://www.w3.org/TR/2001/REC-smil-animation-20010904/#KeyTimesAttribute">section 3.2.3 of the SMIL Animation specification</a> the <code>keyTimes</code> attribute is described and the following constraint is given:</p>
	<blockquote><p>&#8220;For linear and spline animation, the first time value in the list must be 0, and the last time value in the list must be 1.&#8221;</p></blockquote>
	<p>Later in that section, the following example is given:</p>
	<p class="elem">&lt;animate <span class="attr">attributeName=&#8221;foo&#8221;</span> <span class="attr">from=&#8221;10&#8243;</span> <span class="attr">to=&#8221;20&#8243;</span><br />
<span class="attr">dur=&#8221;10s&#8221;</span> <span class="attr">keyTimes=&#8221;0.0; 0.7&#8243;</span> <span class="attr">calcMode=&#8221;spline&#8221;</span> <span class="attr">keySplines=&#8221;.5 0 .5 1&#8243;</span>/&gt;
</p>
	<p class="elem">
&lt;/animate&gt;
</p>
	<p>The behaviour of the example is given as &#8220;The <code>keyTimes</code> values cause the value of 20 to be reached at 7 seconds, and to hold there for the remainder of the 10 second simple duration.&#8221;</p>
	<p>This seems to contradict the constraint provided earlier. Perhaps this is a special case for from-to animation but I can&#8217;t find a reference to such an exception elsewhere.</p>
	<p>In the patch I&#8217;ve prepared I have a <code>#define</code> (<code>ALLOW_BAD_KEYTIMES</code>). If this is defined then no constraint checking is performed and specs such as <code>keyTimes="0.0; 0.7"</code> or even <code>keyTimes="0.3; 0.9"</code> are allowed and provide the behaviour described above.</p>
	<p>I think it is reasonable to allow this behaviour because:</p>
	<ul>
<li>There is an example using this notation in the spec and many authors will just copy the code examples rather than reading the spec.</li>
	<li>The behaviour in this case is quite obvious. From memory Opera and ASV allow it but I&#8217;ll have another look soon.</li>
	</ul>
	<p>2. In the same section (3.2.3) the following example is given of the <code>keyTimes</code> attribute:</p>
	<p class="elem">&lt;animateColor <span class="attr">attributeName=&#8221;color&#8221;</span> <span class="attr">dur=&#8221;10s&#8221;</span> <span class="attr">calcMode=&#8221;discrete&#8221;</span> <span class="attr">values=&#8221;green; yellow; red&#8221;</span> <span class="attr">keyTimes=&#8221;0.0; 0.5;&#8221;</span>/&gt;
</p>
	<p>Firstly, the trailing semi-colon in the <code>keyTimes</code> value seems out of place but perhaps it is my understanding of the following explanation that is at fault:</p>
	<blockquote><p>
&#8216;This example also shows how <code>keyTimes</code> values can interact with an indefinite duration. The value of the &#8220;color&#8221; attribute will be set to green for 5 seconds, and then to yellow for 5 seconds, and then will remain red for the remainder of the document, since the (unspecified) duration defaults to &#8220;indefinite&#8221;.&#8217;
</p></blockquote>
	<p>I first thought that perhaps the &#8220;unspecified duration&#8221; referred to the missing keyTime but nowhere else is it mentioned that keyTimes can be indefinite. Furthermore I would not expect that such a keyTime specification can extend the duration of the <code>&lt;animateColor&gt;</code> element beyond its specified duration of 10s but the description says it &#8220;will remain red for the remainder of the document.&#8221;</p>
	<p>I&#8217;ve posted these questions to <a href="http://lists.w3.org/Archives/Public/www-smil/2005OctDec/0006.html">www-smil@w3.org</a> but so far haven&#8217;t received any response.</p>
	<p>Your helps is greatly appreciated! Please leave a comment if you have any suggestions.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://brian.sol1.net/svg/range-for-keytimes/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
