Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.4

Bring Colours to Your Life.

X3D Reference

TimeSensor

TimeSensor

TimeSensor continuously generates events as time passes. Typical use: ROUTE thisTimeSensor.fraction_changed TO someInterpolator.set_fraction. Interchange profile hint: TimeSensor may be ignored if cycleInterval < 0.01 second.

The TimeSensor node belongs to the Time component and its container field is children. It is available since X3D version 3.0 or later.

Hierarchy

* Derived from multiple interfaces.

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Metadata are not part of the X3D world and not interpreted by the X3D browser, but they can be accessed via the ECMAScript interface.

SFBool [in, out] enabled TRUE

Enables/disables node operation.

SFTime [in, out] cycleInterval 1 (0,∞)

CycleInterval is loop duration in seconds. Interchange profile hint: TimeSensor may be ignored if cycleInterval < 0.01 second.

Warning

An active TimeSensor node ignores set_cycleInterval and set_startTime events.

SFBool [in, out] loop FALSE

Repeat indefinitely when loop=true, repeat only once when loop=false.

SFTime [in, out] startTime(-∞,∞)

When time now >= startTime, isActive becomes true and TimeSensor becomes active. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT.

Hint

Usually receives a ROUTEd time value.

SFTime [in, out] resumeTime

When resumeTime becomes <= time now, isPaused becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT.

Hint

Usually receives a ROUTEd time value.

Warning

Not supported in VRML97.

SFTime [in, out] pauseTime(-∞,∞)

When time now >= pauseTime, isPaused becomes true and TimeSensor becomes paused. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT.

Hint

Usually receives a ROUTEd time value.

Warning

Not supported in VRML97.

SFTime [in, out] stopTime(-∞,∞)

When stopTime becomes <= time now, isActive becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT.

Hint

Usually receives a ROUTEd time value.

Warnings

An active TimeSensor node ignores set_cycleInterval and set_startTime events. An active TimeSensor node ignores set_stopTime event values less than or equal to startTime.

SFBool [out] isPaused

IsPaused true/false events are sent when TimeSensor is paused/resumed.

Warning

Not supported in VRML97.

SFBool [out] isActive

IsActive true/false events are sent when TimeSensor starts/stops running.

SFTime [out] cycleTime

CycleTime sends a time outputOnly at startTime, and also at the beginning of each new cycle (useful for synchronization with other time-based objects).

SFTime [out] elapsedTime

Current elapsed time since TimeSensor activated/running, cumulative in seconds, and not counting any paused time.

Warning

Not supported in VRML97.

SFFloat [out] fraction_changed

Fraction_changed continuously sends value in range [0,1] showing time progress in the current cycle.

SFTime [out] time

Time continuously sends the absolute time (since January 1, 1970) for a given simulation tick.

Example

TimeSensor

XML Encoding

Classic Encoding

JSON Encoding

Browser Compatibility

Titania X_ITE
yes yes

Cookies and other Technologies

By clicking »Accept« or continuing to use the site, you agree to the use of CREATE3000 and third-party cookies and other similar technologies to enhance your browsing experience, analyze and measure your engagement with our content, and provide more relevant ads on CREATE3000 websites and others. Learn more about cookies. You can withdraw your consent at any time.