From: Andreas P. <and...@gm...> - 2016-02-03 19:03:03
|
Hi Leonard, this is very nice and functional, and will let us know understand better the concept behind the nodes. For convenience, I created a gist here: https://gist.github.com/andreasplesch/70996fb54acb198cdc41#file-x3dom_animate-user-js which can be used a Greasemonkey user script: https://gist.github.com/andreasplesch/70996fb54acb198cdc41/raw/7537a235655d9c0fd71df80a4ee2d3efaf942a25/x3dom_animate.user.js This allows use of nodes without explicitly linking them in via a script element in the html. Let me know if this is ok with you. It may be interesting to see if not having to have ROUTE keywords (elements) has already measurable performance benefits with your implementation. Looking at Animate.js I see that postMessage is avoided to get the fractional time to Interpolate nodes. I believe this is main benefit in terms of performance ? Looking at Interpolate.js, I see that destinations are also modified directly, eg. not via postMessage. I see that you are using the xml node (dom node) to set the interpolated value. There is probably also a way to find the scene (x3dom) node. Then you could use its fieldChanged() function directly which should be faster. You probably would have to use nodeChanged() for the Interpolate initialisation since when nodeChanged() is called more (all?) of the scene is parsed into scene (x3dom) nodes. Hope this helps, Andreas On Mon, Feb 1, 2016 at 12:24 PM, Leonard Daly <Leo...@re...> wrote: > On 2/1/2016 2:04 AM, Max Limper wrote: > > Hey, cool - congratulations Leonard! > > The example code looks very clean and interesting. > I guess having such an example will greatly facilitate discussion about > this topic, regarding X3D V4. > > > Thanks, Max. I was inspired by the code that already was there. > > > > Regarding your contribution: Is there anything in particular that you > would like to see documented for future X3DOM contributors (since it was > hard to understand)? > > > I'll write up what I learned with some documentation. It will be more of a > tutorial and internals documentation. The part that took me the longest to > figure out and comprehend is how to access a node from the one currently > being processed -- 'this' in the node routines. I'm sure there will be more > in the future. > > My biggest change from V3 content is to replace the ROUTE statements with > parent/child Animate and Interpolate (eliminates 1 ROUTE), and Interpolate > identifying the destination (eliminates 2nd ROUTE). This was done because > prior work had indicated that the creation of an event (which ROUTE does), > consumes a lot of resources. I'm not against ROUTEs, but I felt they were > heavy for something that needs to happen frequently on short time intervals > (e.g., Animation). > > This idea separates into using ROUTEs as triggers, and direct updates for > animation. > > What do people think? > > > Leonard Daly > > > > Best, > Max > > > On 01.02.2016 05:03, Leonard Daly wrote: > > Mission Accomplished! Thanks to everyone who offered suggestions, > including Andreas Plesch, Max Limper, and others. > > I have written a new node for X3DOM. The node is a functional replacement > for TimeSensor, interpolators, and ROUTE. The example is at > http://tools.realism.com/Basx3D/x3dom/x3dom/test/V4/Animate.html > > The preliminary documentation is for Animate and Interpolate at > http://tools.realism.com/specification/x3d-v40/changes-additions-x3d-v33. > These nodes are for X3D V4 to test various ideas for workflow compatibility > and performance in a DOM environment. > > Comments and suggestions for improving the design (or implementation are > welcome. The source for these nodes is at > Animate: > http://tools.realism.com/Basx3D/x3dom/x3dom/src/nodes/Time/Animate.js > Interpolate: > http://tools.realism.com/Basx3D/x3dom/x3dom/src/nodes/Interpolation/Interpolate.js > > I will also start to document various structures of X3DOM. > > -- > *Leonard Daly* > X3D Co-Chair > Cloud Consultant > President, Daly Realism - *Creating the Future* > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now!http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > > _______________________________________________ > x3dom-developers mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/x3dom-developers > > > -- > Dipl.-Inform. Max Limper > > Visual Computing System Technologies > Fraunhofer-Institut für Graphische Datenverarbeitung IGD > Fraunhoferstraße 5 | 64283 Darmstadt > Phone: +49 6151 155-554 | Fax: -19...@ig... > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now!http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > > _______________________________________________ > x3dom-developers mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/x3dom-developers > > > > -- > *Leonard Daly* > 3D Systems & Cloud Consultant > X3D Co-Chair on Sabbatical > LA ACM SIGGRAPH Chair > President, Daly Realism - *Creating the Future* > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > x3dom-developers mailing list > x3d...@li... > https://lists.sourceforge.net/lists/listinfo/x3dom-developers > > -- Andreas Plesch 39 Barbara Rd. Waltham, MA 02453 |