[x3d-public] Documenting X3DJSONLD interface to X_ITE and X3DOM.

vmarchetti at kshell.com vmarchetti at kshell.com
Mon Mar 7 07:22:08 PST 2022


John

Thank you for documenting this interface, as well as for the work you and Andreas did in developing this implementation.

I recently demonstrated the use of the JSON encoding to the ISO JWG-16, for the purpose of demonstating transmitting a X3D visualization created fron a STEP file. The demonstration page is at https://www.kshell.com/pages/wg16_json_demo_20220224/nistctc5.html . This demo uses X3DOM implementation of rendering a JSON stream directly entered as the URL of an Inline node.

I will be using the interface documented below to demonstrate this complementary approach. Having direct control of the JSON stream will allow additional capabilities to the web page, such as scanning the downloaded json stream for metadata embedded in the X3D scene.

Vince Marchetti


> On Mar 5, 2022, at 11:54 PM, John Carlson <yottzumm at gmail.com> wrote:
> 
> I do not know if the ECMAScript SAI interface to X_ITE and X3DOM can be standardized, that is, I don't know if you can run different browser implementations in an HTML environment with the same interface.
> 
> Here's what I did for X_ITE:
> 
> * Load an ECMAScript object:
> 
>                 var importedScene = browser.importJS(jsobj);
> 
> * Returning a DOM object after passing in an ECMAScript object:
> 
>                 browser.importJS(jsobj, function(child) {
> 
> Here's what Andreas and I did for X3DOM:
> 
> * Returning a DOM object after passing in an ECMAScript object:  
> 
>                 var child = doc.runtime.createX3DFromJS(jsobj, path);
> 
> Once X3DJSONLD has produced DOM element, replace the scene/world:
> 
>                 doc.runtime.replaceWorld(element);
> 
> Standardization of these methods in-line with SAI standards would be appreciated, but perhaps there is an amount of coordination required?
> 
> Note that X3DOM and X_ITE both have createX3DFromString, but with different parameters.
> 
> I would like a standardized way in the ECMAScript SAI spec to load X3D JS objects from JSON sources, if that makes sense.  No, I don't want to reparse JSON for each browser on my page.
> 
> We can certainly put this in the JSON standard, if necessary.
> 
> If I have overlooked something, let me know!
> 
> Thanks!
> 
> John
> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org




More information about the x3d-public mailing list