Skip to main content

Abstract Class: LivelinkBase<EntityType, SceneType, SessionType>

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:64

Shared implementation of a livelink client facade.

Owns the connection to the core, the wiring of the core event listeners to the session and the scene, and the update/broadcast loop that flushes dirty entities and scene settings to the server.

Each SDK derives its own facade from this class:

  • the browser SDK adds the streaming, rendering and input layers,
  • the headless agent SDK exposes it almost as-is.

Extended by​

Type Parameters​

Type Parameter
EntityType extends Entity
SceneType extends SceneBase<EntityType>
SessionType extends Session

Implements​

Properties​

PropertyModifierTypeDescription
sessionreadonlySessionTypeThe session this instance is connected to.
scenereadonlySceneTypeThe scene the current session is running.

Accessors​

_api_url​

Set Signature​

set static _api_url(url: string): void;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:82

Parameters​
ParameterType
urlstring
Returns​

void


activity_watcher​

Get Signature​

get activity_watcher(): ActivityWatcher;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:120

The activity watcher disconnects the session if no activity is detected for a certain amount of time.

Returns​

ActivityWatcher


latency​

Get Signature​

get latency(): number;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:127

The latency of the connection in milliseconds.

Returns​

number

Methods​

disconnect()​

disconnect(): Promise<void>;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:192

Disconnect from the server and release the core resources.

Note that the session is not closed, it can be reconnected later. Safe to call multiple times.

Returns​

Promise<void>


startSimulation()​

startSimulation(): void;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:210

Send a script event to the server to start the simulation.

Returns​

void


pauseSimulation()​

pauseSimulation(): void;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:217

Send a script event to the server to pause the simulation.

Returns​

void


stopSimulation()​

stopSimulation(): void;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:224

Send a script event to the server to stop the simulation.

Returns​

void


sendSkeletonPose()​

sendSkeletonPose(params: {
controller: EntityType;
partial_pose: SkeletonPartialPose;
}): void;

Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:235

Send a partial skeleton pose targeting a specific animation controller.

Parameters​

ParameterTypeDescription
params{ controller: EntityType; partial_pose: SkeletonPartialPose; }-
params.controllerEntityTypeThe entity having the animation controller component.
params.partial_poseSkeletonPartialPoseThe partial pose to send.

Returns​

void