www.pudn.com > vrmlExample.rar > 7-2-1.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]
}
DEF Color ColorInterpolator
{
key [ 0.0 , 0.5 , 1.0 ]
keyValue [ 1 0 0 , 0 1 0 , 0 0 1 ]
}
DEF Time TimeSensor
{
cycleInterval 10.0
loop TRUE
}
Shape
{
appearance Appearance
{
material DEF myMaterial Material { }
}
geometry Sphere { }
}
ROUTE Time.fraction_changed TO Color.set_fraction
ROUTE Color.value_changed TO myMaterial.set_diffuseColor