<div><div dir="auto">Again, we need an Hello World for JavaScript SAI so our X3dToES5.xslt can be modeled properly.</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020 at 11:59 AM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">this is a general question, i'm a javascript user/tester but no expert in some of those deep waters!<br>
<br>
On 3/3/2020 10:20 AM, John Carlson wrote:<br>
> Don, would this be an appropriate set of calls for a node.js scenegraph?<br>
> <br>
> new TouchSensor({"@description":"within ProtoBody"},[,<br>
> new IS({},[,<br>
> new connect({"@nodeField":"description","@protoField":"description"},[]),<br>
> new connect({"@nodeField":"enabled","@protoField":"enabled"},[])])])])]),<br>
> <br>
> Or should i append the @, -, etc in the constructor?<br>
> <br>
> John<br>
> <br>
> On Mon, Mar 2, 2020 at 2:24 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
> Also, see this example of the beginnings of a class hierarchy for X3DESAIL, plus a scenegraph (combined for efficiency).<br>
> <br>
> <a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/node/examples/HelloWorldProgramOutput.js" rel="noreferrer" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/node/examples/HelloWorldProgramOutput.js</a><br>
> <br>
> Good luck!<br>
> <br>
> <br>
> On Mon, Mar 2, 2020 at 2:17 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
> You might be considering this?<br>
> <br>
> <a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js" rel="noreferrer" target="_blank">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js</a><br>
> <br>
> That's how I translate DOM documents to JSON.<br>
> <br>
> I am unclear on how to map X3D JSON onto any kind of class hierarchy, such that X3D JSON dumps out with JSON.stringify.<br>
> <br>
> This JS is not very well tested, but produced the same result as the stylesheet on the JSON I tested.<br>
> <br>
> John<br>
> <br>
> On Mon, Mar 2, 2020 at 2:02 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
> No, X3DJSONLD.ts is already part of X3DTSSAIL.<br>
> <br>
> I think what you folks want is in X3DTSSAIL, or something totally different from X3DJSONLD. It would not be in the purpose of X3DJSONLD to provide X3DESAIL.<br>
> <br>
> If you want to pursue a JSON scenegraph, then either modify X3DJSAIL to provide it, or write X3duomToX3dESPackage.xslt similar to the python stylesheet. I am not a stylesheet programmer. What I can do is provide a sample ECMAScript class implementing one part of X3DESAIL, so that the pattern may be followed.<br>
> <br>
> Here are the requirements I see:<br>
> <br>
> 1. Provide a JSON scenegraph API<br>
> 2. Provide a TypeScript scenegraph API<br>
> <br>
> May I suggest that we don't need a JSON API? That's already in ECMAScript, guys. What might be needed I think can be found in route.js under X3DJSONLD/src/main/node/route.js (check it out).<br>
> <br>
> For the TypeScript API, checkout the repository: <a href="https://github.com/coderextreme/JavaSceneAuthoringInterfaceLibrary" rel="noreferrer" target="_blank">https://github.com/coderextreme/JavaSceneAuthoringInterfaceLibrary</a> when you run maven, it should leave files in target/ts.<br>
> <br>
> Also, please checkout the nashorn version of X3DJSAIL already on sourceforge. /The thing that's missing here is a node.js version. I started something under <a href="http://www.web3d.org/x3d/stylesheets/node" rel="noreferrer" target="_blank">www.web3d.org/x3d/stylesheets/node</a> <<a href="http://www.web3d.org/x3d/stylesheets/node" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/stylesheets/node</a>>, but it's incomplete. I have modifications that I haven't checked in yet./<br>
> This was something that skipped my mind.<br>
> <br>
> The basic interface is to have a "node" constructor that takes a object for attributes, and an array for children.<br>
> <br>
> Good luck!<br>
> <br>
> John<br>
> <br>
> On Mon, Mar 2, 2020 at 1:26 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
> Do we want to add X3DJSONLD.java to X3DTSSAIL? Is that what I’m missing?<br>
> <br>
> On Mon, Mar 2, 2020 at 1:18 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
> Here is X3DTSSAIL:<br>
> <br>
> <a href="https://coderextreme.net/X3DTSSAIL.zip" rel="noreferrer" target="_blank">https://coderextreme.net/X3DTSSAIL.zip</a><br>
> <br>
> Does this satisfy the desire for ECMAscript, or do we want a native JSON scenegraph? Can we add it to X3DJSAIL? We should be able to extract JSON and parse JSON already? I think? Do you need examples?<br>
> <br>
> I will spend some time looking at x3d.py generation.<br>
> <br>
> John<br>
> <br>
> On Mon, Mar 2, 2020 at 8:44 AM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>> wrote:<br>
> <br>
> Hi John. Can we meet via phone some time this week to discuss? Happy to learn more and support as able.<br>
> <br>
> 1. X3D Unified Object Model (X3DUOM) is a thorough representation of X3D scene graph. If something needs to be added, can consider that.<br>
> <br>
> Qt is cross platform, seems to have C++ innards similar to primary python distribution.<br>
> <br>
> I found your work as follows but not sure what to do with it:<br>
> <a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/python/examples/gui.py" rel="noreferrer" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/python/examples/gui.py</a><br>
> <a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/python/examples/gui.x3d" rel="noreferrer" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/python/examples/gui.x3d</a><br>
> <br>
> Wondering what the project's primary goal is, writing a new LGPL X3D scene editor in Qt? Or nonrendering API X3DQtSAIL?<br>
> <br>
> Or perhaps you are thinking of something that adds X3D to the following project?<br>
> <br>
> * The Future of Qt 3D<br>
> <a href="https://www.qt.io/blog/the-future-of-qt-3d" rel="noreferrer" target="_blank">https://www.qt.io/blog/the-future-of-qt-3d</a><br>
> <br>
> * Qt 3D Studio 2.6 Released<br>
> <a href="https://www.qt.io/blog/qt-3d-studio-2.6-released" rel="noreferrer" target="_blank">https://www.qt.io/blog/qt-3d-studio-2.6-released</a><br>
> <br>
> * Qt 3D Studio Manual<br>
> <a href="https://doc.qt.io/qt3dstudio/index.html" rel="noreferrer" target="_blank">https://doc.qt.io/qt3dstudio/index.html</a><br>
> <a href="https://doc.qt.io/qt3dstudio/3d-assets.html" rel="noreferrer" target="_blank">https://doc.qt.io/qt3dstudio/3d-assets.html</a><br>
> <a href="https://doc.qt.io/qt3dstudio/graphics.html" rel="noreferrer" target="_blank">https://doc.qt.io/qt3dstudio/graphics.html</a><br>
> <br>
> ---<br>
> <br>
> 2. Python concern: shouldn't your new work be a separate project to avoid creating problems and synchronization difficulties in the current project in the /stylesheets/python directory. This would let x3d.py evolve without unintended clobbers emerging in the future.<br>
> <br>
> Am also thinking we should finally rename the X3D Python Package to X3DPSAIL, matching X3DJSAIL both in acronym and concept since it already matches in functionality. Probably long overdue. We also now have time to write a paper for Web3D 2020 since the conference was postponed to November.<br>
> <br>
> ---<br>
> <br>
> 3. Next: also had a old+new idea to consider following recent discussion with Katie Unger of Synergy Software Design (cc:ed). What if we used X3DUOM and autogenerated an ECMAScript SAI for X3D called X3DESAIL that patterned X3D scene graph accessors following your X3DJSONLD patterns, was primarily oriented towards Node.js, and also added utility methods facilitating use in combination with X3DOM X_ITE and Three.js. That harmonization might be something widely useful.<br>
> <br>
> TIA for your efforts, as always best wishes for your work.<br>
> <br>
> v/r Don<br>
> <br>
> <br>
> On 3/1/2020 3:02 PM, John Carlson wrote:<br>
> > I have added gui.x3d and gui.py as examples of translating Qt Designer XML (I think) to "X3D"-like python. This is after a "roll my own" xmltopy.py. There's still a lot of work to do, namely, we need to add some text node processing to X3dToPython.xslt. We probably want to create a RpgToPython.xslt for that.<br>
> ><br>
> > I also added a build target for gui.py.<br>
> ><br>
> > Ideally, either Jeff or I will write the RpgToPython.xslt and associated RPGuomToRpgPythonPackage.xslt.<br>
> ><br>
> > Any inputs everyone has are welcome, especially in the realm of creating a user friendly editor for RPGUOM like Qt Designer/WxFormBuilder.<br>
> ><br>
> > Code is found here on sourceforge:<br>
> ><br>
> > x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/python" rel="noreferrer" target="_blank">www.web3d.org/x3d/stylesheets/python</a> <<a href="http://www.web3d.org/x3d/stylesheets/python" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/stylesheets/python</a>> <<a href="http://www.web3d.org/x3d/stylesheets/python" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/stylesheets/python</a>><br>
> ><br>
> > Thanks for all the contributions that made this project even possible!<br>
> ><br>
> > John<br>
> ><br>
> ><br>
> ><br>
> > If someone wants to contribute XMLSchemas or X3DUOM-like unified object models which support Qt Designer and/or RPG object model, they would be most welcome.<br>
> ><br>
> > I'll probably be working on an RPGUOM next.<br>
> ><br>
> > John<br>
> <br>
> all the best, Don<br>
> -- <br>
> Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
> X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
> <br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div></div>