[x3d-public] Parsing/Loading X3D encodings...what's desired, what's the best design, etc. etc.

John Carlson yottzumm at gmail.com
Sat Apr 3 15:30:25 PDT 2021


Do people want a type-safe methods distributed across classes for 
loading encodings in JavaScript, Java, Python, and C/C#/C++, or a 
programming language class per encoding which loads an encoded file into 
a browser native scene graph?

This is market research for X3D JSON.  I know that Xj3D, last I heard, 
converted XML to VRML.  X3DJSONLD primarily converts JSON to a DOM 
structure, also other inputs formats which convert to JSON, namely PLY 
and STL.  So Xj3D would require 2 translations to load JSON via 
X3DJSONLD.   There might be demand for loading JSON directly in Xj3D, or 
loading by way of VRML.   X3DJSAIL has several inputs, 
https://www.web3d.org/specifications/java/X3DJSAIL.html#Conversions XML, 
EXI, GZIP, STL and ZIP.  I believe each of these encodings is pretty 
much focused on a single class for loading, ex. X3DLoaderDOM.java

Primary considerations for JavaScript are the size of the download, and 
thus, a type-safe library should be organized by profile (probably not 
currently done in either X3DOM or X_ITE).

It would seem like browsers already have a type-safe library, therefore, 
either the type-safe classes should be modified to load encodings 
(possibly quite difficult, unless generated, which in itself may be 
difficult) or encodings should be converted to an encoding (XML (DOM), 
VRML) native to the type-safe library. The latter is the X3DJSONLD 
approach.  I felt I should have a good feel of the encodings before 
digging into any browser source code.

Should we support and encourage both? How does your browser or library 
deal with various encodings?   Has anyone successfully generated an 
multi-encoding loading system?  Michalis?

Perhaps a different X3D JSON proposed encoding (JSON 5?) would be 
suitable for a multiple class loader?

What's the best way to add a new encoding to an existing browser?

Thanks!

John




More information about the x3d-public mailing list