<div dir="auto">I thought a bit more and realized not divs, but X3D/X3DCanvas elements.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 7, 2022 at 10:30 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">Here is sample ECMAScript code for loading ECMAScript objects into X3DOM and X_ITE (divs).   Search for “runtime” for X3DOM, and “browser” for X_ITE.</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/loaderJQuery.js" target="_blank">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/loaderJQuery.js</a></div><br></div><div dir="auto"><br></div><div dir="auto">I am not currently ready to document the HTML pages yet.   I will probably be updating them with the async/await and fetch() in the 2-3 month timeframe.</div><div dir="auto"><br></div><div dir="auto">Enjoy!</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 7, 2022 at 10:15 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">I don’t know if you’re using a streaming JSON parser.  It would be good to show some examples of that!</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">There are a few more details to using the X3DOM interface, that are found in <a href="https://github.com/coderextreme/X3DJSONLD" target="_blank">https://github.com/coderextreme/X3DJSONLD</a> … src/main/node/loaderJQuery.js</div><div dir="auto">(Search for runtime).</div><div dir="auto"><br></div><div dir="auto">I do not feel the additional features should be standardized since X_ITE has no analog.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 7, 2022 at 9:22 AM <a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.com</a> <<a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">John<br>
<br>
Thank you for documenting this interface, as well as for the work you and Andreas did in developing this implementation.<br>
<br>
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 <a href="https://www.kshell.com/pages/wg16_json_demo_20220224/nistctc5.html" rel="noreferrer" target="_blank">https://www.kshell.com/pages/wg16_json_demo_20220224/nistctc5.html</a> . This demo uses X3DOM implementation of rendering a JSON stream directly entered as the URL of an Inline node.<br>
<br>
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.<br>
<br>
Vince Marchetti<br>
<br>
<br>
> On Mar 5, 2022, at 11:54 PM, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
> <br>
> 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.<br>
> <br>
> Here's what I did for X_ITE:<br>
> <br>
> * Load an ECMAScript object:<br>
> <br>
>                 var importedScene = browser.importJS(jsobj);<br>
> <br>
> * Returning a DOM object after passing in an ECMAScript object:<br>
> <br>
>                 browser.importJS(jsobj, function(child) {<br>
> <br>
> Here's what Andreas and I did for X3DOM:<br>
> <br>
> * Returning a DOM object after passing in an ECMAScript object:  <br>
> <br>
>                 var child = doc.runtime.createX3DFromJS(jsobj, path);<br>
> <br>
> Once X3DJSONLD has produced DOM element, replace the scene/world:<br>
> <br>
>                 doc.runtime.replaceWorld(element);<br>
> <br>
> Standardization of these methods in-line with SAI standards would be appreciated, but perhaps there is an amount of coordination required?<br>
> <br>
> Note that X3DOM and X_ITE both have createX3DFromString, but with different parameters.<br>
> <br>
> 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.<br>
> <br>
> We can certainly put this in the JSON standard, if necessary.<br>
> <br>
> If I have overlooked something, let me know!<br>
> <br>
> Thanks!<br>
> <br>
> John<br>
> <br>
> _______________________________________________<br>
> x3d-public mailing list<br>
> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div></div>