www.pudn.com > vrmlExample.rar > 7-2-2.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
[
Shape
{
appearance Appearance
{
material DEF mat Material
{ diffuseColor 1 0 0 }
}
geometry Sphere {}
}
DEF Scalar ScalarInterpolator
{
key [0 0.5 1]
keyValue [0 1 0]
}
DEF Time TimeSensor
{
cycleInterval 3
loop TRUE
}
]
}
ROUTE Time.fraction_changed TO Scalar.set_fraction
ROUTE Scalar.value_changed TO mat.set_transparency