<div><br></div><div><div dir="auto">It would be very nice if someone could sit down with me and explained X3DOM namespace code.</div><div dir="auto"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 27, 2020 at 7:59 PM 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><br></div><div><div dir="auto">Art Deco materials running with JSON files minus gridBack.x3d (try changing to gridBack.json, not sure...) at <a href="https://coderextreme.net/X3DJSONLD" target="_blank">https://coderextreme.net/X3DJSONLD</a> Select Art Deco examples from pull down.   You may have to flip file selection back and forth.</div><div dir="auto"><br></div><div dir="auto">Yes, I agree we need a DOM based expander.   We need 2 ways to do scoping, one for X3DOM, and one for the generic (non 3D) case.</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 27, 2020 at 7:48 PM 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><div dir="auto">Guys, I’m kinda panicking that replaceWorld() seems unavailable in the X_ITE version I am using.</div></div><div><div dir="auto"><br></div><div dir="auto">John</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 27, 2020 at 7:44 PM 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><div dir="auto">Considering it is likely that any Proto implementation in X3DOM will only be available in an Inline or similar url inclusion how worthwhile is it?   Have we considered CORS yet?</div></div><div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br></div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 27, 2020 at 4:57 PM 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="ltr">Learning how to design and implement X3DOM *and* namescopes *and* perhaps X_ITE at the same time is pretty much beyond my paygrade, unless I get a doctorate (honorary is fine) in return.  I have been a application programmer for most of my career.  That's pretty much what I enjoy doing.  That's why they didn't let me into SGI.  They wanted a systems guy.<div><br></div><div>I think I *can* design and implement a DOM to DOM proto expander (for any kind of DOM--use it with HTML or SVG if you like), if given adequate supervision/help, since I've nearly implemented a JSON proto expander.  This should not require learning much about X3DOM, from what I see in the X3DOM code. Doug should know how far we can carry this and perhaps where the gotchas are.</div><div><br></div><div>But how well it will work is another question.  Perhaps we should assign component levels to each feature I will implement?  I know the first level :).</div><div><br></div><div>Guys & gals, I'm getting anxiety.  This is NOT good.  I can't do squat with anxiety, and we will be walking around this email thread for a very long time.  Note that i *can* compose emails with anxiety! Seriously!</div><div><br></div><div>So what's more valuable, an X3DOM Proto handler, or a generic DOM to DOM proto expander that can be applied in many use cases in XML and/or HTML?</div><div>Which one is eminently more doable?</div><div><br></div><div>A bird in the hand is worth two in the bush.  Let's work on something with wider scope than X3D/X3DOM/X_ITE.  Maybe we can get other people to play in our sandbox.</div></div><div dir="ltr"><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 27, 2020 at 4:22 PM 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="ltr">Andreas, when you expand the ProtoInstances, the scoping disappears, thus you need to put the instance scope in any DEF or name that appears in the ProtoBody.<div><br></div><div>Are we implementing an expander, or full on Protos?</div><div><br></div><div>Sorry if I haven't made this clearer.</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 27, 2020 at 4:02 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@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)">I created a test for namescopes in Inline nodes:<br>
<br>
<a href="https://gist.github.com/andreasplesch/f959aaaf04475922bdfbdf1aaca8476b" rel="noreferrer" target="_blank">https://gist.github.com/andreasplesch/f959aaaf04475922bdfbdf1aaca8476b</a><br>
<br>
This is using the same DEF names for clock, interpolator and material<br>
for both the main scene and within the Inline scene.<br>
<br>
It seems to work fine, without interference between the inline and main scopes:<br>
<br>
<a href="https://gist.githack.com/andreasplesch/f959aaaf04475922bdfbdf1aaca8476b/raw/a6d08ddb67eb055dd4ada4624374c8712cf15893/namescope_x3dom2.html" rel="noreferrer" target="_blank">https://gist.githack.com/andreasplesch/f959aaaf04475922bdfbdf1aaca8476b/raw/a6d08ddb67eb055dd4ada4624374c8712cf15893/namescope_x3dom2.html</a><br>
<br>
The idea will be to use the same mechanism for ProtoInstances. I think<br>
the spec. requires that each ProtoInstance has its own namescope.<br>
<br>
-Andreas<br>
<br>
<br>
<br>
On Wed, May 27, 2020 at 3:43 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:<br>
><br>
> Hi John,<br>
><br>
> I think Inline in x3dom properly isolates the namescope within Inlines<br>
> from the namescope of the main scene. So it should be possible to have<br>
> DEF/USE names within an Inline which are identical with ones in the<br>
> main scene, without causing confusion. Perhaps there is an example for<br>
> that to test with.<br>
><br>
> -Andreas<br>
><br>
> On Wed, May 27, 2020 at 12:03 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
> ><br>
> > I think the big monster in the closet is whether we have to rewrite DEF/USE/name values (for ROUTEs at least), or if we can use X3DOM's namespaces. If we have to rewrite the values, I don't see value in using X3DOM's infrastructure--we just hand it an expanded DOM.<br>
> ><br>
> > John<br>
> ><br>
> > On Wed, May 27, 2020 at 9:50 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
> >><br>
> >> I see one issue with approach, but it is a good first step:<br>
> >><br>
> >> In current ProtoExpander, name values, DEF/USE values are rewritten.  So Scripts attributes, ROUTE attributes, etc. need to be rewritten as well.  That's only the second step.  So really, the whole scene needs be examined.  It will become difficult, I think, to extract the non-Inlined, non-ExternProtoDeclare items from the existing DOM.  So we are limited to Inlines, or how X_ITE does it with the URL in X3DCanvas tag. JSON is limited to Inlines, so limiting to Inlines is probably OK.  But we'll need to ask Don about his examples and converters.  Note that X3DJSONLD is not limited to Inlines though, but it loads JSON from files, which is equivalent.<br>
> >><br>
> >> Suggestions?  It's good to think simple cases, but we need a holistic approach to design if we're going to solve this.<br>
> >><br>
> >> So we have<br>
> >><br>
> >> 1.  Use Inlines<br>
> >> 2.  Rewrite DEF/USE/name.<br>
> >><br>
> >> John<br>
> >><br>
> >><br>
> >> On Tue, May 26, 2020 at 10:00 PM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br>
> >>><br>
> >>> As discussed Monday: Prototype Expander may have general value, but primary need is adding Prototype support to X3DOM.<br>
> >>><br>
> >>> Recommend scrapping all options as distracting alternative future work.<br>
> >>><br>
> >>> Simply focus on the X3DOM prize in JavaScript.  Path to get there is a straight line:<br>
> >>><br>
> >>> 1. Concept: ProtoDeclare is a template definition, ProtoInstance creates a scene subgraph.<br>
> >>><br>
> >>> 2. Thus the only resulting code of interest looks like X3DOM scene subgraph.<br>
> >>><br>
> >>> 3. Collect and create corresponding pairs of (a) inputs (ProtoDeclare/ProtoInstance) and (b) outputs (X3DOM scene subgraph).<br>
> >>><br>
> >>> 4. The ProtoExpander is native X3DOM javascript code reads 3(a) and creates 3(b).<br>
> >>><br>
> >>> ====================<br>
> >>><br>
> >>> That's it.  No really.<br>
> >>><br>
> >>> Recommended first model for input/output inventory: ArtDeco00, which is a simple Material node.<br>
> >>><br>
> >>> * <a href="https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoPrototypesIndex.html" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoPrototypesIndex.html</a><br>
> >>> * <a href="https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoPrototypes.json" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoPrototypes.json</a><br>
> >>> * <a href="https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamplesIndex.html" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamplesIndex.html</a><br>
> >>> * <a href="https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.json" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.json</a><br>
> >>><br>
> >>> JSON input<br>
> >>><br>
> >>> { "ProtoDeclare":<br>
> >>>    {<br>
> >>>      "@name":"ArtDeco00",<br>
> >>>      "@appinfo":"UniversalMediaMaterials prototype",<br>
> >>>      "@documentation":"<a href="https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials</a>",<br>
> >>>      "ProtoBody": {<br>
> >>>          "-children":[<br>
> >>>            { "Material":<br>
> >>>              {<br>
> >>>                "@ambientIntensity":0.25,<br>
> >>>                "@diffuseColor":[0.282435,0.085159,0.134462],<br>
> >>>                "@shininess":0.127273,<br>
> >>>                "@specularColor":[0.276305,0.11431,0.139857]<br>
> >>>              }<br>
> >>>            }<br>
> >>>          ]<br>
> >>>      }<br>
> >>>    }<br>
> >>> },<br>
> >>><br>
> >>> JSON result of interest:<br>
> >>><br>
> >>>            { "Material":<br>
> >>>              {<br>
> >>>                "@ambientIntensity":0.25,<br>
> >>>                "@diffuseColor":[0.282435,0.085159,0.134462],<br>
> >>>                "@shininess":0.127273,<br>
> >>>                "@specularColor":[0.276305,0.11431,0.139857]<br>
> >>>              }<br>
> >>><br>
> >>> First draft of converter: extract everything inside ProtoBody, ignore the rest.<br>
> >>><br>
> >>> So you are now halfway to first example.  If that is how JSON says it in JavaScript, how does X3DOM say it in JavaScript?<br>
> >>><br>
> >>> If still puzzled, here is a second-opinion point of comparison: how does X_ITE say it?<br>
> >>><br>
> >>> Have fun with X3D JavaScript, I hope...<br>
> >>><br>
> >>> On 5/26/2020 9:29 AM, John Carlson wrote:<br>
> >>> > There's also choice of data structure<br>
> >>> ><br>
> >>> > 1.  Mostly DOM/JDON, relying on functions<br>
> >>> > 2.  Full X3DJSAIL-like data structure<br>
> >>> > 3.  Just the Proto classes.<br>
> >>> ><br>
> >>> > On Tue, May 26, 2020 at 2:59 AM 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>
> >>> >     1.  Keep current implementation, debug it<br>
> >>> >     2.  Add XML -> JSON -> XML to current implementation.  Code is written, but not tested extensively<br>
> >>> >     3.  Write a new version in XML<br>
> >>> >     4.  Copy and port X_ITE's Proto code.<br>
> >>> >     5.  Write a new XML based proto expander.<br>
> >>> ><br>
> >>> >     We *do* want at least an XML proto expander.<br>
> >>> ><br>
> >>> >     Anyone want to help with any of these?  There are a lot of options.<br>
> >>> ><br>
> >>> ><br>
> >>> ><br>
> >>> > _______________________________________________<br>
> >>> > X3dom-users mailing list<br>
> >>> > <a href="mailto:X3dom-users@lists.sourceforge.net" target="_blank">X3dom-users@lists.sourceforge.net</a><br>
> >>> > <a href="https://lists.sourceforge.net/lists/listinfo/x3dom-users" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/x3dom-users</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>
><br>
><br>
><br>
> --<br>
> Andreas Plesch<br>
> Waltham, MA 02453<br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div></div>