This part presents TimeSensor,
MotionSensor,
TouchSensor and
MediaSensor.
KeySensor and InputSensor are already presented in previous tutorial.
TimeSensor node generates
periodic values. It's a 'timer' and it is basis of most animations.
See TimeSensor documentation for
more informations about it.
In this tutorial, we would create a timer.
Timer displays time since the launch of the widget.
This tutorial require:
The text node:
The TimeSensor node:
Script to receive timer event and convert time in displayable value.
We use Math.floor() function to convert float value to integer value (See
Math class documentation).
Finally, link TimeSensor node and Script node, and link Script node and Text node:
Note:
See animation tutorials for more examples
about TimeSensor.
Note:
Audio and video functionalities depend of your mobile phone.
Note:
TouchSensor node requires
mobile phone with touchscreen.
Detects touch screen events on all Shapes included in the same Group in which
the TouchSensor is declared.
Note:
MotionSensor node requires
mobile phone with accelerometer.
Gives access to accelerometer data if available.