<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Date: Mon, 10 Jul 2017 08:40:42 -0700<br>
From: Leonard Daly <<a href="mailto:Leonard.Daly@realism.com">Leonard.Daly@realism.com</a>><br>
To: <a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a><br>
Subject: Re: [x3d-public] default interpolation keys<br>
Message-ID: <<a href="mailto:82a1dc2f-4021-2778-8a15-a069666b9a2a@realism.com">82a1dc2f-4021-2778-8a15-<wbr>a069666b9a2a@realism.com</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
Andreas,<br>
<br>
This is a very reasonable suggestion. As you point out, there would be<br>
no way to get an empty key field except when keyValue was also empty.<br></blockquote><div><br></div><div>The only situation I can vaguely imagine when empty key and keyValue fields would be useful is an initial state which does not want to be immediately changed to a functional, fully populated interpolator. But this would be likely a misuse since activation like this should be done more explicitly.<br></div><div>Although there is the statement that an empty keyValue field is valid and leads to returning of the initial value for the field data type. This indicates that there was some idea of a situation when this behavior would be expected.</div><div>Hm, there seems to be contradiction since an empty keyValue field requires an empty key field which should lead to no events at all, eg. no returning of any value ?</div><div>Regardless, the empty fields behavior would not change if both fields are explicitly given as empty. Just the default key field value would change when no key value is provided.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I haven't looked, but I suspect A-Frame uses TWEEN to do the<br>
interpolations. TWEEN automatically provides evenly spaced keys when<br>
given multiple keyValues. I was planning on working on an upgrade for<br>
that sometime this fall. Please let me know if you are going to make<br>
modifications to TWEEN.<br>
<br></blockquote><div><br></div><div>Yes, A-Frame uses TWEEN. The proposed default key value would correspond to the default TWEEN behavior. I had raised an issue with Tween here to discuss keyed animation:</div><div><a href="https://github.com/tweenjs/tween.js/issues/352">https://github.com/tweenjs/tween.js/issues/352</a><br></div><div><br></div><div>As discussed there it turns out that by using custom (piecewise) interpolation or custom easing it is already possible to do key frame animation with Tween. This is what I do for the A-Frame keyframes component. So I do not think there will be changes to Tween although the maintainer expressed some interest.</div><div><br></div><div>Andreas</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Leonard Daly<br>
<br>
<br>
<br>
> The default key field value is [ ], empty.<br>
><br>
> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/interp.html#X3DInterpolatorNode" rel="noreferrer" target="_blank">http://www.web3d.org/<wbr>documents/specifications/<wbr>19775-1/V3.3/Part01/<wbr>components/interp.html#<wbr>X3DInterpolatorNode</a><br>
><br>
><br>
> recognizes the validity of an empty key field, which then means no<br>
> events are generated and no interpolation happens.<br>
><br>
> Is that behavior useful for any situation ? A serious question,<br>
> perhaps for prototypes somehow ?<br>
><br>
> I am developing an Aframe equivalent to interpolation nodes<br>
> (<a href="https://github.com/andreasplesch/aframe-keyframes-component" rel="noreferrer" target="_blank">https://github.com/<wbr>andreasplesch/aframe-<wbr>keyframes-component</a>) and<br>
> weigh other default key values.<br>
><br>
> Specifically, I am leaning towards a default which provides constant<br>
> intervals for keyValues. If there are 5 keyValues, the default keys<br>
> would be [0,0.25,0,5,0.75,1]. This is what most commonly may be the<br>
> expected behavior from an interpolator. Given n keyValues, default<br>
> keys are [0/(n-1), 1/(n-1) .., (n-1)/(n-1)].<br>
><br>
> The benefits of such a default are least surprise, and more concise<br>
> scenes.<br>
><br>
> The drawback is backwards incompatibility although I have not seen a<br>
> scene which uses the default key field value.<br>
><br>
> My goal is to raise a better informed specification comment as I feel<br>
> there may be more to consider.<br>
><br>
> Any comments are very welcome,<br>
><br>
> Andreas<br>
><br><br>
--<br>
*Leonard Daly*<br>
3D Systems & Cloud Consultant<br>
LA ACM SIGGRAPH Chair<br>
President, Daly Realism - /Creating the Future/<br><br></blockquote></div>
</div></div>