#VRML V2.0 utf8

# It should be possible to switch on the PointLight with both clicking
# on the Sphere and on the Text. If only one of the objects are
# clickable, fan-in is probably broken.

Group {
   children [
      Transform {
         children [
            DEF light PointLight {
               intensity 1
               on FALSE
            }

            Transform {
               translation -2 0 -2
               children [
                  Shape {
                     appearance Appearance {
                        material Material {
                           diffuseColor 1 0 1
                           specularColor 1 1 1
                           shininess 0.9
                        }
                     }
                     geometry Sphere { }
                  }
                  DEF touchsensor0 TouchSensor { }
               ]
            }
         ]
      }
      Transform {
         children [
            Shape {
               appearance Appearance {
                  material Material { emissiveColor 1 1 0 }
               }
               geometry Text { string "CLICK" }
            }
            DEF touchsensor1 TouchSensor { }
         ]
      }
   ]
   ROUTE touchsensor0.isActive TO light.set_on
   ROUTE touchsensor1.isActive TO light.set_on
}
