<div dir="ltr">Here's why I didn't continue with an ECMAScript SAI similar to the ECMAScript SAI standard and X_ITE SAI examples.<div><br></div><div>Translated code:</div><div><br></div><div>var browser = X3D.getBrowser();<br>var X3D0 = {};<br>X3D0.profile = "Immersive";<br>X3D0.version = "3.3";<br>ProtoDeclare2 = browser.currentScene.createNode("ProtoDeclare");<br>ProtoDeclare2.name = "anyShape";<br>ProtoInterface3 = browser.currentScene.createNode("ProtoInterface");<br>field4 = browser.currentScene.createNode("field");<br><a href="http://field4.name">field4.name</a> = "myShape";<br>field4.accessType = "inputOutput";<br>field4.type = "MFNode";<br>Shape5 = browser.currentScene.createNode("Shape");<br>Sphere6 = browser.currentScene.createNode("Sphere");<br>Shape5.geometry = Sphere6;<br>field4.children = new MFNode();<br>field4.children[0] = Shape5;<br>ProtoInterface3.field = new MFNode();<br>ProtoInterface3.field[0] = field4;<br>ProtoDeclare2.protoInterface = ProtoInterface3;<br></div><div><br></div><div>I believe some of the Nodes above should be statements.  That's not the issue.  The issue is that in SAI I've seen, the ProtoDeclare (or PROTO) is in VRML or perhaps XML.  I understand I need add a special case for Proto's.</div><div><br></div><div>John</div><div><br></div></div>