Class: Livelink
Defined in: livelink.clients/livelink.agent/sources/Livelink.ts:22
The main class for connecting a headless agent to a 3dverse session.
Usage:
Livelink.start()to create a new sessionLivelink.join()to join an existing sessionLivelink.join_or_start()to join or create a session
Extends
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
session | readonly | Session | The session this instance is connected to. | LivelinkBase.session |
scene | readonly | Scene | The scene the current session is running. | LivelinkBase.scene |
Accessors
_api_url
Set Signature
set static _api_url(url: string): void;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:81
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
void
Inherited from
activity_watcher
Get Signature
get activity_watcher(): ActivityWatcher;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:119
The activity watcher disconnects the session if no activity is detected for a certain amount of time.
Returns
Inherited from
latency
Get Signature
get latency(): number;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:126
The latency of the connection in milliseconds.
Returns
number
Inherited from
Methods
start()
static start(__namedParameters: {
scene_id: UUID;
token: string;
is_transient?: boolean;
session_options?: Record<string, boolean>;
onProgress?: LivelinkProgressCallback;
}): Promise<Livelink>;
Defined in: livelink.clients/livelink.agent/sources/Livelink.ts:26
Creates a new session and connects to it.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { scene_id: UUID; token: string; is_transient?: boolean; session_options?: Record<string, boolean>; onProgress?: LivelinkProgressCallback; } |
__namedParameters.scene_id | UUID |
__namedParameters.token | string |
__namedParameters.is_transient? | boolean |
__namedParameters.session_options? | Record<string, boolean> |
__namedParameters.onProgress? | LivelinkProgressCallback |
Returns
Promise<Livelink>
join_or_start()
static join_or_start(__namedParameters: {
scene_id: UUID;
token: string;
session_selector?: (__namedParameters: {
sessions: SessionInfo[];
}) => SessionInfo | null;
is_transient?: boolean;
session_options?: Record<string, boolean>;
onProgress?: LivelinkProgressCallback;
}): Promise<Livelink>;
Defined in: livelink.clients/livelink.agent/sources/Livelink.ts:48
Connects to an existing session matching the given scene ID. If no session is found, a new session is created.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { scene_id: UUID; token: string; session_selector?: (__namedParameters: { sessions: SessionInfo[]; }) => SessionInfo | null; is_transient?: boolean; session_options?: Record<string, boolean>; onProgress?: LivelinkProgressCallback; } |
__namedParameters.scene_id | UUID |
__namedParameters.token | string |
__namedParameters.session_selector? | (__namedParameters: { sessions: SessionInfo[]; }) => SessionInfo | null |
__namedParameters.is_transient? | boolean |
__namedParameters.session_options? | Record<string, boolean> |
__namedParameters.onProgress? | LivelinkProgressCallback |
Returns
Promise<Livelink>
join()
static join(__namedParameters: {
session: | Session<Client>
| {
session_info: SessionInfo;
token: string;
};
onProgress?: LivelinkProgressCallback;
}): Promise<Livelink>;
Defined in: livelink.clients/livelink.agent/sources/Livelink.ts:92
Connects to an existing session.
The session can be provided either as a fully-constructed Session instance, or as a SessionInfo along with the authentication token to use against it.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { session: | Session<Client> | { session_info: SessionInfo; token: string; }; onProgress?: LivelinkProgressCallback; } |
__namedParameters.session | | Session<Client> | { session_info: SessionInfo; token: string; } |
__namedParameters.onProgress? | LivelinkProgressCallback |
Returns
Promise<Livelink>
startUpdateLoop()
startUpdateLoop(__namedParameters?: {
updatesPerSecond?: number;
broadcastsPerSecond?: number;
}): Promise<void>;
Defined in: livelink.clients/livelink.agent/sources/Livelink.ts:126
Starts the client update loop.
Each rate must be a finite number in the (0, 125] range so that the resulting interval is
at least 8 milliseconds.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { updatesPerSecond?: number; broadcastsPerSecond?: number; } |
__namedParameters.updatesPerSecond? | number |
__namedParameters.broadcastsPerSecond? | number |
Returns
Promise<void>
Throws
RangeError if a rate falls outside the accepted range.
disconnect()
disconnect(): Promise<void>;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:191
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>
Inherited from
startSimulation()
startSimulation(): void;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:206
Send a script event to the server to start the simulation.
Returns
void
Inherited from
pauseSimulation()
pauseSimulation(): void;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:213
Send a script event to the server to pause the simulation.
Returns
void
Inherited from
stopSimulation()
stopSimulation(): void;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:220
Send a script event to the server to stop the simulation.
Returns
void
Inherited from
sendSkeletonPose()
sendSkeletonPose(params: {
controller: Entity;
partial_pose: SkeletonPartialPose;
}): void;
Defined in: livelink.clients/livelink.base/sources/LivelinkBase.ts:231
Send a partial skeleton pose targeting a specific animation controller.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | { controller: Entity; partial_pose: SkeletonPartialPose; } | - |
params.controller | Entity | The entity having the animation controller component. |
params.partial_pose | SkeletonPartialPose | The partial pose to send. |
Returns
void