Light with switch

  • Email
  • Sharebar
  • Email
Andy's picture

After much thinking and planning, I have finally implemented an initial behaviour framework. Behaviour is different to animation. But it may also have effect of animation. In this blog, I have programmed a desk lamp -- a spotlight with a switch. You can click on the switch to switch on and off the light. When you do, you can also hear a switch sound, so have your speakers turned on to enjoy the virtual simulation of light, shadow and sound.

The 3D world below includes a three-face room corner, a Vika Byske Table, a desk lamp, and 4 3D-objects on the desk. You can drag to rotate the world and view from different angle. To zoom in and out, please hold down the ALT key while dragging mouse pointer forward and back. Drag while holding down the CTRL key will pan the virtual world.

Below is the Logo program. You can copy and paste to the Logo Editor to try. Or you can download the Logo file at the end of this blog. This is a long program, but I have included comments to explain how it works. 

Please leave a comment and let me know what you think. cool

Fileslight_with_switch.x3d  light_with_switch.logo


mathskid's picture

I love user interaction

I love the new idea to add more user interraction into my programms. Thanks for egsaple and I'll use it soon.


Andy's picture

The behaviour framework

Welcome back MathsKid. You can check out this forum post for more details about Event and Action.


Facebook Comments Box