<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "https://www.web3d.org/specifications/x3d-4.0.dtd">
<X3D profile='Immersive' version='4.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-4.0.xsd '>
<head>
<meta name='titlecontent='X3dArchitectureConceptsPrototypeBodyValidationExample.x3d'/>
<meta name='descriptioncontent='Prototype example to illustrate why additional non-rendering nodes might be needed after first node in ProtoBody'/>
<meta name='creatorcontent='*Don Brutzman'/>
<meta name='createdcontent='10 September 2021'/>
<meta name='versioncontent='19 September 2021'/>
<meta name='drawingcontent='X3dArchitectureConceptsPrototypeBodyValidationDiagram.png'/>
<meta name='drawingcontent='X3dArchitectureConceptsPrototypeBodyValidationDiagram.vsdx'/>
<meta name='Imagecontent='X3dArchitectureConceptsPrototypeBodyValidationExampleX_ITE.png'/>
<meta name='referencecontent=' https://www.web3d.org/member-only/mantis/view.php?id=1372 '/>
<meta name='specificationSectioncontent=' X3D Architecture, ISO/IEC 19775-1: 202x, Clause 4 Concepts, 4.4.4.3 PROTO definition semantics'/>
<meta name='specificationUrlcontent=' https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/concepts.html#PROTOdefinitionsemantics '/>
<meta name='rightscontent='(c) Web3D Consortium Inc. 2021'/>
<meta name='subjectcontent='X3D prototype specification'/>
<meta name='identifiercontent=' https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/X3dArchitectureConceptsPrototypeBodyValidationExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for ProtoDeclare definition : PulsingBoxShape

Index for DEF nodes : BoxMaterial, MyBox, PrototypeRootNode, PulsingBox, Timer, TransparencyInterpolator
-->
<Scene>
<Background skyColor='0.058824 0.886275 1'/>
<NavigationInfo/>
<ProtoDeclare name='PulsingBoxShape'>
<ProtoInterface>
<field name='boxColortype='SFColorvalue='1 0 0accessType='inputOutput'/>
</ProtoInterface>
<ProtoBody>
<!-- First node in ProtoBody determines node type of this Prototype -->
<Shape DEF='PrototypeRootNode'>
<Appearance>
<!-- ROUTE information for BoxMaterial node:  [from TransparencyInterpolator.value_changed to transparency ] -->
<Material DEF='BoxMaterialdiffuseColor='0.980392 0 0'>
<IS>
<connect nodeField='diffuseColorprotoField='boxColor'/>
</IS>
</Material>
</Appearance>
<Box DEF='PulsingBoxsize='4 4 4'/>
</Shape>
<!-- ====================================================================== -->
<!-- Subsequent nodes do not render, but still must be a valid X3D subgraph -->
<!-- Note if these move into the Shape node, scene graph is no longer valid -->
<!-- ROUTE information for TransparencyInterpolator node:  [from Timer.fraction_changed to set_fraction ] [from value_changed to BoxMaterial.transparency ] -->
<ScalarInterpolator DEF='TransparencyInterpolatorkey='0 0.5 1keyValue='1 0 1'/>
<!-- ROUTE information for Timer node:  [from fraction_changed to TransparencyInterpolator.set_fraction ] -->
<TimeSensor DEF='TimercycleInterval='10loop='true'/>
<!-- ROUTEs -->
<ROUTE fromNode='TimerfromField='fraction_changedtoNode='TransparencyInterpolatortoField='set_fraction'/>
<ROUTE fromNode='TransparencyInterpolatorfromField='value_changedtoNode='BoxMaterialtoField='transparency'/>
<!-- ====================================================================== -->
</ProtoBody>
</ProtoDeclare>
<ProtoInstance name='PulsingBoxShapeDEF='MyBox'>
<!-- NavyBlue TODO need appinfo/documentation fields on fieldValue to match field expressivity -->
<fieldValue name='boxColorvalue='0 0 0.5'/>
</ProtoInstance>
</Scene>
</X3D>
<!--

Index for ProtoDeclare definition : PulsingBoxShape

Index for DEF nodes : BoxMaterial, MyBox, PrototypeRootNode, PulsingBox, Timer, TransparencyInterpolator
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
    <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources and X3D Scene Authoring Hints. -->