<div dir="ltr"><div>The cobweb_dom event logger now includes the x3d time stamp for each event:<br></div><div><br></div><a href="https://andreasplesch.github.io/cobweb_dom/tests/interactiveTransformations.xhtml">https://andreasplesch.github.io/cobweb_dom/tests/interactiveTransformations.xhtml</a><div><div><br></div><div>For documentation purposes some related findings:</div><div><br></div><div>Looking at Chrome, it turns out that Chrome reports dom event creation time stamps in (hi-res) milliseconds after initial page loading:</div><div><br></div><div><a href="https://developers.google.com/web/updates/2016/01/high-res-timestamps">https://developers.google.com/web/updates/2016/01/high-res-timestamps</a><br></div><div><br></div><div>Firefox, on the other hand, reports in integer microseconds after 1970.</div><div><br></div><div>Both, therefore, do not follow the DOM spec. which says time stamps should be in milliseconds after 1970:</div><div><br></div><div><a href="http://www.w3.org/TR/dom/#dom-event-timestamp">http://www.w3.org/TR/dom/#dom-event-timestamp</a><br></div><div><br></div><div>Firefox documentation apparently needs to be updated:</div><div><br></div><div><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp">https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp</a><br></div><div><br></div><div>(Perhaps event.timeStamp was not available until recently?)</div><div><br></div><div>-Andreas</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 30, 2016 at 2:06 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Date: Sun, 30 Oct 2016 09:34:38 -0700<br><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">
From: Michael Aratow <<a href="mailto:maratow@noegenesis.com" target="_blank">maratow@noegenesis.com</a>><br>
To: <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
Subject: Re: [x3d-public] event utility usage, and event tracing<br>
        techniques<br>
Message-ID: <<a href="mailto:2037c542-880d-58ea-01b4-b03cf24f80c4@noegenesis.com" target="_blank">2037c542-880d-58ea-01b4-b03cf<wbr>24f80c4@noegenesis.com</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
If we take WebVR into consideration, these types of delays are significant.<br>
<br>
Do you anticipate problems?  End to end system delay in VR systems must<br>
be 20 milliseconds or less to avoid simulator sickness.<br></blockquote><div><br></div><div>I am not sure these can be called delays. The actual rendering time of the frame is not the bind time (of a viewpoint) but occurs afterwards.<br><br></div><div>Latency would be the time from some input via a controller to the time the input has an effect on the rendering.<br><br></div><div>Not sure how to measure this. cobweb has timing measurements to show how much time is spent for various processing steps.<br><br></div><div>Overall, I would expect that there will be a penalty for using the DOM to control a scene, and that there is room for using a predictive capability to reduce perceived latency.<br><br></div><div>A-Frame and three.js are trying hard to reduce latency. It will be difficult to improve on or match their efforts.<br><br></div><div>-Andreas<br></div><div><br></div><div> On 10/30/16 7:59 AM, Andreas Plesch wrote:> Hello,><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> cobweb_dom v0.7 is now available. It has full support for<br>
> ProtoInstance nodes and basic event tracing capability.<br>
><br>
> v0.7 requires the latest development cobweb.js, eg cobweb > 2.3 .<br>
><br>
> Event tracing to the console can be enabled by providing a 'trace'<br>
> attribute to the X3DCanvas element (with any value).<br>
><br>
> All output x3d events are logged. Here is an example:<br>
><br>
> 1477837418917000: Background  x3d_isBound: true<br>
> 1477837418918000: Background  x3d_bindTime: 1477837418.9007943<br>
> 1477837418919000: Viewpoint  x3d_isBound: true<br>
> 1477837418920000: Viewpoint  x3d_bindTime: 1477837418.9007943<br>
> 1477837421509000: CylinderSensor aroundX x3d_isOver: true<br>
> ...<br>
><br>
> (using<br>
> <a href="https://andreasplesch.github.io/cobweb_dom//tests/interactiveTransformations.xhtml" rel="noreferrer" target="_blank">https://andreasplesch.github.i<wbr>o/cobweb_dom//tests/interactiv<wbr>eTransformations.xhtml</a><br>
> )<br>
><br>
> The frontal time stamp is the DOM event creation time stamp in<br>
> microseconds produced by the web browser and available to DOM event<br>
> listeners.<br>
> It is interesting to see the difference between the time stamp and say<br>
> the bindTime of the Background node, 18.918s - 18.901s = 17 ms<br>
> or for Viewpoint: 18.920 - 18.901 = 19 ms.<br>
> So it takes a bit for cobweb to call the event callback which creates<br>
> the DOM event.<br>
> When a DOM event listener captures the event, it may be a little later<br>
> again.<br>
> With a fps of 30, a frame lasts 33ms.<br>
> It will be interesting to compare what time stamps and values are<br>
> reported with the x3d-edit trace scripts.<br>
><br>
> -Andreas<br>
><br>
><br>
><br>
> On Sat, Oct 29, 2016 at 8:00 PM, Andreas Plesch<br>
> <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a> <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.co<wbr>m</a>>> wrote:<br>
><br>
>     On Oct 29, 2016 6:20 PM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
>     <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>> wrote:<br>
>     ><br>
>     > On 10/29/2016 2:21 PM, Andreas Plesch wrote:<br>
>     >><br>
>     >> [...]<br>
>     >><br>
>     >> Since logging all fields for all nodes becomes quickly a bit<br>
>     overwhelming, it would be a nice touch to be able select in the<br>
>     GUI which fields are traced (by default all).<br>
>     ><br>
>     ><br>
>     > excellent idea.  not easily accomplished with current setup, but<br>
>     will keep it in mind as a future feature in X3D-Edit.<br>
>     ><br>
>     > for that matter, couldn't someone someday somewhere create such<br>
>     a widget in HTML that listened to all ROUTEs, as selected?  8)<br>
><br>
>     It should be possible find all elements referenced by fromNode<br>
>     attributes in ROUTE elements and attach event listeners with<br>
>     handlers which just log to the console. Let me give it a try.<br>
><br>
>     Andreas<br>
><br>
><br>
><br>
><br>
> --<br>
> Andreas Plesch<br>
> 39 Barbara Rd.<br>
> Waltham, MA 02453<br>
><br>
><br>
> ______________________________<wbr>_________________<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/listi<wbr>nfo/x3d-public_web3d.org</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161030/b0184271/attachment.html" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3<wbr>d-public_web3d.org/attachments<wbr>/20161030/b0184271/attachment.<wbr>html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<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/listi<wbr>nfo/x3d-public_web3d.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of x3d-public Digest, Vol 91, Issue 81<br>
******************************<wbr>************<span class="gmail-HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="gmail-HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="gmail-m_-8528691112782686802gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div></div></div>