<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Andreas,<br>
<br>
I haven't had a chance to read and digest your post yet. You might
wish to take a look at the TWEEN JavaScript library. It does
linear interpolation, but has a large number of easings for the
way-points. XSeen uses this library for all animations. Docs are
at
<a class="moz-txt-link-freetext" href="https://github.com/tweenjs/tween.js/blob/master/docs/user_guide.md">https://github.com/tweenjs/tween.js/blob/master/docs/user_guide.md</a>.<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
<br>
<br>
</div>
<blockquote type="cite"
cite="mid:CAKdk67t1HvCw-sGcteB6kwM1jc-1WVa87shXv8qmeHJ8yyKmyw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="auto">As I am looking to add glTF animation support for
x3dom, I am considering convenient ways to do cubic spline and
step wise interpolation with x3d interpolators.
<div dir="auto">glTF has three modes of interpolation: linear,
cubic spline, step.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Linear corresponds to the linear interpolation
of the regular x3d interpolators.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Step produces jumps at key times, and can be
represented with x3d interpolators also, by repeating keys.
However, implementation could be optimized for a special step
mode.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Cubic spline almost corresponds to the x3d
spline interpolators but not exactly. With glTF, the velocity
derived tangent can be different towards and away from a key
frame, while in x3d there is only a single velocity. Also, in
glTF, the tangents are requied and part of a 3 tuple for each
frame. This makes computing the cubic spline interpolation
straightforward and performant. </div>
<div dir="auto"><br>
</div>
<div dir="auto">So it turns out to be most convenient and
efficient to forgo the x3d spline interpolators and instead
add a mode SFString init only field to the regular
interpolators with a 'linear' default. I currently have it not
exposed declaratively and for use with glTF only but why not
expose it.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Such a mode field allows for optimization of
step and cubic spline interpolation over regular, and NURBS
interpolators, and allows for full glTF animation support.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Other browsers may have similar goals but likely
differing strategies which would be great to hear about.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Any feedback or comment much welcome,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Andreas</div>
<div dir="auto"><br>
<div data-smartmail="gmail_signature" dir="auto">-- AP on the
road</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
x3d-public mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>
<a class="moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>
</pre>
</blockquote>
<p><br>
</p>
<div class="moz-signature">-- <br>
<font class="tahoma,arial,helvetica san serif" color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
3D Systems & Cloud Consultant<br>
LA ACM SIGGRAPH Past Chair<br>
President, Daly Realism - <i>Creating the Future</i>
</font></div>
</body>
</html>