<
ExternProtoDeclare name='
CircleFish'
appinfo='
Simple model of a fish swimming in a cirlce'
url='
"
CircleFishPrototype.x3d#CircleFish"
"
http://X3dGraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishPrototype.x3d#CircleFish"
"
CircleFishPrototype.wrl#CircleFish"
"
http://X3dGraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishPrototype.wrl#CircleFish"
'>
<field name='skinTextureUrl' type='MFString' accessType='inputOutput'/>
<field name='fishScale' type='SFVec3f' accessType='inputOutput'/>
<field name='fishColor' type='SFColor' accessType='inputOutput'/>
<field name='finColor' type='SFColor' accessType='inputOutput'/>
<field name='positionKey' type='MFFloat' accessType='inputOutput'/>
<field name='positionKeyValue' type='MFVec3f' accessType='inputOutput'/>
<field name='orientationKey' type='MFFloat' accessType='inputOutput'/>
<field name='orientationKeyValue' type='MFRotation' accessType='inputOutput'/>
<field name='orbitTime' type='SFTime' accessType='inputOutput'/>
</
ExternProtoDeclare>
<!-- new LOD prototype extends a previously defined prototype -->
<
ProtoDeclare name='
CircleFishLod'
appinfo='
CircleFish prototype with LOD added'>
<
ProtoInterface>
<
field name='
skinTextureUrl'
type='
MFString'
accessType='
inputOutput'/>
<
field name='
fishScale'
type='
SFVec3f'
value='
1 1 1'
accessType='
inputOutput'/>
<
field name='
fishColor'
type='
SFColor'
value='
0.5 0.5 0.5'
accessType='
inputOutput'/>
<
field name='
finColor'
type='
SFColor'
value='
0.5 0.5 0.5'
accessType='
inputOutput'/>
<
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'/>
<
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'/>
<
field name='
orientationKey'
type='
MFFloat'
value='
0.0 0.25 0.5 0.750 1'
accessType='
inputOutput'/>
<
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'/>
<
field name='
orbitTime'
type='
SFTime'
value='
45'
accessType='
inputOutput'/>
</
ProtoInterface>
<
ProtoBody>
<
LOD range='
20 40'
forceTransitions='
false'>
<
ProtoInstance name='
CircleFish'
DEF='
NearInstance'>
<
IS>
<
connect nodeField='
skinTextureUrl'
protoField='
skinTextureUrl'/>
<
connect nodeField='
fishScale'
protoField='
fishScale'/>
<
connect nodeField='
fishColor'
protoField='
fishColor'/>
<
connect nodeField='
finColor'
protoField='
finColor'/>
<
connect nodeField='
positionKey'
protoField='
positionKey'/>
<
connect nodeField='
positionKeyValue'
protoField='
positionKeyValue'/>
<
connect nodeField='
orientationKey'
protoField='
orientationKey'/>
<
connect nodeField='
orientationKeyValue'
protoField='
orientationKeyValue'/>
<
connect nodeField='
orbitTime'
protoField='
orbitTime'/>
</
IS>
</
ProtoInstance>
<!-- no skinTexture at midRange for better performance -->
<
ProtoInstance name='
CircleFish'
DEF='
MidRangeInstance'>
<
IS>
<
connect nodeField='
fishScale'
protoField='
fishScale'/>
<
connect nodeField='
fishColor'
protoField='
fishColor'/>
<
connect nodeField='
finColor'
protoField='
finColor'/>
<
connect nodeField='
positionKey'
protoField='
positionKey'/>
<
connect nodeField='
positionKeyValue'
protoField='
positionKeyValue'/>
<
connect nodeField='
orientationKey'
protoField='
orientationKey'/>
<
connect nodeField='
orientationKeyValue'
protoField='
orientationKeyValue'/>
<
connect nodeField='
orbitTime'
protoField='
orbitTime'/>
</
IS>
</
ProtoInstance>
<
WorldInfo info='
"null node"'/>
</
LOD>
</
ProtoBody>
</
ProtoDeclare>
<!-- ==================== -->
<
Anchor description='
CircleFishLodExample'
parameter='
"target=_blank"'
url='
"
CircleFishLodExample.x3d"
"
http://X3dGraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishLodExample.x3d"
"
CircleFishLodExample.wrl"
"
http://X3dGraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishLodExample.wrl"
'>
<
Shape>
<
Appearance>
<Material diffuseColor='0 1 1' emissiveColor='0 1 1'/>
</
Appearance>
<
Text string='
"CircleFishLodPrototype" "is a Prototype efinition file." "" "To see an example scene using this new node," "click this text and view" "CircleFishLodExample.wrl"'
solid='
false'>
<FontStyle justify='"MIDDLE" "MIDDLE"' size='0.7'/>
</
Text>
</
Shape>
</
Anchor>