BooleanToggle maintains state and negates output when a true input is provided.
The BooleanToggle node belongs to the EventUtilities component and requires at least level 1, its default container field is children. It is available from X3D version 3.0 or higher.
1 2 3 + X3DNode + X3DChildNode + BooleanToggle
If input event set_boolean is true, flip state by negating current value of the toggle field
- For logical consistency, input event set_boolean false has no effect (under review as part of Mantis issue 519).
- It is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.
Persistent state value that gets toggled or reset.
- Directly setting a new value for the toggle field generates a corresponding toggle_changed output event.