ant -f C:\\x3d-code\\www.web3d.org\\x3d\\stylesheets\\java\\nashorn all
test.nashorn:
Compile:
Compiling 4 source files to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\classes
Compiling 2 source files to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\classes
Copy:
Copying 1 file to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples
Copying C:\x3d-code\www.web3d.org\x3d\stylesheets\java\examples\HelloWorldProgramOutput.x3d to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.x3d
Copying 1 file to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples
Copying C:\x3d-code\www.web3d.org\x3d\stylesheets\java\examples\HelloWorldProgramOutput.json to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.json
===========
Run test 1:
org.web3d.x3d.jsail.CommandLine examples/HelloWorldProgramOutput.x3d -tojs -toFile examples/HelloWorldProgramOutput.Nashorn.js
parameter: source file HelloWorldProgramOutput.x3d filesize 21512 bytes
CommandLine parameter: "-tojs" for conversion to X3DJSONLD JavaScript source
CommandLine parameter: "-toFile" "examples/HelloWorldProgramOutput.Nashorn.js" for result file name root examples/HelloWorldProgramOutput.Nashorn
Parsing using Document Object Model (DOM) based X3DLoaderDOM...
convert to JS JavaScript:
Warning: examples/HelloWorldProgramOutput.Nashorn.js does not meet suggested X3D naming conventions, output serialization continuing...
Warning: toFileJavaScript() is overwriting prior file examples/HelloWorldProgramOutput.Nashorn.js
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
nashorn diagnostic: toFileJavaScript(examples/HelloWorldProgramOutput.Nashorn.js) is running engine.eval(load(...)) using intermediateJSFileName='examples/HelloWorldProgramOutput.Nashorn.js.intermediate.js'
Returning with <X3D profile="Immersive" version="3.3" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.3.xsd"><!--x3dVersionComparisonTest for this model: supportsX3dVersion(X3DObject.VERSION_3_0)=true--><head><!--comment #1--><!--comment #2--><!--comment #3--><!--comment #4--><component name="Navigation" level="3"/>
<component name="Shaders" level="1"/>
<component name="Layering" level="1"/>
<unit name="AngleUnitConversion" category="angle" conversionFactor="1"/>
<unit name="LengthUnitConversion" category="length" conversionFactor="1"/>
<meta name="title" content="HelloWorldProgramOutput.x3d"/>
<meta name="description" content="Example HelloWorldProgram creates an X3D model using the X3D Java Scene Access Interface Library (X3DJSAIL)"/>
<meta name="reference" content="http://www.web3d.org/specifications/java/X3DJSAIL.html"/>
<meta name="generator" content="HelloWorldProgramOutput.java"/>
<meta name="created" content="6 September 2016"/>
<meta name="modified" content="1 May 2019"/>
<meta name="generator" content="X3D Java Scene Access Interface Library (X3DJSAIL)"/>
<meta name="generator" content="http://www.web3d.org/specifications/java/examples/HelloWorldProgram.java"/>
<meta name="generator" content="Netbeans http://www.netbeans.org"/>
<meta name="creator" content="Don Brutzman"/>
<meta name="reference" content="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d"/>
<meta name="reference" content="Console output, ClassicVRML encoding, VRML97 encoding and pretty-print documentation:"/>
<meta name="reference" content="HelloWorldProgramOutput.txt"/>
<meta name="reference" content="HelloWorldProgramOutput.x3dv"/>
<meta name="reference" content="HelloWorldProgramOutput.wrl"/>
<meta name="reference" content="HelloWorldProgramOutput.html"/>
<meta name="reference" content="https://savage.nps.edu/X3dValidator?url=http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d"/>
<meta name="identifier" content="http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d"/>
<meta name="license" content="../license.html"/>
</head>
<Scene><ViewpointGroup description="Available viewpoints"><Viewpoint DEF="DefaultView" description="Hello X3DJSAIL"/>
<Viewpoint DEF="TopDownView" description="top-down view from above" orientation="1 0 0 -1.570796" position="0 100 0"/>
</ViewpointGroup>
<NavigationInfo type="&quot;EXAMINE&quot; &quot;FLY&quot; &quot;ANY&quot;"/>
<WorldInfo DEF="WorldInfoDEF" title="HelloWorldProgram produced by X3D Java SAI Library (X3DJSAIL)"/>
<WorldInfo USE="WorldInfoDEF"/>
<WorldInfo USE="WorldInfoDEF"/>
<MetadataString name="test" DEF="scene.addChildMetadata" value="&quot;Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding&quot;"/>
<LayerSet DEF="scene.addChildLayerSetTest"/>
<Transform DEF="LogoGeometryTransform" translation="0 1.5 0"><Anchor description="select for X3D Java SAI Library (X3DJSAIL) description" url="&quot;../X3DJSAIL.html&quot; &quot;http://www.web3d.org/specifications/java/X3DJSAIL.html&quot;"><Shape DEF="BoxShape"><Appearance><Material DEF="GreenMaterial" diffuseColor="0 1 1" emissiveColor="0.8 0 0" transparency="0.1"/>
<ImageTexture containerField="texture" url="&quot;images/X3dJavaSceneAccessInterfaceSaiLibrary.png&quot; &quot;http://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png&quot;"/>
</Appearance>
<Box containerField="geometry" DEF="test-NMTOKEN_regex.0123456789" class="untextured"/>
</Shape>
</Anchor>
</Transform>
<Shape DEF="LineShape"><Appearance><Material emissiveColor="0.6 0.19607843 0.8"/>
</Appearance>
<IndexedLineSet containerField="geometry" coordIndex="0 1 2 3 4 0"><!--Coordinate 3-tuple point count: 6--><Coordinate containerField="coord" 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"/>
</IndexedLineSet>
</Shape>
<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"/>
<TimeSensor DEF="OrbitClock" cycleInterval="8" loop="true"/>
<ROUTE fromField="fraction_changed" fromNode="OrbitClock" toField="set_fraction" toNode="BoxPathAnimator"/>
<ROUTE fromField="value_changed" fromNode="BoxPathAnimator" toField="set_translation" toNode="LogoGeometryTransform"/>
<Transform DEF="TextTransform" translation="0 -1.5 0"><Shape><Appearance><Material USE="GreenMaterial"/>
</Appearance>
<Text containerField="geometry" string="&quot;X3D Java&quot; &quot;SAI Library&quot; &quot;X3DJSAIL&quot;"><!--Comment example A, plain quotation marks: He said, "Immel did it!"--><!--Comment example B, XML character entities: He said, &quot;Immel did it!&quot;--><MetadataSet containerField="metadata" name="EscapedQuotationMarksMetadataSet"><MetadataString name="quotesTestC" value="&quot;MFString example C, backslash-escaped quotes: He said, \&quot;Immel did it!\&quot;&quot;"/>
<MetadataString name="extraChildTest" value="&quot;checks MetadataSetObject addValue() method&quot;"/>
</MetadataSet>
<FontStyle justify="&quot;MIDDLE&quot; &quot;MIDDLE&quot;"/>
</Text>
</Shape>
<Collision><!--test containerField='proxy'--><Shape containerField="proxy" DEF="ProxyShape"><!--alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \&quot;Immel did it!\&quot;"'--><!--alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \&quot;Immel did it!\&quot;" ""'--><!--alternative Java source: .setString(new String [] {"One, Two, Comment", "", "He said, \""Immel did it!\"""})--><!--reference: http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html--><Text containerField="geometry" string="&quot;One, Two, Text&quot; &quot;&quot; &quot;He said, \&quot;Immel did it!\&quot; \&quot;\&quot;&quot;"/>
</Shape>
</Collision>
<!--It's a beautiful world--><!--... for you!--><!--https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song)--></Transform>
<!--repeatedly spin 180 degrees as a readable special effect--><OrientationInterpolator DEF="SpinInterpolator" key="0 0.5 1" keyValue="0 1 0 4.712389 0 1 0 0 0 1 0 1.5707964"/>
<TimeSensor DEF="SpinClock" cycleInterval="5" loop="true"/>
<ROUTE fromField="fraction_changed" fromNode="SpinClock" toField="set_fraction" toNode="SpinInterpolator"/>
<ROUTE fromField="value_changed" fromNode="SpinInterpolator" toField="rotation" toNode="TextTransform"/>
<Group DEF="BackgroundGroup"><Background DEF="GradualBackground"/>
<Script DEF="colorTypeConversionScript"><field name="colorInput" accessType="inputOnly" type="SFColor"/>
<field name="colorsOutput" accessType="outputOnly" type="MFColor"/>
<![CDATA[

ecmascript:

function colorInput (eventValue) // Example source code
{
   colorsOutput = new MFColor(eventValue); // assigning value sends output event
// Browser.print('colorInput=' + eventValue + ', colorsOutput=' + colorsOutput + '\n');
}


]]></Script>
<ColorInterpolator DEF="ColorAnimator" key="0 0.5 1" keyValue="0.9411765 1 1 0.29411766 0 0.50980395 0.9411765 1 1"><!--AZURE to INDIGO and back again--></ColorInterpolator>
<TimeSensor DEF="ColorClock" cycleInterval="60" loop="true"/>
<ROUTE fromField="colorsOutput" fromNode="colorTypeConversionScript" toField="skyColor" toNode="GradualBackground"/>
<ROUTE fromField="value_changed" fromNode="ColorAnimator" toField="colorInput" toNode="colorTypeConversionScript"/>
<ROUTE fromField="fraction_changed" fromNode="ColorClock" toField="set_fraction" toNode="ColorAnimator"/>
</Group>
<ProtoDeclare name="ArtDeco01Material" appinfo="tooltip: ArtDeco01Material prototype is a Material node"><ProtoInterface><field name="description" accessType="inputOutput" appinfo="tooltip for descriptionField" type="SFString" value="ArtDeco01Material prototype is a Material node"/>
<field name="enabled" accessType="inputOutput" type="SFBool" value="true"/>
</ProtoInterface>
<ProtoBody><!--Initial node of ProtoBody determines prototype node type--><Material ambientIntensity="0.25" diffuseColor="0.282435 0.085159 0.134462" shininess="0.127273" specularColor="0.276305 0.11431 0.139857"/>
<!--[HelloWorldProgram diagnostic] should be connected to scene graph: artDeco01ProtoDeclare.getNodeType()="Material"--><!--presence of follow-on TouchSensor shows that additional nodes are allowed in ProtoBody after initial node, regardless of node types--><TouchSensor description="within ProtoBody"><IS><connect nodeField="description" protoField="description"/>
<connect nodeField="enabled" protoField="enabled"/>
</IS>
</TouchSensor>
</ProtoBody>
</ProtoDeclare>
<ExternProtoDeclare name="ArtDeco02Material" appinfo="this is a different Material node" url="&quot;http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02Material&quot; &quot;http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02Material&quot;"><!--[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."--><field name="description" accessType="inputOutput" appinfo="tooltip for descriptionField" type="SFString"/>
</ExternProtoDeclare>
<!--Tested ArtDeco01ProtoInstance, ArtDeco02ProtoInstance for improper node type when ProtoInstance is added in wrong place--><Shape DEF="TestShape1"><Appearance DEF="TestAppearance1"><!--ArtDeco01Material prototype goes here... TODO ensure setContainerField is handled in exported Java--><ProtoInstance containerField="material" name="ArtDeco01Material"><!--[HelloWorldProgram diagnostic] ArtDeco01ProtoInstance.getNodeType()="Material"--><fieldValue name="description" value="ArtDeco01Material can substitute for a Material node"/>
</ProtoInstance>
</Appearance>
<Sphere containerField="geometry" radius="0.001"/>
</Shape>
<Shape DEF="TestShape2"><Appearance DEF="TestAppearance2"><!--ArtDeco02Material prototype goes here... TODO ensure setContainerField is handled in exported Java--><ProtoInstance containerField="material" name="ArtDeco02Material" DEF="ArtDeco02MaterialDEF"><!--[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."--><fieldValue name="description" value="ArtDeco02Material can substitute for another Material node"/>
</ProtoInstance>
</Appearance>
<Cone containerField="geometry" bottomRadius="0.001" height="0.001"/>
</Shape>
<Shape DEF="TestShape3"><Appearance DEF="TestAppearance3"><!--ArtDeco02Material ProtoInstance USE goes here. Note that name field is NOT defined as part of ProtoInstance USE.--><ProtoInstance containerField="material" USE="ArtDeco02MaterialDEF"/>
</Appearance>
<Cylinder containerField="geometry" height="0.001" radius="0.001"/>
</Shape>
<Inline DEF="inlineSceneDef" url="&quot;someOtherScene.x3d&quot; &quot;http://www.web3d.org/specifications/java/examples/someOtherScene.x3d&quot;"/>
<IMPORT AS="WorldInfoDEF2" importedDEF="WorldInfoDEF" inlineDEF="inlineSceneDef"/>
<EXPORT AS="WorldInfoDEF3" localDEF="WorldInfoDEF"/>
<ProtoDeclare name="MaterialModulator" appinfo="mimic a Material node and modulate fields as an animation effect" documentation="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html"><ProtoInterface><field name="enabled" accessType="inputOutput" type="SFBool" value="true"/>
<field name="diffuseColor" accessType="inputOutput" type="SFColor" value="0 0 0"/>
<field name="emissiveColor" accessType="inputOutput" type="SFColor" value="0.05 0.05 0.5"/>
<field name="specularColor" accessType="inputOutput" type="SFColor" value="0 0 0"/>
<field name="transparency" accessType="inputOutput" type="SFFloat" value="0"/>
<field name="shininess" accessType="inputOutput" type="SFFloat" value="0"/>
<field name="ambientIntensity" accessType="inputOutput" type="SFFloat" value="0"/>
</ProtoInterface>
<ProtoBody><Material DEF="MaterialNode"><IS><connect nodeField="diffuseColor" protoField="diffuseColor"/>
<connect nodeField="emissiveColor" protoField="emissiveColor"/>
<connect nodeField="specularColor" protoField="specularColor"/>
<connect nodeField="transparency" protoField="transparency"/>
<connect nodeField="shininess" protoField="shininess"/>
<connect nodeField="ambientIntensity" protoField="ambientIntensity"/>
</IS>
</Material>
<!--Only first node (the node type) is renderable, others are along for the ride--><Script DEF="MaterialModulatorScript"><field name="enabled" accessType="inputOutput" type="SFBool"/>
<field name="diffuseColor" accessType="inputOutput" type="SFColor"/>
<field name="newColor" accessType="outputOnly" type="SFColor"/>
<field name="clockTrigger" accessType="inputOnly" type="SFTime"/>
<IS><connect nodeField="enabled" protoField="enabled"/>
<connect nodeField="diffuseColor" protoField="diffuseColor"/>
</IS>
<![CDATA[

ecmascript:
function initialize ()
{
    newColor = diffuseColor; // start with correct color
}
function set_enabled (newValue)
{
	enabled = newValue;
}
function clockTrigger (timeValue)
{
    if (!enabled) return;
    red   = newColor.r;
    green = newColor.g;
    blue  = newColor.b;

    // note different modulation rates for each color component, % is modulus operator
    newColor = new SFColor ((red + 0.02) % 1, (green + 0.03) % 1, (blue + 0.04) % 1);
	if (enabled)
	{
		Browser.print ('diffuseColor=(' + red + ',' + green + ',' + blue + ') newColor=' + newColor.toString() + '\n');
	}
}


]]></Script>
</ProtoBody>
</ProtoDeclare>
<!--Test success: declarative statement createDeclarativeShapeTests()--><Group DEF="DeclarativeGroupExample"><Shape><MetadataString containerField="metadata" name="findThisNameValue" DEF="FindableMetadataStringTest" value="&quot;test case&quot;"/>
<Appearance DEF="DeclarativeAppearanceExample"><!--DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance--><ProtoInstance containerField="material" name="MaterialModulator" DEF="MyMaterialModulator"/>
</Appearance>
<Cone containerField="geometry" bottom="false" bottomRadius="0.05" height="0.1"/>
</Shape>
<!--Test success: declarativeGroup.addChild() singleton pipeline method--></Group>
<!--Test success: declarative statement addChild()--><!--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>--><!--Test success: x3dModel.findElementByNameValue(findThisNameValue) = <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='"test case"'/>--><!--Test success: x3dModel.findElementByNameValue("ArtDeco01Material", "ProtoDeclare") found--><!--Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoDeclare") found--><!--Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoInstance") found--><Group DEF="TestFieldObjectsGroup"><!--testFieldObjects() results--><!--SFBool default=true, true=true, false=false, negate()=true--><!--MFBool default=, initial=true false true, negate()=false true false--><!--SFFloat default=0.0, initial=1.0, setValue(2)=2.0, setValue(3.0f)=3.0, setValue(4.0)=4.0--><!--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--><!--... 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=--><!--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--><!--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--></Group>
<Sound location="0 1.6 0"><!--set sound-ellipsoid location height at 1.6m to match typical avatar height--><AudioClip containerField="source" description="chimes" url="&quot;chimes.wav&quot; &quot;http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav&quot;"><!--Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d--></AudioClip>
</Sound>
<Sound location="0 1.6 0"><!--set sound-ellipsoid location height at 1.6m to match typical avatar height--><MovieTexture containerField="source" description="mpgsys.mpg from ConformanceNist suite" url="&quot;mpgsys.mpg&quot; &quot;http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg&quot;"><!--Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d--><!--Expected containerField='source', allowed containerField values="texture" "source" "back" "bottom" "front" "left" "right" "top" "backTexture" "bottomTexture" "frontTexture" "leftTexture" "rightTexture" "topTexture" "watchList"--></MovieTexture>
</Sound>
<!--Test success: AnchorObject.isNode()=true, siteAnchor.isNode()=true--><!--Test success: AnchorObject.isStatement()=false, siteAnchor.isStatement()=false--><!--Test success: ROUTEObject.isNode()=false, orbitPositionROUTE.isNode()=false--><!--Test success: ROUTEObject.isStatement()=true, orbitPositionROUTE.isStatement()=true--><!--Test success: CommentsBlock.isNode()=false, testComments.isNode()=false--><!--Test failure: CommentsBlock.isStatement()=true, testComments.isStatement()=true--><Shape DEF="ExtrusionShape"><!--ExampleExtrusion isCrossSectionClosed()=true, crossSection='[1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0]'--><!--ExampleExtrusion isSpineClosed()=false, spine='[0.0, 0.0, 0.0, 0.0, 1.0, 0.0]'--><Appearance DEF="TransparentAppearance"><Material transparency="1"/>
</Appearance>
<Extrusion containerField="geometry" DEF="ExampleExtrusion"/>
</Shape>
<Group><!--Test MFNode children array as an ordered list consisting of comments, statements, ProtoInstance and nodes--><ProtoDeclare name="NewWorldInfo"><ProtoInterface><field name="description" accessType="initializeOnly" type="SFString"/>
</ProtoInterface>
<ProtoBody><WorldInfo/>
</ProtoBody>
</ProtoDeclare>
<ProtoInstance name="NewWorldInfo" DEF="Proto1"><fieldValue name="description" value="testing 1 2 3"/>
</ProtoInstance>
<Group DEF="Node2"><!--intentionally empty--></Group>
<ProtoInstance name="NewWorldInfo" DEF="Proto3"/>
<Transform DEF="Node4"><!--intentionally empty--></Transform>
<!--Test satisfactorily creates MFNode children array as an ordered list with mixed content--></Group>
<ProtoDeclare name="ShaderProto"><ProtoBody><ProgramShader/>
</ProtoBody>
</ProtoDeclare>
<Shape><Appearance><!--Test MFNode shaders array as an ordered list consisting of comments, ProtoInstance and nodes--><!--Test satisfactorily creates MFNode shaders array as an ordered list with mixed content--><ProgramShader DEF="TestShader1"><ShaderProgram DEF="TestShader2" type="VERTEX"/>
</ProgramShader>
<ProtoInstance name="ShaderProto" DEF="TestShader3"/>
<ComposedShader DEF="TestShader4"><ShaderPart DEF="TestShader5" type="VERTEX"/>
</ComposedShader>
</Appearance>
</Shape>
</Scene>
</X3D>
Hello World!
file conversion successful: HelloWorldProgramOutput.Nashorn.js (30186 bytes)
===========
Run test 2:
org.web3d.x3d.jsail.CommandLine examples/HelloWorldProgramOutput.x3d -toJSON -toFile examples/HelloWorldProgramOutput.Java.json
parameter: source file HelloWorldProgramOutput.x3d filesize 21512 bytes
CommandLine parameter: "-toJSON" for conversion to JSON encoding
CommandLine parameter: "-toFile" "examples/HelloWorldProgramOutput.Java.json" for result file name root examples/HelloWorldProgramOutput.Java
convert to JSON:
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Warning: fileStylesheetConversion() is overwriting prior file examples\HelloWorldProgramOutput.Java.json
===========
Run test 3:
org.web3d.x3d.jsail.CommandLine examples/HelloWorldProgramOutput.x3d -toX3D -toFile examples/HelloWorldProgramOutput.Java.x3d
parameter: source file HelloWorldProgramOutput.x3d filesize 21512 bytes
CommandLine parameter: "-toX3D" for conversion to X3D encoding
CommandLine parameter: "-toFile" "examples/HelloWorldProgramOutput.Java.x3d" for result file name root examples/HelloWorldProgramOutput.Java
Parsing using Document Object Model (DOM) based X3DLoaderDOM...
convert to X3D:
Warning: examples/HelloWorldProgramOutput.Java.x3d does not meet suggested X3D naming conventions, output serialization continuing...
Warning: toFileX3D() is overwriting prior file examples/HelloWorldProgramOutput.Java.x3d
file conversion successful: HelloWorldProgramOutput.Java.x3d (21512 bytes)
===========================================
HelloWorldProgramOutput.Java.x3d
1 file(s) have been successfully validated.
1 file(s) have been successfully validated.
matches HelloWorldProgramOutput.x3d: true
===========================================
===========================================
HelloWorldProgramOutput.Java.json
matches HelloWorldProgramOutput.json: true
===========================================
script:
Warning: examples/HelloWorldProgramOutput.Nashorn.js.new.x3d does not meet suggested X3D naming conventions, output serialization continuing...
Warning: toFileX3D() is overwriting prior file examples/HelloWorldProgramOutput.Nashorn.js.new.x3d
Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file examples/HelloWorldProgramOutput.Nashorn.js.new.json
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
===========================================
HelloWorldProgramOutput.Java.x3d
matches HelloWorldProgramOutput.Nashorn.js.new.x3d: false
===========================================
===========================================
HelloWorldProgramOutput.Java.json
matches HelloWorldProgramOutput.Nashorn.js.new.json: false
===========================================
Run test 4
Warning: meta name newValue="X3dValidator" has an unrecognized value not matching any of the optional string tokens.
Warning: meta name newValue="SpecialTest" has an unrecognized value not matching any of the optional string tokens.
Warning: meta name newValue="X3dValidator" has an unrecognized value not matching any of the optional string tokens.
Warning: meta name newValue="SpecialTest" has an unrecognized value not matching any of the optional string tokens.
Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file ./examples/Nashorn.json
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">

<X3D profile="Immersive" version="3.3"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.3.xsd">
    <head>
        <!-- comment #1 -->
        <!-- comment #2 -->
        <!-- comment #3 -->
        <!-- comment #4 -->
        <component level="3" name="Navigation"/>
        <component level="1" name="Layering"/>
        <unit category="angle" conversionFactor="1.0" name="AngleUnitConversion"/>
        <unit category="length" conversionFactor="1.0" name="LengthUnitConversion"/>
        <meta content="HelloWorldProgramOutput.x3d" name="title"/>
        <meta
            content="Example HelloWorldProgram creates an X3D model using the X3D Java Scene Access Interface (SAI) Library" name="description"/>
        <meta
            content="http://www.web3d.org/specifications/java/X3DJSAIL.html" name="reference"/>
        <meta content="HelloWorldProgramOutput.java" name="generator"/>
        <meta content="6 September 2016" name="created"/>
        <meta content="28 June 2018" name="modified"/>
        <meta
            content="X3D Java Scene Access Interface Library (X3DJSAIL)" name="generator"/>
        <meta
            content="http://www.web3d.org/specifications/java/examples/HelloWorldProgram.java" name="generator"/>
        <meta content="Netbeans http://www.netbeans.org" name="generator"/>
        <meta content="Don Brutzman" name="creator"/>
        <meta
            content="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d" name="reference"/>
        <meta
            content="Console output, ClassicVRML encoding, VRML97 encoding and pretty-print documentation:" name="reference"/>
        <meta content="HelloWorldProgramOutput.txt" name="reference"/>
        <meta content="HelloWorldProgramOutput.x3dv" name="reference"/>
        <meta content="HelloWorldProgramOutput.wrl" name="reference"/>
        <meta content="HelloWorldProgramOutput.html" name="reference"/>
        <meta
            content="https://savage.nps.edu/X3dValidator?url=http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d" name="X3dValidator"/>
        <meta
            content="http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d" name="identifier"/>
        <meta content="../license.html" name="license"/>
        <meta
            content="tested sat: name value cannot contain embedded space character" name="SpecialTest"/>
        <meta content="01 May 2019" name="translated"/>
        <meta
            content="X3dToJson.xslt, http://www.web3d.org/x3d/stylesheets/X3dToJson.html" name="generator"/>
        <meta
            content="X3D JSON encoding: http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding" name="reference"/>
    </head>
    <Scene>
        <ViewpointGroup description="Available viewpoints">
            <Viewpoint DEF="DefaultView" description="Hello X3DJSAIL"/>
            <Viewpoint DEF="TopDownView"
                description="top-down view from above"
                orientation="1 0 0 -1.570796" position="0 100 0"/>
        </ViewpointGroup>
        <WorldInfo DEF="WorldInfoDEF" title="HelloWorldProgram produced by X3D Java SAI Library (X3DJSAIL)"/>
        <WorldInfo USE="WorldInfoDEF"/>
        <WorldInfo USE="WorldInfoDEF"/>
        <MetadataString DEF="scene.addChildMetadata" name="test" value="&quot;Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding&quot;"/>
        <LayerSet DEF="scene.addChildLayerSetTest"/>
        <Transform DEF="LogoGeometryTransform" translation="0 1.5 0">
            <Anchor
                description="select for X3D Java SAI Library (X3DJSAIL) description" url="&quot;../X3DJSAIL.html&quot; &quot;http://www.web3d.org/specifications/java/X3DJSAIL.html&quot;">
                <Shape DEF="BoxShape">
                    <Appearance>
                        <Material DEF="GreenMaterial"
                            diffuseColor="0 1 1" emissiveColor="0.8 0 0" transparency="0.1"/>
                        <ImageTexture containerField="texture" url="&quot;images/X3dJavaSceneAccessInterfaceSaiLibrary.png&quot; &quot;http://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png&quot;"/>
                    </Appearance>
                    <Box DEF="test-NMTOKEN_regex.0123456789"
                        class="untextured" containerField="geometry"/>
                </Shape>
            </Anchor>
        </Transform>
        <Shape DEF="LineShape">
            <Appearance>
                <Material emissiveColor="0.6 0.19607843 0.8"/>
            </Appearance>
            <IndexedLineSet containerField="geometry" coordIndex="0 1 2 3 4 0">
                <!-- Coordinate 3-tuple point count: 6 -->
                <Coordinate containerField="coord" 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"/>
            </IndexedLineSet>
        </Shape>
        <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"/>
        <TimeSensor DEF="OrbitClock" cycleInterval="8.0" loop="true"/>
        <ROUTE fromField="fraction_changed" fromNode="OrbitClock"
            toField="set_fraction" toNode="BoxPathAnimator"/>
        <ROUTE fromField="value_changed" fromNode="BoxPathAnimator"
            toField="set_translation" toNode="LogoGeometryTransform"/>
        <Transform DEF="TextTransform" translation="0 -1.5 0">
            <Shape>
                <Appearance>
                    <Material USE="GreenMaterial"/>
                </Appearance>
                <Text containerField="geometry" string="&quot;X3D Java&quot; &quot;SAI Library&quot; &quot;X3DJSAIL&quot;">
                    <!-- Comment example A, plain quotation marks: He said, "Immel did it!" -->
                    <!-- Comment example B, XML character entities: He said, &quot;Immel did it!&quot; -->
                    <MetadataSet containerField="metadata" name="EscapedQuotationMarksMetadataSet">
                        <MetadataString containerField="value"
                            name="quotesTestC" value="&quot;MFString example C, backslash-escaped quotes: He said, \&quot;Immel did it!\&quot;&quot;"/>
                        <MetadataString containerField="value"
                            name="extraChildTest" value="&quot;checks MetadataSetObject addValue() method&quot;"/>
                    </MetadataSet>
                    <FontStyle justify="&quot;MIDDLE&quot; &quot;MIDDLE&quot;"/>
                </Text>
            </Shape>
            <Collision>
                <!-- test containerField='proxy' -->
                <Shape DEF="ProxyShape" containerField="proxy">
                    <!-- alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \&quot;Immel did it!\&quot;"' -->
                    <!-- alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \&quot;Immel did it!\&quot;" ""' -->
                    <!-- alternative Java source: .setString(new String [] {"One, Two, Comment", "", "He said, \""Immel did it!\"\"}) -->
                    <!-- reference: http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html -->
                    <Text containerField="geometry" string="&quot;One, Two, Text&quot; &quot;&quot; &quot;He said, \&quot;Immel did it!\&quot; \&quot;\&quot;&quot;"/>
                </Shape>
            </Collision>
            <!-- It's a beautiful world -->
            <!-- ... for you! -->
            <!-- https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song) -->
        </Transform>
        <!-- repeatedly spin 180 degrees as a readable special effect -->
        <OrientationInterpolator DEF="SpinInterpolator" key="0 0.5 1" keyValue="0 1 0 4.712389 0 1 0 0 0 1 0 1.5707964"/>
        <TimeSensor DEF="SpinClock" cycleInterval="5.0" loop="true"/>
        <ROUTE fromField="fraction_changed" fromNode="SpinClock"
            toField="set_fraction" toNode="SpinInterpolator"/>
        <ROUTE fromField="value_changed" fromNode="SpinInterpolator"
            toField="rotation" toNode="TextTransform"/>
        <Group DEF="BackgroundGroup">
            <Background DEF="GradualBackground"/>
            <Script DEF="colorTypeConversionScript">
                <field accessType="inputOnly" name="colorInput" type="SFColor"/>
                <field accessType="outputOnly" name="colorsOutput" type="MFColor"/><![CDATA[



ecmascript:

function colorInput (eventValue) // Example source code
{
   colorsOutput = new MFColor(eventValue); // assigning value sends output event
// Browser.print('colorInput=' + eventValue + ', colorsOutput=' + colorsOutput + '\n');
}




]]></Script>
            <ColorInterpolator DEF="ColorAnimator" key="0 0.5 1" keyValue="0.9411765 1 1 0.29411766 0 0.50980395 0.9411765 1 1">
                <!-- AZURE to INDIGO and back again -->
            </ColorInterpolator>
            <TimeSensor DEF="ColorClock" cycleInterval="60.0" loop="true"/>
            <ROUTE fromField="colorsOutput"
                fromNode="colorTypeConversionScript" toField="skyColor" toNode="GradualBackground"/>
            <ROUTE fromField="value_changed" fromNode="ColorAnimator"
                toField="colorInput" toNode="colorTypeConversionScript"/>
            <ROUTE fromField="fraction_changed" fromNode="ColorClock"
                toField="set_fraction" toNode="ColorAnimator"/>
        </Group>
        <ProtoDeclare
            appinfo="tooltip: ArtDeco01Material prototype is a Material node" name="ArtDeco01Material">
            <ProtoInterface>
                <field accessType="inputOutput"
                    appinfo="tooltip for descriptionField"
                    name="description" type="SFString" value="ArtDeco01Material prototype is a Material node"/>
                <field accessType="inputOutput" name="enabled"
                    type="SFBool" value="true"/>
            </ProtoInterface>
            <ProtoBody>
                <!-- Initial node of ProtoBody determines prototype node type -->
                <Material ambientIntensity="0.25"
                    diffuseColor="0.282435 0.085159 0.134462"
                    shininess="0.127273" specularColor="0.276305 0.11431 0.139857"/>
                <!-- [HelloWorldProgram diagnostic] should be connected to scene graph: ArtDeco01ProtoDeclare.getNodeType()="Material" -->
                <!-- presence of follow-on TouchSensor shows that additional nodes are allowed in ProtoBody after initial node, regardless of node types -->
                <TouchSensor description="within ProtoBody">
                    <IS>
                        <connect nodeField="description" protoField="description"/>
                        <connect nodeField="enabled" protoField="enabled"/>
                    </IS>
                </TouchSensor>
            </ProtoBody>
        </ProtoDeclare>
        <ExternProtoDeclare appinfo="this is a different Material node"
            name="ArtDeco02Material" url="&quot;http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02Material&quot; &quot;http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02Material&quot;">
            <!-- [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." -->
            <field accessType="inputOutput"
                appinfo="tooltip for descriptionField"
                name="description" type="SFString"/>
        </ExternProtoDeclare>
        <!-- Tested ArtDeco01ProtoInstance, ArtDeco02ProtoInstance for improper node type when ProtoInstance is added in wrong place -->
        <Shape DEF="TestShape1">
            <Appearance DEF="TestAppearance1">
                <!-- ArtDeco01Material prototype goes here... TODO ensure setContainerField is handled in exported Java -->
                <ProtoInstance containerField="material" name="ArtDeco01Material">
                    <!-- [HelloWorldProgram diagnostic] ArtDeco01ProtoInstance.getNodeType()="Material" -->
                    <fieldValue containerField="material"
                        name="description" value="ArtDeco01Material can substitute for a Material node"/>
                </ProtoInstance>
            </Appearance>
            <Sphere containerField="geometry" radius="0.001"/>
        </Shape>
        <Shape DEF="TestShape2">
            <Appearance DEF="TestAppearance2">
                <!-- ArtDeco02Material prototype goes here... TODO ensure setContainerField is handled in exported Java -->
                <ProtoInstance DEF="ArtDeco02MaterialDEF"
                    containerField="material" name="ArtDeco02Material">
                    <!-- [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." -->
                    <fieldValue containerField="material"
                        name="description" value="ArtDeco02Material can substitute for another Material node"/>
                </ProtoInstance>
            </Appearance>
            <Cone bottomRadius="0.001" containerField="geometry" height="0.001"/>
        </Shape>
        <Shape DEF="TestShape3">
            <Appearance DEF="TestAppearance3">
                <!-- ArtDeco02Material ProtoInstance USE goes here... -->
                <ProtoInstance USE="ArtDeco02MaterialDEF" containerField="material"/>
            </Appearance>
            <Cylinder containerField="geometry" height="0.001" radius="0.001"/>
        </Shape>
        <Inline DEF="inlineSceneDef" url="&quot;someOtherScene.x3d&quot;"/>
        <IMPORT AS="WorldInfoDEF2" importedDEF="WorldInfoDEF" inlineDEF="inlineSceneDef"/>
        <EXPORT AS="WorldInfoDEF3" localDEF="WorldInfoDEF"/>
        <ProtoDeclare
            appinfo="mimic a Material node and modulate fields as an animation effect"
            documentation="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html" name="MaterialModulator">
            <ProtoInterface>
                <field accessType="inputOutput" name="enabled"
                    type="SFBool" value="true"/>
                <field accessType="inputOutput" name="diffuseColor"
                    type="SFColor" value="0 0 0"/>
                <field accessType="inputOutput" name="emissiveColor"
                    type="SFColor" value="0.05 0.05 0.5"/>
                <field accessType="inputOutput" name="specularColor"
                    type="SFColor" value="0 0 0"/>
                <field accessType="inputOutput" name="transparency"
                    type="SFFloat" value="0.0"/>
                <field accessType="inputOutput" name="shininess"
                    type="SFFloat" value="0.0"/>
                <field accessType="inputOutput" name="ambientIntensity"
                    type="SFFloat" value="0.0"/>
            </ProtoInterface>
            <ProtoBody>
                <Material DEF="MaterialNode">
                    <IS>
                        <connect nodeField="diffuseColor" protoField="diffuseColor"/>
                        <connect nodeField="emissiveColor" protoField="emissiveColor"/>
                        <connect nodeField="specularColor" protoField="specularColor"/>
                        <connect nodeField="transparency" protoField="transparency"/>
                        <connect nodeField="shininess" protoField="shininess"/>
                        <connect nodeField="ambientIntensity" protoField="ambientIntensity"/>
                    </IS>
                </Material>
                <!-- Only first node (the node type) is renderable, others are along for the ride -->
                <Script DEF="MaterialModulatorScript">
                    <field accessType="inputOutput" name="enabled" type="SFBool"/>
                    <field accessType="inputOutput" name="diffuseColor" type="SFColor"/>
                    <field accessType="outputOnly" name="newColor" type="SFColor"/>
                    <field accessType="inputOnly" name="clockTrigger" type="SFTime"/>
                    <IS>
                        <connect nodeField="enabled" protoField="enabled"/>
                        <connect nodeField="diffuseColor" protoField="diffuseColor"/>
                    </IS><![CDATA[



ecmascript:
function initialize ()
{
    newColor = diffuseColor; // start with correct color
}
function set_enabled (newValue)
{
	enabled = newValue;
}
function clockTrigger (timeValue)
{
    if (!enabled) return;
    red   = newColor.r;
    green = newColor.g;
    blue  = newColor.b;

    // note different modulation rates for each color component, % is modulus operator
    newColor = new SFColor ((red + 0.02) % 1, (green + 0.03) % 1, (blue + 0.04) % 1);
	if (enabled)
	{
		Browser.print ('diffuseColor=(' + red + ',' + green + ',' + blue + ') newColor=' + newColor.toString() + '\n');
	}
}




]]></Script>
            </ProtoBody>
        </ProtoDeclare>
        <!-- Test success: declarative statement createDeclarativeShapeTests() -->
        <Group DEF="DeclarativeGroupExample">
            <Shape>
                <MetadataString DEF="FindableMetadataStringTest"
                    containerField="metadata" name="findThisNameValue" value="&quot;test case&quot;"/>
                <Appearance DEF="DeclarativeAppearanceExample">
                    <!-- DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance -->
                    <ProtoInstance DEF="MyMaterialModulator"
                        containerField="material" name="MaterialModulator"/>
                </Appearance>
                <Cone bottom="false" bottomRadius="0.05"
                    containerField="geometry" height="0.1"/>
            </Shape>
            <!-- Test success: declarativeGroup.addChild() singleton pipeline method -->
        </Group>
        <!-- Test success: declarative statement addChild() -->
        <!-- 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> -->
        <!-- Test success: x3dModel.findElementByNameValue(findThisNameValue) = <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='"test case"'/> -->
        <!-- Test success: x3dModel.findElementByNameValue("ArtDeco01Material", "ProtoDeclare") found -->
        <!-- Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoDeclare") found -->
        <!-- Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoInstance") found -->
        <Group DEF="TestFieldObjectsGroup">
            <!-- testFieldObjects() results -->
            <!-- SFBool default=true, true=true, false=false, negate()=true -->
            <!-- MFBool default=, initial=true false true, negate()=false true false -->
            <!-- SFFloat default=0.0, initial=1.0, setValue(2)=2.0, setValue(3.0f)=3.0, setValue(4.0)=4.0 -->
            <!-- 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 -->
            <!-- ... 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= -->
            <!-- 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 -->
            <!-- 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 -->
        </Group>
        <Sound location="0 1.6 0">
            <!-- set sound-ellipsoid location height at 1.6m to match typical avatar height -->
            <AudioClip containerField="source" description="chimes" url="&quot;chimes.wav&quot; &quot;http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav&quot;">
                <!-- Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d -->
            </AudioClip>
        </Sound>
        <Sound location="0 1.6 0">
            <!-- set sound-ellipsoid location height at 1.6m to match typical avatar height -->
            <MovieTexture containerField="source"
                description="mpgsys.mpg from ConformanceNist suite" url="&quot;mpgsys.mpg&quot; &quot;http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg&quot;">
                <!-- Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d -->
                <!-- Expected containerField='source', allowed containerField values="texture" "source" "back" "bottom" "front" "left" "right" "top" "backTexture" "bottomTexture" "frontTexture" "leftTexture" "rightTexture" "topTexture" "watchList" -->
            </MovieTexture>
        </Sound>
        <!-- Test success: AnchorObject.isNode()=true, siteAnchor.isNode()=true -->
        <!-- Test success: AnchorObject.isStatement()=false, siteAnchor.isStatement()=false -->
        <!-- Test success: ROUTEObject.isNode()=false, orbitPositionROUTE.isNode()=false -->
        <!-- Test success: ROUTEObject.isStatement()=true, orbitPositionROUTE.isStatement()=true -->
        <!-- Test success: CommentsBlock.isNode()=false, testComments.isNode()=false -->
        <!-- Test failure: CommentsBlock.isStatement()=true, testComments.isStatement()=true -->
        <Shape DEF="ExtrusionShape">
            <!-- ExampleExtrusion isCrossSectionClosed()=true, crossSection='[1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0]' -->
            <!-- ExampleExtrusion isSpineClosed()=false, spine='[0.0, 0.0, 0.0, 0.0, 1.0, 0.0]' -->
            <Appearance DEF="TransparentAppearance">
                <Material transparency="1.0"/>
            </Appearance>
            <Extrusion DEF="ExampleExtrusion" containerField="geometry"/>
        </Shape>
    </Scene>
</X3D>

Warning: meta name newValue="X3dValidator" has an unrecognized value not matching any of the optional string tokens.
Warning: meta name newValue="SpecialTest" has an unrecognized value not matching any of the optional string tokens.
Warning: meta name newValue="X3dValidator" has an unrecognized value not matching any of the optional string tokens.
Warning: meta name newValue="SpecialTest" has an unrecognized value not matching any of the optional string tokens.
Warning: toFileX3D() is overwriting prior file ./examples/Nashorn.x3d
===========================================
Run test 5
HelloWorldProgramOutput.x3d
matches Nashorn.x3d: false
===========================================
===========================================
HelloWorldProgramOutput.x3d
matches Nashorn0.x3d: false
===========================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">

<X3D profile="Immersive" version="3.3"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.3.xsd">
    <!-- x3dVersionComparisonTest for this model: supportsX3dVersion(X3DObject.VERSION_3_0)=true -->
    <head>
        <!-- comment #1 -->
        <!-- comment #2 -->
        <!-- comment #3 -->
        <!-- comment #4 -->
        <component level="3" name="Navigation"/>
        <component level="1" name="Shaders"/>
        <component level="1" name="Layering"/>
        <unit category="angle" conversionFactor="1.0" name="AngleUnitConversion"/>
        <unit category="length" conversionFactor="1.0" name="LengthUnitConversion"/>
        <meta content="HelloWorldProgramOutput.x3d" name="title"/>
        <meta
            content="Example HelloWorldProgram creates an X3D model using the X3D Java Scene Access Interface Library (X3DJSAIL)" name="description"/>
        <meta
            content="http://www.web3d.org/specifications/java/X3DJSAIL.html" name="reference"/>
        <meta content="HelloWorldProgramOutput.java" name="generator"/>
        <meta content="6 September 2016" name="created"/>
        <meta content="1 May 2019" name="modified"/>
        <meta
            content="X3D Java Scene Access Interface Library (X3DJSAIL)" name="generator"/>
        <meta
            content="http://www.web3d.org/specifications/java/examples/HelloWorldProgram.java" name="generator"/>
        <meta content="Netbeans http://www.netbeans.org" name="generator"/>
        <meta content="Don Brutzman" name="creator"/>
        <meta
            content="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d" name="reference"/>
        <meta
            content="Console output, ClassicVRML encoding, VRML97 encoding and pretty-print documentation:" name="reference"/>
        <meta content="HelloWorldProgramOutput.txt" name="reference"/>
        <meta content="HelloWorldProgramOutput.x3dv" name="reference"/>
        <meta content="HelloWorldProgramOutput.wrl" name="reference"/>
        <meta content="HelloWorldProgramOutput.html" name="reference"/>
        <meta
            content="https://savage.nps.edu/X3dValidator?url=http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d" name="reference"/>
        <meta
            content="http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d" name="identifier"/>
        <meta content="../license.html" name="license"/>
        <meta content="01 May 2019" name="translated"/>
        <meta
            content="X3dToJson.xslt, http://www.web3d.org/x3d/stylesheets/X3dToJson.html" name="generator"/>
        <meta
            content="X3D JSON encoding: http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding" name="reference"/>
    </head>
    <Scene>
        <ViewpointGroup description="Available viewpoints">
            <Viewpoint DEF="DefaultView" description="Hello X3DJSAIL"/>
            <Viewpoint DEF="TopDownView"
                description="top-down view from above"
                orientation="1 0 0 -1.570796" position="0 100 0"/>
        </ViewpointGroup>
        <NavigationInfo type="&quot;EXAMINE&quot; &quot;FLY&quot; &quot;ANY&quot;"/>
        <WorldInfo DEF="WorldInfoDEF" title="HelloWorldProgram produced by X3D Java SAI Library (X3DJSAIL)"/>
        <WorldInfo USE="WorldInfoDEF"/>
        <WorldInfo USE="WorldInfoDEF"/>
        <MetadataString DEF="scene.addChildMetadata" name="test" value="&quot;Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding&quot;"/>
        <LayerSet DEF="scene.addChildLayerSetTest"/>
        <Transform DEF="LogoGeometryTransform" translation="0 1.5 0">
            <Anchor
                description="select for X3D Java SAI Library (X3DJSAIL) description" url="&quot;../X3DJSAIL.html&quot; &quot;http://www.web3d.org/specifications/java/X3DJSAIL.html&quot;">
                <Shape DEF="BoxShape">
                    <Appearance>
                        <Material DEF="GreenMaterial"
                            diffuseColor="0 1 1" emissiveColor="0.8 0 0" transparency="0.1"/>
                        <ImageTexture containerField="texture" url="&quot;images/X3dJavaSceneAccessInterfaceSaiLibrary.png&quot; &quot;http://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png&quot;"/>
                    </Appearance>
                    <Box DEF="test-NMTOKEN_regex.0123456789"
                        class="untextured" containerField="geometry"/>
                </Shape>
            </Anchor>
        </Transform>
        <Shape DEF="LineShape">
            <Appearance>
                <Material emissiveColor="0.6 0.19607843 0.8"/>
            </Appearance>
            <IndexedLineSet containerField="geometry" coordIndex="0 1 2 3 4 0">
                <!-- Coordinate 3-tuple point count: 6 -->
                <Coordinate containerField="coord" 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"/>
            </IndexedLineSet>
        </Shape>
        <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"/>
        <TimeSensor DEF="OrbitClock" cycleInterval="8.0" loop="true"/>
        <ROUTE fromField="fraction_changed" fromNode="OrbitClock"
            toField="set_fraction" toNode="BoxPathAnimator"/>
        <ROUTE fromField="value_changed" fromNode="BoxPathAnimator"
            toField="set_translation" toNode="LogoGeometryTransform"/>
        <Transform DEF="TextTransform" translation="0 -1.5 0">
            <Shape>
                <Appearance>
                    <Material USE="GreenMaterial"/>
                </Appearance>
                <Text containerField="geometry" string="&quot;X3D Java&quot; &quot;SAI Library&quot; &quot;X3DJSAIL&quot;">
                    <!-- Comment example A, plain quotation marks: He said, "Immel did it!" -->
                    <!-- Comment example B, XML character entities: He said, &quot;Immel did it!&quot; -->
                    <MetadataSet containerField="metadata" name="EscapedQuotationMarksMetadataSet">
                        <MetadataString containerField="value"
                            name="quotesTestC" value="&quot;MFString example C, backslash-escaped quotes: He said, \&quot;Immel did it!\&quot;&quot;"/>
                        <MetadataString containerField="value"
                            name="extraChildTest" value="&quot;checks MetadataSetObject addValue() method&quot;"/>
                    </MetadataSet>
                    <FontStyle justify="&quot;MIDDLE&quot; &quot;MIDDLE&quot;"/>
                </Text>
            </Shape>
            <Collision>
                <!-- test containerField='proxy' -->
                <Shape DEF="ProxyShape" containerField="proxy">
                    <!-- alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \&quot;Immel did it!\&quot;"' -->
                    <!-- alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \&quot;Immel did it!\&quot;" ""' -->
                    <!-- alternative Java source: .setString(new String [] {"One, Two, Comment", "", "He said, \"Immel did it!\""}) -->
                    <!-- reference: http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html -->
                    <Text containerField="geometry" string="&quot;One, Two, Text&quot; &quot;&quot; &quot;He said, \&quot;Immel did it!\&quot; \&quot;\&quot;&quot;"/>
                </Shape>
            </Collision>
            <!-- It's a beautiful world -->
            <!-- ... for you! -->
            <!-- https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song) -->
        </Transform>
        <!-- repeatedly spin 180 degrees as a readable special effect -->
        <OrientationInterpolator DEF="SpinInterpolator" key="0 0.5 1" keyValue="0 1 0 4.712389 0 1 0 0 0 1 0 1.5707964"/>
        <TimeSensor DEF="SpinClock" cycleInterval="5.0" loop="true"/>
        <ROUTE fromField="fraction_changed" fromNode="SpinClock"
            toField="set_fraction" toNode="SpinInterpolator"/>
        <ROUTE fromField="value_changed" fromNode="SpinInterpolator"
            toField="rotation" toNode="TextTransform"/>
        <Group DEF="BackgroundGroup">
            <Background DEF="GradualBackground"/>
            <Script DEF="colorTypeConversionScript">
                <field accessType="inputOnly" name="colorInput" type="SFColor"/>
                <field accessType="outputOnly" name="colorsOutput" type="MFColor"/><![CDATA[

ecmascript:

function colorInput (eventValue) // Example source code
{
   colorsOutput = new MFColor(eventValue); // assigning value sends output event
// Browser.print('colorInput=' + eventValue + ', colorsOutput=' + colorsOutput + '\n');
}

]]></Script>
            <ColorInterpolator DEF="ColorAnimator" key="0 0.5 1" keyValue="0.9411765 1 1 0.29411766 0 0.50980395 0.9411765 1 1">
                <!-- AZURE to INDIGO and back again -->
            </ColorInterpolator>
            <TimeSensor DEF="ColorClock" cycleInterval="60.0" loop="true"/>
            <ROUTE fromField="colorsOutput"
                fromNode="colorTypeConversionScript" toField="skyColor" toNode="GradualBackground"/>
            <ROUTE fromField="value_changed" fromNode="ColorAnimator"
                toField="colorInput" toNode="colorTypeConversionScript"/>
            <ROUTE fromField="fraction_changed" fromNode="ColorClock"
                toField="set_fraction" toNode="ColorAnimator"/>
        </Group>
        <ProtoDeclare
            appinfo="tooltip: ArtDeco01Material prototype is a Material node" name="ArtDeco01Material">
            <ProtoInterface>
                <field accessType="inputOutput"
                    appinfo="tooltip for descriptionField"
                    name="description" type="SFString" value="ArtDeco01Material prototype is a Material node"/>
                <field accessType="inputOutput" name="enabled"
                    type="SFBool" value="true"/>
            </ProtoInterface>
            <ProtoBody>
                <!-- Initial node of ProtoBody determines prototype node type -->
                <Material ambientIntensity="0.25"
                    diffuseColor="0.282435 0.085159 0.134462"
                    shininess="0.127273" specularColor="0.276305 0.11431 0.139857"/>
                <!-- [HelloWorldProgram diagnostic] should be connected to scene graph: artDeco01ProtoDeclare.getNodeType()="Material" -->
                <!-- presence of follow-on TouchSensor shows that additional nodes are allowed in ProtoBody after initial node, regardless of node types -->
                <TouchSensor description="within ProtoBody">
                    <IS>
                        <connect nodeField="description" protoField="description"/>
                        <connect nodeField="enabled" protoField="enabled"/>
                    </IS>
                </TouchSensor>
            </ProtoBody>
        </ProtoDeclare>
        <ExternProtoDeclare appinfo="this is a different Material node"
            name="ArtDeco02Material" url="&quot;http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02Material&quot; &quot;http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02Material&quot;">
            <!-- [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." -->
            <field accessType="inputOutput"
                appinfo="tooltip for descriptionField"
                name="description" type="SFString"/>
        </ExternProtoDeclare>
        <!-- Tested ArtDeco01ProtoInstance, ArtDeco02ProtoInstance for improper node type when ProtoInstance is added in wrong place -->
        <Shape DEF="TestShape1">
            <Appearance DEF="TestAppearance1">
                <!-- ArtDeco01Material prototype goes here... TODO ensure setContainerField is handled in exported Java -->
                <ProtoInstance containerField="material" name="ArtDeco01Material">
                    <!-- [HelloWorldProgram diagnostic] ArtDeco01ProtoInstance.getNodeType()="Material" -->
                    <fieldValue containerField="material"
                        name="description" value="ArtDeco01Material can substitute for a Material node"/>
                </ProtoInstance>
            </Appearance>
            <Sphere containerField="geometry" radius="0.001"/>
        </Shape>
        <Shape DEF="TestShape2">
            <Appearance DEF="TestAppearance2">
                <!-- ArtDeco02Material prototype goes here... TODO ensure setContainerField is handled in exported Java -->
                <ProtoInstance DEF="ArtDeco02MaterialDEF"
                    containerField="material" name="ArtDeco02Material">
                    <!-- [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." -->
                    <fieldValue containerField="material"
                        name="description" value="ArtDeco02Material can substitute for another Material node"/>
                </ProtoInstance>
            </Appearance>
            <Cone bottomRadius="0.001" containerField="geometry" height="0.001"/>
        </Shape>
        <Shape DEF="TestShape3">
            <Appearance DEF="TestAppearance3">
                <!-- ArtDeco02Material ProtoInstance USE goes here. Note that name field is NOT defined as part of ProtoInstance USE. -->
                <ProtoInstance USE="ArtDeco02MaterialDEF" containerField="material"/>
            </Appearance>
            <Cylinder containerField="geometry" height="0.001" radius="0.001"/>
        </Shape>
        <Inline DEF="inlineSceneDef" url="&quot;someOtherScene.x3d&quot; &quot;http://www.web3d.org/specifications/java/examples/someOtherScene.x3d&quot;"/>
        <IMPORT AS="WorldInfoDEF2" importedDEF="WorldInfoDEF" inlineDEF="inlineSceneDef"/>
        <EXPORT AS="WorldInfoDEF3" localDEF="WorldInfoDEF"/>
        <ProtoDeclare
            appinfo="mimic a Material node and modulate fields as an animation effect"
            documentation="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html" name="MaterialModulator">
            <ProtoInterface>
                <field accessType="inputOutput" name="enabled"
                    type="SFBool" value="true"/>
                <field accessType="inputOutput" name="diffuseColor"
                    type="SFColor" value="0 0 0"/>
                <field accessType="inputOutput" name="emissiveColor"
                    type="SFColor" value="0.05 0.05 0.5"/>
                <field accessType="inputOutput" name="specularColor"
                    type="SFColor" value="0 0 0"/>
                <field accessType="inputOutput" name="transparency"
                    type="SFFloat" value="0.0"/>
                <field accessType="inputOutput" name="shininess"
                    type="SFFloat" value="0.0"/>
                <field accessType="inputOutput" name="ambientIntensity"
                    type="SFFloat" value="0.0"/>
            </ProtoInterface>
            <ProtoBody>
                <Material DEF="MaterialNode">
                    <IS>
                        <connect nodeField="diffuseColor" protoField="diffuseColor"/>
                        <connect nodeField="emissiveColor" protoField="emissiveColor"/>
                        <connect nodeField="specularColor" protoField="specularColor"/>
                        <connect nodeField="transparency" protoField="transparency"/>
                        <connect nodeField="shininess" protoField="shininess"/>
                        <connect nodeField="ambientIntensity" protoField="ambientIntensity"/>
                    </IS>
                </Material>
                <!-- Only first node (the node type) is renderable, others are along for the ride -->
                <Script DEF="MaterialModulatorScript">
                    <field accessType="inputOutput" name="enabled" type="SFBool"/>
                    <field accessType="inputOutput" name="diffuseColor" type="SFColor"/>
                    <field accessType="outputOnly" name="newColor" type="SFColor"/>
                    <field accessType="inputOnly" name="clockTrigger" type="SFTime"/>
                    <IS>
                        <connect nodeField="enabled" protoField="enabled"/>
                        <connect nodeField="diffuseColor" protoField="diffuseColor"/>
                    </IS><![CDATA[

ecmascript:
function initialize ()
{
    newColor = diffuseColor; // start with correct color
}
function set_enabled (newValue)
{
	enabled = newValue;
}
function clockTrigger (timeValue)
{
    if (!enabled) return;
    red   = newColor.r;
    green = newColor.g;
    blue  = newColor.b;

    // note different modulation rates for each color component, % is modulus operator
    newColor = new SFColor ((red + 0.02) % 1, (green + 0.03) % 1, (blue + 0.04) % 1);
	if (enabled)
	{
		Browser.print ('diffuseColor=(' + red + ',' + green + ',' + blue + ') newColor=' + newColor.toString() + '\n');
	}
}

]]></Script>
            </ProtoBody>
        </ProtoDeclare>
        <!-- Test success: declarative statement createDeclarativeShapeTests() -->
        <Group DEF="DeclarativeGroupExample">
            <Shape>
                <MetadataString DEF="FindableMetadataStringTest"
                    containerField="metadata" name="findThisNameValue" value="&quot;test case&quot;"/>
                <Appearance DEF="DeclarativeAppearanceExample">
                    <!-- DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance -->
                    <ProtoInstance DEF="MyMaterialModulator"
                        containerField="material" name="MaterialModulator"/>
                </Appearance>
                <Cone bottom="false" bottomRadius="0.05"
                    containerField="geometry" height="0.1"/>
            </Shape>
            <!-- Test success: declarativeGroup.addChild() singleton pipeline method -->
        </Group>
        <!-- Test success: declarative statement addChild() -->
        <!-- 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> -->
        <!-- Test success: x3dModel.findElementByNameValue(findThisNameValue) = <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='"test case"'/> -->
        <!-- Test success: x3dModel.findElementByNameValue("ArtDeco01Material", "ProtoDeclare") found -->
        <!-- Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoDeclare") found -->
        <!-- Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoInstance") found -->
        <Group DEF="TestFieldObjectsGroup">
            <!-- testFieldObjects() results -->
            <!-- SFBool default=true, true=true, false=false, negate()=true -->
            <!-- MFBool default=, initial=true false true, negate()=false true false -->
            <!-- SFFloat default=0.0, initial=1.0, setValue(2)=2.0, setValue(3.0f)=3.0, setValue(4.0)=4.0 -->
            <!-- 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 -->
            <!-- ... 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= -->
            <!-- 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 -->
            <!-- 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 -->
        </Group>
        <Sound location="0 1.6 0">
            <!-- set sound-ellipsoid location height at 1.6m to match typical avatar height -->
            <AudioClip containerField="source" description="chimes" url="&quot;chimes.wav&quot; &quot;http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav&quot;">
                <!-- Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d -->
            </AudioClip>
        </Sound>
        <Sound location="0 1.6 0">
            <!-- set sound-ellipsoid location height at 1.6m to match typical avatar height -->
            <MovieTexture containerField="source"
                description="mpgsys.mpg from ConformanceNist suite" url="&quot;mpgsys.mpg&quot; &quot;http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg&quot;">
                <!-- Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d -->
                <!-- Expected containerField='source', allowed containerField values="texture" "source" "back" "bottom" "front" "left" "right" "top" "backTexture" "bottomTexture" "frontTexture" "leftTexture" "rightTexture" "topTexture" "watchList" -->
            </MovieTexture>
        </Sound>
        <!-- Test success: AnchorObject.isNode()=true, siteAnchor.isNode()=true -->
        <!-- Test success: AnchorObject.isStatement()=false, siteAnchor.isStatement()=false -->
        <!-- Test success: ROUTEObject.isNode()=false, orbitPositionROUTE.isNode()=false -->
        <!-- Test success: ROUTEObject.isStatement()=true, orbitPositionROUTE.isStatement()=true -->
        <!-- Test success: CommentsBlock.isNode()=false, testComments.isNode()=false -->
        <!-- Test failure: CommentsBlock.isStatement()=true, testComments.isStatement()=true -->
        <Shape DEF="ExtrusionShape">
            <!-- ExampleExtrusion isCrossSectionClosed()=true, crossSection='[1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0]' -->
            <!-- ExampleExtrusion isSpineClosed()=false, spine='[0.0, 0.0, 0.0, 0.0, 1.0, 0.0]' -->
            <Appearance DEF="TransparentAppearance">
                <Material transparency="1.0"/>
            </Appearance>
            <Extrusion DEF="ExampleExtrusion" containerField="geometry"/>
        </Shape>
        <Group>
            <!-- Test MFNode children array as an ordered list consisting of comments, statements, ProtoInstance and nodes -->
            <ProtoDeclare name="NewWorldInfo">
                <ProtoInterface>
                    <field accessType="initializeOnly"
                        name="description" type="SFString"/>
                </ProtoInterface>
                <ProtoBody>
                    <WorldInfo/>
                </ProtoBody>
            </ProtoDeclare>
            <ProtoInstance DEF="Proto1" name="NewWorldInfo">
                <fieldValue name="description" value="testing 1 2 3"/>
            </ProtoInstance>
            <Group DEF="Node2">
                <!-- intentionally empty -->
            </Group>
            <ProtoInstance DEF="Proto3" name="NewWorldInfo"/>
            <Transform DEF="Node4">
                <!-- intentionally empty -->
            </Transform>
            <!-- Test satisfactorily creates MFNode children array as an ordered list with mixed content -->
        </Group>
        <ProtoDeclare name="ShaderProto">
            <ProtoBody>
                <ProgramShader/>
            </ProtoBody>
        </ProtoDeclare>
        <Shape>
            <Appearance>
                <!-- Test MFNode shaders array as an ordered list consisting of comments, ProtoInstance and nodes -->
                <!-- Test satisfactorily creates MFNode shaders array as an ordered list with mixed content -->
                <ProgramShader DEF="TestShader1" containerField="shaders">
                    <ShaderProgram DEF="TestShader2"
                        containerField="programs" type="VERTEX"/>
                </ProgramShader>
                <ProtoInstance DEF="TestShader3"
                    containerField="shaders" name="ShaderProto"/>
                <ComposedShader DEF="TestShader4" containerField="shaders">
                    <ShaderPart DEF="TestShader5" containerField="parts" type="VERTEX"/>
                </ComposedShader>
            </Appearance>
        </Shape>
    </Scene>
</X3D>

***[X3DLoaderDOM warning] ProtoInstance NewWorldInfo found and node type is WorldInfo but containerField is missing, assuming default value 'children'
***[X3DLoaderDOM warning] ProtoInstance NewWorldInfo found and node type is WorldInfo but containerField is missing, assuming default value 'children'
Warning: toFileX3D() is overwriting prior file ./examples/Json.x3d
Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file ./examples/Json.json
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
===========================================
HelloWorldProgramOutput.x3d
matches Json.x3d: false
===========================================
HelloWorldProgramOutput.json
matches Json.json: false
all:
BUILD SUCCESSFUL (total time: 32 seconds)
