opengeometry 0.0.5 → 0.0.7

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.
package/index.d.ts CHANGED
@@ -1,22 +1,11 @@
1
- import { BasePolygon, Vector3 } from "../opengeometry/pkg/opengeometry";
2
- import * as THREE from "three";
3
- import { CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer.js";
4
- import { Pencil } from "./src/pencil";
1
+ import { Vector3 } from "../opengeometry/pkg/opengeometry";
5
2
  import { SpotLabel } from "./src/markup/spotMarker";
6
3
  import { OpenGeometryOptions } from "./src/base-types";
7
- import { Rectangle } from "./src/primitives/rectangle";
8
4
  export type OUTLINE_TYPE = "front" | "side" | "top";
9
5
  export declare class OpenGeometry {
10
- private camera;
11
6
  static version: string;
12
- protected scene: THREE.Scene | undefined;
13
- protected container: HTMLElement | undefined;
14
- private _pencil;
15
- private _labelRenderer;
7
+ static instance: OpenGeometry | null;
16
8
  private _enableDebug;
17
- set enablePencil(value: boolean);
18
- get pencil(): Pencil | undefined;
19
- get labelRenderer(): CSS2DRenderer | undefined;
20
9
  get enableDebug(): boolean;
21
10
  /**
22
11
  * Enables or disables debug mode for OpenGeometry.
@@ -28,7 +17,7 @@ export declare class OpenGeometry {
28
17
  * @param value - A boolean indicating whether to enable or disable debug mode.
29
18
  */
30
19
  set enableDebug(value: boolean);
31
- constructor(container: HTMLElement, threeScene: THREE.Scene, camera: THREE.Camera);
20
+ constructor();
32
21
  /**
33
22
  * Asynchronously creates and initializes an instance of OpenGeometry.
34
23
  *
@@ -52,50 +41,6 @@ export declare class OpenGeometry {
52
41
  */
53
42
  static create(options: OpenGeometryOptions): Promise<OpenGeometry>;
54
43
  private setup;
55
- private setuplabelRenderer;
56
- private setupEvent;
57
- /**
58
- * Updates the label renderer to render the scene with the given camera.
59
- * This method should be called in the animation loop or render loop of your application.
60
- * @param scene - The Three.js scene containing the objects to be rendered.
61
- * @param camera - The Three.js camera used for rendering the scene.
62
- */
63
- update(scene: THREE.Scene, camera: THREE.Camera): void;
64
- }
65
- export declare class BasePoly extends THREE.Mesh {
66
- ogid: string;
67
- layerVertices: Vector3[];
68
- layerBackVertices: Vector3[];
69
- polygon: BasePolygon | null;
70
- isTriangulated: boolean;
71
- constructor(vertices?: Vector3[]);
72
- addVertices(vertices: Vector3[]): void;
73
- resetVertices(): void;
74
- addVertex(threeVertex: Vector3): void;
75
- addHole(holeVertices: Vector3[]): void;
76
- addFlushBufferToScene(flush: string): void;
77
- extrude(height: number): void;
78
- generateExtrudedGeometry(extruded_buff: string): void;
79
- }
80
- export declare class RectanglePoly extends THREE.Mesh {
81
- ogid: string;
82
- polygon: BasePolygon | null;
83
- baseRectangle: Rectangle;
84
- isExtruded: boolean;
85
- constructor(baseRectangle: Rectangle);
86
- update(): void;
87
- generateGeometry(): void;
88
- addFlushBufferToScene(): void;
89
- clearGeometry(): void;
90
- extrude(height: number): void;
91
- generateExtrudedGeometry(extruded_buff: string): void;
92
- getOutline(type: OUTLINE_TYPE): THREE.Line<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.MeshBasicMaterial, THREE.Object3DEventMap> | undefined;
93
- }
94
- /**
95
- * Base Flat Mesh
96
- */
97
- export declare class FlatMesh extends THREE.Mesh {
98
- constructor(vertices: Vector3[]);
99
44
  }
100
45
  export { Vector3, SpotLabel, };
101
46
  export * from './src/primitives/';