[x3d-public] page updates for X3DJSAIL; Using GraalJS and NodeJS recent stylesheets with X3DJSAIL.

John Carlson yottzumm at gmail.com
Wed Mar 20 16:40:32 PDT 2024


   - *Complete, nashorn is no longer supported.* coderextreme/X3DJSAIL
   <https://github.com/coderextreme/X3DJSAIL> development is testing and
   building many capabilities. Nashorn JavaScript
   <https://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html>
usage
   is demonstrated, and Maven <https://maven.apache.org/> build support is
   under consideration.

On:
X3DJSAIL: X3D Java Scene Access Interface Library (web3d.org)
<https://www.web3d.org/specifications/java/X3DJSAIL.html>

Nashorn  development has moved to GraalJS, which AFAIK is up to date
with current ECMAScript standards.

That should reference coderextreme/X3DJSONLD.  The coderextreme/X3DJSAIL
repository is code rot, v3.3 of the jars.  Pull requests welcome.

There is a Maven pom.xml and Gradle installation under
coderextreme/X3DJSONLD.

GraalJS is now preferred over Nashorn, and X3DJSONLD supports conversions
X3dToES5.xslt (sorry, wrong name).  Bring your own stylesheet to
X3DJSAIL.properties if desired.  X3dToNodeJS.xslt is possible, but hard to
install.

Here are alternate stylesheets for your perusal.

https://coderextreme.net/X3DJSONLD/src/main/lib/stylesheets/X3dToNodeJS.xslt

(one needs to install the node-java/java module, version 0.14.0 java - npm
(npmjs.com) <https://www.npmjs.com/package/java/v/0.14.0>.  Probably needs
recompilation and a reference locally, like

"java": "file:../node-java",

under dependencies in package.json.   You will need to clone the GitHub
repo. in a folder parallel to the folder your package.json is in.

You will also need to have this file:

X3DJSONLD/src/main/node/net/x3djsonld/data/X3Dautoclass.js at master ·
coderextreme/X3DJSONLD (github.com)
<https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/net/x3djsonld/data/X3Dautoclass.js>

or this file:

X3DJSONLD/src/main/node/X3Dautoclass.js at master · coderextreme/X3DJSONLD
(github.com)
<https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/X3Dautoclass.js>

(I think they may be the same)


For this reason for all the configuration, I find GraalJS easier to use,
and I'm pretty sure there's a commercially supported version (Oracle
provides a release).  Use this stylesheet for the latest.

https://coderextreme.net/X3DJSONLD/src/main/lib/stylesheets/X3dToES5.xslt

And this import file:

X3DJSONLD/src/main/graaljs/net/coderextreme/data/X3Dautoclass.js at master
· coderextreme/X3DJSONLD (github.com)
<https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/graaljs/net/coderextreme/data/X3Dautoclass.js>

(sorry, same name as above.  They are different files)

Don't forget to point the X3Dautoclass.js file to your own X3DJSAIL jar
file.

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


More information about the x3d-public mailing list