File for dealing with wFunctions.
- Source:
Type Definitions
-
afterslchangeTriggerString
-
The "afterslchange" trigger means that the simple event will execute after the superlayer changes.
Type:
- "afterslchange"
- Source:
-
firstslupdateTriggerString
-
The "firstslupdate" trigger means that the simple event will execute during the first update of the simulation.
Type:
- "firstslupdate"
- Source:
-
keyTriggerString
-
The "key" trigger means that the simple event will execute if a key is pressed.
Type:
- "key"
- Source:
-
objclickTriggerString
-
The "objclick" trigger means that the simple event will execute if the mouse clicks on the trigger object. However, the "objclick_global" trigger means that the simple event will execute if the mouse clicks on any object in general.
Type:
- "objclick" | "objclick_global"
- Source:
-
objlinkTriggerString
-
The "objlink" trigger means that the simple event will execute if the trigger object is linked to another object by the objlink widget.
Type:
- "objlink"
- Source:
-
objMouseDownTriggerString
-
The "objmousedown" trigger means that the simple event call is executed if the mouse is being pushed down on the object. The "objmousedown_global" trigger means that the simple event will execute if the mouse clicks on any object in general.
Type:
- "objMouseDown" | "objmousedown_global"
- Source:
-
objmouseupTriggerString
-
The "objmouseup" trigger means that the simple event will execute when the mouse is let go of while the mouse is over an object. The "objmouseup_global" trigger means that the simple event will execute if the mouse is let go of while it is over an object.
Type:
- "objmouseup" | "objmouseup_global"
- Source:
-
sensorTriggerString
-
The "sensor" trigger means that the simple event will execute if the trigger object collides with an object that shares at least one of the sensor classes. However, the "sensor_global" trigger means that the function will execute if any two objects that share at least one sensor class collides.
Type:
- "sensor" | "sensor_global"
- Source:
-
timeTriggerString
-
The "time" trigger means that the simple event will execute by some interval of time.
Type:
- "time"
- Source:
-
WFunction()
-
A widget function is a function that used for the
WidgetFunctionwidget. The "this" keyword in the body of function usually refers to the current instance of PhSim simulation or references an instance of PhSim.DynObject.To learn more, see the Widget Functions
- Source:
Properties:
Name Type Argument Description _optionsfunction Options used to create WFunction
_reffunction | Number _nameString <optional>
WFunction name
_bodyFunctionfunction Body Function
_eventclassString Event class
-
WFunctionBody(e)
-
This:
Parameters:
Name Type Description eEvent event object
- Source:
-
WFunctionOptions
-
Properties for a simple event. The simple event options is an Object that is used for the PhSim#createWFunction function. They are also used to configure various types of widgets. Especially widgets that utilize wFunctions.
Type:
- Object
- Source:
Properties:
Name Type Argument Description keyKeyBoard <optional>
The event.key value for triggering a simple event.
timeNumber <optional>
The time interval between a repeated event or a delay time for timeouts.
maxNNumber <optional>
The maximum number of times a repeated SimpleEvent can be executed.
wFunctionObjPhSim.DynObject <optional>
An object being affected by the wFunction.
nameString <optional>
The name of the wFunction
-
wFunctionTrigger
-
The simple event trigger string is a string defining WFunctionOptions.trigger
Type:
- keyTriggerString | sensorTriggerString | objclickTriggerString | objMouseDownTriggerString | firstslupdateTriggerString | objmouseupTriggerString | objlinkTriggerString | afterslchangeTriggerString | timeTriggerString
- Source: