@3dverse/livelink.core 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -537,33 +537,18 @@ export type MeshRef = {
537
537
  */
538
538
  export type OrthographicLens = {
539
539
  /**
540
- * Left plane.
541
- * @defaultValue -1
542
- */
543
- left: Float;
544
- /**
545
- * Right plane.
546
- * @defaultValue 1
547
- */
548
- right: Float;
549
- /**
550
- * Top plane.
551
- * @defaultValue -1
540
+ * Zoom factor to apply to the projection.
541
+ * @defaultValue 1,1
552
542
  */
553
- top: Float;
554
- /**
555
- * Bottom plane.
556
- * @defaultValue 1
557
- */
558
- bottom: Float;
543
+ zoomFactor: Vec2;
559
544
  /**
560
545
  * Near plane.
561
- * @defaultValue -1
546
+ * @defaultValue 0
562
547
  */
563
548
  zNear: Float;
564
549
  /**
565
550
  * Far plane.
566
- * @defaultValue 1
551
+ * @defaultValue 100
567
552
  */
568
553
  zFar: Float;
569
554
  };
@@ -4,21 +4,27 @@
4
4
  * Activity is defined as any message sent to the gateway that is **not** a heartbeat.
5
5
  *
6
6
  * Internally the activity watcher uses two timeouts:
7
- * - Inactivity warning: the time in seconds after which the `on-warning` event is dispatched.
8
- * - Inactivity timeout: the time in seconds after which the `on-timeout` event is dispatched.
7
+ * - Inactivity warning: the time in seconds after which the {@link InactivityWarningEvent} event is dispatched.
8
+ * - Inactivity timeout: the time in seconds after which the {@link DisconnectedEvent} event is dispatched.
9
9
  *
10
- * The `on-timeout` event automatically triggers the disconnection from the gateway.
10
+ * Whenever an internal activity is detected like a message being sent to the gateway, the activity watcher is reset
11
+ * and a {@link ActivityDetectedEvent} event is dispatched.
11
12
  *
12
13
  * The application **should** listen to these events and act accordingly.
13
14
  *
14
- * Usually, when the `on-warning` event is dispatched, the application should display a warning to the user.
15
+ * Usually, when the {@link InactivityWarningEvent} event is dispatched, the application should display a warning to
16
+ * the user.
15
17
  * It is up to the application to decide what can be qualified as activity.
16
18
  * For example, the application could consider the user moving the mouse as activity. In this case, the application
17
19
  * would listen to the "mousemove" event and reset the activity watcher whenever the mouse is moved calling
18
- * the {@linkcode ActivityWatcher.reset} method.
20
+ * the {@link ActivityWatcher.reset} method.
19
21
  *
20
- * When the `on-timeout` event is dispatched, there is no way to recover the connection. The application should
21
- * display an error message to the user.
22
+ * The application should also listen to the {@link ActivityDetectedEvent} event and update the UI accordingly.
23
+ *
24
+ * Once the inactivity timeout is reached it automatically triggers the disconnection from the gateway, and a
25
+ * {@link DisconnectedEvent} is dispatched with `inactivity` as the reason.
26
+ * In this case, there is no way to recover the connection. The application should let the user know that the connection
27
+ * has been lost.
22
28
  *
23
29
  * @category Core
24
30
  */
@@ -19,6 +19,10 @@ import { EntityResponse, FindEntityOptions, FindEntityQuery, UpdateEntityCommand
19
19
  * If the client is inactive for a certain amount of time, the connection is closed.
20
20
  * See {@link ActivityWatcher}.
21
21
  *
22
+ * ## Events
23
+ *
24
+ * See {@link CoreEvents}.
25
+ *
22
26
  * @category Core
23
27
  */
24
28
  export declare class LivelinkCore extends TypedEventTarget<CoreEvents> {
@@ -27,6 +31,10 @@ export declare class LivelinkCore extends TypedEventTarget<CoreEvents> {
27
31
  * Get the gateway activity watcher.
28
32
  */
29
33
  get activity_watcher(): ActivityWatcher;
34
+ /**
35
+ * Get the latency of the connection in milliseconds.
36
+ */
37
+ get latency(): number;
30
38
  /**
31
39
  * Connect to the session
32
40
  *
@@ -149,7 +157,7 @@ export declare class LivelinkCore extends TypedEventTarget<CoreEvents> {
149
157
  *
150
158
  * @param params
151
159
  * @param params.screenSpaceRayQuery - The screen space ray query.
152
- * @returns A promise that resolves to the screen space ray result.
160
+ * @returns A promise that resolves to the screen space ray response.
153
161
  */
154
162
  castScreenSpaceRay({ screenSpaceRayQuery, }: {
155
163
  screenSpaceRayQuery: GatewayMessages.Queries.ScreenSpaceRayQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dverse/livelink.core",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "3dverse Livelink Core types.",
5
5
  "main": "./dist/library.cjs",
6
6
  "module": "./dist/library.mjs",