<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;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
.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>Here is an example with X3D XML, expanded JSON (not sure if proto expansion is working or not, but try it) and the script that goes with it.  Attached.</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>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:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Friday, August 11, 2017 7:56 AM<br><b>To: </b><a href="mailto:Leonard.Daly@realism.com">Leonard Daly</a><br><b>Cc: </b><a href="mailto:x3d@web3d.org">X3D Graphics member mailing list</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:consortium@web3d.org">Web3D Consortium</a><br><b>Subject: </b>Re: [x3d] X3D Specification Relationships diagram</p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Leonard,</p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Do you have an actual example that cannot be made to work in Cobweb + Cobweb_dom?  It helps to deal with realistic examples.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Is the difficulty with writing up how Cobweb or X3DJSONLD works?</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You can visit my page @ <a href="https://coderextreme.net/X3DJSONLD/">https://coderextreme.net/X3DJSONLD/</a> to see how my script + route -> script + event handlers works with X3DOM, (there by are several evals in loaderJQuery.js) but I believe I've posted the results here.   I guess I need to post before and after scenarios.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks,</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>John</p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Aug 10, 2017 9:31 PM, "Leonard Daly" <<a href="mailto:Leonard.Daly@realism.com">Leonard.Daly@realism.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><div><p class=MsoNormal>On 8/10/2017 5:17 PM, John Carlson wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Leonard wrote:</p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>>and node name collisions (i.e., Script).</p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>There has been quite a bit of progress with this and X3DJSONLD and X3DOM.   It’s been under the covers because I have not advertised it much. I have several scripts running, but not the full complement of my examples.  It does not run the X3D event model yet, except for initialize().</p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Cobweb of course, already handles this, so quit bellyaching.</p></div></blockquote><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>Cobweb even with Andreas' DOM interface extensions does not integrate with the DOM regarding Scripts. A full integration would allow the following:<br><br>X3D Script function called 'foo'<br>HTML script function called 'bar'<br><br>In the body of bar, I should be able to redefine 'foo'. It is (in a fully integrated system) available as window.foo. Similarly for inside of 'foo' to change 'bar'.<br><br><tt><span style='font-size:10.0pt'>function bar(event, time) {</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>    window.foo = bar;            // I would (perhaps) settle for window.x3d.foo = bar;</tt><br><tt>}</tt><br></span><br>and<br><br><tt><span style='font-size:10.0pt'><Script ...>    <!-- X3D Script node --></span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>    function foo (event, time) {</tt><br><tt>        window.bar = foo;</tt><br><tt>    }</tt><br><tt></script></tt><br></span><br>I should be able to construct an object with 'foo' as a method. E.g.,<br><br><tt><span style='font-size:10.0pt'>var globalVar = {};</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>globalVar.x3d = foo;</tt><br><br><tt>// should call the X3D script passing it a reference to the current value of 'event' and 'time'.</tt><br><tt>globalVar.x3d(event, time);  </tt><br></span><br><br>Inside 'foo' I should be able to access any DOM element to get it's current state or even establish an event listener.<br><br><br>I know there are some things that Cobweb can do, but there has been no discussions in the WG for the language that would be necessary to ensure HTML/DOM/X3D interaction like I described above.<br><br>Unrolling scripts on the server (or at least not in the runtime of the browser) is all fine and good, but again there has been no discussion in the WG as to how to even approach writing that up.<br><br>I will be happy to be (relatively) quiet on these points if someone can show me working examples and proposed text to make this work.</p><div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br></p><div><p class=MsoNormal>-- <br><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></p></div></div></div></blockquote></div></div></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>