searches the current version of every section · esc to close

35 Interaction

#todo


interface ArtifactAttachments {
	interaction: InteractionAttachment[], // OPTIONAL
	// ...
}

interface InteractionAttachment {
    name: string; // REQUIRED must be unique in artifact
    cues?: string[]; // OPTIONAL
    play: InteractionPlay; // REQUIRED
}

interface InteractionPlay {
	js: string // OPTIONAL
	system: string // OPTIONAL
	// ...
}

interface InteractionIndex {
	artifactId: string // OPTIONAL
	interactionName: string; // REQUIRED
} // for other module to refrance a interaction.

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:

  1. 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.

  2. On interface call Triggered by the interface, for example on mouse click or hover, or through avatar actions and positions.

  3. 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:

  1. Trace or Subtrace Add the corresponding history Story or modify State for Trace and Subtrace. Story entries in a Subtrace are typically more detailed.

  2. Run-time loading Add a new entry to State in Subtrace with a new address to temporarily load an asset, where the extra field is an Embedding object. 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.

  3. Interface Modify the interface, for example by showing a pop-up window, playing a model animation, or playing a specific music track.

  4. Other interactions Call other interaction functions. A chain of interactions can run for a maximum of 10 minutes in total.

Revision history

  1. v0.1.52This updates a list of to-do documents and outlines the shape of the standard. Some important type shapes have been defined on the to-do documents as proposed types. All the to-do documents are marked with the tag #todo.view