<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:199558338;
        mso-list-type:hybrid;
        mso-list-template-ids:1334497586 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1885871744;
        mso-list-type:hybrid;
        mso-list-template-ids:-1281850172 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:20.25pt;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:Calibri;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:56.25pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:92.25pt;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:128.25pt;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:164.25pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:200.25pt;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:236.25pt;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:272.25pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:308.25pt;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Leonard,<br><br>Thank you for your support of X3D JSON encoding.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Yes, I convert JSON to DOM in X3DJSONLD.  And to XML.  Both DOM and XML are loaded into X3DOM and Cobweb in the GUI.  X3D JSON (and perhaps XML) Inlines are not supported well now for X3DOM or Cobweb, but potentially possible, and have been made to work in the past.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>You are right, since I got my shaders working in Cobweb, all I’m really doing is trying to get JSON support in Cobweb, and leave X3DOM in the dust.  Perhaps I should work on that, next.   Shaders were holding me back, but now I realize I have solved that problem.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Time to look into JSON parsing in Cobweb again.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Bye, bye, X3DOM.  Love your subdivisions.  That could get added to the standard.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:Leonard.Daly@realism.com">Leonard Daly</a><br><b>Sent: </b>Sunday, May 21, 2017 12:16 AM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a>; <a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a>; <a href="mailto:holger.seelig@yahoo.de">holger.seelig@yahoo.de</a><br><b>Cc: </b><a href="mailto:x3dom-users@lists.sourceforge.net">x3dom-users@lists.sourceforge.net</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3dom-users] Cobweb_dom...Script Magic? Loading DOM subscenesafter parent in X3DOM and Cobweb. ALMOST complete, requires sequencing ofouter functions.</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>John,<br><br>I don't really like to answer this way, but why?<br><br>X3DOM does not have Proto/ExternProto feature. It does not have X3D Script node. The integration with HTML is too close to allow an X3D Script node. HTML JavaScript (via DOM and X3D node manipulation) is available and used extensively. X3DOM does not handle VRML (meaning a text file with {} syntax). There is an unofficial JSON loader. Perhaps you have one too. How does it get the scene graph into DOM? Does it create DOM elements (or perhaps an HTML text string which is then parsed)? Something else?<br><br>To the extent I understand your question, you are asking for help in constructing a means of handling X3D Script node in X3DOM. Once that is done, Proto/ExternProto would be next. This would all come into the browser through an JSON encoded file. It seems to me that trying to handle X3D Script code requires an entire infrastructure supporting the X3D event mode and calling script code with X3D arguments. It also requires building full support for SAI and supporting the 'directOutput' field. That is a major effort with no obvious purpose that I see in V4.<br><br>You are asking for some serious time support (I think) into an application that is neither fully X3D-compliant, nor DOM-compliant (but the closest to both that is available). At least for me, I do not understand how this effort would further an X3D integrated DOM system. I am quite willing to listen to your reasons and help where I can, but I would like to see where this is going first.<br><br>Leonard Daly<br><br>P.S.  Everything above is for client-side code. Server side code can manipulate things as much as it wants to create something that runs in a client-side browser.<br><br>P.P.S. I do think there is a need to JSON encoding in V4 subject to the node definition for V4.<br><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Yes, Leonard, for quite some time I have an X3D JSON PROTOtypeExpander.js that works with X3D PROTOs and EXTERNPROTOs and displays in X3DOM.  I don’t know how complete it is, and testers are welcome. My EXTERNPROTO expander runs on the server, so is not included in the message, but it is included in the link in the original message.  If someone can make the EXTERNPROTO expander work client side that would be great.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>The EXTERNPROTO expander is generally called like:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>                json = externPrototypeExpander(outfile, json);<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Where json is the parent json of the extern, and outfile is the parent X3D file being loaded (I think “” will probably do in a pinch.  I am not sure.).  The extern PROTOs will be included in the original JSON as a ProtoDeclare object.  You may have to run the flattener afterwards, and it is run as:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='font-size:14.0pt'>            <span style='color:black'>json = flattener(json);</span></span><o:p></o:p></p><p class=MsoNormal><span style='font-size:14.0pt;color:black'> </span><o:p></o:p></p><p class=MsoNormal>It removes empty objects from the JSON.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Yes, I would like someone to help me with VRMLScript for X3DOM, if someone is available.  I have a very barebones and incorrect implementation here:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/Script.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/Script.js</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Please help.  I don’t know the X3D event model, and I’m not likely to learn soon.  The X3D event model can be emulated in Browser-side JavaScript, but there’s only Cobweb for proof.<o:p></o:p></p><p class=MsoNormal><br>I have another version of flipper.html here that works with X3DOM and Cobweb adding the subscene later.  It works with Promises, but the functions still aren’t separated…close, but no cigar.  Take a look:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/html/flipper.html">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/html/flipper.html</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Sorry, I tend to use the XML version of “Proto”, and not the VRML “PROTO”.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>X3DJSONLD provides an infrastructure for X3D JSON Browser development, including X3D XML -> X3D JSON conversion on the server, and X3D JSON to X3D XML loading into X3DOM and Cobweb.  It also includes conversions from XML DOM to Java and Nashorn JavaScript for X3DJSAIL app development.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>There is definite potential for an XML PROTO expander, as I have written this code, but not seriously tested, since I am focused on JSON:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/CompleteXMLPrototypeExpander.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/CompleteXMLPrototypeExpander.js</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>So far, it’s still server-side.  If you’re going to modify it, split it into server and client-side pieces, please.  Complete is probably a misnomer, since the input is JSON<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>John<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From: </b><a href="mailto:Leonard.Daly@realism.com">Leonard Daly</a><br><b>Sent: </b>Saturday, May 20, 2017 7:17 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a>; <a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a>; <a href="mailto:holger.seelig@yahoo.de">holger.seelig@yahoo.de</a><br><b>Cc: </b><a href="mailto:x3dom-users@lists.sourceforge.net">x3dom-users@lists.sourceforge.net</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3dom-users] Cobweb_dom...Script Magic? Loading DOM subscenesafter parent in X3DOM and Cobweb.<o:p></o:p></p></div><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:black'>John,</span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='color:black'>Cobweb_dom, X3DOM experts, I need some help adding a child DOM scenegraph with prototypes to a parent DOM scenegraph after the </span><o:p></o:p></p></blockquote><p class=MsoNormal><span style='color:black'><br>Not sure how any of this applies to X3DOM as it does not have PROTOs. Assuming you mean X3D prototypes via PROTO or EXTERNPROTO. If you mean something else, please elaborate.<br><br><br>Leonard Daly<br><br><br><br><br><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='color:black'>primary scene has been  loaded, and not before. I have an example of loading before the scene is loaded, and in a callback.  If you have an example with Promises instead of callback nesting, that would be more ideal, the second $.getJSON() (child scenegraph) might finish before the first $.getJSON() (parent scenegraph) if I don’t use promises or callback nesting. Also, Promises would allow me to separate the parent loading somewhat from the child loading, and create separate functions.  Also, X3DOM experts can provide an example with Promises as well.  Meanwhile, I will be reading about Promises.</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>Here is my example so far:</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/html/flipper.html">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/html/flipper.html</a><br><br>Viewable here:</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><a href="https://coderextreme.net/X3DJSONLD/src/main/html/flipper.html">https://coderextreme.net/X3DJSONLD/src/main/html/flipper.html</a></span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>The white Box is the subscene of the dolphin scene.</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>The following related code is from <a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/loaderJQuery.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/loaderJQuery.js</a></span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>and references code from:</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/X3DJSONLD.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/X3DJSONLD.js</a></span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>[ actually, I think the last two reference each other – naughty ]</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>Data is here:</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>[ child scenegraph ]</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/abox.json">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/abox.json</a></span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>[ parent scenegraph ]</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/flipp.json">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/flipp.json</a></span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>Cobweb doesn’t need the prototypeExpander or the flattener (well, it might have with prototypes in cobweb_dom, but I think the last release fixed that…haven’t checked—here is a good test for you!).  This is a dual example, and I haven’t figured out how to conditionally run the prototypeExpander on only X3DOM code.  Please test without the PrototypeExpander.js and Flattener.js included, and remove X3DOM, since it won’t work in that case.  X3DOM folks can include the two JavaScript files which are here:</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/PrototypeExpander.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/PrototypeExpander.js</a></span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/Flattener.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/Flattener.js</a></span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>You may provide your own appendInline (below) which doesn’t call loadSchema.  That may be too complex of a download.  That is, you probably don’t want to do all that JSON schema validation in your example.  Try to keep my code close to what it is otherwise.</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>And if you start supporting X3D JSON in your viewers, that would be even better!</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>John</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>/**</span><o:p></o:p></p><p class=MsoNormalCxSpMiddle style='margin-left:200.25pt;mso-add-space:auto;text-indent:-.25in;line-height:105%;mso-list:l1 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>         </span></span></span><![endif]><span style='color:black'>Next is passed the element parameter</span><o:p></o:p></p><p class=MsoNormalCxSpMiddle style='margin-left:200.25pt;mso-add-space:auto;text-indent:-.25in;line-height:105%;mso-list:l1 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>         </span></span></span><![endif]><span style='color:black'>*/</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>function appendInline(element, url, next) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>        $.getJSON(url, function(json) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                if (typeof prototypeExpander === 'function') {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                        json = prototypeExpander(url, json, "");</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                } else {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                        console.error("Perhaps you need to include the PrototypeExpander.js?");</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                }</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                if (typeof flattener === 'function') {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                        json = flattener(json);</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                } else {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                        console.error("Perhaps you need to include the Flattener.js?");</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                }</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                // must validate here because we call an inner method.</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                loadSchema(json, url, doValidate, function() {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                        ConvertToX3DOM(json["X3D"]["Scene"], "Scene", element, url);</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                        next(element);</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                }, function(e) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                        console.error(e);</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>                });</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>        }).fail(function(jqXHR, textStatus, errorThrown) { alert('getJSON request failed! ' + textStatus + ' ' + errorThrown); });</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>}</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>/**</span><o:p></o:p></p><p class=MsoNormalCxSpMiddle style='margin-left:3.0in;mso-add-space:auto;text-indent:-.25in;line-height:105%;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>         </span></span></span><![endif]><span style='color:black'>Next is passed the selected element from selector</span><o:p></o:p></p><p class=MsoNormalCxSpMiddle style='margin-left:3.0in;mso-add-space:auto;text-indent:-.25in;line-height:105%;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>         </span></span></span><![endif]><span style='color:black'>Selector is the CSS selector to append inline to.</span><o:p></o:p></p><p class=MsoNormalCxSpMiddle style='margin-left:3.0in;mso-add-space:auto;text-indent:-.25in;line-height:105%;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>         </span></span></span><![endif]><span style='color:black'>*/</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>function loadSubscene(selector, url, next) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>        appendInline(document.querySelector(selector), url, next);</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'>}</span><o:p></o:p></p><p class=MsoNormal><span style='color:black'><br><br><br><br></span><o:p></o:p></p><pre>------------------------------------------------------------------------------</pre><pre>Check out the vibrant tech community on one of the world's most</pre><pre>engaging tech sites, Slashdot.org! <a href="http://sdm.link/slashdot">http://sdm.link/slashdot</a></pre><p class=MsoNormal><span style='color:black'><br><br><br><br></span><o:p></o:p></p><pre>_______________________________________________</pre><pre>X3dom-users mailing list</pre><pre><a href="mailto:X3dom-users@lists.sourceforge.net">X3dom-users@lists.sourceforge.net</a></pre><pre><a href="https://lists.sourceforge.net/lists/listinfo/x3dom-users">https://lists.sourceforge.net/lists/listinfo/x3dom-users</a></pre></blockquote><p> </p><p class=MsoNormal><span style='color:black'>-- <br></span><b><span style='font-size:13.5pt;color:#333366'>Leonard Daly</span></b><span style='color:#333366'><br>3D Systems & Cloud Consultant<br>LA ACM SIGGRAPH Chair<br>President, Daly Realism - <i>Creating the Future</i> </span><o:p></o:p></p><p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p></blockquote><p><o:p> </o:p></p><p class=MsoNormal><span style='color:black'>-- <br></span><b><span style='font-size:13.5pt;color:#333366'>Leonard Daly</span></b><span style='color:#333366'><br>3D Systems & Cloud Consultant<br>LA ACM SIGGRAPH Chair<br>President, Daly Realism - <i>Creating the Future</i> </span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>