1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
|
3 | <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'> |
4 | <head> |
5 | <meta name='title' content='CircleFishLodPrototype.x3d'/> |
6 | <meta name='description' content='Modifies an externally defined CircleFish prototype by adding Level of Detail (LOD)'/> |
7 | <meta name='creator' content='Ildeniz Duman'/> |
8 | <meta name='translator' content='Scott Tufts'/> |
9 | <meta name='created' content='1998'/> |
10 | <meta name='translated' content='11 December 2001'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishLodPrototype.x3d'/> |
13 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
14 | <meta name='license' content='../license.html'/> |
15 | </head> |
16 | <Scene> |
17 | <ExternProtoDeclare name='CircleFish' appinfo='Simple model of a fish swimming in a cirlce' url=' "CircleFishPrototype.x3d#CircleFish" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishPrototype.x3d#CircleFish" "CircleFishPrototype.wrl#CircleFish" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishPrototype.wrl#CircleFish" '> |
18 | <field name='skinTextureUrl' type='MFString' accessType='inputOutput'/> |
19 | <field name='fishScale' type='SFVec3f' accessType='inputOutput'/> |
20 | <field name='fishColor' type='SFColor' accessType='inputOutput'/> |
21 | <field name='finColor' type='SFColor' accessType='inputOutput'/> |
22 | <field name='positionKey' type='MFFloat' accessType='inputOutput'/> |
23 | <field name='positionKeyValue' type='MFVec3f' accessType='inputOutput'/> |
24 | <field name='orientationKey' type='MFFloat' accessType='inputOutput'/> |
25 | <field name='orientationKeyValue' type='MFRotation' accessType='inputOutput'/> |
26 | <field name='orbitTime' type='SFTime' accessType='inputOutput'/> |
27 | </ExternProtoDeclare> |
28 | <!-- new LOD prototype extends a previously defined prototype --> |
29 | <ProtoDeclare name='CircleFishLod' appinfo='CircleFish prototype with LOD added'> |
30 | <ProtoInterface> |
31 | <field name='skinTextureUrl' type='MFString' accessType='inputOutput'/> |
32 | <field name='fishScale' type='SFVec3f' value='1 1 1' accessType='inputOutput'/> |
33 | <field name='fishColor' type='SFColor' value='0.5 0.5 0.5' accessType='inputOutput'/> |
34 | <field name='finColor' type='SFColor' value='0.5 0.5 0.5' accessType='inputOutput'/> |
35 | <field name='positionKey' type='MFFloat' value='0.0 0.125 0.25 0.375 0.5 0.625 0.750 0.875 1' accessType='inputOutput'/> |
36 | <field name='positionKeyValue' type='MFVec3f' value='1.5 0.5 0 1.3 0 -0.8 0 -0.5 -1.0 -1.3 0 -0.8 -1.5 0.5 0 -1.3 0 0.8 0 -0.5 1.0 1.3 0 0.8 1.5 0.5 0' accessType='inputOutput'/> |
37 | <field name='orientationKey' type='MFFloat' value='0.0 0.25 0.5 0.750 1' accessType='inputOutput'/> |
38 | <field name='orientationKeyValue' type='MFRotation' value='0 1 0 -3.14 0 1 0 -1.57 0 1 0 0 0 1 0 1.57 0 1 0 3.14' accessType='inputOutput'/> |
39 | <field name='orbitTime' type='SFTime' value='45' accessType='inputOutput'/> |
40 | </ProtoInterface> |
41 | <ProtoBody> |
42 | <LOD forceTransitions='true' range='20 40'> |
43 | <ProtoInstance name='CircleFish' DEF='NearInstance'> |
44 | <IS> |
45 | <connect nodeField='skinTextureUrl' protoField='skinTextureUrl'/> |
46 | <connect nodeField='fishScale' protoField='fishScale'/> |
47 | <connect nodeField='fishColor' protoField='fishColor'/> |
48 | <connect nodeField='finColor' protoField='finColor'/> |
49 | <connect nodeField='positionKey' protoField='positionKey'/> |
50 | <connect nodeField='positionKeyValue' protoField='positionKeyValue'/> |
51 | <connect nodeField='orientationKey' protoField='orientationKey'/> |
52 | <connect nodeField='orientationKeyValue' protoField='orientationKeyValue'/> |
53 | <connect nodeField='orbitTime' protoField='orbitTime'/> |
54 | </IS> |
55 | </ProtoInstance> |
56 | <ProtoInstance name='CircleFish' DEF='MidRangeInstance'> |
57 | <!-- no skinTexture at midRange for better performance --> |
58 | <IS> |
59 | <connect nodeField='fishScale' protoField='fishScale'/> |
60 | <connect nodeField='fishColor' protoField='fishColor'/> |
61 | <connect nodeField='finColor' protoField='finColor'/> |
62 | <connect nodeField='positionKey' protoField='positionKey'/> |
63 | <connect nodeField='positionKeyValue' protoField='positionKeyValue'/> |
64 | <connect nodeField='orientationKey' protoField='orientationKey'/> |
65 | <connect nodeField='orientationKeyValue' protoField='orientationKeyValue'/> |
66 | <connect nodeField='orbitTime' protoField='orbitTime'/> |
67 | </IS> |
68 | </ProtoInstance> |
69 | <!-- Disappear at far range --> |
70 | <WorldInfo info='"null node"'/> |
71 | </LOD> |
72 | </ProtoBody> |
73 | </ProtoDeclare> |
74 | <!-- ==================== --> |
75 | <Anchor description='CircleFishLod Example' parameter='"target=_blank"' url=' "CircleFishLodExample.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishLodExample.x3d" "CircleFishLodExample.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishLodExample.wrl" '> |
76 | <Shape> |
77 | <Appearance> |
78 | <Material diffuseColor='0 1 1' emissiveColor='0 1 1'/> |
79 | </Appearance> |
80 | <Text string='"CircleFishLodPrototype" "is a Prototype declaration file." "" "To see an example using this new node," "click this text and view" "CircleFishLodExample scene"'> |
81 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.7'/> |
82 | </Text> |
83 | </Shape> |
84 | <!-- Selectable Text design pattern has transparent Box and TouchSensor description as a tooltip --> |
85 | <Shape> |
86 | <Box size='12 5 .001'/> |
87 | <Appearance> |
88 | <Material transparency='1'/> |
89 | </Appearance> |
90 | </Shape> |
91 | </Anchor> |
92 | </Scene> |
93 | </X3D> |
<!--
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'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->