[x3d-public] [x3dom-developers] updated X3D node, statement inventory spreadsheets: X3DOM node addition recommendations

Andreas Plesch andreasplesch at gmail.com
Fri Oct 6 11:25:19 PDT 2017


Once one gets used to the verbosity required by the Event Utilities
component and the related ROUTEing, there is a lot of value and it often
becomes possible to replace X3D scripts. Sometimes the nodes even allow for
more concise expression of logic, and will enable quite a few authors to
add reactivity and branching to a scene which otherwise could not do that
due to a perceived (?) difficulty of scripting.

After spec. and other X3D viewer review for best compatibility, I completed
implementation of Event Utility nodes for x3dom and requested them to be
pulled into the main x3dom github repo. For now it also possible to simply
load the js implementations after x3dom.js on a web page. To make this
convenient, I collected all node code into a single file here:

https://gist.github.com/andreasplesch/bc44534cb072dd0d88a77406fcecf4b0/raw/479293afc7bc15810caf98a63b5a29a6bf87b472/x3dom_eventUtilities.user.js

This also contains a fix for TouchSensor to enable the touchtime field
which is often used in connection with the event utilities.
This file is simultaneously a user script which can be applied by a web
browser to any web page. With the user script loaded many example scenes
which use event utility nodes start to work as long as they do not use X3D
script nodes.

I will also add a x3dom only ScalarSequencer node since I believe it can be
very useful to access all Interpolator types and since it is very
straightforward to implement.

Enjoy scriptless logic,

-Andreas


On Sat, Sep 2, 2017 at 11:02 AM, Andreas Plesch <andreasplesch at gmail.com>
wrote:

>
> CoordinateDouble for x3dom would be a bit pointless but easy to implement
> as a CoordinateDouble.js implementation would be identical to
> Coordinate.js, except for the node name. No other files would need to be
> touched.
>
> It is part of the Nurbs component which otherwise would require
> substantial effort to realize.
>
> The event utilities just feel like not a good fit for a declarative style
> but probably could be implemented if there is a real demand. They do not
> seem to be used much since generally it is more natural to use a x3d or dom
> script for logic. Is there a convincing use case/example somewhere to
> promote them ? Potential users understand routing and logic but do not want
> to bother with scripting. Perhaps a small group but who knows.
>
> I do not think x3dom's goal is to have complete node coverage. In fact,
> there was an attempt to define a special profile which would fit x3dom.
>
> Although regrettably there is no developer documentation it is not hard to
> add functionality since the code is open and fairly well organized though
> aging at this point (some DOM methods it uses are deprecated for some
> time). X3dom is easy and fun to hack, mostly by overriding methods. Try
> things on glitch or jsfiddle.
>
> On the other hand there is quite a bit of extra functionality in x3dom
> which should inspire standardization or more widespread implementation in
> other viewers. CommonSurfaceShader or turntable navigation comes to mind.
>
> For reference:
> http://www.web3d.org/documents/specifications/19775-1/V3.3/
> Part01/components/nurbs.html#CoordinateDouble
>
> Andreas
>
>
> On Sep 1, 2017 9:16 PM, "Don Brutzman" <brutzman at nps.edu> wrote:
>
> No doubt many people share the concern that X3DOM development, while
> actively continuing, has not added support for missing X3D nodes in a long
> while.
>
> In years past, community source-code contributions for new nodes in X3DOM
> always seemed to require updating by insider experts.
>
> Am wondering if remains difficult to add new X3D nodes to the primary
> X3DOM build?  Making that task easier likely has great value.
>
> Towards that end, recommend the following progressive priorities to
> improve X3DOM node support towards X3D Immersive profile (essentially
> VRML97 capabilities).
>
> a. CoordinateDouble.  Hopefully just a simple variation of Coordinate
> node.  (Note that all floating-point values in Javascript have double
> precision.)  Adding this simplest-possible variation will reveal what other
> X3DOM files have to be modified to recognize a new node.
>
>         https://doc.x3dom.org/developer/x3dom/nodeTypes/Coordinate.html
>
>         https://github.com/x3dom/x3dom/tree/master/src/nodes/Rendering
>         https://github.com/x3dom/x3dom/blob/master/src/nodes/Renderi
> ng/Coordinate.js
>
> b. Event utilities:  simple input-output type conversion algorithms.
>         BooleanFilter
>         BooleanSequencer
>         BooleanToggle
>         BooleanTrigger
>         IntegerSequencer
>         IntegerTrigger
>         TimeTrigger
>
>         EventUtilities component is not found in source tree,
>         https://github.com/x3dom/x3dom/tree/master/src/nodes
>
>         X3D Abstract Specification, Event Utilities component
>         http://www.web3d.org/documents/specifications/19775-1/V3.3/P
> art01/components/utils.html
>
>         Basic Examples Archive: example Javascript proto implementations
>         http://www.web3d.org/x3d/content/examples/Basic/development/
> EventUtilityPrototypesIndex.html
>         http://www.web3d.org/x3d/content/examples/Basic/development/
> EventUtilityExamplesIndex.html
>
> Applying and improving developer documentation for new nodes would be
> further important to accomplish at the same time.  Not seeing a "How to Add
> a Node" section, however...
>
>         X3DOM Developer API Documentation
>         https://doc.x3dom.org/developer/index.html
>
> c. Prototype declarations and instances.  As ever, prototypes remain
> fundamental and are a key part of extensibility, literally the "X" in X3D.
>
> There have been on-again/off-again efforts to define and implement a
> Prototype Expander algorithm as a preprocessor for X3D players.  Seems like
> a good time to resume working at this.
>
>         https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14-
> Prototypes/MaterialModulatorPrototypeExpandedIndex.html
>         http://web3d.org/pipermail/x3d-public_web3d.org/2016-July/00
> 4982.html
>         and many follow-on threads, steadily progressing that work,
> especially
>
>         Source is somewhere in:
>         https://github.com/coderextreme/X3DJSONLD
>
> ... and so on.  Possible?
>
> It will be great if some X3DOM developers might "step up" to show that
> node addition is do-able.
>
> Hopefully this list helps triage simple/moderate/advanced work that is
> needed.
>
> Have fun with X3DOM!  8)
>
>
> On 9/1/2017 5:31 PM, Don Brutzman wrote:
>
>> Am happy to report improvements and updates to the X3D node + statement
>> inventory spreadsheets:
>>
>>      http://www.web3d.org/specifications/X3dNodeInventoryComparison.xlsx
>>      http://www.web3d.org/specifications/X3dNodeInventoryComparison.pdf
>>
>> Updates include readability improvements and addition of view3dscene
>> (Castle Game Engine) support.
>>
>> Some interesting statistics follow, also attached in image.
>> =====================================================================
>> X3D Abstract Specification      Cobweb Castle X3DOM  X3D-Edit Xj3D
>>
>> Supported nodes and statements: 73%    57%    61%    87%      68%
>> (251 total, X3D specification)  182    144    154    218      171
>>
>> Unimplemented nodes:            69     93     97     33       80
>>
>> needed for HTML5 support goals
>> * required for X3D Immersive    all    all    19    all     2
>> * suggested for HTML5 support   2      14     13    all     5
>> * priority nodes missing:       2      14     32    0       7
>> =====================================================================
>>
>> Am willing to add others, now that spreadsheet refactoring permits it.
>> Please send an alphabetized verified list of supported nodes.
>>
>> Have fun with X3D!
>>
>
> 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/brutzma
> n
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> x3dom-developers mailing list
> x3dom-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x3dom-developers
>
>
>


-- 
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20171006/4a51fe77/attachment-0001.html>


More information about the x3d-public mailing list