<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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
.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>Currently adding extra nodes to parentArray without Switch node.  Switch node to come (needed?).  Flattener.js has been modified.  MaterialModulator.json (attached) appears to be rendering properly in X3DOM, X3DOMJSON (except for offsetting script text) and Cobweb (A dark red sphere?).  Also bonus, we got Figure…DonutExternalPrototype.json rendering properly in Cobweb!  That one has been extremely difficult to expand properly!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Left to do:  accidental @value at top level in Scripts, any other schema variances (getting fewer and fewer now).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Can you tell me which JSON object key “-…” (containerField) values should be arrays and which should be objects so I have a complete list?</p><p class=MsoNormal>I should be able to look this up in the JSON schema, possibly.  If I could access the schema in a program to determine this, it would be ideal, but still a bit unclear on how determine what’s a containerField in the JSON schema. Schema.definitions[containerField]?  Then check for leading “–“ and definitions[containerField].type for whether it’s an array or an object?  Should we have a separate definitions for containerFields???</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,</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</p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'><o:p> </o:p></span></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>Saturday, July 2, 2016 11:40 PM<br><b>To: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Cc: </b><a href="mailto:x3dom-developers@lists.sourceforge.net">x3dom-developer mlist</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:roy.walmsley@ntlworld.com">Roy Walmsley</a><br><b>Subject: </b>Re: Prototype Expander, Question on design of instance expansions</p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'><o:p> </o:p></span></p><p>On Jul 2, 2016 5:10 PM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br>><br>> b. Handle follow-on nodes by also inserting them, in a scene-valid manner.<br>> b.1. When the first node in the ProtoBody is an X3DChildNode, any follow-on nodes can be wrapped in a Switch (with whichChoice="-1") to ensure they are non-rendering.<br>> b.2. When first node in the ProtoBody is not an X3DChildNode, any follow-on nodes are still wrapped in a Switch which follows at the closest subsequent point in the scene graph that can accept children nodes.</p><p>Note that the closest subsequent point is likely to  be a parent array, since objects don't hold objects (they hold objects as values of attributes).  Is this what we want?  As to finding the parent array, I was thinking each object could contain a "../arrayElement" attribute which would have a value of the JSONPath from the root to the array element index that the ProtoInstance (for example) is contained within.  Doing this with nested protoinstances could get really tricky. I almost want to do the Proto expansion first, and then try to add the switch nodes in the Flattener.js.  hmm.  That may work a lot better.  Thank you John for thinking this through before implementation. </p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'><o:p> </o:p></span></p></div></body></html>