Statechart
The statechart is defined as a json document according to Xstate formalism.
In particular, the following types of native xstate action can be used:
"xstate.raise" to send an internal event with attribute "event" defining the event (a string with the event name or an object with attributes "type" for the event name and any additional payload)
In addition, the following customized types of action can be defined:
"ActionShow" ("show") to make appear the asset "target" in a given place. Additional attributes are: "position" (array), "rotation" (array), "placementRelTo" (string), "delay" (milliseconds as integer).
"ActionHide" ("hide") to hide the asset "target". Additional attributes are: "delay" (milliseconds as integer).
"ActionMoveTo" ("moveTo") to move the asset "target" to a given place. Additional attributes are: "position" (array), "rotation" (array), "placementRelTo" (string), "delay" (milliseconds as integer), "duration" (milliseconds as integer).
"ActionMoveAdditive" ("moveAdditive") to move the asset "target" incrementally from the current place. Additional attributes are: "position" (array), "rotation" (array), "delay" (milliseconds as integer), "duration" (milliseconds as integer), "loop" (boolean, set to true if the movement must be repeated in loop).
"ActionSurfaceVelocity" ("surfaceVelocity") to set the surface velocity of asset "target". Additional attributes are: "velocity" (array), "delay" (milliseconds as integer).
"ActionGenerateAsset" ("genAsset") to generate a new asset modeled after the asset "target". Additional attributes are: "position" (array), "rotation" (array), "placementRelTo" (string), "delay" (milliseconds as integer).
"ActionSetRepresentation" ("setRepresentation") to set the representation (3D model) of the asset "target". Additional attributes are: "reprref" (string) to set the URI reference of the 3D model, "color" (array) to set the RGB color, "intensity" (double ≥ 0) to set the color emissive intensity, "blink" (milliseconds as integer) to set the blinking interval, "delay" (milliseconds as integer).
"EventGeneration" ("sendEvent") to generate an event with" attribute "event" defining the event (a string with the event name or an object with attributes "type" for the event name and any additional payload), "to" specifying the id of the statechart receiving the event (optional, if missing it is sent to the same statechart that contains the action), "delay" (optional delay in milliseconds as integer).
Last updated
Was this helpful?