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

John Carlson yottzumm at gmail.com
Mon Mar 7 08:15:58 PST 2022


I’m pretty sure I used care when describing the APIs.   It’s ECMAScript
APIs, not JSON APIs.   The JSON API uses the inline node, as you mention.

I don’t know if you’re using a streaming JSON parser.  It would be good to
show some examples of that!

I do have at least one example of composing more than one JSON file if
you’re interested in that feature of X3DJSONLD.   I’ve not used multiple
Inlines before, that would probably be much easier.  Note that composing
has not been tested recently.

There are a few more details to using the X3DOM interface, that are found
in https://github.com/coderextreme/X3DJSONLD … src/main/node/loaderJQuery.js
(Search for runtime).

I do not feel the additional features should be standardized since X_ITE
has no analog.

John

On Mon, Mar 7, 2022 at 9:22 AM vmarchetti at kshell.com <vmarchetti at kshell.com>
wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220307/ab99c85f/attachment.html>


More information about the x3d-public mailing list