<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:"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;}
span.m4751740362823455514gmail-m6814112949669356284m7174440674528929433m-637341298042191590m4670831100320161873m3334206258020055149m-8313888796625588714html-attribute-name
{mso-style-name:m_4751740362823455514gmail-m6814112949669356284m7174440674528929433m-637341298042191590m4670831100320161873m3334206258020055149m-8313888796625588714html-attribute-name;}
span.m4751740362823455514gmail-m6814112949669356284m7174440674528929433m-637341298042191590m4670831100320161873m3334206258020055149m-8313888796625588714html-attribute-value
{mso-style-name:m_4751740362823455514gmail-m6814112949669356284m7174440674528929433m-637341298042191590m4670831100320161873m3334206258020055149m-8313888796625588714html-attribute-value;}
.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;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I think that’s what Clement is doing on the X3DOM list.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></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:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Sent: </b>Sunday, December 4, 2016 7:21 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:roy.walmsley@ntlworld.com">Roy Walmsley</a>; <a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Subject: </b>Re: loading DOM VRML Script. Cobweb enhancement?</p></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Hi John,</p></div><p class=MsoNormal style='margin-bottom:12.0pt'>good points. It reminded me that there is GeoJSON <a href="http://geojson.org/">http://geojson.org/</a> which is popular and that it might be possible to transform into geospatial x3d json.</p></div><p class=MsoNormal>-Andreas</p><div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Sun, Dec 4, 2016 at 5:32 PM, <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal>I view JSON as simpler to use than DOM. I like what I did with the prototype expander, adding functionality to X3DOM without having to use DOM (I used X3DJSONLD to create the DOM from the prototype expander JSON). JSON does has it’s disadvantages…I haven’t figured out how to do a listener/event handler/observer on tree changes yet.</p><p class=MsoNormal> </p><p class=MsoNormal>One of the reasons I took on JSON is for “JSON transformation by demonstration” I’d like to be able to transform the JSON with a GUI and have the series of steps recorded in a script. First though, I have to learn JSON transformation. Using XML for transformation has already been done—see XSLT, and IBM did XSL(T)bydemo, I believe (and there’s JOLT in Java). I have my own jtbd repository on GitHub, which basicially takes a list of JSON indices down a JSON tree down to a character and copies it to another tree. There’s also jsondemons, but that’s been morphed into a kind of 3D graph.</p><p class=MsoNormal> </p><p class=MsoNormal>John</p><p class=MsoNormal> </p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">Mail</a> for Windows 10</p><p class=MsoNormal> </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:andreasplesch@gmail.com" target="_blank">Andreas Plesch</a><br><b>Sent: </b>Sunday, December 4, 2016 1:42 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com" target="_blank">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org" target="_blank">X3D Graphics public mailing list</a>; <a href="mailto:roy.walmsley@ntlworld.com" target="_blank">Roy Walmsley</a>; <a href="mailto:brutzman@nps.edu" target="_blank">Don Brutzman</a><br><b>Subject: </b>Re: loading DOM VRML Script. Cobweb enhancement?</p></div><p class=MsoNormal> </p><div><p>Hi John,</p><p>X3dom is designed to work with the XML encoding or a dom. So for x3dom it would be necessary to first create a DOM from the json. It will be difficult to get around that.</p><p>Cobweb has parsers which parse XML or vrml into a scene graph. So it should be possible to make a parser for json, probably following what the XML parser does. But the easier path would be also to create a DOM from the json first.</p><p>How do you envision you or others would use json encoded x3d content to add value to a project ? Easier manipulation as a js object ? Easier programmatic content creation ? As an exchange/transmission format, a bit similar to gltf ?</p><p> </p><p><a href="http://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/" target="_blank">http://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/</a></p><p>has good examples to test scripting. For example,</p><p><a href="http://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/TouchSensorIsOverEventECMAScriptIndex.html" target="_blank">http://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/TouchSensorIsOverEventECMAScriptIndex.html</a></p><p><a href="http://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/TouchSensorIsOverEventECMAScript.json" target="_blank">http://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/TouchSensorIsOverEventECMAScript.json</a></p><p>I may give this example a try with the json loader and cobweb.</p><p>-Andreas</p><div><p class=MsoNormal> </p><div><p class=MsoNormal>On Dec 4, 2016 1:49 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><p>Perhaps it's time for me to dig into Cobweb and X3DOM to see how they can be extended to support JSON? If it's through DOM, which is fine by me, I would have to look and see how the various encodings are loaded after DOM is loaded.</p><div><p class=MsoNormal> </p><div><p class=MsoNormal>On Dec 4, 2016 1:40 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><p>Again, the X3D JSON Loader is a proof of concept patch until we get full JSON support in Cobweb and X3DOM, if desired.</p><div><p class=MsoNormal> </p><div><p class=MsoNormal>On Dec 4, 2016 1:24 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><p>Because I may not have the full x3d examples downloaded. And I do want to test to see if JSON inclusion works.</p><div><p class=MsoNormal> </p><div><p class=MsoNormal>On Dec 2, 2016 3:04 PM, "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><p class=MsoNormal>Hi John,</p><div><p class=MsoNormal> </p></div><div><p class=MsoNormal>I tried a bit to load gears.json with X3DJSONLD:</p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal><a href="https://raw.githubusercontent.com/andreasplesch/X3DJSONLD/master/AP_minimal_JSLD.html" target="_blank">https://raw.githubusercontent.com/andreasplesch/X3DJSONLD/master/AP_minimal_JSLD.html</a></p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal>But even before any script parsing/loading, there is a problem with the ExternProtoDeclare node in gears.json. It has a url field to Rotor.x3d which is replaced by the json loader with Rotor.json before being handed off to cobweb with importDocument(). Cobweb does not know what to do with the Rotor.json file and gives up.</p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal>Why modify the url field value ? If the scene author wants to use a .json encoded scene, she will put it in the url field just like a .wrl encoded scene.</p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal>On another note, I agree that eval() cannot be avoided if script should be supported. cobweb itself also uses eval() (after some setup and massaging) to run the x3d script.</p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal>type="application/x-vrmlscript" is necessary because without it the web browser will try to run the script "as is" as soon as it gets appended to the page DOM. When cobweb gets a chance to check for the type attribute, it is already too late. So it cannot use the attribute to prevent it from running. It can only not reject it which is what it does.</p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal>-Andreas</p></div><div><p class=MsoNormal> </p></div></div><div><p class=MsoNormal> </p><div><p class=MsoNormal>On Thu, Dec 1, 2016 at 1:02 AM, <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=MsoNormal>It appears that Cobweb is fouled up with DOM loading of scripts, even with the additional name value pair. See gears.x3d/gears.json and load DOM through importDocument. And independent test would help. I am not sure which of my X3DCanvases gets loaded first and I am using absolute indexing, so it could be the XML loaded one that is failing. Basically, we need a good way to load scripts coming in through JSON I think, and the only real way I know how to do it is eval or cobweb with JSON to XML conversion and VRMLscript. If Cobweb could use the VRMLscript from JSON or DOM, that might be ideal.</p><p class=MsoNormal> </p><p class=MsoNormal>This is with cobweb 2.4.</p><p class=MsoNormal> </p><p class=MsoNormal>John</p><p class=MsoNormal> </p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">Mail</a> for Windows 10</p><p class=MsoNormal> </p><div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;border-color:-moz-use-text-color -moz-use-text-color'><p class=MsoNormal><b>From: </b><a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a><br><b>Sent: </b>Thursday, December 1, 2016 12:32 AM<br><b>To: </b><a href="mailto:andreasplesch@gmail.com" target="_blank">Andreas Plesch</a>; <a href="mailto:brutzman@nps.edu" target="_blank">Don Brutzman</a>; <a href="mailto:roy.walmsley@ntlworld.com" target="_blank">Roy Walmsley</a><br><b>Subject: </b>FW: loading X3D DOM. Latest Cobweb techniques?</p></div><p class=MsoNormal> </p><p class=MsoNormal>Would it be possible to get a name/value of </p><p class=MsoNormal> </p><p class=MsoNormal>"@<span class="m4751740362823455514gmail-m6814112949669356284m7174440674528929433m-637341298042191590m4670831100320161873m3334206258020055149m-8313888796625588714html-attribute-name"><span style='font-size:13.5pt;font-family:"Courier New"'>type"</span></span><span style='font-size:13.5pt;font-family:"Courier New";color:#881280'> : "</span><span class="m4751740362823455514gmail-m6814112949669356284m7174440674528929433m-637341298042191590m4670831100320161873m3334206258020055149m-8313888796625588714html-attribute-value"><span style='font-size:13.5pt;font-family:"Courier New"'>application/x-vrmlscript"</span></span></p><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Courier New";color:#881280'> </span></p><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Courier New";color:#881280'>On the Script tag in X3D JSON? I will do some testing here first to see if it will help.</span></p><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Courier New";color:#881280'> </span></p><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Courier New";color:#881280'>John</span></p><p class=MsoNormal> </p><div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;border-color:-moz-use-text-color -moz-use-text-color'><p class=MsoNormal><b>From: </b><a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a><br><b>Sent: </b>Thursday, December 1, 2016 12:24 AM<br><b>To: </b><a href="mailto:andreasplesch@gmail.com" target="_blank">Andreas Plesch</a><br><b>Subject: </b>RE: loading X3D DOM. Latest Cobweb techniques?</p></div><p class=MsoNormal> </p><p class=MsoNormal>One thing I noticed once I got both DOM and XML views loaded, was that I think the DOM VRML script tag was disabled, but the XML one worked. Was there some attribute to add to the Script tag to make it work? Can I add it in both XML and DOM? Thanks, John I will start email search.</p><p class=MsoNormal> </p><p class=MsoNormal> </p><p class=MsoNormal> </p></div></div></blockquote></div><p class=MsoNormal><br><br clear=all></p><div><p class=MsoNormal> </p></div><p class=MsoNormal>-- </p></div></blockquote></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div></div><p class=MsoNormal style='margin-left:19.2pt'>Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</p><p class=MsoNormal> </p></div></div></blockquote></div><p class=MsoNormal><br><br clear=all><br>-- </p></div></div></div><p class=MsoNormal>Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>