viral-viewer-2 6.4.8 → 6.5.0

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.
@@ -24,6 +24,7 @@ export declare class ViralCamera {
24
24
  restoreState(state: ViralViewerState): void;
25
25
  clientToWorld(): import("three").Intersection<Object3D<import("three").Object3DEventMap>>[] | null;
26
26
  worldToClient(point: Vector3): Vector3 | null;
27
+ worldToClient2(point: Vector3): Vector3 | null;
27
28
  private castRay;
28
29
  updateMainCamera(): void;
29
30
  private cameraWakeQueuedEvents;
@@ -1,4 +1,4 @@
1
- import { Vector3 } from "three";
1
+ import { Object3D, Vector3 } from "three";
2
2
  import { ViralViewerApi } from "../..";
3
3
  export declare class ViralAvatar {
4
4
  private viralViewerApi;
@@ -6,7 +6,7 @@ export declare class ViralAvatar {
6
6
  private mixer;
7
7
  private idleAnimation;
8
8
  private walkAnimation;
9
- private avatar;
9
+ avatar: Object3D | null;
10
10
  private destination;
11
11
  isReady: boolean;
12
12
  name: string;
package/dist/index.mjs CHANGED
@@ -23276,6 +23276,14 @@ class O2 {
23276
23276
  }
23277
23277
  return null;
23278
23278
  }
23279
+ worldToClient2(e) {
23280
+ if (this.camera) {
23281
+ e.project(this.camera);
23282
+ const t = (e.x + 1) / 2 * this.viralViewerApi.viralRenderer.renderer.domElement.clientWidth, i = -(e.y - 1) / 2 * this.viralViewerApi.viralRenderer.renderer.domElement.clientHeight;
23283
+ return new G(t, i, 0);
23284
+ }
23285
+ return null;
23286
+ }
23279
23287
  castRay(e) {
23280
23288
  return this.camera && this.raycaster && this.viralViewerApi.viralMouse ? (this.camera.updateMatrixWorld(!0), this.raycaster.setFromCamera(
23281
23289
  this.viralViewerApi.viralMouse.position,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viral-viewer-2",
3
- "version": "6.4.8",
3
+ "version": "6.5.0",
4
4
  "description": "",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",