@inweb/viewer-three 26.4.1 → 26.5.1

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.
Files changed (60) hide show
  1. package/dist/plugins/components/AxesHelperComponent.js +65 -0
  2. package/dist/plugins/components/AxesHelperComponent.js.map +1 -0
  3. package/dist/plugins/components/AxesHelperComponent.min.js +1 -0
  4. package/dist/plugins/components/AxesHelperComponent.module.js +39 -0
  5. package/dist/plugins/components/AxesHelperComponent.module.js.map +1 -0
  6. package/dist/plugins/components/ExtentsHelperComponent.js +55 -0
  7. package/dist/plugins/components/ExtentsHelperComponent.js.map +1 -0
  8. package/dist/plugins/components/ExtentsHelperComponent.min.js +1 -0
  9. package/dist/plugins/components/ExtentsHelperComponent.module.js +29 -0
  10. package/dist/plugins/components/ExtentsHelperComponent.module.js.map +1 -0
  11. package/dist/plugins/components/LightHelperComponent.js +65 -0
  12. package/dist/plugins/components/LightHelperComponent.js.map +1 -0
  13. package/dist/plugins/components/LightHelperComponent.min.js +1 -0
  14. package/dist/plugins/components/LightHelperComponent.module.js +40 -0
  15. package/dist/plugins/components/LightHelperComponent.module.js.map +1 -0
  16. package/dist/plugins/loaders/IFCXLoader.js +887 -0
  17. package/dist/plugins/loaders/IFCXLoader.js.map +1 -0
  18. package/dist/plugins/loaders/IFCXLoader.min.js +1 -0
  19. package/dist/plugins/loaders/IFCXLoader.module.js +726 -0
  20. package/dist/plugins/loaders/IFCXLoader.module.js.map +1 -0
  21. package/dist/viewer-three.js +61151 -44369
  22. package/dist/viewer-three.js.map +1 -1
  23. package/dist/viewer-three.min.js +2 -7
  24. package/dist/viewer-three.module.js +209 -92
  25. package/dist/viewer-three.module.js.map +1 -1
  26. package/lib/Viewer/Viewer.d.ts +51 -68
  27. package/lib/Viewer/commands/index.d.ts +1 -1
  28. package/lib/Viewer/components/{ExtentsHelperComponent.d.ts → RoomEnvironmentComponent.d.ts} +2 -4
  29. package/lib/Viewer/loaders/GLTFFileLoader.d.ts +9 -0
  30. package/lib/Viewer/loaders/GLTFLoadingManager.d.ts +9 -3
  31. package/lib/Viewer/loaders/GLTFModelLoader.d.ts +8 -0
  32. package/lib/Viewer/loaders/index.d.ts +67 -0
  33. package/lib/index-umd.d.ts +1 -0
  34. package/lib/index.d.ts +6 -4
  35. package/package.json +10 -7
  36. package/{src/Viewer → plugins}/components/AxesHelperComponent.ts +4 -4
  37. package/{src/Viewer → plugins}/components/ExtentsHelperComponent.ts +4 -4
  38. package/{src/Viewer → plugins}/components/LightHelperComponent.ts +4 -4
  39. package/plugins/loaders/IFCX/IFCXLoader.ts +71 -0
  40. package/plugins/loaders/IFCX/render.js +701 -0
  41. package/plugins/loaders/IFCXFileLoader.ts +76 -0
  42. package/plugins/loaders/IFCXLoader.ts +30 -0
  43. package/plugins/loaders/IFCXModelLoader.ts +75 -0
  44. package/src/Viewer/Viewer.ts +101 -148
  45. package/src/Viewer/commands/Explode.ts +2 -2
  46. package/src/Viewer/commands/index.ts +1 -1
  47. package/src/Viewer/components/BackgroundComponent.ts +1 -9
  48. package/src/Viewer/components/CameraComponent.ts +5 -1
  49. package/src/Viewer/components/ExtentsComponent.ts +1 -2
  50. package/src/Viewer/components/LightComponent.ts +6 -4
  51. package/src/Viewer/components/RoomEnvironmentComponent.ts +47 -0
  52. package/src/Viewer/components/index.ts +4 -8
  53. package/src/Viewer/loaders/GLTFFileLoader.ts +73 -0
  54. package/src/Viewer/loaders/GLTFLoadingManager.ts +16 -8
  55. package/src/Viewer/loaders/GLTFModelLoader.ts +74 -0
  56. package/src/Viewer/loaders/index.ts +99 -0
  57. package/src/index-umd.ts +30 -0
  58. package/src/index.ts +9 -5
  59. package/lib/Viewer/components/AxesHelperComponent.d.ts +0 -10
  60. package/lib/Viewer/components/LightHelperComponent.d.ts +0 -9
@@ -21,7 +21,7 @@
21
21
  // acknowledge and accept the above terms.
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
- import { AmbientLight, DirectionalLight, Sphere } from "three";
24
+ import { AmbientLight, DirectionalLight, Sphere, Vector3 } from "three";
25
25
 
26
26
  import { IComponent } from "@inweb/viewer-core";
27
27
  import type { Viewer } from "../Viewer";
@@ -41,7 +41,7 @@ export class LightComponent implements IComponent {
41
41
  this.directionalLight.position.set(0.5, 0, 0.866); // ~60º
42
42
  this.viewer.scene.add(this.directionalLight);
43
43
 
44
- this.viewer.addEventListener("geometryend", this.geometryEnd);
44
+ this.viewer.addEventListener("databasechunk", this.geometryEnd);
45
45
  this.viewer.addEventListener("clear", this.geometryEnd);
46
46
  }
47
47
 
@@ -52,7 +52,7 @@ export class LightComponent implements IComponent {
52
52
  this.directionalLight.removeFromParent();
53
53
  this.directionalLight.dispose();
54
54
 
55
- this.viewer.removeEventListener("geometryend", this.geometryEnd);
55
+ this.viewer.removeEventListener("databasechunk", this.geometryEnd);
56
56
  this.viewer.removeEventListener("clear", this.geometryEnd);
57
57
  }
58
58
 
@@ -62,8 +62,10 @@ export class LightComponent implements IComponent {
62
62
 
63
63
  if (this.viewer.extents.isEmpty()) return;
64
64
 
65
+ const extentsCenter = this.viewer.extents.getCenter(new Vector3());
65
66
  const extentsSize = this.viewer.extents.getBoundingSphere(new Sphere()).radius * 2;
66
- this.directionalLight.position.set(0.5, 0, 0.866).multiplyScalar(extentsSize * 2);
67
+ this.directionalLight.position.set(0.5, 0, 0.866).multiplyScalar(extentsSize).add(extentsCenter);
68
+ this.directionalLight.target.position.copy(extentsCenter);
67
69
 
68
70
  this.viewer.scene.add(this.ambientLight);
69
71
  this.viewer.scene.add(this.directionalLight);
@@ -0,0 +1,47 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
3
+ // All rights reserved.
4
+ //
5
+ // This software and its documentation and related materials are owned by
6
+ // the Alliance. The software may only be incorporated into application
7
+ // programs owned by members of the Alliance, subject to a signed
8
+ // Membership Agreement and Supplemental Software License Agreement with the
9
+ // Alliance. The structure and organization of this software are the valuable
10
+ // trade secrets of the Alliance and its suppliers. The software is also
11
+ // protected by copyright law and international treaty provisions. Application
12
+ // programs incorporating this software must include the following statement
13
+ // with their copyright notices:
14
+ //
15
+ // This application incorporates Open Design Alliance software pursuant to a
16
+ // license agreement with Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
18
+ // All rights reserved.
19
+ //
20
+ // By use of this software, its documentation or related materials, you
21
+ // acknowledge and accept the above terms.
22
+ ///////////////////////////////////////////////////////////////////////////////
23
+
24
+ import { PMREMGenerator } from "three";
25
+ import { RoomEnvironment } from "three/examples/jsm/environments/RoomEnvironment.js";
26
+
27
+ import { IComponent } from "@inweb/viewer-core";
28
+ import type { Viewer } from "../Viewer";
29
+
30
+ export class RoomEnvironmentComponent implements IComponent {
31
+ protected viewer: Viewer;
32
+
33
+ constructor(viewer: Viewer) {
34
+ this.viewer = viewer;
35
+
36
+ const environment = new RoomEnvironment();
37
+ const pmremGenerator = new PMREMGenerator(this.viewer.renderer);
38
+
39
+ this.viewer.scene.environment = pmremGenerator.fromScene(environment).texture;
40
+
41
+ environment.dispose();
42
+ }
43
+
44
+ dispose() {
45
+ this.viewer.scene.environment = undefined;
46
+ }
47
+ }
@@ -23,13 +23,11 @@
23
23
 
24
24
  import { IComponentsRegistry, componentsRegistry } from "@inweb/viewer-core";
25
25
 
26
- // import { AxesHelperComponent } from "./AxesHelperComponent";
27
26
  import { BackgroundComponent } from "./BackgroundComponent";
27
+ import { RoomEnvironmentComponent } from "./RoomEnvironmentComponent";
28
28
  import { CameraComponent } from "./CameraComponent";
29
29
  import { ExtentsComponent } from "./ExtentsComponent";
30
- // import { ExtentsHelperComponent } from "./ExtentsHelperComponent";
31
- // import { LightComponent } from "./LightComponent";
32
- // import { LightHelperComponent } from "./LightHelperComponent";
30
+ import { LightComponent } from "./LightComponent";
33
31
  import { RenderLoopComponent } from "./RenderLoopComponent";
34
32
  import { ResizeCanvasComponent } from "./ResizeCanvasComponent";
35
33
  import { SelectionComponent } from "./SelectionComponent";
@@ -80,12 +78,10 @@ export const components: IComponentsRegistry = componentsRegistry("threejs");
80
78
  components.registerComponent("ExtentsComponent", (viewer) => new ExtentsComponent(viewer));
81
79
  components.registerComponent("CameraComponent", (viewer) => new CameraComponent(viewer));
82
80
  components.registerComponent("BackgroundComponent", (viewer) => new BackgroundComponent(viewer));
83
- // components.registerComponent("LightComponent", (viewer) => new LightComponent(viewer));
81
+ components.registerComponent("RoomEnvironmentComponent", (viewer) => new RoomEnvironmentComponent(viewer));
82
+ components.registerComponent("LightComponent", (viewer) => new LightComponent(viewer));
84
83
  components.registerComponent("ResizeCanvasComponent", (viewer) => new ResizeCanvasComponent(viewer));
85
84
  components.registerComponent("RenderLoopComponent", (viewer) => new RenderLoopComponent(viewer));
86
85
  components.registerComponent("SelectionComponent", (viewer) => new SelectionComponent(viewer));
87
86
 
88
87
  components.registerComponent("WCSHelperComponent", (viewer) => new WCSHelperComponent(viewer));
89
- // components.registerComponent("AxesHelperComponent", (viewer) => new AxesHelperComponent(viewer));
90
- // components.registerComponent("ExtentsHelperComponent", (viewer) => new ExtentsHelperComponent(viewer));
91
- // components.registerComponent("LightHelperComponent", (viewer) => new LightHelperComponent(viewer));
@@ -0,0 +1,73 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
3
+ // All rights reserved.
4
+ //
5
+ // This software and its documentation and related materials are owned by
6
+ // the Alliance. The software may only be incorporated into application
7
+ // programs owned by members of the Alliance, subject to a signed
8
+ // Membership Agreement and Supplemental Software License Agreement with the
9
+ // Alliance. The structure and organization of this software are the valuable
10
+ // trade secrets of the Alliance and its suppliers. The software is also
11
+ // protected by copyright law and international treaty provisions. Application
12
+ // programs incorporating this software must include the following statement
13
+ // with their copyright notices:
14
+ //
15
+ // This application incorporates Open Design Alliance software pursuant to a
16
+ // license agreement with Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
18
+ // All rights reserved.
19
+ //
20
+ // By use of this software, its documentation or related materials, you
21
+ // acknowledge and accept the above terms.
22
+ ///////////////////////////////////////////////////////////////////////////////
23
+
24
+ import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
25
+ import { Loader } from "@inweb/viewer-core";
26
+
27
+ import { Viewer } from "../Viewer";
28
+ import { GLTFLoadingManager, GLTFLoadParams } from "./GLTFLoadingManager";
29
+
30
+ export class GLTFFileLoader extends Loader {
31
+ public viewer: Viewer;
32
+
33
+ constructor(viewer: Viewer) {
34
+ super();
35
+ this.viewer = viewer;
36
+ }
37
+
38
+ override isSupport(file: any, format?: string): boolean {
39
+ return (
40
+ (typeof file === "string" || file instanceof globalThis.File || file instanceof ArrayBuffer) &&
41
+ /(gltf|glb)$/i.test(format)
42
+ );
43
+ }
44
+
45
+ override async load(buffer: any, format?: string, params?: GLTFLoadParams): Promise<this> {
46
+ const manager = new GLTFLoadingManager(buffer, params);
47
+
48
+ const loader = new GLTFLoader(manager);
49
+ loader.setPath(manager.path);
50
+ loader.setCrossOrigin(params.crossOrigin || loader.crossOrigin);
51
+ loader.setWithCredentials(params.withCredentials || loader.withCredentials);
52
+
53
+ const progress = (event: ProgressEvent) => {
54
+ const { lengthComputable, loaded, total } = event;
55
+ const progress = lengthComputable ? loaded / total : 1;
56
+ this.viewer.emitEvent({ type: "geometryprogress", data: progress, file: buffer });
57
+ };
58
+
59
+ const gltf = await loader.loadAsync(manager.fileURL, progress);
60
+ if (!this.viewer.scene) return this;
61
+
62
+ this.viewer.scene.add(gltf.scene);
63
+ this.viewer.models.push(gltf.scene);
64
+
65
+ this.viewer.syncOptions();
66
+ this.viewer.syncOverlay();
67
+ this.viewer.update();
68
+
69
+ this.viewer.emitEvent({ type: "databasechunk", data: gltf.scene, file: buffer });
70
+
71
+ return this;
72
+ }
73
+ }
@@ -23,30 +23,38 @@
23
23
 
24
24
  import { LoadingManager, LoaderUtils } from "three";
25
25
 
26
+ export type GLTFFileSource = string | globalThis.File | ArrayBuffer | Blob;
27
+
28
+ export type GLTFLoadParams = {
29
+ path?: string;
30
+ externalFiles?: Map<string, GLTFFileSource>;
31
+ requestHeader?: HeadersInit;
32
+ crossOrigin?: string;
33
+ withCredentials?: boolean;
34
+ };
35
+
26
36
  export class GLTFLoadingManager extends LoadingManager {
27
37
  public path = "";
28
38
  public resourcePath = "";
29
39
  public fileURL = "";
30
40
  public dataURLs = new Map();
31
41
 
32
- constructor(
33
- file: string | globalThis.File | ArrayBuffer | Blob,
34
- externalData: Map<string, string | File | ArrayBuffer | Blob> = new Map(),
35
- params: { path?: string } = {}
36
- ) {
42
+ constructor(file: GLTFFileSource, params: GLTFLoadParams = {}) {
37
43
  super();
38
44
 
39
45
  this.path = params.path || "";
40
46
 
47
+ const externalFiles = params.externalFiles || new Map();
48
+
41
49
  if (typeof file === "string") {
42
50
  this.fileURL = file;
43
51
  this.resourcePath = LoaderUtils.extractUrlBase(file);
44
52
  } else {
45
- externalData.forEach((value, key) => (this.fileURL = value === file ? key : this.fileURL));
46
- externalData.set(this.fileURL, file);
53
+ externalFiles.forEach((value, key) => (this.fileURL = value === file ? key : this.fileURL));
54
+ externalFiles.set(this.fileURL, file);
47
55
  }
48
56
 
49
- externalData.forEach((value, key) => {
57
+ externalFiles.forEach((value, key) => {
50
58
  let dataURL: string;
51
59
  if (typeof value === "string") dataURL = value;
52
60
  else dataURL = URL.createObjectURL(new Blob([value]));
@@ -0,0 +1,74 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
3
+ // All rights reserved.
4
+ //
5
+ // This software and its documentation and related materials are owned by
6
+ // the Alliance. The software may only be incorporated into application
7
+ // programs owned by members of the Alliance, subject to a signed
8
+ // Membership Agreement and Supplemental Software License Agreement with the
9
+ // Alliance. The structure and organization of this software are the valuable
10
+ // trade secrets of the Alliance and its suppliers. The software is also
11
+ // protected by copyright law and international treaty provisions. Application
12
+ // programs incorporating this software must include the following statement
13
+ // with their copyright notices:
14
+ //
15
+ // This application incorporates Open Design Alliance software pursuant to a
16
+ // license agreement with Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
18
+ // All rights reserved.
19
+ //
20
+ // By use of this software, its documentation or related materials, you
21
+ // acknowledge and accept the above terms.
22
+ ///////////////////////////////////////////////////////////////////////////////
23
+
24
+ import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
25
+ import { Loader } from "@inweb/viewer-core";
26
+
27
+ import { Viewer } from "../Viewer";
28
+ import { GLTFLoadingManager } from "./GLTFLoadingManager";
29
+
30
+ export class GLTFModelLoader extends Loader {
31
+ public viewer: Viewer;
32
+
33
+ constructor(viewer: Viewer) {
34
+ super();
35
+ this.viewer = viewer;
36
+ }
37
+
38
+ override isSupport(model: any): boolean {
39
+ return (
40
+ typeof model === "object" &&
41
+ typeof model.database === "string" &&
42
+ typeof model.downloadResource === "function" &&
43
+ /.gltf$/i.test(model.database)
44
+ );
45
+ }
46
+
47
+ override async load(model: any): Promise<this> {
48
+ const url = `${model.httpClient.serverUrl}${model.path}/${model.database}`;
49
+ const manager = new GLTFLoadingManager(url);
50
+
51
+ const loader = new GLTFLoader(manager);
52
+ loader.setRequestHeader(model.httpClient.headers);
53
+
54
+ const progress = (event: ProgressEvent) => {
55
+ const { lengthComputable, loaded, total } = event;
56
+ const progress = lengthComputable ? loaded / total : 1;
57
+ this.viewer.emitEvent({ type: "geometryprogress", data: progress, file: model.file, model });
58
+ };
59
+
60
+ const gltf = await loader.loadAsync(url, progress);
61
+ if (!this.viewer.scene) return this;
62
+
63
+ this.viewer.scene.add(gltf.scene);
64
+ this.viewer.models.push(gltf.scene);
65
+
66
+ this.viewer.syncOptions();
67
+ this.viewer.syncOverlay();
68
+ this.viewer.update();
69
+
70
+ this.viewer.emitEvent({ type: "databasechunk", data: gltf.scene, file: model.file, model });
71
+
72
+ return this;
73
+ }
74
+ }
@@ -0,0 +1,99 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
3
+ // All rights reserved.
4
+ //
5
+ // This software and its documentation and related materials are owned by
6
+ // the Alliance. The software may only be incorporated into application
7
+ // programs owned by members of the Alliance, subject to a signed
8
+ // Membership Agreement and Supplemental Software License Agreement with the
9
+ // Alliance. The structure and organization of this software are the valuable
10
+ // trade secrets of the Alliance and its suppliers. The software is also
11
+ // protected by copyright law and international treaty provisions. Application
12
+ // programs incorporating this software must include the following statement
13
+ // with their copyright notices:
14
+ //
15
+ // This application incorporates Open Design Alliance software pursuant to a
16
+ // license agreement with Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
18
+ // All rights reserved.
19
+ //
20
+ // By use of this software, its documentation or related materials, you
21
+ // acknowledge and accept the above terms.
22
+ ///////////////////////////////////////////////////////////////////////////////
23
+
24
+ import { ILoadersRegistry, loadersRegistry } from "@inweb/viewer-core";
25
+
26
+ import { GLTFModelLoader } from "./GLTFModelLoader";
27
+ import { GLTFFileLoader } from "./GLTFFileLoader";
28
+
29
+ /**
30
+ * Viewer loaders registry. Use this registry to register custom loaders.
31
+ *
32
+ * To implement custom loader:
33
+ *
34
+ * 1. Define a loader class implements {@link ILoader}.
35
+ * 2. Define a constructor with a `viewer` parameter.
36
+ * 3. Override {@link ILoader.isSupport} and сheck if the loader can load the specified file.
37
+ * 4. Override {@link ILoader.load} and define the logic for loading the model from the file.
38
+ *
39
+ * The loader should do:
40
+ *
41
+ * - Load model from file. The model must be a Three.js object of type `Object3D` or a descendant of it.
42
+ * - Add model to the viewer `scene` and `models` list.
43
+ * - Synchronize viewer options and overlay.
44
+ * - Update the viewer.
45
+ *
46
+ * The loader must emit events:
47
+ *
48
+ * - `geometryprogress` - during loading. If progress is not supported, emit it once with a value of 100%
49
+ * after the load is complete.
50
+ * - `databasechunk` - when model is loaded and ready to render.
51
+ * 5. Override {@link ILoader.dispose} and release loader resources, if required.
52
+ * 6. Register loader provider in the loaders registry by calling the {@link loaders.registerLoader}.
53
+ *
54
+ * @example Implementing a custom loader.
55
+ *
56
+ * ```javascript
57
+ * import { Loader } from "@inweb/viewer-core";
58
+ * import { loaders, Viewer } from "@inweb/viewer-three";
59
+ *
60
+ * class MyLoader extends Loader {
61
+ * public viewer: Viewer;
62
+ *
63
+ * constructor(viewer: Viewer) {
64
+ * super();
65
+ * this.viewer = viewer;
66
+ * }
67
+ *
68
+ * override isSupport(file, format): Boolean {
69
+ * // place custom logic here
70
+ * return ...;
71
+ * }
72
+ *
73
+ * override load(file, format, params): Promise<this> {
74
+ *
75
+ * // place custom loading logic here
76
+ * const model = ...;
77
+ *
78
+ * this.viewer.scene.add(model);
79
+ * this.viewer.models.push(model);
80
+ *
81
+ * this.viewer.syncOptions();
82
+ * this.viewer.syncOverlay();
83
+ * this.viewer.update();
84
+ *
85
+ * this.viewer.emitEvent({ type: "databasechunk", data: model, file });
86
+ *
87
+ * return Promise.resove(this);
88
+ * };
89
+ * }
90
+ *
91
+ * loaders.registerLoader("MyLoader", (viewer) => new MyLoader(viewer));
92
+ * ```
93
+ */
94
+ export const loaders: ILoadersRegistry = loadersRegistry("threejs");
95
+
96
+ // build-in loaders
97
+
98
+ loaders.registerLoader("gltf", (viewer: any) => new GLTFModelLoader(viewer));
99
+ loaders.registerLoader("gltf-file", (viewer: any) => new GLTFFileLoader(viewer));
@@ -0,0 +1,30 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
3
+ // All rights reserved.
4
+ //
5
+ // This software and its documentation and related materials are owned by
6
+ // the Alliance. The software may only be incorporated into application
7
+ // programs owned by members of the Alliance, subject to a signed
8
+ // Membership Agreement and Supplemental Software License Agreement with the
9
+ // Alliance. The structure and organization of this software are the valuable
10
+ // trade secrets of the Alliance and its suppliers. The software is also
11
+ // protected by copyright law and international treaty provisions. Application
12
+ // programs incorporating this software must include the following statement
13
+ // with their copyright notices:
14
+ //
15
+ // This application incorporates Open Design Alliance software pursuant to a
16
+ // license agreement with Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
18
+ // All rights reserved.
19
+ //
20
+ // By use of this software, its documentation or related materials, you
21
+ // acknowledge and accept the above terms.
22
+ ///////////////////////////////////////////////////////////////////////////////
23
+
24
+ export * from "./index";
25
+
26
+ // add the global exports (was removed in 0.160.0) to expose the plugins to Three.js code
27
+
28
+ import * as THREE from "three";
29
+
30
+ if (typeof window !== "undefined") window["THREE"] = THREE;
package/src/index.ts CHANGED
@@ -21,10 +21,14 @@
21
21
  // acknowledge and accept the above terms.
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
+ export * from "./Viewer/draggers";
25
+ export * from "./Viewer/commands";
26
+ export * from "./Viewer/components";
27
+ export * from "./Viewer/loaders";
28
+ export * from "./Viewer/loaders/GLTFLoadingManager";
29
+ export * from "./Viewer/Viewer";
30
+
31
+ // the lines below are required for typedoc to include the viewer core and markups documentation
32
+
24
33
  export * from "@inweb/viewer-core";
25
34
  export * from "@inweb/markup";
26
-
27
- export { draggers } from "./Viewer/draggers";
28
- export { commands } from "./Viewer/commands";
29
- export { components } from "./Viewer/components";
30
- export { Viewer } from "./Viewer/Viewer";
@@ -1,10 +0,0 @@
1
- import { IComponent } from "@inweb/viewer-core";
2
- import type { Viewer } from "../Viewer";
3
- export declare class AxesHelperComponent implements IComponent {
4
- private viewer;
5
- private axesHelper1;
6
- private axesHelper2;
7
- constructor(viewer: Viewer);
8
- dispose(): void;
9
- geometryEnd: () => void;
10
- }
@@ -1,9 +0,0 @@
1
- import { IComponent } from "@inweb/viewer-core";
2
- import type { Viewer } from "../Viewer";
3
- export declare class LightHelperComponent implements IComponent {
4
- private viewer;
5
- private lightHelpers;
6
- constructor(viewer: Viewer);
7
- dispose(): void;
8
- geometryEnd: () => void;
9
- }