<div dir="ltr"><h2 style="font-size:31.2px;margin-top:18px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-weight:400">Wait...</span></h2><h2 style="font-size:31.2px;margin-top:18px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">7.3.6 <i>X3DPrototypeInstance</i></h2><pre class="gmail-node" style="color:rgb(0,0,0);font-size:17.85px;margin-left:25px">X3DPrototypeInstance : X3DNode {
  SFNode [in,out] metadata NULL [X3DMetadataObject] </pre><span style="color:rgb(0,0,0);font-size:17.85px">}</span><div><br></div><div>ProtoInstance is a Node or a Statement???</div><div><br></div><div>For nodes, I use these semantics: USE creates another parent reference, not another child (see below).  If it doesn't create another child, there's no room whatever is in name, it should already be populated in the DEF'd node.</div><div><br></div><div>I have no clue why this keeps popping up.  Is it because the ProtoDeclare is in another namespace than the instance?</div><div><br></div><div>John</div><div><br></div><div>DEF/USE semantics from V4: <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD3/">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD3/</a><div><div><div><h2 style="font-size:31.2px;margin-top:18px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">4.4.3 DEF/USE semantics</h2><p style="font-size:24px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">Node names are limited in scope to a single X3D file, prototype definition, or string submitted to either CreateX3DFromString, CreateX3DFromStream, or CreateX3DFromURL browser service or a construction for SFNodes within a script. The USE statement does not create a copy of the node. Instead, the same node is inserted into the scene graph a second time, resulting in the node having multiple parents (see <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD3/Part01/concepts.html#Transformationhierarchy">4.3.5 Transformation hierarchy</a>, for restrictions on self-referential nodes).<br><br>Node names shall be unique in the context within which the associated DEF keyword occurs.</p><div class="editorsNote" title="Editors note, X3D4 design goals" style="background-color:lightcyan;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:24px"><p>TODO: describe how, when an external environment exists,</p><ul><li style="margin-top:4px">Abstract definition of how events can be exchanged between external environment and scene graph.</li><li style="margin-top:4px">Syntax for multiple encoding/language bindings may be defined in related specifications, e.g. updates to 19777-1 JavaScript, 19776-1 XML Encoding, and (eventually) 19776-5 JSON.</li><li style="margin-top:4px">For example, HTML5/DOM id attribute can be used for performing event callbacks using JavaScript, and thus has a similar role to DEF when events are ROUTEd.</li><li style="margin-top:4px">Editors discussion: examples should not go into an annex, will need to go into other file encodings and language bindings.</li><li style="margin-top:4px">Pending eventual ISO submission and review of those specifications, we will need example usage and some specification details publicly available to support implementation efforts.</li></ul><div><br></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 8:28 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><a href="https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#DEFL_USESemantics" target="_blank">https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#DEFL_USESemantics</a> (for nodes, not statements).  DEF's with the same value can appear in more than one namespace.<br><div><br>For nodes, what happens if you have a different name in the USE node referencing the DEF'd node?</div><div><br></div><div>I think the answer is, additional fields can be used in statements, but not nodes.</div><div><br>Now the question is, how should the JSON Schema react to this information?  This was not handled for the most part in the hand generated schema, I'm not even sure it was handled by XML schema or X3DUOM, so we're only talking about the generated JSON schema, as appears here:</div><div><br></div><div><a href="https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json" target="_blank">https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json</a> (not 3.3!)</div><div><br></div><div>John</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 8:15 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">John Carlson</strong> <span dir="auto"><<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>></span><br>Date: Sun, Nov 22, 2020 at 8:10 PM<br>Subject: Re: x3dom bug related to IS/children PROTOs?<br>To: Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br></div><br><br><div dir="ltr">I'll just pretend we zoomed back from 2020->2015 virtually (in the mind).<div><br><div>Can we agree, that in most cases (nodes), USE is the only field allowed when USE appears?</div><div><br></div><div>If not, I've got to change all my JSON schema generating code.</div><div><br></div><div>Maybe we'll decide on another JSON schema based on the XML schema, since XML Spy can now generate a JSON schema from an XML schema last I heard.</div><div><br></div><div>Let's just break all my coding for the last 5 years!  Whee!</div><div><br>I would need to know all the nodes/statements where additional fields are allowed when USE appears.  I think there's only two cases.</div><div><br></div><div>Or is this a thing in X3D4?</div><div><br></div><div>It seems like USE has two different semantics, whether you're using it on a node or not?  I know in one case, it's intended to add another parent to a node (not statement I guess), but perhaps that's a X3D3 thing?</div><div><br></div><div>John</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 7:51 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I think the spec. does not have an opinion on this, see x3d-public and other players. Cheers, -Andreas</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 8:47 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Note that X3DOM should now probably flag ProtoInstances with both name and USE with a warning that the code is now non-compliant or deprecated. I believe the spec says that USE and name together are only allowed in certain nodes (I think Metadata and perhaps one other comes to mind).<div><br></div><div>That's the best I have right now.  See previous discussion on mailing list regarding extra fields including name along with USE.</div><div><br></div><div>Also, if you use JSON schema, it should catch JSON examples as non-compliant if they contain both name and USE.  This works in JSON, because containerFields are not used in JSON.</div><div><br></div><div>And yes, this may have all changed under my nose!</div><div><br></div><div>John</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 7:19 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Yes, the Diamond files have the diamond shape in the ProtoDeclaration.<div><br></div><div>I added guards for nonimplemented but expected, standard fields (such as addChildren) to ProtoDeclaration.js, and allowed USE ProtoInstances by looking for DEFs in the dom (before parsing, at the initial step of translation to the concise x3dom syntax).</div><div><br></div><div>These changes should help with making these older HAnim protos work better.</div><div><br></div><div>-Andreas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 4:43 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:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div dir="auto">I see one Shape (in a proto?), but I didn’t look for geometry.   I believe there is satisfactory appearance.   I believe I only checked one LOA4 file.   I am not sure about converted files.</div><div dir="auto"><br></div><div dir="auto">I will look into this in more detail later today.  I believe at least the Diamond files should have shapes.</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 9:35 AM 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Yes this is Proto related, due to the "addChildren" and "removeChildren" fields not being available in x3dom for grouping nodes. And those are not available because x3dom cannot route node type fields.</div><div><br></div><div>Although the Protos define the addChildren field it is actually never used in the examples, so they are not actually necessary. You could just remove them.</div><div><br></div><div>The examples use an old Proto implementation of HAnim. The native implementation is also available, without Protos.</div><div><br></div><div>Perhaps it would make sense to add noop stubs for add/removeChildren fields in X3DGroupingNode.js, or add a guard for the Proto field type.</div><div><br></div><div>I notice that hanimloa4.html does not have any geometry to render, only the joint structure.</div></div>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</blockquote></div>
</div></div>
</blockquote></div>
</blockquote></div>