Portal Types
SnapTarget
The list of possible snap targets.
"ground"
means that the dragged bot should snap to the ground plane. This option is overriden by "grid"."grid"
means that the dragged bot should snap to grid tiles."face"
means that the dragged bot should snap to other bot faces."bots"
means that the dragged bot will snap to other bots.
SnapPoint
SnapAxis
Defines an interface that represents a snap axis. That is, a ray in 3D space with an associated snap distance.
Members
direction Vector3
The 3D direction that the axis ray travels along.
interface Vector3 {
x: number;
y: number;
z: number;
}distance number
The distance from the ray line that the snap point should take effect at.
origin Vector3
The 3D position that the ray starts at.
interface Vector3 {
x: number;
y: number;
z: number;
}
AddDropSnapAction
Defines a base interface for actions that can add drop snap points.
Members
botId? string
The ID of the bot that, when it is a drop target, the snap points should be enabled. If null, then the targets apply globally during the drag operation.
type string
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
AddDropSnapPointsAction
An event that is used to add some snap points for a drag operation.
Members
botId? string
The ID of the bot that, when it is a drop target, the snap points should be enabled. If null, then the targets apply globally during the drag operation.
targets SnapTarget[]
The list of snap targets that should be used.
type "add_drop_snap_targets"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
AnalyticsRecordEventAction
An action that is used to record an event for analytics.
Members
metadata any
The metadata for the event.
name string
The name of the event.
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
taskId (string | number)
The ID of the async task.
type "analytics_record_event"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
BufferFormAddressGLTFAction
Defines an event that requests the pre-caching of a GLTF mesh.
Members
address string
The address that should be buffered.
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
taskId (string | number)
The ID of the async task.
type "buffer_form_address_gltf"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
CalculateRayFromCameraAction
Defines an event that calculates a ray for the given portal from the given viewport coordinates.
Members
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
portal CameraPortal
The portal that the ray should be calculated for.
taskId (string | number)
The ID of the async task.
type "calculate_camera_ray"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
CalculateScreenCoordinatesFromViewportCoordinatesAction
Defines an event that calculates the 2D screen coordinates from the given 2D viewport coordinates.
Members
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
portal CameraPortal
The portal that the ray should be calculated for.
taskId (string | number)
The ID of the async task.
type "calculate_screen_coordinates_from_viewport_coordinates"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
CalculateViewportCoordinatesFromPositionAction
Defines an event that calculates the 2D viewport coordinates from the given 3D position.
Members
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
portal CameraPortal
The portal that the ray should be calculated for.
taskId (string | number)
The ID of the async task.
type "calculate_viewport_coordinates_from_position"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
CalculateViewportCoordinatesFromScreenCoordinatesAction
Defines an event that calculates the 2D viewport coordinates from the given 2D screen coordinates.
Members
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
portal CameraPortal
The portal that the ray should be calculated for.
taskId (string | number)
The ID of the async task.
type "calculate_viewport_coordinates_from_screen_coordinates"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
CameraPortal
The portals that contain a camera that can be raycasted from.
A CameraPortal can be one of the following values:
"grid"
"miniGrid"
"map"
"miniMap"
ConfigureWakeLockAction
An event that is used to enable/disable wake lock.
Members
enabled boolean
Whether the wake lock should be enabled.
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
taskId (string | number)
The ID of the async task.
type "configure_wake_lock"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
DefineGlobalBotAction
Defines an event that defines a global variable that points to the given bot.
Members
botId string
The ID of the bot that should be defined.
name string
The name of the global variable that should reference the bot.
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
taskId (string | number)
The ID of the async task.
type "define_global_bot"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
GetAverageFrameRateAction
Defines an event that retrieves the current average frame rate.
Members
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
taskId (string | number)
The ID of the async task.
type "get_average_frame_rate"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
GetRoomOptionsResult
The possible results for a "get room options" request.
A GetRoomOptionsResult can be one of the following values:
GetRoomRemoteOptionsFailure
Defines an interface that represents a failed "get room remote options" request.
Members
errorCode string
The error code that describes why the request failed.
errorMessage string
The error message that describes why the request failed.
remoteId string
The ID of the remote that the options were attempted to be retrieved from.
roomName string
The name of the room that the options were attempted to be retrieved from.
success false
GetRoomRemoteOptionsResult
The possible results for a "get room remote options" request.
A GetRoomRemoteOptionsResult can be one of the following values:
GetRoomRemoteOptionsSuccess
Defines an interface that represents a successful "get room remote options" request.
Members
options RoomRemoteOptions
The options that were retrieved.
remoteId string
The ID of the remote that the options were retrieved from.
roomName string
The name of the room that the options were retrieved from.
success true
GetRoomTrackOptionsFailure
Defines an interface that represents a failed "get room track options" request.
Members
address string
The address of the track that the options were attempted to be retrieved from.
errorCode string
The error code that describes why the request failed.
errorMessage string
The error message that describes why the request failed.
roomName string
The name of the room that the options were attempted to be retrieved from.
success false
GetRoomTrackOptionsResult
The possible results for a "get room track options" request.
A GetRoomTrackOptionsResult can be one of the following values:
GetRoomTrackOptionsSuccess
Defines an interface that represents a successful "get room track options" request.
Members
address string
The address of the track that the options were retrieved from.
options RoomTrackOptions
The options that were retrieved.
roomName string
The name of the room that the options were retrieved from.
success true
GetWakeLockConfigurationAction
An event that is used to retrieve the current wake lock configuration.
Members
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
taskId (string | number)
The ID of the async task.
type "get_wake_lock_configuration"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.
HideTooltipAction
An event that is used to hide tooltip messages.
Members
playerId? string
The ID of the player that created this task. Set by remote action handlers when a task is recieved from a remote player.
taskId (string | number)
The ID of the async task.
tooltipIds number[]
The IDs of the tooltips that should be hidden. If null, then all tooltips will be hidden.
type "hide_tooltip"
The type of the event. This helps determine how the event should be applied to the state.
uncopiable? boolean
Whether the action can be structure cloned. If true, then the action should not be passed across message ports without special handling.