LivelinkCore
@3dverse/livelink / LivelinkCore
Class: LivelinkCore
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:24
The LivelinkCore is the main entry point to the Livelink API.
It implements the communication protocol with the 3dverse server.
It has two main responsibilities:
- It manages the connection to the 3dverse server.
- It provides methods to interact with the 3dverse server as defined in the Livelink protocol.
An activity watcher is embedded to monitor the activity of the client. If the client is inactive for a certain amount of time, the connection is closed. See ActivityWatcher.
Extends
TypedEventTarget
<CoreEvents
>
Constructors
new LivelinkCore()
new LivelinkCore():
LivelinkCore
Returns
Inherited from
TypedEventTarget<CoreEvents>.constructor
Accessors
activity_watcher
Get Signature
get activity_watcher():
ActivityWatcher
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:29
Get the gateway activity watcher.
Returns
Methods
connect()
connect(
params
):Promise
<void
>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:37
Connect to the session
Parameters
params
session
The session to connect to. MUST be joinable.
editor_url
string
The URL of the editor.
Returns
Promise
<void
>
disconnect()
disconnect():
void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:44
Closes the connections to the 3dverse server.
Returns
void
sanitizeComponentValue()
sanitizeComponentValue<
_ComponentName
>(__namedParameters
):ComponentType
<_ComponentName
>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:48
Type Parameters
• _ComponentName extends keyof ComponentsRecord
Parameters
__namedParameters
component_name
_ComponentName
value
undefined
| Partial
<ComponentType
<_ComponentName
>>
Returns
ComponentType
<_ComponentName
>
setSimulationState()
setSimulationState(
params
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:58
Set the simulation state.
Parameters
params
state
"start_simulation"
| "pause_simulation"
| "stop_simulation"
The state of the simulation.
Returns
void
createEntities()
createEntities(
params
):Promise
<EntityCore
[]>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:72
Create entities.
Parameters
params
components
The components to use to create the entities.
delete_on_client_disconnection
boolean
Whether to delete the entities when the client disconnects.
is_transient
boolean
Whether the entities are transient.
Returns
Promise
<EntityCore
[]>
A promise that resolves to the created entities.
Throws
If any entity could not be created.
updateEntities()
updateEntities(
__namedParameters
):Promise
<void
>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:80
Update entities.
Parameters
__namedParameters
update_commands
persist
boolean
Returns
Promise
<void
>
findEntities()
findEntities(
__namedParameters
):Promise
<EntityResponse
[]>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:87
Find entities based on a query.
Parameters
__namedParameters
query
options
{ include_ancestors
: boolean
; }
options.include_ancestors
boolean
Whether to include the ancestors of the found entities. This will incur an additional query to fetch the ancestors for each entity found.
Returns
Promise
<EntityResponse
[]>
configureClient()
configureClient(
params
):Promise
<ClientConfigResponse
>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:100
Send the configuration requested by the client.
Parameters
params
client_config
The configuration requested by the client.
Returns
Promise
<ClientConfigResponse
>
sendInputState()
sendInputState(
params
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:112
Send the input state of an input device.
Parameters
params
input_state
The input state of the input device.
Returns
void
resize()
resize(
params
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:124
Resize the remote rendering surface.
Parameters
params
size
The new size of the remote rendering surface.
Returns
void
suspend()
suspend():
void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:130
Suspend the rendering client. The server won't send any more frames until the client is resumed.
Returns
void
resume()
resume():
void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:134
Resume the rendering client.
Returns
void
setViewports()
setViewports(
params
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:141
Set the viewports configuration of the current client.
Parameters
params
viewport_configs
The viewports configuration.
Returns
void
castScreenSpaceRay()
castScreenSpaceRay(
params
):Promise
<ScreenSpaceRayResponse
>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:154
Cast a screen space ray.
Parameters
params
screenSpaceRayQuery
The screen space ray query.
Returns
Promise
<ScreenSpaceRayResponse
>
A promise that resolves to the screen space ray result.
highlightEntities()
highlightEntities(
params
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:163
Mark entities as selected.
Parameters
params
highlightEntitiesMessage
The message to highlight entities.
Returns
void
fireEvent()
fireEvent(
fireEventMessage
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:171
11 - Fire an event.
Parameters
fireEventMessage
The message to fire an event.
Returns
void
setFilter()
setFilter(
setFilterMessage
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:179
Experimental
16 - Set a filter.
Parameters
setFilterMessage
The message to set a filter.
Returns
void
removeFilter()
removeFilter(
removeFilterMessage
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:187
Experimental
17 - Remove a filter.
Parameters
removeFilterMessage
The message to remove a filter.
Returns
void
toggleFilter()
toggleFilter(
toggleFilterMessage
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:195
Experimental
18 - Toggle a filter.
Parameters
toggleFilterMessage
The message to toggle a filter.
Returns
void
assignClientToScript()
assignClientToScript(
assignClientToScriptMessage
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:201
20 - Assign a client to a script. The target script will consume the specified client's inputs.
Parameters
assignClientToScriptMessage
The message to assign a client to a script.
Returns
void
sendSkeletonPose()
sendSkeletonPose(
skeletonPoseMessage
):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:207
24 - Send a skeleton pose.
Parameters
skeletonPoseMessage
The message to send a skeleton pose.
Returns
void
deleteEntities()
deleteEntities(
params
):Promise
<void
>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:214
Delete entities.
Parameters
params
entity_uuids
UUID
[]
The UUIDs of the entities to delete.
Returns
Promise
<void
>
setEntityVisibility()
setEntityVisibility(
params
):Promise
<void
>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:224
Set the visibility of the specified entity.
Parameters
params
entity_rtid
The RTID of the entity to set the visibility.
is_visible
boolean
The visibility of the entity.
Returns
Promise
<void
>
getChildren()
getChildren(
params
):Promise
<EntityCore
[]>
Defined in: node_modules/@3dverse/livelink.core/dist/sources/LivelinkCore.d.ts:236
Resolve the children of the specified entity. Children are the direct children of the entity.
Parameters
params
entity_rtid
The RTID of the entity to resolve the children.
Returns
Promise
<EntityCore
[]>
A promise that resolves to the children of the entity or an empty array if the entity has no children.
addEventListener()
addEventListener<
_EventName
>(event_name
,listener
,options
?):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/TypedEventTarget.d.ts:9
Type Parameters
• _EventName extends "on-disconnected"
| "on-inactivity-warning"
| "on-activity-detected"
| "on-script-event-received"
| "on-frame-received"
| "on-asset-loading-status-received"
| "on-entities-updated"
| "on-entity-visibility-changed"
Parameters
event_name
_EventName
listener
(event
) => void
options?
boolean
| AddEventListenerOptions
Returns
void
Inherited from
TypedEventTarget.addEventListener
removeEventListener()
removeEventListener<
_EventName
>(event_name
,listener
,options
?):void
Defined in: node_modules/@3dverse/livelink.core/dist/sources/TypedEventTarget.d.ts:13
Type Parameters
• _EventName extends "on-disconnected"
| "on-inactivity-warning"
| "on-activity-detected"
| "on-script-event-received"
| "on-frame-received"
| "on-asset-loading-status-received"
| "on-entities-updated"
| "on-entity-visibility-changed"
Parameters
event_name
_EventName
listener
(event
) => void
options?
boolean
| EventListenerOptions
Returns
void
Inherited from
TypedEventTarget.removeEventListener