[x3d-public] Alpha quality X3DJSONLD

John Carlson yottzumm at gmail.com
Tue Feb 27 13:50:27 PST 2024


https://github.com/coderextreme/X3DJSONLD

X3DJSONLD is typically used to convert XML to JSON (currently
X3dToJson.xslt, but others have been tried) and then to Java, GraalJS, and
Python, followed by a roundtrip conversion back to JSON and/or XML.

X3DJSONLD/X3DJSAIL records intermediate XML for debugging X3DJSONLD.js and
X3DJSAIL output.

An alternate version of x3d.py/X3DPSAIL is included in X3DJSONLD.  Feel
free to BYO.

New features of X3DJSONLD include the Blender scripts used in the Winter
and Spring project, which are used to convert files “offline” from the
Blender GUI, headless.

X3DJSONLD does not include Blender import/export plugins, GraalVM/GraalJS
(js.exe) or X3DJSAIL jars.  You will have to edit
X3DJSONLD/src/main/shell/classpath and maybe others.

A typical way to use X3DJSONLD is to copy a file, say, foo.x3d to
X3DJSONLD/src/main/data:

$ cp foo.x3d X3DJSONLD/src/main/data/

Then run conversion script:

$ cd X3DJSONLD/src/main/shell/

$ bash several.sh ../data/foo.x3d

You may wish to pipe output to less:

$ bash several.sh ../data/foo.x3d 2>&1 | less

This will provide a full log of the conversions and comparisons.

Converted files may be picked up in ../data/ and ../*/net/coderextreme/data/

You may wish to use don.sh instead of several.sh for using stylesheets for
conversions.  In that case, files are picked up in ./*/net/x3djsonld/data/

Main differences include more than a single class per file to ameliorate
compiler issues on large files.  Human splitting of code is required for
some HAnim models.

I normally use Bourne Again Shell (git for windows, git bash) inside
Windows Terminal for best experience!

X3DJSONLD provides a full web environment for testing XML <-> JSON <-> EXI
conversions in the browser.

I will probably try to continue to evolve the JSON to C/C++ converters for
C/C++ SAI, since that is not covered by stylesheets.  Initial targets will
be the SAI, and maybe Coin3D.

I do not forsee a beta or production release, but one can use a JSON
validator included, if not x3dvalidate (an allied tool).

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


More information about the x3d-public mailing list