<div dir="ltr">Here's the current scenegraph as JavaScript:<div><br></div><div>I'm going to download the latest from X_ITE.</div><div><br></div><div>John</div><div><br></div><div><br></div><div>X3D = require('X3Dautoclass');<br>var X3D0 = new X3D({profile:"Immersive",version:"3.3"}<br> /* x3dVersionComparisonTest for this model: supportsX3dVersion(X3DObject.VERSION_3_0)=true */<br>,<br> new head({}<br> /* comment #1 */<br><br> /* comment #2 */<br><br> /* comment #3 */<br><br> /* comment #4 */<br>,<br> new component({name:"Navigation",level:3}),<br> new component({name:"Shaders",level:1}),<br> new component({name:"CADGeometry",level:2}),<br> new component({name:"DIS",level:2}),<br> new component({name:"H-Anim",level:1}),<br> new component({name:"Grouping",level:1}),<br> new component({name:"Layering",level:1}),<br> new unit({name:"AngleUnitConversion",category:"angle",conversionFactor:1.0}),<br> new unit({name:"LengthUnitConversion",category:"length",conversionFactor:1.0}),<br> new unit({name:"ForceFromPoundsToNewtons",category:"force",conversionFactor:4.4482}),<br> new meta({content:"HelloWorldProgramOutput.x3d",name:"title"}),<br> new meta({content:"continued development and testing in progress",name:"info"}),<br> new meta({content:"Example HelloWorldProgram creates an X3D model using the X3D Java Scene Access Interface Library (X3DJSAIL)",name:"description"}),<br> new meta({content:"<a href="https://www.web3d.org/specifications/java/X3DJSAIL.html">https://www.web3d.org/specifications/java/X3DJSAIL.html</a>",name:"reference"}),<br> new meta({content:"HelloWorldProgramOutput.java",name:"generator"}),<br> new meta({content:"6 September 2016",name:"created"}),<br> new meta({content:"12 January 2020",name:"modified"}),<br> new meta({content:"X3D Java Scene Access Interface Library (X3DJSAIL)",name:"generator"}),<br> new meta({content:"<a href="https://www.web3d.org/specifications/java/examples/HelloWorldProgram.java">https://www.web3d.org/specifications/java/examples/HelloWorldProgram.java</a>",name:"generator"}),<br> new meta({content:"Netbeans <a href="http://www.netbeans.org">http://www.netbeans.org</a>",name:"generator"}),<br> new meta({content:"Don Brutzman",name:"creator"}),<br> new meta({content:"<a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d</a>",name:"reference"}),<br> new meta({content:"Console output, ClassicVRML encoding, VRML97 encoding and pretty-print documentation:",name:"reference"}),<br> new meta({content:"HelloWorldProgramOutput.txt",name:"reference"}),<br> new meta({content:"HelloWorldProgramOutput.x3dv",name:"reference"}),<br> new meta({content:"HelloWorldProgramOutput.wrl",name:"reference"}),<br> new meta({content:"HelloWorldProgramOutput.html",name:"reference"}),<br> new meta({content:"<a href="https://savage.nps.edu/X3dValidator?url=https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d">https://savage.nps.edu/X3dValidator?url=https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d</a>",name:"reference"}),<br> new meta({content:"<a href="https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d">https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d</a>",name:"identifier"}),<br> new meta({content:"../license.html",name:"license"})),<br> new Scene({},<br> new ViewpointGroup({description:"Available viewpoints"},<br> new Viewpoint({DEF:"DefaultView",description:"Hello X3DJSAIL"}),<br> new Viewpoint({DEF:"TopDownView",description:"top-down view from above",orientation:[1,0,0,-1.570796],position:[0,100,0]})),<br> new NavigationInfo({type:["EXAMINE","FLY","ANY"],avatarSize:[0.25,1.6,0.75],transitionType:["LINEAR"]}),<br> new WorldInfo({DEF:"WorldInfoDEF",title:"HelloWorldProgram produced by X3D Java SAI Library (X3DJSAIL)"}),<br> new WorldInfo({USE:"WorldInfoDEF"}),<br> new WorldInfo({USE:"WorldInfoDEF"}),<br> new MetadataString({DEF:"scene.addChildMetadata",name:"test",value:["Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding"]}),<br> new LayerSet({DEF:"scene.addChildLayerSetTest",order:[0]}),<br> new Transform({DEF:"LogoGeometryTransform",translation:[0,1.5,0]},<br> new Anchor({description:"select for X3D Java SAI Library (X3DJSAIL) description",url:["../X3DJSAIL.html","<a href="https://www.web3d.org/specifications/java/X3DJSAIL.html">https://www.web3d.org/specifications/java/X3DJSAIL.html</a>"]},<br> new Shape({DEF:"BoxShape"},<br> new Appearance({},<br> new Material({DEF:"GreenMaterial",diffuseColor:[0,1,1],emissiveColor:[0.8,0,0],transparency:0.1}),<br> new ImageTexture({url:["images/X3dJavaSceneAccessInterfaceSaiLibrary.png","<a href="https://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png">https://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png</a>"]})),<br> new Box({DEF:"test-NMTOKEN_regex.0123456789",cssClass:"untextured"})))),<br> new Shape({DEF:"LineShape"},<br> new Appearance({},<br> new Material({emissiveColor:[0.6,0.19607843,0.8]})),<br> new IndexedLineSet({coordIndex:[0,1,2,3,4,0]}<br> /* Coordinate 3-tuple point count: 6 */<br>,<br> new Coordinate({point:[0,1.5,0,2,1.5,0,2,1.5,-2,-2,1.5,-2,-2,1.5,0,0,1.5,0]}))),<br> new PositionInterpolator({DEF:"BoxPathAnimator",key:[0,0.125,0.375,0.625,0.875,1],keyValue:[0,1.5,0,2,1.5,0,2,1.5,-2,-2,1.5,-2,-2,1.5,0,0,1.5,0]}),<br> new TimeSensor({DEF:"OrbitClock",cycleInterval:8.0,loop:true}),<br> new ROUTE({fromField:"fraction_changed",fromNode:"OrbitClock",toField:"set_fraction",toNode:"BoxPathAnimator"}),<br> new ROUTE({fromField:"value_changed",fromNode:"BoxPathAnimator",toField:"set_translation",toNode:"LogoGeometryTransform"}),<br> new Transform({DEF:"TextTransform",translation:[0,-1.5,0]},<br> new Shape({},<br> new Appearance({},<br> new Material({USE:"GreenMaterial"})),<br> new Text({string:["X3D Java","SAI Library","X3DJSAIL"]}<br> /* Comment example A, plain quotation marks: He said, \"Immel did it!\" */<br><br> /* Comment example B, XML character entities: He said, "Immel did it!" */<br>,<br> new MetadataSet({name:"EscapedQuotationMarksMetadataSet"},<br> new MetadataString({name:"quotesTestC",value:["MFString example C, backslash-escaped quotes: He said, \"Immel did it!\""]}),<br> new MetadataString({name:"extraChildTest",value:["checks MetadataSetObject addValue() method"]})),<br> new FontStyle({family:["SERIF"],justify:["MIDDLE","MIDDLE"]}))),<br> new Collision({}<br> /* test containerField='proxy' */<br>,<br> new Shape({DEF:"ProxyShape"}<br> /* alternative XML encoding: Text string='\"One, Two, Comment\" \"\" \"He said, \\"Immel did it!\\"\"' */<br><br> /* alternative XML encoding: Text string='\"One, Two, Comment\" \"\" \"He said, \\"Immel did it!\\"\" \"\"' */<br><br> /* alternative Java source: .setString(new String [] {\"One, Two, Comment\", \"\", \"He said, \\\"Immel did it!\\\"\"}) */<br><br> /* reference: <a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html</a> */<br>,<br> new Text({string:["One, Two, Text","","He said, \"Immel did it!\" \"\""]})))<br> /* It's a beautiful world */<br><br> /* ... for you! */<br><br> /* <a href="https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song)">https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song)</a> */<br>)<br> /* repeatedly spin 180 degrees as a readable special effect */<br>,<br> new OrientationInterpolator({DEF:"SpinInterpolator",key:[0,0.5,1],keyValue:[0,1,0,4.712389,0,1,0,0,0,1,0,1.5707964]}),<br> new TimeSensor({DEF:"SpinClock",cycleInterval:5.0,loop:true}),<br> new ROUTE({fromField:"fraction_changed",fromNode:"SpinClock",toField:"set_fraction",toNode:"SpinInterpolator"}),<br> new ROUTE({fromField:"value_changed",fromNode:"SpinInterpolator",toField:"rotation",toNode:"TextTransform"}),<br> new Group({DEF:"BackgroundGroup"},<br> new Background({DEF:"GradualBackground"}),<br> new Script({DEF:"colorTypeConversionScript"},<br> new field({type:field.TYPE_SFCOLOR,name:"colorInput",accessType:field.ACCESSTYPE_INPUTONLY}),<br> new field({type:field.TYPE_MFCOLOR,name:"colorsOutput",accessType:field.ACCESSTYPE_OUTPUTONLY}),<br><br>`<br>ecmascript:<br><br>function colorInput (eventValue) // Example source code<br>{<br> colorsOutput = new MFColor(eventValue); // assigning value sends output event<br>// Browser.print('colorInput=' + eventValue + ', colorsOutput=' + colorsOutput + '\\n');<br>}<br><br>`),<br> new ColorInterpolator({DEF:"ColorAnimator",key:[0,0.5,1],keyValue:[0.9411765,1,1,0.29411766,0,0.50980395,0.9411765,1,1]}<br> /* AZURE to INDIGO and back again */<br>),<br> new TimeSensor({DEF:"ColorClock",cycleInterval:60.0,loop:true}),<br> new ROUTE({fromField:"colorsOutput",fromNode:"colorTypeConversionScript",toField:"skyColor",toNode:"GradualBackground"}),<br> new ROUTE({fromField:"value_changed",fromNode:"ColorAnimator",toField:"colorInput",toNode:"colorTypeConversionScript"}),<br> new ROUTE({fromField:"fraction_changed",fromNode:"ColorClock",toField:"set_fraction",toNode:"ColorAnimator"})),<br> new ProtoDeclare({name:"ArtDeco01Material",appinfo:"tooltip: ArtDeco01Material prototype is a Material node"},<br> new ProtoInterface({},<br> new field({type:field.TYPE_SFSTRING,name:"description",accessType:field.ACCESSTYPE_INPUTOUTPUT,appinfo:"tooltip for descriptionField",value:"ArtDeco01Material prototype is a Material node"}),<br> new field({type:field.TYPE_SFBOOL,name:"enabled",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"true"})),<br> new ProtoBody({}<br> /* Initial node of ProtoBody determines prototype node type */<br>,<br> new Material({ambientIntensity:0.25,diffuseColor:[0.282435,0.085159,0.134462],shininess:0.127273,specularColor:[0.276305,0.11431,0.139857]})<br> /* [HelloWorldProgram diagnostic] should be connected to scene graph: artDeco01ProtoDeclare.getNodeType()=\"Material\" */<br><br> /* presence of follow-on TouchSensor shows that additional nodes are allowed in ProtoBody after initial node, regardless of node types */<br>,<br> new TouchSensor({description:"within ProtoBody"},<br> new IS({},<br> new connect({nodeField:"description",protoField:"description"}),<br> new connect({nodeField:"enabled",protoField:"enabled"}))))),<br> new ExternProtoDeclare({name:"ArtDeco02Material",appinfo:"this is a different Material node",url:["<a href="http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02Material">http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02Material</a>","<a href="http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02Material">http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02Material</a>"]}<br> /* [HelloWorldProgram diagnostic] artDeco02ExternProtoDeclare.getNodeType()=\"ERROR_UNKNOWN_EXTERNPROTODECLARE_NODE_TYPE: ExternProtoDeclare name='ArtDeco02Material' type cannot be remotely accessed at run time. TODO X3DJSAIL needs to add further capability that retrieves the ExternProtoDeclare file.\" */<br>,<br> new field({type:field.TYPE_SFSTRING,name:"description",accessType:field.ACCESSTYPE_INPUTOUTPUT,appinfo:"tooltip for descriptionField"}))<br> /* Tested ArtDeco01ProtoInstance, ArtDeco02ProtoInstance for improper node type when ProtoInstance is added in wrong place */<br>,<br> new Shape({DEF:"TestShape1"},<br> new Appearance({DEF:"TestAppearance1"}<br> /* ArtDeco01Material prototype goes here... TODO ensure setContainerField is handled in exported Java */<br>,<br> new ProtoInstance({name:"ArtDeco01Material"}<br> /* [HelloWorldProgram diagnostic] ArtDeco01ProtoInstance.getNodeType()=\"Material\" */<br>,<br> new fieldValue({name:"description",value:"ArtDeco01Material can substitute for a Material node"}))),<br> new Sphere({radius:0.001})),<br> new Shape({DEF:"TestShape2"},<br> new Appearance({DEF:"TestAppearance2"}<br> /* ArtDeco02Material prototype goes here... TODO ensure setContainerField is handled in exported Java */<br>,<br> new ProtoInstance({DEF:"ArtDeco02MaterialDEF",name:"ArtDeco02Material"}<br> /* [HelloWorldProgram diagnostic] ArtDeco02ProtoInstance.getNodeType()=\"ERROR_UNKNOWN_EXTERNPROTODECLARE_NODE_TYPE: ExternProtoDeclare name='ArtDeco02Material' type cannot be remotely accessed at run time. TODO X3DJSAIL needs to add further capability that retrieves the ExternProtoDeclare file.\" */<br>,<br> new fieldValue({name:"description",value:"ArtDeco02Material can substitute for another Material node"}))),<br> new Cone({bottomRadius:0.001,height:0.001})),<br> new Shape({DEF:"TestShape3"},<br> new Appearance({DEF:"TestAppearance3"}<br> /* ArtDeco02Material ProtoInstance USE goes here. Note that name field is NOT defined as part of ProtoInstance USE. */<br>,<br> new ProtoInstance({USE:"ArtDeco02MaterialDEF"})),<br> new Cylinder({height:0.001,radius:0.001})),<br> new Inline({DEF:"inlineSceneDef",url:["someOtherScene.x3d","<a href="https://www.web3d.org/specifications/java/examples/someOtherScene.x3d">https://www.web3d.org/specifications/java/examples/someOtherScene.x3d</a>"]}),<br> new IMPORT({AS:"WorldInfoDEF2",importedDEF:"WorldInfoDEF",inlineDEF:"inlineSceneDef"}),<br> new EXPORT({AS:"WorldInfoDEF3",localDEF:"WorldInfoDEF"}),<br> new ProtoDeclare({name:"MaterialModulator",appinfo:"mimic a Material node and modulate fields as an animation effect",documentation:"<a href="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html">http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html</a>"},<br> new ProtoInterface({},<br> new field({type:field.TYPE_SFBOOL,name:"enabled",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"true"}),<br> new field({type:field.TYPE_SFCOLOR,name:"diffuseColor",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"0 0 0"}),<br> new field({type:field.TYPE_SFCOLOR,name:"emissiveColor",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"0.05 0.05 0.5"}),<br> new field({type:field.TYPE_SFCOLOR,name:"specularColor",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"0 0 0"}),<br> new field({type:field.TYPE_SFFLOAT,name:"transparency",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"0.0"}),<br> new field({type:field.TYPE_SFFLOAT,name:"shininess",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"0.0"}),<br> new field({type:field.TYPE_SFFLOAT,name:"ambientIntensity",accessType:field.ACCESSTYPE_INPUTOUTPUT,value:"0.0"})),<br> new ProtoBody({},<br> new Material({DEF:"MaterialNode"},<br> new IS({},<br> new connect({nodeField:"diffuseColor",protoField:"diffuseColor"}),<br> new connect({nodeField:"emissiveColor",protoField:"emissiveColor"}),<br> new connect({nodeField:"specularColor",protoField:"specularColor"}),<br> new connect({nodeField:"transparency",protoField:"transparency"}),<br> new connect({nodeField:"shininess",protoField:"shininess"}),<br> new connect({nodeField:"ambientIntensity",protoField:"ambientIntensity"})))<br> /* Only first node (the node type) is renderable, others are along for the ride */<br>,<br> new Script({DEF:"MaterialModulatorScript"},<br> new field({type:field.TYPE_SFBOOL,name:"enabled",accessType:field.ACCESSTYPE_INPUTOUTPUT}),<br> new field({type:field.TYPE_SFCOLOR,name:"diffuseColor",accessType:field.ACCESSTYPE_INPUTOUTPUT}),<br> new field({type:field.TYPE_SFCOLOR,name:"newColor",accessType:field.ACCESSTYPE_OUTPUTONLY}),<br> new field({type:field.TYPE_SFTIME,name:"clockTrigger",accessType:field.ACCESSTYPE_INPUTONLY}),<br> new IS({},<br> new connect({nodeField:"enabled",protoField:"enabled"}),<br> new connect({nodeField:"diffuseColor",protoField:"diffuseColor"})),<br><br>`<br>ecmascript:<br>function initialize ()<br>{<br> newColor = diffuseColor; // start with correct color<br>}<br>function set_enabled (newValue)<br>{<br> enabled = newValue;<br>}<br>function clockTrigger (timeValue)<br>{<br> if (!enabled) return;<br> red = newColor.r;<br> green = newColor.g;<br> blue = newColor.b;<br> <br> // note different modulation rates for each color component, % is modulus operator<br> newColor = new SFColor ((red + 0.02) % 1, (green + 0.03) % 1, (blue + 0.04) % 1);<br> if (enabled)<br> {<br> Browser.print ('diffuseColor=(' + red + ',' + green + ',' + blue + ') newColor=' + newColor.toString() + '\\n');<br> }<br>}<br><br>`)))<br> /* Test success: declarative statement createDeclarativeShapeTests() */<br>,<br> new Group({DEF:"DeclarativeGroupExample"},<br> new Shape({},<br> new MetadataString({DEF:"FindableMetadataStringTest",name:"findThisNameValue",value:["test case"]}),<br> new Appearance({DEF:"DeclarativeAppearanceExample"}<br> /* DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance */<br>,<br> new ProtoInstance({DEF:"MyMaterialModulator",name:"MaterialModulator"})),<br> new Cone({bottom:false,bottomRadius:0.05,height:0.1}))<br> /* Test success: declarativeGroup.addChild() singleton pipeline method */<br>)<br> /* Test success: declarative statement addChild() */<br><br> /* Test success: x3dModel.findNodeByDEF(DeclarativeAppearanceExample) = <Appearance DEF='DeclarativeAppearanceExample'/> i.e. <Appearance DEF='DeclarativeAppearanceExample'> <!- - DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance - -> <ProtoInstance DEF='MyMaterialModulator' name='MaterialModulator' containerField='material'/> </Appearance> */<br><br> /* Test success: x3dModel.findElementByNameValue(findThisNameValue) = <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='\"test case\"'/> */<br><br> /* Test success: x3dModel.findElementByNameValue(\"ArtDeco01Material\", \"ProtoDeclare\") found */<br><br> /* Test success: x3dModel.findElementByNameValue(\"MaterialModulator\", \"ProtoDeclare\") found */<br><br> /* Test success: x3dModel.findElementByNameValue(\"MaterialModulator\", \"ProtoInstance\") found */<br>,<br> new Group({DEF:"TestFieldObjectsGroup"}<br> /* testFieldObjects() results */<br><br> /* SFBool default=true, true=true, false=false, negate()=true */<br><br> /* MFBool default=, initial=true false true, negate()=false true false */<br><br> /* SFFloat default=0.0, initial=1.0, setValue(2)=2.0, setValue(3.0f)=3.0, setValue(4.0)=4.0 */<br><br> /* MFFloat default=, initial=1 2 3, append(5)=1 2 3 5, inserts(3,4)(0,0)=0 1 2 3 4 5, append(6)=0 1 2 3 4 5 6, size()=7 */<br><br> /* ... get1Value[3]=3.0, remove[1]=0 2 3 4 5 6, set1Value(0,10)=10 2 3 4 5 6, multiply(2)=20 4 6 8 10 12, clear= */<br><br> /* SFVec3f default=0 0 0, initial=1 2 3, setValue=4 5 6, multiply(2)=8 10 12, normalize()=0.45584232 0.5698029 0.68376344, regex matches()=true */<br><br> /* regex test SFVec3f().matches(\"1 2 3\")=true, regex test SFVec3f().matches(\"1 2 3 4\")=false, regex test (SFRotationObject.matches(\"0 0 0 0\")=true, failure detecting illegal (zero axis) rotation value */<br>),<br> new Sound({location:[0,1.6,0]}<br> /* set sound-ellipsoid location height at 1.6m to match typical avatar height */<br>,<br> new AudioClip({description:"chimes",url:["chimes.wav","<a href="https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav">https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav</a>"]}<br> /* Scene example fragment from <a href="https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d">https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d</a> */<br>)),<br> new Sound({location:[0,1.6,0]}<br> /* set sound-ellipsoid location height at 1.6m to match typical avatar height */<br>,<br> new MovieTexture({description:"mpgsys.mpg from ConformanceNist suite",url:["mpgsys.mpg","<a href="https://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg">https://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg</a>"]}<br> /* Scene example fragment from <a href="https://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d">https://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d</a> */<br><br> /* Expected containerField='source', allowed containerField values=\"texture\" \"source\" \"back\" \"bottom\" \"front\" \"left\" \"right\" \"top\" \"backTexture\" \"bottomTexture\" \"frontTexture\" \"leftTexture\" \"rightTexture\" \"topTexture\" \"watchList\" */<br>))<br> /* Test success: AnchorObject.isNode()=true, siteAnchor.isNode()=true */<br><br> /* Test success: AnchorObject.isStatement()=false, siteAnchor.isStatement()=false */<br><br> /* Test success: ROUTEObject.isNode()=false, orbitPositionROUTE.isNode()=false */<br><br> /* Test success: ROUTEObject.isStatement()=true, orbitPositionROUTE.isStatement()=true */<br><br> /* Test success: CommentsBlock.isNode()=false, testComments.isNode()=false */<br><br> /* Test failure: CommentsBlock.isStatement()=true, testComments.isStatement()=true */<br>,<br> new Shape({DEF:"ExtrusionShape"}<br> /* ExampleExtrusion isCrossSectionClosed()=true, crossSection='[1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0]' */<br><br> /* ExampleExtrusion isSpineClosed()=false, spine='[0.0, 0.0, 0.0, 0.0, 1.0, 0.0]' */<br>,<br> new Appearance({DEF:"TransparentAppearance"},<br> new Material({transparency:1.0})),<br> new Extrusion({DEF:"ExampleExtrusion"})),<br> new Group({}<br> /* Test MFNode children array as an ordered list consisting of comments, statements, ProtoInstance and nodes */<br>,<br> new ProtoDeclare({name:"NewWorldInfo"},<br> new ProtoInterface({},<br> new field({type:field.TYPE_SFSTRING,name:"description",accessType:field.ACCESSTYPE_INITIALIZEONLY})),<br> new ProtoBody({},<br> new WorldInfo({}))),<br> new ProtoInstance({DEF:"Proto1",name:"NewWorldInfo"},<br> new fieldValue({name:"description",value:"testing 1 2 3"})),<br> new Group({DEF:"Node2"}<br> /* intentionally empty */<br>),<br> new ProtoInstance({DEF:"Proto3",name:"NewWorldInfo"}),<br> new Transform({DEF:"Node4"}<br> /* intentionally empty */<br>)<br> /* Test satisfactorily creates MFNode children array as an ordered list with mixed content */<br>),<br> new ProtoDeclare({name:"ShaderProto"},<br> new ProtoBody({},<br> new ProgramShader({}))),<br> new Shape({},<br> new Appearance({}<br> /* Test MFNode shaders array as an ordered list consisting of comments, ProtoInstance and nodes */<br><br> /* Test satisfactorily creates MFNode shaders array as an ordered list with mixed content */<br>,<br> new ProgramShader({DEF:"TestShader1"},<br> new ShaderProgram({DEF:"TestShader2"})),<br> new ProtoInstance({DEF:"TestShader3",name:"ShaderProto"}),<br> new ComposedShader({DEF:"TestShader4"},<br> new ShaderPart({DEF:"TestShader5"})))),<br> new Transform({DEF:"SpecialtyNodes"},<br> new CADLayer({},<br> new CADAssembly({},<br> new CADPart({},<br> new CADFace({})))),<br> new EspduTransform({geoSystem:["GD","WE"]}),<br> new ReceiverPdu({geoSystem:["GD","WE"]}),<br> new SignalPdu({geoSystem:["GD","WE"]}),<br> new TransmitterPdu({geoSystem:["GD","WE"]}),<br> new DISEntityManager({},<br> new DISEntityTypeMapping({}))))) ;<br>X3D0.toFileX3D("examples/HelloWorldProgramOutput.new.x3d");<br>X3D0.toFileJSON("examples/HelloWorldProgramOutput.new.json");<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 13, 2020 at 3:40 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">Ant build script (All found on X3D sourceforge project):<div><br><div><a href="http://www.web3d.org/x3d/stylesheets/node/build.xml" target="_blank">www.web3d.org/x3d/stylesheets/node/build.xml</a><br></div><div><br></div><div>(recommend "all" target). In that folder, run</div><div><br></div><div>ant all to compile and run the test, but first, look at hand generated example:</div><div><br></div><div>Example for those creating the node.js SAI library: (very buggy)</div><div><a href="http://www.web3d.org/x3d/stylesheets/node/examples/HelloWorldProgramOutput.js" target="_blank">www.web3d.org/x3d/stylesheets/node/examples/HelloWorldProgramOutput.js</a><br></div><div><br></div></div><div>Code that ultimately needs work:</div><div><br></div><div><a href="http://www.web3d.org/x3d/stylesheets/node/JavaScriptSerializer.js" target="_blank">www.web3d.org/x3d/stylesheets/node/JavaScriptSerializer.js</a><br></div><div><br></div><div>Discussion:</div><div>Does this look like a good style in the examples file?</div><div>Does the style match the standard JavaScript SAI?</div><div>What is needed to standardize JavaScript SAI for X3Dv4?</div><div>How fast can we get a Hello World roundtrip working?</div><div><br></div><div>This is primarily a build integration release. Please integrate the build.xml all target with the stylesheets build.xml. Thanks, Don!</div><div><br></div><div>Don, I see your way ahead of me, integrating this into everything.</div><div><br></div><div>Can someone point me at a working JavaScript SAI?</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div></div>
</blockquote></div>