| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "https://www.web3d.org/specifications/x3d-4.0.dtd">
|
| 3 | <!-- This model file was produced using X3DJSAIL https://www.web3d.org/specifications/java/X3DJSAIL.html --> |
| 4 | <X3D class='x3dModel.class' id='x3dModel.id' profile='Full' style='x3dModel.style' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'> |
| 5 | <!-- X3D model top-level comment --> |
| 6 | <head> |
| 7 | <!-- comment #1 --> |
| 8 | <!-- comment #2 --> |
| 9 | <!-- comment #3 --> |
| 10 | <!-- comment #4 --> |
| 11 | <component name='Navigation' level='3'/> |
| 12 | <component name='Shaders' level='1'/> |
| 13 | <component name='CADGeometry' level='2'/> |
| 14 | <component name='DIS' level='2'/> |
| 15 | <component name='HAnim' level='1'/> |
| 16 | <component name='Grouping' level='1'/> |
| 17 | <component name='Layering' level='1'/> |
| 18 | <unit name='AngleUnitConversion' category='angle' conversionFactor='1.0'/> |
| 19 | <unit name='LengthUnitConversion' category='length' conversionFactor='1.0'/> |
| 20 | <unit name='ForceFromPoundsToNewtons' category='force' conversionFactor='4.4482'/> |
| 21 | <meta name='title' content='SmokeTestProgramOutput.x3d'/> |
| 22 | <meta name='info' content='continued development and testing in progress'/> |
| 23 | <meta name='description' content='Example SmokeTestProgram creates an X3D model using the X3D Java Scene Access Interface Library (X3DJSAIL)'/> |
| 24 | <meta name='reference' content='https://www.web3d.org/specifications/java/X3DJSAIL.html'/> |
| 25 | <meta name='generator' content='SmokeTestProgramOutput.java'/> |
| 26 | <meta name='created' content='6 September 2016'/> |
| 27 | <meta name='modified' content='7 October 2025'/> |
| 28 | <meta name='generator' content='X3D Java Scene Access Interface Library (X3DJSAIL)'/> |
| 29 | <meta name='generator' content='https://www.web3d.org/specifications/java/examples/SmokeTestProgram.java'/> |
| 30 | <meta name='generator' content='Netbeans https://www.netbeans.org'/> |
| 31 | <meta name='creator' content='Don Brutzman'/> |
| 32 | <meta name='reference' content='https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/SmokeTestProgramOutput.x3d'/> |
| 33 | <meta name='reference' content='Console output, ClassicVRML encoding, VRML97 encoding and pretty-print documentation:'/> |
| 34 | <meta name='reference' content='SmokeTestProgramOutput.txt'/> |
| 35 | <meta name='reference' content='SmokeTestProgramOutput.x3dv'/> |
| 36 | <meta name='reference' content='SmokeTestProgramOutput.wrl'/> |
| 37 | <meta name='reference' content='SmokeTestProgramOutput.html'/> |
| 38 | <meta name='reference' content='https://savage.nps.edu/X3dValidator?url=https://www.web3d.org/specifications/java/examples/SmokeTestProgramOutput.x3d'/> |
| 39 | <meta name='identifier' content='https://www.web3d.org/specifications/java/examples/SmokeTestProgramOutput.x3d'/> |
| 40 | <meta name='license' content='../license.html'/> |
| 41 | </head> |
| 42 | <Scene> |
| 43 | <MetadataSet name='topLevelSceneMetadata'/> |
| 44 | <ViewpointGroup description='Available viewpoints' containerField='children'> |
| 45 | <Viewpoint DEF='DefaultView' description='Hello X3DJSAIL'/> |
| 46 | <Viewpoint DEF='TopDownView' description='top-down view from above' orientation='1 0 0 -1.570796' position='0 100 0'/> |
| 47 | </ViewpointGroup> |
| 48 | <NavigationInfo type='"EXAMINE" "FLY" "ANY"'/> |
| 49 |
<!-- WorldInfo WorldInfoDEF is a DEF node that has 2 USE nodes: USE_1, USE_2<!-- This node has an EXPORT connection that can exchange events with a parent X3D model. --> <WorldInfo DEF='WorldInfoDEF' class='worldInfoNode.class' id='worldInfoNode.id' style='worldInfoNode.style' title='SmokeTestProgram produced by X3D Java SAI Library (X3DJSAIL)'/> |
| 50 | <WorldInfo USE='WorldInfoDEF'/> |
| 51 | <WorldInfo USE='WorldInfoDEF'/> |
| 52 | <MetadataString DEF='scene.addChildMetadata' name='test' value='"Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding"'/> |
| 53 | <LayerSet DEF='scene.addChildLayerSetTest' containerField='children'/> |
| 54 |
<!-- ROUTE information for LogoGeometryTransform node:
[from BoxPathAnimator.value_changed to set_translation]
-->
<Transform DEF='LogoGeometryTransform' translation='0 1.5 0'> |
| 55 |
<!-- Anchor siteAnchor is a DEF node that has 1 USE node: USE_1 -->
<Anchor DEF='siteAnchor' description='select for X3D Java SAI Library (X3DJSAIL) description' url=' "../X3DJSAIL.html" "https://www.web3d.org/specifications/java/X3DJSAIL.html" '> |
| 56 | <Shape DEF='BoxShape' id='BoxShapeID'> |
| 57 | <Appearance> |
| 58 |
<!-- Material GreenMaterial is a DEF node that has 1 USE node: USE_1 --> <Material DEF='GreenMaterial' diffuseColor='0 1 1' emissiveColor='0.8 0 0' transparency='0.1'/> |
| 59 |
<ImageTexture
url=' "images/X3dJavaSceneAccessInterfaceSaiLibrary.png " "https://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png " '/>
|
| 60 | </Appearance> |
| 61 | <Box DEF='test-NMTOKEN_regex.0123456789' class='untextured'/> |
| 62 | </Shape> |
| 63 | </Anchor> |
| 64 | </Transform> |
| 65 | <Shape DEF='LineShape'> |
| 66 | <Appearance> |
| 67 | <Material emissiveColor='0.6 0.19607843 0.8'/> |
| 68 | </Appearance> |
| 69 | <IndexedLineSet coordIndex='0 1 2 3 4 0'> |
| 70 | <!-- Coordinate 3-tuple point count: 6 --> |
| 71 | <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'/> |
| 72 | </IndexedLineSet> |
| 73 | </Shape> |
| 74 |
<!-- ROUTE information for BoxPathAnimator node:
[from OrbitClock.fraction_changed to set_fraction]
[from value_changed to LogoGeometryTransform.set_translation]
-->
<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'/> |
| 75 |
<!-- ROUTE information for OrbitClock node:
[from fraction_changed to BoxPathAnimator.set_fraction]
-->
<TimeSensor DEF='OrbitClock' cycleInterval='8.0' loop='true'/> |
| 76 | <ROUTE fromNode='OrbitClock' fromField='fraction_changed' toNode='BoxPathAnimator' toField='set_fraction'/> |
| 77 | <ROUTE fromNode='BoxPathAnimator' fromField='value_changed' toNode='LogoGeometryTransform' toField='set_translation'/> |
| 78 |
<!-- ROUTE information for TextTransform node:
[from SpinInterpolator.value_changed to rotation]
-->
<Transform DEF='TextTransform' translation='0 -1.5 0'> |
| 79 | <Shape> |
| 80 | <Appearance> |
| 81 | <Material USE='GreenMaterial'/> |
| 82 | </Appearance> |
| 83 | <Text string='"X3D Java" "SAI Library" "X3DJSAIL"'> |
| 84 | <!-- Comment example A, plain quotation marks: He said, "Immel did it!" --> |
| 85 | <!-- Comment example B, XML character entities: He said, "Immel did it!" --> |
| 86 | <MetadataSet name='EscapedQuotationMarksMetadataSet' containerField='metadata'> |
| 87 | <MetadataString name='quotesTestC' value='"MFString example C, backslash-escaped quotes: He said, \"Immel did it!\""'/> |
| 88 | <MetadataString name='extraChildTest' value='"checks MetadataSet addValue() method"'/> |
| 89 | </MetadataSet> |
| 90 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
| 91 | </Text> |
| 92 | </Shape> |
| 93 | <Collision> |
| 94 | <!-- test containerField='proxy' --> |
| 95 | <Shape DEF='ProxyShape' containerField='proxy'> |
| 96 | <!-- alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \"Immel did it!\""' --> |
| 97 | <!-- alternative XML encoding: Text string='"One, Two, Comment" "" "He said, \"Immel did it!\"" ""' --> |
| 98 | <!-- alternative Java source: .setString(new String [] {"One, Two, Comment", "", "He said, \"Immel did it!\""}) --> |
| 99 | <!-- reference: https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html --> |
| 100 | <Text string='"One, Two, Text" "" "He said, \"Immel did it!\" \"\""'/> |
| 101 | </Shape> |
| 102 | </Collision> |
| 103 | <!-- It's a beautiful world --> |
| 104 | <!-- ... for you! --> |
| 105 | <!-- https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song) --> |
| 106 | </Transform> |
| 107 | <!-- repeatedly spin 180 degrees as a readable special effect --> |
| 108 |
<!-- ROUTE information for SpinInterpolator node:
[from SpinClock.fraction_changed to set_fraction]
[from value_changed to TextTransform.rotation]
-->
<OrientationInterpolator DEF='SpinInterpolator' key='0 0.5 1' keyValue='0 1 0 4.712389 0 1 0 0 0 1 0 1.5707964'/> |
| 109 |
<!-- ROUTE information for SpinClock node:
[from fraction_changed to SpinInterpolator.set_fraction]
-->
<TimeSensor DEF='SpinClock' cycleInterval='5.0' loop='true'/> |
| 110 | <ROUTE fromNode='SpinClock' fromField='fraction_changed' toNode='SpinInterpolator' toField='set_fraction'/> |
| 111 | <ROUTE fromNode='SpinInterpolator' fromField='value_changed' toNode='TextTransform' toField='rotation'/> |
| 112 | <Group DEF='BackgroundGroup'> |
| 113 |
<!-- ROUTE information for GradualBackground node:
[from colorTypeConversionScript.colorsOutput to skyColor]
-->
<Background DEF='GradualBackground'/> |
| 114 |
<!-- ROUTE information for colorTypeConversionScript node:
[from ColorAnimator.value_changed to colorInput]
[from colorsOutput to GradualBackground.skyColor]
-->
<Script DEF='colorTypeConversionScript'> |
| 115 | <field name='colorInput' type='SFColor' accessType='inputOnly'/> |
| 116 | <field name='colorsOutput' type='MFColor' accessType='outputOnly'/> |
<![CDATA[
ecmascript:
function colorInput (eventValue) // Example source code
{
colorsOutput = new MFColor(eventValue); // assigning value sends output event
// Browser.print('colorInput=' + eventValue + ',
// colorsOutput=' + colorsOutput + '
');
// TODO check line wrapping when exporting/converting
}
]]>
|
|
| 118 | </Script> |
| 119 |
<!-- ROUTE information for ColorAnimator node:
[from ColorClock.fraction_changed to set_fraction]
[from value_changed to colorTypeConversionScript.colorInput]
-->
<ColorInterpolator DEF='ColorAnimator' key='0 0.5 1' keyValue='0.9411765 1 1 0.29411766 0 0.50980395 0.9411765 1 1'> |
| 120 | <!-- AZURE to INDIGO and back again --> |
| 121 | </ColorInterpolator> |
| 122 |
<!-- ROUTE information for ColorClock node:
[from fraction_changed to ColorAnimator.set_fraction]
-->
<TimeSensor DEF='ColorClock' cycleInterval='60.0' loop='true'/> |
| 123 | <ROUTE fromNode='colorTypeConversionScript' fromField='colorsOutput' toNode='GradualBackground' toField='skyColor'/> |
| 124 | <ROUTE fromNode='ColorAnimator' fromField='value_changed' toNode='colorTypeConversionScript' toField='colorInput'/> |
| 125 | <ROUTE fromNode='ColorClock' fromField='fraction_changed' toNode='ColorAnimator' toField='set_fraction'/> |
| 126 | </Group> |
| 127 | <ProtoDeclare name='ArtDeco01' appinfo='tooltip: ArtDeco01Material prototype is a Material node'> |
| 128 | <ProtoInterface> |
| 129 |
<field name='description' type='SFString' value='ArtDeco01Material prototype is a Material node' accessType='inputOutput'
appinfo='tooltip for descriptionField'/> |
| 130 | <field name='enabled' type='SFBool' value='true' accessType='inputOutput'/> |
| 131 | </ProtoInterface> |
| 132 | <ProtoBody> |
| 133 | <!-- Initial node of ProtoBody determines prototype node type --> |
| 134 | <Material ambientIntensity='0.25' diffuseColor='0.282435 0.085159 0.134462' shininess='0.127273' specularColor='0.276305 0.11431 0.139857'/> |
| 135 | <!-- [SmokeTestProgram diagnostic] should be connected to scene graph: artDeco01ProtoDeclare.getNodeType()="Material" --> |
| 136 | <!-- presence of follow-on TouchSensor shows that additional nodes are allowed in ProtoBody after initial node, regardless of node types --> |
| 137 | <TouchSensor description='within ProtoBody'> |
| 138 | <IS> |
| 139 | <connect nodeField='description' protoField='description'/> |
| 140 | <connect nodeField='enabled' protoField='enabled'/> |
| 141 | </IS> |
| 142 | </TouchSensor> |
| 143 | </ProtoBody> |
| 144 | </ProtoDeclare> |
| 145 | <ExternProtoDeclare name='ArtDeco02' appinfo='this is a different Material node' url=' "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02" '> |
| 146 | <!-- [SmokeTestProgram diagnostic] artDeco02ExternProtoDeclare.getNodeType()="ERROR_UNKNOWN_EXTERNPROTODECLARE_NODE_TYPE: ExternProtoDeclare name='ArtDeco02' type cannot be remotely accessed at run time. TODO X3DJSAIL needs to add further capability that retrieves the ExternProtoDeclare file." --> |
| 147 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='tooltip for descriptionField'/> |
| 148 | </ExternProtoDeclare> |
| 149 | <!-- Tested ArtDeco01ProtoInstance, ArtDeco02ProtoInstance for improper node type when ProtoInstance is added in wrong place --> |
| 150 | <Shape DEF='TestShape1'> |
| 151 | <Appearance DEF='TestAppearance1'> |
| 152 | <!-- ArtDeco01Material prototype goes here... --> |
| 153 | <ProtoInstance name='ArtDeco01' containerField='material'> |
| 154 | <!-- [SmokeTestProgram diagnostic] ArtDeco01ProtoInstance.getNodeType()="Material" --> |
| 155 | <fieldValue name='description' value='ArtDeco01Material can substitute for a Material node'/> |
| 156 | </ProtoInstance> |
| 157 | </Appearance> |
| 158 | <Sphere radius='0.001'/> |
| 159 | </Shape> |
| 160 | <Shape DEF='TestShape2'> |
| 161 | <Appearance DEF='TestAppearance2'> |
| 162 | <!-- ArtDeco02Material ProtoInstance goes here... --> |
| 163 |
<!-- ProtoInstance ArtDeco02MaterialDEF is a DEF node that has 1 USE node: USE_1 -->
<ProtoInstance name='ArtDeco02' DEF='ArtDeco02MaterialDEF' containerField='material'> |
| 164 | <!-- [SmokeTestProgram diagnostic] ArtDeco02ProtoInstance.getNodeType()="ERROR_UNKNOWN_EXTERNPROTODECLARE_NODE_TYPE: ExternProtoDeclare name='ArtDeco02' type cannot be remotely accessed at run time. TODO X3DJSAIL needs to add further capability that retrieves the ExternProtoDeclare file." --> |
| 165 | </ProtoInstance> |
| 166 | </Appearance> |
| 167 | <Cone bottomRadius='0.001' height='0.001'/> |
| 168 | </Shape> |
| 169 | <Shape DEF='TestShape3'> |
| 170 | <Appearance DEF='TestAppearance3'> |
| 171 | <!-- ArtDeco02Material ProtoInstance USE goes here. Note that name field is REQUIRED as part of ProtoInstance USE. --> |
| 172 | <ProtoInstance USE='ArtDeco02MaterialDEF' containerField='material'/> |
| 173 | </Appearance> |
| 174 | <Cylinder height='0.001' radius='0.001'/> |
| 175 | </Shape> |
| 176 |
<!-- Inline inlineScene is a DEF node that has 1 USE node: USE_1<!-- This node has an IMPORT connection that can exchange events with a child X3D model. --> <Inline DEF='inlineScene' url=' "newScene.x3d" "https://www.web3d.org/specifications/java/examples/newScene.x3d" '/> |
| 177 | <IMPORT inlineDEF='inlineScene' importedDEF='WorldInfoDEF' AS='WorldInfoDEF2'/> |
| 178 | <EXPORT localDEF='WorldInfoDEF' AS='WorldInfoDEF3'/> |
| 179 | <ProtoDeclare name='MaterialModulator' appinfo='mimic a Material node and modulate fields as an animation effect' documentation='https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html'> |
| 180 | <ProtoInterface> |
| 181 | <field name='enabled' type='SFBool' value='true' accessType='inputOutput'/> |
| 182 | <field name='diffuseColor' type='SFColor' value='0 0 0' accessType='inputOutput'/> |
| 183 | <field name='emissiveColor' type='SFColor' value='0.05 0.05 0.5' accessType='inputOutput'/> |
| 184 | <field name='specularColor' type='SFColor' value='0 0 0' accessType='inputOutput'/> |
| 185 | <field name='transparency' type='SFFloat' value='0.0' accessType='inputOutput'/> |
| 186 | <field name='shininess' type='SFFloat' value='0.0' accessType='inputOutput'/> |
| 187 | <field name='ambientIntensity' type='SFFloat' value='0.0' accessType='inputOutput'/> |
| 188 | </ProtoInterface> |
| 189 | <ProtoBody> |
| 190 | <Material DEF='MaterialNode'> |
| 191 | <IS> |
| 192 | <connect nodeField='diffuseColor' protoField='diffuseColor'/> |
| 193 | <connect nodeField='emissiveColor' protoField='emissiveColor'/> |
| 194 | <connect nodeField='specularColor' protoField='specularColor'/> |
| 195 | <connect nodeField='transparency' protoField='transparency'/> |
| 196 | <connect nodeField='shininess' protoField='shininess'/> |
| 197 | <connect nodeField='ambientIntensity' protoField='ambientIntensity'/> |
| 198 | </IS> |
| 199 | </Material> |
| 200 | <!-- Only first node (the node type for the prototype) is renderable, others are along for the ride --> |
| 201 | <Script DEF='MaterialModulatorScript'> |
| 202 | <field name='enabled' type='SFBool' accessType='inputOutput'/> |
| 203 | <field name='diffuseColor' type='SFColor' accessType='inputOutput'/> |
| 204 | <field name='newColor' type='SFColor' accessType='outputOnly'/> |
| 205 | <field name='clockTrigger' type='SFTime' accessType='inputOnly'/> |
| 206 | <IS> |
| 207 | <connect nodeField='enabled' protoField='enabled'/> |
| 208 | <connect nodeField='diffuseColor' protoField='diffuseColor'/> |
| 209 | </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');
}
}
]]>
|
|
| 211 | </Script> |
| 212 | </ProtoBody> |
| 213 | </ProtoDeclare> |
| 214 | <!-- Test success: declarative statement createDeclarativeShapeTests() --> |
| 215 | <Group DEF='DeclarativeGroupExample'> |
| 216 | <Shape> |
| 217 | <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='"test case"'/> |
| 218 | <Appearance DEF='DeclarativeAppearanceExample'> |
| 219 | <!-- DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance --> |
| 220 | <ProtoInstance name='MaterialModulator' DEF='MyMaterialModulator' containerField='material'/> |
| 221 | </Appearance> |
| 222 | <Cone bottom='false' bottomRadius='0.05' height='0.1'/> |
| 223 | </Shape> |
| 224 | <!-- Test success: declarativeGroup.addChild() singleton pipeline method --> |
| 225 | </Group> |
| 226 | <!-- Test success: declarative statement addChild() --> |
| 227 | <!-- 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> --> |
| 228 | <!-- Test success: x3dModel.findElementByNameValue(findThisNameValue) = <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='"test case"'/> --> |
| 229 | <!-- Test success: x3dModel.findElementByNameValue("ArtDeco01", "ProtoDeclare") found --> |
| 230 | <!-- Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoDeclare") found --> |
| 231 | <!-- Test success: x3dModel.findElementByNameValue("MaterialModulator", "ProtoInstance") found --> |
| 232 | <Group DEF='TestFieldObjectsGroup'> |
| 233 | <!-- testFieldObjects() results --> |
| 234 | <!-- SFBool default=false, true=true, false=false, negate()=true --> |
| 235 | <!-- MFBool default=, initial=true false true, negate()=false true false --> |
| 236 | <!-- SFFloat default=0.0, initial=1.0, setValue(2)=2.0, setValue(3.0f)=3.0, setValue(4.0)=4.0 --> |
| 237 | <!-- 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 --> |
| 238 | <!-- ... 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= --> |
| 239 | <!-- 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 --> |
| 240 | <!-- regex test SFVec3f().matches("1 2 3")=true, regex test SFVec3f().matches("1 2 3 4")=false, regex test (SFRotation.matches("0 0 0 0")=true, failure detecting illegal (zero axis) rotation value --> |
| 241 | </Group> |
| 242 | <Sound location='0 1.6 0'> |
| 243 | <!-- set sound-ellipsoid location height at 1.6m to match typical avatar height --> |
| 244 | <AudioClip description='chimes' url=' "chimes.wav" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav" '> |
| 245 | <!-- Scene example fragment from https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d --> |
| 246 | </AudioClip> |
| 247 | </Sound> |
| 248 | <Sound location='0 1.6 0'> |
| 249 | <!-- set sound-ellipsoid location height at 1.6m to match typical avatar height --> |
| 250 | <MovieTexture containerField='source' description='mpgsys.mpg from ConformanceNist suite' url=' "mpgsys.mpg" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg" '> |
| 251 | <!-- Scene example fragment from https://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d --> |
| 252 | <!-- Expected containerField='source', allowed containerField values="texture" "source" "back" "bottom" "front" "left" "right" "top" "backTexture" "bottomTexture" "frontTexture" "leftTexture" "rightTexture" "topTexture" "children" --> |
| 253 | </MovieTexture> |
| 254 | </Sound> |
| 255 | <!-- Test success: Anchor.isNode()=true, siteAnchor.isNode()=true --> |
| 256 | <!-- Test success: Anchor.isStatement()=false, siteAnchor.isStatement()=false --> |
| 257 | <!-- Test success: ROUTE.isNode()=false, orbitPositionROUTE.isNode()=false --> |
| 258 | <!-- Test success: ROUTE.isStatement()=true, orbitPositionROUTE.isStatement()=true --> |
| 259 | <!-- Test success: CommentsBlock.isNode()=false, testComments.isNode()=false --> |
| 260 | <!-- Test failure: CommentsBlock.isStatement()=true, testComments.isStatement()=true --> |
| 261 | <Shape DEF='ExtrusionShape'> |
| 262 | <!-- ExampleExtrusion isCrossSectionClosed()=true, crossSection='[1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0]' --> |
| 263 | <!-- ExampleExtrusion isSpineClosed()=false, spine='[0.0, 0.0, 0.0, 0.0, 1.0, 0.0]' --> |
| 264 | <Appearance DEF='TransparentAppearance'> |
| 265 | <Material transparency='1.0'/> |
| 266 | </Appearance> |
| 267 | <Extrusion DEF='ExampleExtrusion'/> |
| 268 | </Shape> |
| 269 | <Group> |
| 270 | <!-- Test MFNode children array as an ordered list consisting of comments, statements, ProtoInstance and nodes --> |
| 271 | <ProtoDeclare name='NewWorldInfo'> |
| 272 | <ProtoInterface> |
| 273 | <field name='description' type='SFString' accessType='initializeOnly'/> |
| 274 | </ProtoInterface> |
| 275 | <ProtoBody> |
| 276 | <WorldInfo/> |
| 277 | </ProtoBody> |
| 278 | </ProtoDeclare> |
| 279 | <ProtoInstance name='NewWorldInfo' DEF='Proto1'> |
| 280 | <fieldValue name='description' value='testing 1 2 3'/> |
| 281 | </ProtoInstance> |
| 282 | <Group DEF='Node2'> |
| 283 | <!-- intentionally empty --> |
| 284 | </Group> |
| 285 | <ProtoInstance name='NewWorldInfo' DEF='Proto3'/> |
| 286 | <Transform DEF='Node4'> |
| 287 | <!-- intentionally empty --> |
| 288 | </Transform> |
| 289 | <!-- Test satisfactorily creates MFNode children array as an ordered list with mixed content --> |
| 290 | </Group> |
| 291 | <ProtoDeclare name='ShaderProto'> |
| 292 | <ProtoBody> |
| 293 | <ProgramShader containerField='shaders'/> |
| 294 | </ProtoBody> |
| 295 | </ProtoDeclare> |
| 296 | <Shape> |
| 297 | <Appearance> |
| 298 | <!-- Test MFNode shaders array as an ordered list consisting of comments, ProtoInstance and nodes --> |
| 299 | <!-- Test satisfactorily creates MFNode shaders array as an ordered list with mixed content --> |
| 300 | <ProgramShader DEF='TestShader1' containerField='shaders'> |
| 301 | <ShaderProgram DEF='TestShader2' containerField='programs'> |
| 302 | </ShaderProgram> |
| 302 | </ProgramShader> |
| 303 | <ProtoInstance name='ShaderProto' DEF='TestShader3' containerField='shaders'/> |
| 304 | <ComposedShader DEF='TestShader4' containerField='shaders'> |
| 305 | <ShaderPart DEF='TestShader5' containerField='parts'> |
| 306 | </ShaderPart> |
| 306 | </ComposedShader> |
| 307 | </Appearance> |
| 308 | </Shape> |
| 309 | <Transform DEF='SpecialtyNodes'> |
| 310 | <CADLayer> |
| 311 | <CADAssembly> |
| 312 | <CADPart> |
| 313 | <CADFace/> |
| 314 | </CADPart> |
| 315 | </CADAssembly> |
| 316 | </CADLayer> |
| 317 | <EspduTransform containerField='children'/> |
| 318 | <ReceiverPdu receivedPower='0.0' containerField='children'/> |
| 319 | <SignalPdu containerField='children'/> |
| 320 | <TransmitterPdu relativeAntennaLocation='0 0 0' transmitFrequencyBandwidth='0.0' containerField='children'/> |
| 321 | <DISEntityManager containerField='children'> |
| 322 | <DISEntityTypeMapping containerField='children'/> |
| 323 | </DISEntityManager> |
| 324 | </Transform> |
| 325 | <EspduTransform containerField='children'> |
| 326 | <WorldInfo/> |
| 327 | </EspduTransform> |
| 328 | <ReceiverPdu receivedPower='0.0' containerField='children'/> |
| 329 | <SignalPdu containerField='children'/> |
| 330 | <TransmitterPdu relativeAntennaLocation='0 0 0' transmitFrequencyBandwidth='0.0' containerField='children'/> |
| 331 | <DISEntityManager containerField='children'> |
| 332 | <DISEntityTypeMapping containerField='children'/> |
| 333 | </DISEntityManager> |
| 334 | <LoadSensor> |
| 335 | <!-- Contained nodes typically must be USE references for nodes previously DEFined in the scene --> |
| 336 | <!-- The following nodes are test cases for all X3DUrlObject nodes --> |
| 337 | <Anchor USE='siteAnchor'/> |
| 338 | <Inline USE='inlineScene'/> |
| 339 | <DISEntityTypeMapping containerField='children'/> |
| 340 | <GeoMetadata containerField='children'/> |
| 341 | <AudioClip containerField='children'/> |
| 342 | <ImageCubeMapTexture containerField='children'/> |
| 343 | <ImageTexture3D containerField='children'/> |
| 344 | <ImageTexture containerField='children'/> |
| 345 | <MovieTexture containerField='children'/> |
| 346 | <Script DEF='DummyScript'> |
<![CDATA[
ecmascript:
/* dummy test source code */
]]>
|
|
| 348 | </Script> |
| 349 | <PackagedShader containerField='children'/> |
| 350 | <ShaderPart containerField='children'> |
| 351 | </ShaderPart> |
| 351 | <ShaderProgram containerField='children'> |
| 352 | </ShaderProgram> |
| 352 | </LoadSensor> |
| 353 | <OrthoViewpoint DEF='SpecialTestOrthoViewpoint' fieldOfView='1 3 2 4' containerField='children'/> |
| 354 | </Scene> |
| 355 | </X3D> |
Event Graph ROUTE Table entries with 7 ROUTE connections total, showing X3D event-model relationships for this scene.
Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.
| line 137 TouchSensor |
description='within ProtoBody' User-interaction hint for this node.(TouchSensor description is providing a tooltip) |
| ColorClock TimeSensor fraction_changed SFFloat |
ColorAnimator ColorInterpolator set_fraction SFFloat |
then |
ColorAnimator ColorInterpolator value_changed SFColor |
colorTypeConversionScript Script colorInput SFColor |
then |
colorTypeConversionScript Script colorsOutput MFColor |
GradualBackground Background skyColor MFColor |
| OrbitClock TimeSensor fraction_changed SFFloat |
BoxPathAnimator PositionInterpolator set_fraction SFFloat |
then |
BoxPathAnimator PositionInterpolator value_changed SFVec3f |
LogoGeometryTransform Transform set_translation SFVec3f |
| SpinClock TimeSensor fraction_changed SFFloat |
SpinInterpolator OrientationInterpolator set_fraction SFFloat |
then |
SpinInterpolator OrientationInterpolator value_changed SFRotation |
TextTransform Transform rotation SFRotation |
| MaterialModulatorScript Script |
No direct ROUTE connection found for events to/from this node. This Script has no direct access to other nodes. |
| line 153 ProtoInstance ArtDeco01 |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
| ArtDeco02MaterialDEF ProtoInstance ArtDeco02 |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
| MyMaterialModulator ProtoInstance MaterialModulator |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
| Proto1 ProtoInstance NewWorldInfo |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
| Proto3 ProtoInstance NewWorldInfo |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
| TestShader3 ProtoInstance ShaderProto |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
| inlineScene Inline |
This node can send or receive ROUTE events via DEF='inlineScene' or via <IMPORT AS='WorldInfoDEF2'/> |
| line 177 IMPORT |
<IMPORT inlineDEF='inlineScene' AS='WorldInfoDEF2'/> matches local node <Inline DEF='inlineScene'/> which can send or receive events between different X3D models, if this parent model has ROUTE statements to exchange events with the child Inline model. |
| line 178 EXPORT |
<EXPORT localDEF='WorldInfoDEF' AS='WorldInfoDEF3'/> matches local node <WorldInfo DEF='WorldInfoDEF'/> which can send or receive events, if a parent X3D model loads this scene via Inline/IMPORT and then uses ROUTE statements to exchange events with it. |
| siteAnchor Anchor |
description='select for X3D Java SAI Library (X3DJSAIL) description' User-interaction hint for this node. |
<!--
Color-coding legend: X3D terminology
<X3dNode DEF='idName' field='value'/>
matches XML terminology
<XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
<ProtoInstance name='ProtoName'>
<fieldname='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->