[x3d-public] X3D meeting minutes 1 MAR 2019: X3Dv4 architectureand event-exchange diagrams, progress review

John Carlson yottzumm at gmail.com
Mon Mar 4 23:54:45 PST 2019


Andreas, if you look at Don’s event loops picture, there’s a double loop, and (DOM, X3D) events exchange between the loops.  I don’t know how it’s determined what goes over to the “other side” but somehow that’s determined. Probably an event cannot be exchanged twice.  Simple as that. We have booted the ROUTE issues for now (until we are ready I presume) and are focusing merely on events, much to my chagrin.

Until we rename the script tag in X3D, fields cannot be added to scripts, per HTML5 schema (I think).  Until fields can be added to scripts, we cannot add ROUTEs to scripts.  Reimplementing the script tag might be implemented with new Function.

The challenge would be to replace script fields with  DOM or JS since they can’t be added to X3DOM (replacing current X3D techniques).  That was the essence of my attempt in X3DJSONLD (bring X3DOM back into the X3D fold was a big effort of X3DJSONLD).  I got really hung up when I had to deal with a node field type and punted. (Actually, it was the JS replacement of variables in calls to my nodeUtil, see below for want ad).  If we pursue my technique, I recommend that we have a designer take two ROUTEs involving a script (those ROUTEs not currently handled by X3DOM) and break it down to JavaScript (to and from a script).  It’s going to get really confusing when a toField or fromField on a ROUTE refers to type SFNode field, I know.

Maybe we can go both ways and meet in the middle. I suggest we define a good SAI interface that we can build a declarative XML structure on top of, instead of trying these various implementations.   Suggestions?  What are the requirements for the SAI interface:

1. Route to XML with node.field
2. Route from XML  with node.field
3. Route to Scripts with script node, JavaScript variable or function
4. Route from Scripts with script node, JavaScript variable or function
5. Routes have a to and a from.
6. Routes are ran from events on the to side.

Is that it?

I have implemented an event loop that has a timestamp In X3DJSONLD.  See: https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/Script.js#L159
I think it might be overwhelming to do an eval in a loop.  I imagine a denial of service attack could be mounted on code memory (is this why eval is evil?)  Better designs are  welcome.

If you make any changes, please test with X3DJSONLD/src/main/html/prototypes.html and your own tests.

Lurking in the background is the Proto Expander.   It currently copies scripts to new namespaces, so it’s currently not affected.   That was my secret to implementing Protos before Scripts.

I do not know the future of ROUTEs. I know it’s going to be difficult to do declarative programming without them, if they go away.  I suggest we get together with other declarative programming people, and present a design which will capture the browser builder’s attention. If anything, I would encourage current X3D browser makers to support ROUTEs, if merely to drive implementers crazy!

If anyone is an expert on replacing script variable names with function calls on the DOM (return element, set attribute, get attribute and lower level X3DOM calls), please contact me.  I could really use your help.

John

Sent from Mail for Windows 10

From: Andreas Plesch
Sent: Monday, March 4, 2019 10:20 PM
To: Don Brutzman
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] X3D meeting minutes 1 MAR 2019: X3Dv4 architectureand event-exchange diagrams, progress review

I am getting a better sense now that there is a discussion on how to enable the DOM event mechanism for X3D events.

Currently, as mentioned, x3dom dispatches the same event ('outputchanged') for any x3d output event. An event listener function has to look into the event payload to determine what event happened. 

X-ITE does not interact with the DOM. With x_ite_dom.js it does and dispatches dom events for every output event. The dom events are named after the fieldname with a 'x3d_' prefix, for example x3d_isOver.

Routes

I suppose the equivalent to routes for DOM nodes is an event listener which changes the attribute of an element or/and a property of a DOM node. For HTML, routes would not be very useful since the payload value of events is not necessarily designed to become directly the value of an attribute. I think the reason is that events are thought of as part of dynamic, scripted changes and markup and css more for static, declarative content in HTML.
It might be possible to represent (and implement) x3d events and routes with dom events and dom event listeners except for the idea that there is a cascade of many events with a single timestamp.

Not sure how useful this was, Andreas







---on the phone---

On Fri, Mar 1, 2019, 7:18 PM Brutzman, Donald (Don) (CIV) <brutzman at nps.edu wrote:
Thanks for helpful information Andreas.  Partial responses:

On 3/1/2019 2:24 PM, Andreas Plesch wrote:
[...]
>  > c. Are ROUTE connections consistent?
> 
> Not sure what the question is. Consistent. Perhaps about timestamps?

Sorry.  Intended context is authoring... what does HTML/X3D page/scene look like syntactically, any differences there?


>  > d. X3DOM is still missing some important/simple Event Utility nodes - is there a problem?
> 
> Here are the currently implemented event utility nodes:
> 
> https://github.com/x3dom/x3dom/tree/master/src/nodes/EventUtilities
> 
> I can help if any are missing or misbehaving but I am not aware of any. Only the dev version has the nodes.
So perhaps we just need to deploy dev versions, and update status spreadsheet?

        X3D Node Inventory Comparison (updated 23 December 2017) shows
                implementation coverage of the X3D Abstract Specification
        http://www.web3d.org/specifications/X3dNodeInventoryComparison.xlsx
        http://www.web3d.org/specifications/X3dNodeInventoryComparison.ddf

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190305/ac9558fc/attachment-0001.html>


More information about the x3d-public mailing list