<div dir="ltr"><div>This is an example on how the DOM via javascript is used to animate. There is no difference between a script element inside or outside a svg scene which is a fragment of a document.<br><br><a href="https://www.w3.org/TR/SVG11/script.html#ScriptElement">https://www.w3.org/TR/SVG11/script.html#ScriptElement</a><br><br></div>Andreas<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 1, 2016 at 5:23 AM, Joe D Williams <span dir="ltr"><<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script" rel="noreferrer" target="_blank">https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script</a><br>
<br>
<br>
----- Original Message ----- From: "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br>
To: "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
Sent: Thursday, March 31, 2016 4:42 PM<br>
Subject: Re: [x3d-public] id attribute proposal<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://blogs.adobe.com/dreamweaver/2015/06/the-state-of-svg-animation.html" rel="noreferrer" target="_blank">http://blogs.adobe.com/dreamweaver/2015/06/the-state-of-svg-animation.html</a><br>
<br>
has a lengthy discussion on SVG animation. It concludes that animation via<br>
the DOM are in many cases the best option because SMIL is deprecated and<br>
easily replaced by more powerful JavaScript.<br>
<br>
I was hoping that the article goes into how collisions between SMIL, CSS<br>
and DOM based animation are resolved but it does not. Apparently it is not<br>
a concern.<br>
<br>
Andreas<br>
<br>
It turns out that SVG uses the SMIL animation model:<br>
<br>
<a href="https://www.w3.org/TR/smil-animation/" rel="noreferrer" target="_blank">https://www.w3.org/TR/smil-animation/</a><br>
<br>
It defines that animation does not affect the DOM value of an animated<br>
property but a separate presentation value which is only accessible to the<br>
animation runtime, and not the DOM. The specification does not go into what<br>
values are used for rendering but the idea is certainly that the<br>
presentation value is used. This would make it necessary for a renderer to<br>
keep track of what attributes are currently animated by SVG and which ones<br>
are not. Since the animate element is the only possible way to do this in<br>
SVG, this is feasible. For the richer X3D scene graph, this would be much<br>
harder and does not seem like a good model to follow at first glance.<br>
<br>
Andreas<br>
<br>
</blockquote>
<br>
<br>
--------------------------------------------------------------------------------<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div>