[x3d-public] JavaScript news from meeting with Don today.

Don Brutzman brutzman at nps.edu
Tue May 26 20:27:05 PDT 2020


I think some of the biggest insights from our meeting Monday is what not to do.  Summary:

a. X3DOM does things its way and is a separate codebase.
b. X_ITE does things its way and is a separate codebase.
c. Node.js    does things its way, and is an appealing execution environment.
d. X3D Script does things its way, with Javascript well defined by X3D specification and widely used.
e. X3D JSON   does things its way, providing another flavor of JavaScript with matching X3D scene-graph representation.
f. Graphics rendering is not needed.  If program creates X3D scene graph objects via JavaScript, then serialize out to X3DOM and/or X_ITE.
g. Multiple open-source codebases in multiple languages exist that have implemented JavaScript in Script node.

So how is this for best motivating goals, following pattern of our successful Java and Python journeys:

1. let JavaScript authors write code like a Script node that also runs in Node.
2. should be easy to add X3DJSON loader/serializer to that.

If this sounds complex, de-stress and re-read.  Super simple is goal.

On 5/25/2020 6:31 PM, John Carlson wrote:
> 
> I'm asking Don to look into the X3dToNodeJS.xslt stylesheet.

Define NodeJS for X3D and then conversion is simple.  Without it, no conversion is possible.  So, first things first.

Examples of direct interest that create X3D via Script node (Ecmascript SAI) are numerous and remain:

[1] https://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/

[2] X3D Example Archives: Basic, X3D Specifications: see ECMAScript examples
     https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/

[3] X3D Example Archives: VRML 2 Sourcebook, Chapter 30 Scripts
     https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter30Scripts/

[4] X3D Example Archives: Conformance Nist, Miscellaneous, Script
     https://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/Script/

[5] X3D Example Archives: X3D for Web Authors, Chapter 09 Event Utilities Scripting
     https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/

Suggestion: first have fun! go through these several dozen examples, confirm that online versions work.  Understand them.

Then look at script code and that is your design basis.

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



More information about the x3d-public mailing list