#VRML V2.0 utf8 DirectionalLight { direction 0 0 -1 intensity 0.5 } DEF LIGHT DirectionalLight { direction 1 -1 -1 intensity 1 } Transform { translation -5 0 0 children Shape { appearance MultiAppearance { material Material { diffuseColor 1 1 1 } diffuseMap DiffuseMap { texture DEF TINTED_TEX TintedImageTexture { url "../images/shared/squareTile.gif" tintColor 1 1 1 } } } geometry Sphere {} } } Transform { translation 0 0 0 children Shape { appearance MultiAppearance { material Material { diffuseColor 1 1 1 specularColor 0 1 0 shininess 0.1 } opacityLevelMap OpacityLevelMap { texture USE TINTED_TEX } } geometry Sphere {} } } Transform { translation 5 0 0 children Shape { appearance MultiAppearance { material Material { diffuseColor 1 1 1 specularColor 1 0 1 shininess 0.1 } specularLevelMap SpecularLevelMap { texture USE TINTED_TEX } } geometry Sphere {} } } Transform { translation -5 -5 0 children Shape { appearance MultiAppearance { material Material { diffuseColor 1 1 1 } diffuseMap DiffuseMap { texture DEF GRADIENT_TEX GradientTexture { width 2 gradientColors [ 1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1] } } } geometry Sphere {} } } Transform { translation 0 -5 0 children Shape { appearance MultiAppearance { material Material { diffuseColor 1 1 1 specularColor 0 1 0 shininess 0.1 } opacityLevelMap OpacityLevelMap { texture USE GRADIENT_TEX } } geometry Sphere {} } } Transform { translation 5 -5 0 children Shape { appearance MultiAppearance { material Material { diffuseColor 1 1 1 specularColor 1 0 1 shininess 0.1 } specularLevelMap SpecularLevelMap { texture USE GRADIENT_TEX } } geometry Sphere {} } } DEF TIME_SENSOR TimeSensor { loop TRUE cycleInterval 5 } DEF LIGHT_DIR_INTERP ColorInterpolator { key [ 0 .25 .5 .75 1 ] keyValue [ 1 -1 0, 0 -1 1, -1 -1 0, 0 -1 -1, 1 -1 0, ] } ROUTE TIME_SENSOR.fraction TO LIGHT_DIR_INTERP.fraction ROUTE LIGHT_DIR_INTERP.value TO LIGHT.direction DEF TINT_INTERP ColorInterpolator { key [ 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 ] keyValue [ 1 1 1, 0 0 0, 0 0 0, 1 1 0, 1 1 0, .5 .5 .5, .5 .5 .5, 1 0 0, 1 0 0, 1 1 1, 1 1 1, ] } ROUTE TIME_SENSOR.fraction TO TINT_INTERP.fraction ROUTE TINT_INTERP.value TO TINTED_TEX.tintColor DEF GRADIENT_INTERP CoordinateInterpolator { key [ 0 .1 .35 .45 .7 .75 1 ] keyValue [ 1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1, 0 0 0, 0 0 0, 1 1 1, 1 1 1, 0 0 0, 0 0 0, 0 0 0, 0 0 0, 1 1 1, 1 1 1, 0 0 0, 0 0 0, 1 1 1, 1 1 1, .1 .1 .1, .1 .1 .1, 1 1 1, 1 1 1, 1 1 1, 1 1 1, .1 .1 .1, .1 .1 .1, 1 1 1, 1 1 1, 1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1 1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1 ] } ROUTE TIME_SENSOR.fraction TO GRADIENT_INTERP.fraction ROUTE GRADIENT_INTERP.value TO GRADIENT_TEX.gradientColors