@mml-io/3d-web-client-core 0.6.0 → 0.7.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.
@@ -1,4 +1,4 @@
1
- import * as THREE from "three";
1
+ import { Texture, MeshBasicMaterial } from "three";
2
2
  type RGBA = {
3
3
  r: number;
4
4
  g: number;
@@ -20,12 +20,12 @@ type CanvasTextOptions = {
20
20
  };
21
21
  export declare function CanvasText(message: string, options: CanvasTextOptions): HTMLCanvasElement;
22
22
  export declare function THREECanvasTextTexture(text: string, options: CanvasTextOptions): {
23
- texture: THREE.Texture;
23
+ texture: Texture;
24
24
  width: number;
25
25
  height: number;
26
26
  };
27
27
  export declare function THREECanvasTextMaterial(text: string, options: CanvasTextOptions): {
28
- material: THREE.MeshBasicMaterial;
28
+ material: MeshBasicMaterial;
29
29
  width: number;
30
30
  height: number;
31
31
  };
@@ -33,7 +33,6 @@ export declare class LocalController {
33
33
  private vectorDown;
34
34
  private rotationOffset;
35
35
  private azimuthalAngle;
36
- private tempBox;
37
36
  private tempMatrix;
38
37
  private tempSegment;
39
38
  private tempVector;
@@ -1,16 +1,26 @@
1
1
  import { MElement } from "mml-web";
2
- import { Box3, Group, Line3, Ray, Scene } from "three";
3
- import { MeshBVH, MeshBVHVisualizer } from "three-mesh-bvh";
2
+ import { Group, Line3, Matrix4, Ray, Scene } from "three";
3
+ import { MeshBVH } from "three-mesh-bvh";
4
4
  type CollisionMeshState = {
5
+ matrix: Matrix4;
5
6
  source: Group;
6
7
  meshBVH: MeshBVH;
7
- visualizer: MeshBVHVisualizer | null;
8
+ debugGroup?: Group;
9
+ trackCollisions: boolean;
8
10
  };
9
11
  export declare class CollisionsManager {
10
12
  private debug;
11
13
  private scene;
12
14
  private tempVector;
13
15
  private tempVector2;
16
+ private tempVector3;
17
+ private tempRay;
18
+ private tempMatrix;
19
+ private tempMatrix2;
20
+ private tempBox;
21
+ private tempEuler;
22
+ private tempSegment;
23
+ private tempSegment2;
14
24
  collisionMeshState: Map<Group, CollisionMeshState>;
15
25
  private collisionTrigger;
16
26
  constructor(scene: Scene);
@@ -20,6 +30,6 @@ export declare class CollisionsManager {
20
30
  updateMeshesGroup(group: Group): void;
21
31
  removeMeshesGroup(group: Group): void;
22
32
  private applyCollider;
23
- applyColliders(tempSegment: Line3, radius: number, boundingBox: Box3): void;
33
+ applyColliders(tempSegment: Line3, radius: number): void;
24
34
  }
25
35
  export {};