<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://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 =' https://www.web3d.org/specifications/x3d-3.3.xsd ' >
<head>
<meta name='titlecontent=' Prototype.x3d '/>
<meta name='descriptioncontent='X3D encodings example: defining a Prototype, demonstration of IS/connect definitions.'/>
<meta name='creatorcontent='Don Brutzman and Joe Williams'/>
<meta name='createdcontent='1 June 2002'/>
<meta name='modifiedcontent='28 October 2019'/>
<meta name='specificationSectioncontent=' X3D encodings, ISO/IEC 19776-1.3, Part 1: XML encoding, Annex C.4 Prototype example'/>
<meta name='specificationUrlcontent=' https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/examples.html#PrototypeExample '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/Prototype.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

to top <!-- Index for DEF nodes: Leg, LegMaterial, TableTopMaterial

Index for ProtoDeclare definition: TwoColorTable
-->
<Scene>
<WorldInfo title='Prototype.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'>
<Shape USE=' Leg'/>
<!-- another table leg -->
</Transform>
<Transform translation='0.5 0.0 0.5'>
<Shape USE=' Leg'/>
<!-- another table 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>
<!--

to top <!-- Index for DEF nodes: Leg, LegMaterial, TableTopMaterial

Index for ProtoDeclare definition: TwoColorTable
-->

Event Graph ROUTE Table with 0 ROUTE 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.


ProtoInstance
TwoColorTable
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/PrototypeIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/Prototype.x3d -->

<!-- Color 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'> <field name='fieldName'/> </ProtoInstance> -->

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