[x3d-public] Moving away two language solutions for X3DJSAIL.

Don Brutzman brutzman at nps.edu
Thu Apr 15 08:49:00 PDT 2021


(Subject line seems incorrect, Java X3DJSAIL and Python x3d.py X3DPSAIL are maintained and active)

On 4/9/2021 3:51 AM, John Carlson wrote:
> 
> I've been planning to deprecate pythonSAI.  This is the python API that
> uses pyjnius to access X3DJSAIL.  This is because the web3d consortium
> has come out with their own SAI candidate x3d.py, which is much better
> documented and uses more features from X3DUOM.  Not only that, I don't
> think that pyjnius works on Linux very well!  What I plan on doing is
> moving my PythonSerializer.js towards using x3d.py.

Yes, x3d.py (aka X3DPSAIL) is actively maintained and is autogenerated from X3D Unified Object Model (X3DUOM).

When there are utility methods of interest in Java X3DJSAIL that might be suitable for python as well, we can translate and add them.

> In general, there's some dissatisfaction with using non-Java languages
> with X3DJSAIL.  Nashorn got tossed by Oracle, and the npm java package
> likely requires an old version of python for node-gyp.

Nashorn and jjs were deprecated for removal in JDK 15, and are gone in the latest Java JDK 16.  Link from JDK15 release notes:

* OpenJDK15 release notes
   https://openjdk.java.net/projects/jdk/15/

* JEP 372: Remove the Nashorn JavaScript Engine
   https://openjdk.java.net/jeps/372

> The good news is, we're coming out with new, one-language solutions.
> Not only x3d.py, but there's X3DOM and X_ITE for JavaScript.   Also, the
> es6x3d project was started by me.  Es6x3d offers classes and new get/set
> methods compatible with es6. Meanwhile GraalVM is still around in the
> short term for Nashorn folks trying to migrate.  If you need a
> conversion from X3D JSON or X3D XML to a particular programming language
> or encoding and can't stomach XSLT, let me know!  I don't mind
> volunteering on non-X3D projects, but I prefer ASCII or UTF-8 encodings!

It will be good to finish our upgrade of X3D JSON Schema using X3DUOM to match JSON draft-07 with testing by multiple tools.  Let's persevere please.

X3DJSAIL has -toJSON output.  JSON output still needs to be written for x3d.py, this is a recursive serializer for each node and so the pattern for autogeneration isn't particularly difficult.

Having an ECMAScript SAI usable with Node.js that is autogenerated (i.e. always correct) similar to X3DJSAIL and X3DPSAIL would be good.

Perhaps this could be a distillation of your work as a concise package while innovative extensions continue.

> I already have X3D JSON <-> STL and PLY -> X3D JSON in mini prototypes.

Adding STL and PLY support to Java X3DJSAIL and x3d.py X3DPSAIL is definitely a goal.  Hoping we can integrate in Java first, that is where testing best occurs.

> Is anyone doing AMF yet?  Looks like there's a lot more interest in STL
> than AMF!

There are some AMF conversion classes in Xj3D, written by Alan Hudson I believe.  Some refreshes to the following codebase are underway and we will soon test under OpenJDK 16.

* Xj3D viewer: NPS source
   https://savage.nps.edu/Savage/developers.html#Xj3D

> For my STL -> JSON project, does anyone have experience with inverseCSG
> or CSGNet?  Thanks! https://arxiv.org/pdf/1912.11393.pdf
> 
> John

the last update there appears to be 3 years ago.

* https://github.com/Hippogriff/CSGNet

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