www.pudn.com > vrmlExample.rar > 7-2-4.wrl
#VRML V2.0 utf8
Viewpoint
{
position 0 0 15
orientation 0 0 1 0
fieldOfView 0.8
}
Background
{
skyColor [ 0 0 0.2,
0.1 0.1 0.8,
0.7 0.8 0.9
]
skyAngle [1 1.57]
groundColor [ 0.0 0.0 0.0,
0.5 0.4 0.3,
0.3 0.3 0.3
]
groundAngle [1 1.57]
}
Group
{
children
[
DEF mybox Transform
{
children Shape
{
appearance Appearance
{
material DEF Co Material
{
diffuseColor 1,0,0
}
}
geometry Box
{
}
}
}
DEF Clock TimeSensor
{
cycleInterval 5.0
loop TRUE
}
DEF Orientation OrientationInterpolator
{
key
[
0.00,
0.20,
0.40,
0.60,
0.80,
1.00,
]
keyValue[
0.0 1.0 0.0 0.0,
1.0 0.0 1.0 3.14,
0.0 1.0 0.0 6.28,
1.0 1.0 0.0 0.0,
0.0 0.0 1.0 3.14,
1.0 1.0 0.0 6.28,
]
}
]
}
ROUTE Clock.fraction_changed TO Orientation.set_fraction
ROUTE Orientation.value_changed TO mybox.set_rotation