<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='Example04.x3d'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='24 May 2000'/>
<meta name='modifiedcontent='28 October 2019'/>
<meta name='creatorcontent='X3D working group'/>
<meta name='descriptioncontent='VRML 97 specification example: Prototype'/>
<meta name='referencecontent='originals/exampleD_4.wrl'/>
<meta name='specificationSectioncontent=' VRML 97, ISO/IEC 14772-1, Part 1: Functional specification and UTF-8 encoding, D.4 Prototype example'/>
<meta name='specificationUrlcontent=' https://www.web3d.org/documents/specifications/14772/V2.0/part1/examples.html#D.4 '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example04.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for ProtoDeclare definition : TwoColorTable

Index for DEF nodes : Leg, LegMaterial, TableTopMaterial
-->
<Scene>
<WorldInfo title='Example04.x3d'/>
<ProtoDeclare name='TwoColorTable'>
<ProtoInterface>
<field name='legColortype='SFColorvalue='.8 .4 .7accessType='initializeOnly'/>
<field name='topColortype='SFColorvalue='.6 .6 .1accessType='initializeOnly'/>
</ProtoInterface>
<ProtoBody>
<Transform>
<Transform translation='0.0 0.6 0.0'>
<!-- table top -->
<Shape>
<Appearance>
<Material DEF='TableTopMaterial'>
<IS>
<connect nodeField='diffuseColorprotoField='topColor'/>
</IS>
</Material>
</Appearance>
<Box size='1.2 0.2 1.2'/>
</Shape>
</Transform>
<Transform translation='-0.5 0.0 -0.5'>
<!-- first table leg -->
<Shape DEF='Leg'>
<Appearance>
<Material DEF='LegMaterialdiffuseColor='1.0 0.0 0.0'>
<IS>
<connect nodeField='diffuseColorprotoField='legColor'/>
</IS>
</Material>
</Appearance>
<Cylinder height='1.0radius='0.1'/>
</Shape>
</Transform>
<Transform translation='0.5 0.0 -0.5'>
<!-- another table leg -->
<Shape USE='Leg'/>
</Transform>
<Transform translation='-0.5 0.0 0.5'>
<!-- another table leg -->
<Shape USE='Leg'/>
</Transform>
<Transform translation='0.5 0.0 0.5'>
<!-- another table leg -->
<Shape USE='Leg'/>
</Transform>
<!-- End of root Transform's children -->
</Transform>
<!-- End of root Transform -->
</ProtoBody>
</ProtoDeclare>
<!-- End of prototype -->
<!-- The prototype is now defined. Although it contains a -->
<!-- number of nodes, only the legColor and topColor fields -->
<!-- are public. Instead of using the default legColor and -->
<!-- topColor, this instance of the table has red legs and -->
<!-- a green top: -->
<ProtoInstance name='TwoColorTable'>
<fieldValue name='legColorvalue='1 0 0'/>
<fieldValue name='topColorvalue='0 1 0'/>
</ProtoInstance>
<NavigationInfo type='"EXAMINE"'/>
<!-- Use the Examine viewer -->
</Scene>
</X3D>
<!--

Index for ProtoDeclare definition : TwoColorTable

Index for DEF nodes : Leg, LegMaterial, TableTopMaterial
-->

<!-- 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> -->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->