[time] , <<VRML 2.0 - An Introductory view by examples

TimeSensor

[example]                                                       [run]

time sensors generate time events (seconds) as time passes. The absolute time is the number of seconds since midnight GMT January 1, 1970.

{
exposedField SFTime cycleInterval 1 # value in seconds
exposedField SFBool enabled TRUE # enables the sensor
exposedField SFBool loop FALSE # allows loops with start,stopTime
exposedField SFTime startTime 0 # begin of events generation
exposedField SFTime stopTime 0 # end of events generation
eventOut SFTime cycleTime # generates event at startTime and each new cycle
eventOut SFFloat fraction_changed # continous event completed cycle fraction
eventOut SFBool isActive # becomes TRUE when TimeSensor begins running
eventOut SFTime time # absolute time for a given simulation tick
}