<html>
 <head>
  <meta name="viewport" content="width=device-width">
  <meta http-equiv="Content-Type" content="text/vnd.ui.insecure+html;charset=utf-8">
 </head>
 <body style="overflow-wrap:break-word; word-break: break-word;"><div class="mail_android_message" style="line-height: 1; padding: 0.5em">Hi Andreas,<br/><br/>The MoosTrigger can be deleted. I forgot it there, sorry (it would be used for MU capability). I will correct asap.<br/><br/>The only theory I have is that the external behaviour of scripts and protos regarding the event cascade is very similar. Both have fields that can be arbitrarily defined. So a reference to a script can hold a reference to a ProtoInstance.<br/><br/>Sorry I am not a Browser developer, but I am a (potential) user of X3D, dont know so much about X3D internals. It could even be an intention of the standard.<br/><br/>kr<br/><br/>-- <br/>Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.</div><div class="mail_android_quote" style="line-height: 1; padding: 0.3em"><html><body>Am 29.11.20, 15:24 schrieb Andreas Plesch <andreasplesch@gmail.com>:</body></html><blockquote class="gmail_quote" style="margin: 0.8ex 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  <div dir="ltr">
   <div>
    Hi Christoph,
   </div>
   <div>
    <br>
   </div>
   <div>
    The Pig proto is using a "Moostrigger" proto. Should the Mosstrigger proto be included in the archive, or can it be ignored, eg. commented out ?
   </div>
   <div>
    <br>
   </div>
   <div>
    I am struggling to understand how Version C, the Script workaround, could work:
   </div>
   <div>
    <br>
   </div>
   <div>
    <!-- the second pig , version C - ProtoInstance WITHOUT name -->
    <br>        <Transform translation='3 0 0' rotation='0 1 0 -1.57'>
    <br>            <Script USE="ThePig"/>
    <br>        </Transform>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    and the ThePig DEF is:
   </div>
   <div>
    <br>
   </div>
   <div>
    <ProtoInstance DEF="ThePig" name='Pig'/>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    So the ThePig DEF is not a Script node. ( And the Pig proto is of Group type. ). It seems like it is just a coincidence that it works with BSContact. Perhaps BSContact somehow treats all ProtoInstances as Scripts ?
   </div>
   <div>
    <br>
   </div>
   <div>
    Do  you have a theory why the workaround actually works with some browsers ?
   </div>
   <div>
    <br>
   </div>
   <div>
    Thanks, Andreas
   </div>
   <div dir="ltr"></div>
   <br>
   <div class="gmail_quote">
    <div class="gmail_attr" dir="ltr">
     On Sat, Nov 28, 2020 at 3:46 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">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="auto">
      Thanks, I will take a look.
      <br>
      <br>
      <div>
       ---on the phone---
      </div>
     </div>
     <br>
     <div class="gmail_quote">
      <div class="gmail_attr" dir="ltr">
       On Sat, Nov 28, 2020, 9:17 AM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at">christoph.valentin@gmx.at</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>
        <div style="font-family:Verdana;font-size:12px">
         <div>
          Hi Andreas,
         </div> 
         <div>
           
         </div> 
         <div>
          I felt free to provide an example scene in three flavors.
         </div> 
         <div>
           
         </div> 
         <div>
          The prototype renders a little pig that says "Eatme!", when you touch it (in remembrance of Douglas Adams)
         </div> 
         <div>
           
         </div> 
         <div>
          Version A: <ProtoInstance USE="xxx" name="yyy"/>    WITH name attribute - standards compliant
         </div> 
         <div>
          Version B: <ProtoInstance USE="xxx"/>  WITHOUT name attribute
         </div> 
         <div>
          Version C: <Script USE="xxx"/>  WORKAROUND - works for all browsers
         </div> 
         <div>
           
         </div> 
         <div>
          I tested with BS Contact --- he can cope with all three versions.
         </div> 
         <div>
           
         </div> 
         <div>
          Download the .zip file at <a href="https://lc-soc-lc.at/experimental/ProtoInstanceWithUSE/">https://lc-soc-lc.at/experimental/ProtoInstanceWithUSE/</a>     I provide it by a GPLv3.
         </div> 
         <div>
           
         </div> 
         <div>
          Feed Back welcome. You may take it and give it to your benchmark tests, if you like.
         </div> 
         <div>
           
         </div> 
         <div>
          Kind regards,
         </div> 
         <div>
          Christoph
         </div> 
         <div>
            
          <div>
             
           <div style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)"> 
            <div style="margin:0px 0px 10px">
             <b>Gesendet:</b> Dienstag, 24. November 2020 um 00:30 Uhr
             <br> <b>Von:</b> "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>>
             <br> <b>An:</b> "Christoph Valentin" <<a href="mailto:christoph.valentin@gmx.at">christoph.valentin@gmx.at</a>>
             <br> <b>Cc:</b> "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>>
             <br> <b>Betreff:</b> Re: [x3d-public] ProtoInstance USE without name
            </div> 
            <div> 
             <div>
              Hi Christoph, 
              <div>
                
              </div> 
              <div>
               thanks, interesting. Perhaps it will be useful to try a USE ProtoInstance in a very simple scene, in multiple browsers.
              </div> 
              <div>
                
              </div> 
              <div>
               -Andreas
              </div> 
             </div>   
             <div class="gmail_quote"> 
              <div class="gmail_attr">
               On Mon, Nov 23, 2020 at 1:01 PM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at">christoph.valentin@gmx.at</a>> wrote:
              </div> 
              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> 
               <div> 
                <div style="font-family:Verdana;font-size:12px"> 
                 <div>
                   
                 </div> 
                 <div> 
                  <div>
                   Hi
                  </div> 
                  <div>
                    
                  </div> 
                  <div>
                   This bug is common to many X3D players (even classical non-WebGL X3D players).
                  </div> 
                  <div>
                    
                  </div> 
                  <div>
                   I was used to use following workaround, which worked for all relevant players:
                  </div> 
                  <div>
                    
                  </div> 
                  <div>
                   If I want to USE a DEFd ProtoInstance, I will actually instantiate a <Script> node with USE.
                  </div> 
                  <div>
                    
                  </div> 
                  <div>
                   KR,
                  </div> 
                  <div>
                   Christoph
                  </div> 
                  <div>
                     
                   <div style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)"> 
                    <div style="margin:0px 0px 10px">
                     <b>Gesendet:</b> Montag, 23. November 2020 um 00:00 Uhr
                     <br> <b>Von:</b> "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>>
                     <br> <b>An:</b> "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>>
                     <br> <b>Betreff:</b> [x3d-public] ProtoInstance USE without name
                    </div> 
                    <div> 
                     <div>
                      Looking at why the old Prototypes for HAnim did not work properly for x3dom, I found that the xml examples typically have a ProtoInstance statement with a USE attribute but without the corresponding name attribute defining the actual node type. However, x3dom expects a name attribute with every ProtoInstance statement, even USE ones, to be able to insert the appropriate node. 
                      <div>
                        
                      </div> 
                      <div>
                       The xml spec  at
                      </div> 
                      <div>
                        
                      </div> 
                      <div>
                       <a href="https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement">https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement</a>
                      </div> 
                      <div>
                        
                      </div> 
                      <div>
                       does not address USE of ProtoInstances but all examples always have a name attribute.
                      </div> 
                      <div>
                        
                      </div> 
                      <div>
                       Also, in my quite extensive testing of Protos, I did not come across other examples of ProtoInstance elements without a name attribute.
                      </div> 
                      <div>
                        
                      </div> 
                      <div>
                       To be fair, the name attribute is not strictly necessary for USE ProtoInstances since the type of the inserted node can be determined from the referenced DEF node. But having the name attribute makes ProtoInstance elements more similar to regular nodes. So I think not requiring the name attribute for USE ProtoInstances should be explicitly allowed in the xml spec., but still be encouraged.
                      </div> 
                      <div>
                        
                      </div> 
                      <div>
                       I do not think the xml spec. would be otherwise affected by V.4 ?
                      </div> 
                      <div>
                        
                      </div> 
                      <div>
                       Best, Andreas
                      </div> 
                      <div>
                        
                      </div> 
                      <div>
                       -- 
                       <div> 
                        <div> 
                         <div>
                          Andreas Plesch
                          <br> Waltham, MA 02453
                         </div> 
                        </div> 
                       </div> 
                      </div> 
                     </div> _______________________________________________ x3d-public mailing list <a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>
                    </div> 
                   </div> 
                  </div> 
                 </div> 
                </div> 
               </div> 
              </blockquote> 
             </div>   
             <div>
               
             </div> -- 
             <div> 
              <div> 
               <div>
                Andreas Plesch
                <br> Waltham, MA 02453
               </div> 
              </div> 
             </div> 
            </div> 
           </div> 
          </div> 
         </div>
        </div>
       </div> 
      </blockquote>
     </div> 
    </blockquote>
   </div>
   <br>
   <div>
    <br>
   </div>-- 
   <br>
   <div class="gmail_signature" dir="ltr">
    <div dir="ltr">
     <div>
      Andreas Plesch
      <br>Waltham, MA 02453
     </div>
    </div>
   </div>
  </div> 
 </blockquote></div></body>
</html>