Interaction System [Draft]
Functions in space
Todo
This page is not the final version. We have now just included the features we want to implement in the future and what kinds of the standard we want to define.
Interactions are functions invoked by the interface that run on the client side and modify the space through the trace.
The interaction function can run in three cases:
-
On asset load Triggered once when the corresponding asset is loaded into the space. It can only change the corresponding model’s animation, and the interaction must specify the animation name.
-
On interface call Triggered by the interface, for example on mouse click or hover, or through avatar actions and positions.
-
On space load Triggered when the space itself is loaded. It can only change a predefined list of visual properties of the space.
The interaction function, once called, can modify the following:
-
Trace or Subtrace Add the corresponding history
Storyor modifyStateforTraceandSubtrace.Storyentries in aSubtraceare typically more detailed. -
Run-time loading Add a new entry to
StateinSubtracewith a new address to temporarily load an asset, where theextrafield is anEmbeddingobject. Such assets remain in the space only during the current run-time, while the interaction function is active, or up to 10 minutes if the asset is not in the user’s inventory. -
Interface Modify the interface, for example by showing a pop-up window, playing a model animation, or playing a specific music track.
-
Other interactions Call other interaction functions. A chain of interactions can run for a maximum of 10 minutes in total.