| 1 |
#VRML V2.0 utf8 |
| 2 |
|
| 3 |
# It should be possible to switch on the PointLight with both clicking |
| 4 |
# on the Sphere and on the Text. If only one of the objects are |
| 5 |
# clickable, fan-in is probably broken. |
| 6 |
|
| 7 |
Group { |
| 8 |
children [ |
| 9 |
Transform { |
| 10 |
children [ |
| 11 |
DEF light PointLight { |
| 12 |
intensity 1 |
| 13 |
on FALSE |
| 14 |
} |
| 15 |
|
| 16 |
Transform { |
| 17 |
translation -2 0 -2 |
| 18 |
children [ |
| 19 |
Shape { |
| 20 |
appearance Appearance { |
| 21 |
material Material { |
| 22 |
diffuseColor 1 0 1 |
| 23 |
specularColor 1 1 1 |
| 24 |
shininess 0.9 |
| 25 |
} |
| 26 |
} |
| 27 |
geometry Sphere { } |
| 28 |
} |
| 29 |
DEF touchsensor0 TouchSensor { } |
| 30 |
] |
| 31 |
} |
| 32 |
] |
| 33 |
} |
| 34 |
Transform { |
| 35 |
children [ |
| 36 |
Shape { |
| 37 |
appearance Appearance { |
| 38 |
material Material { emissiveColor 1 1 0 } |
| 39 |
} |
| 40 |
geometry Text { string "CLICK" } |
| 41 |
} |
| 42 |
DEF touchsensor1 TouchSensor { } |
| 43 |
] |
| 44 |
} |
| 45 |
] |
| 46 |
ROUTE touchsensor0.isActive TO light.set_on |
| 47 |
ROUTE touchsensor1.isActive TO light.set_on |
| 48 |
} |