@thatopen/components 3.1.0 → 3.1.2

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/README.md CHANGED
@@ -1,92 +1,92 @@
1
- <p align="center">
2
- <a href="https://thatopen.com/">TOC</a>
3
- |
4
- <a href="https://docs.thatopen.com/intro">documentation</a>
5
- |
6
- <a href="https://thatopen.github.io/engine_components/examples/IfcLoader/index.html">demo</a>
7
- |
8
- <a href="https://people.thatopen.com/">community</a>
9
- |
10
- <a href="https://www.npmjs.com/org/thatopen">npm package</a>
11
- </p>
12
-
13
- ![cover](https://thatopen.github.io/engine_components/resources/cover.png)
14
-
15
- <h1>Open BIM Components <img src="https://thatopen.github.io/engine_components/resources/favicon.ico" width="32"/></h1>
16
-
17
- [![NPM Package][npm]][npm-url]
18
- [![NPM Package][npm-downloads]][npm-url]
19
-
20
- This library is a collection of BIM tools based on [Three.js](https://github.com/mrdoob/three.js/) and other libraries. It includes pre-made features to easily build browser-based 3D BIM applications, such as postproduction, dimensions, floorplan navigation, DXF export and much more.
21
-
22
-
23
- ## 🤝 Want our help?
24
- Are you developing a project with our technology and would like our help?
25
- Apply now to join [That Open Accelerator Program](https://thatopen.com/accelerator)!
26
-
27
-
28
- ## 🧩 Integration with fragments
29
- As you might know, we have 4 open source libraries:
30
- - [web-ifc](https://github.com/ThatOpen/engine_web-ifc): the IFC parser and geometry engine.
31
- - [fragments](https://github.com/ThatOpen/engine_fragment): the open source format and 3D engine.
32
- - [components](https://github.com/ThatOpen/engine_components): a set of tools to build BIM software fast.
33
- - [ui components](https://github.com/ThatOpen/engine_ui-components): our agnostic UI system.
34
-
35
- Components doesn't work with this new version of Fragments yet. In the next release, at the end of Q2, all components will be updated to work with this new version of Fragments. In the meantime, you have 3 options:
36
-
37
- - Work with Fragments and build your own BIM components from scratch.
38
- - Work with Components (which don't use this new version of Fragments).
39
- - Check out our [Accelerator Program](https://thatopen.com/accelerator) to get previous access to the upcoming components.
40
-
41
- Once the release at the end of Q2 is made, Components will work natively with this new version of Fragments.
42
-
43
- ## Packages
44
-
45
- This library contains 2 packages:
46
-
47
- `@thatopen/components` - The core functionality. Compatible both with browser and Node.js environments.
48
-
49
- `@thatopen/components-front` - Features exclusive for browser environments.
50
-
51
- ## Usage
52
-
53
- You need to be familiar with [Three.js API](https://github.com/mrdoob/three.js/) to be able to use this library effectively. In the following example, we will create a cube in a 3D scene that can be navigated with the mouse or touch events. You can see the full example [here](https://github.com/ThatOpen/engine_components/blob/main/packages/core/src/core/Worlds/example.ts) and the deployed app [here](https://thatopen.github.io/engine_components/examples/Worlds/index.html).
54
-
55
- ```js
56
- /* eslint import/no-extraneous-dependencies: 0 */
57
-
58
- import * as THREE from "three";
59
- import * as OBC from "../..";
60
-
61
- const container = document.getElementById("container")!;
62
-
63
- const components = new OBC.Components();
64
-
65
- const worlds = components.get(OBC.Worlds);
66
-
67
- const world = worlds.create<
68
- OBC.SimpleScene,
69
- OBC.SimpleCamera,
70
- OBC.SimpleRenderer
71
- >();
72
-
73
- world.scene = new OBC.SimpleScene(components);
74
- world.renderer = new OBC.SimpleRenderer(components, container);
75
- world.camera = new OBC.SimpleCamera(components);
76
-
77
- components.init();
78
-
79
- const material = new THREE.MeshLambertMaterial({ color: "#6528D7" });
80
- const geometry = new THREE.BoxGeometry();
81
- const cube = new THREE.Mesh(geometry, material);
82
- world.scene.three.add(cube);
83
-
84
- world.scene.setup();
85
-
86
- world.camera.controls.setLookAt(3, 3, 3, 0, 0, 0);
87
- ```
88
-
89
-
90
- [npm]: https://img.shields.io/npm/v/@thatopen/components
91
- [npm-url]: https://www.npmjs.com/package/@thatopen/components
92
- [npm-downloads]: https://img.shields.io/npm/dw/@thatopen/components
1
+ <p align="center">
2
+ <a href="https://thatopen.com/">TOC</a>
3
+ |
4
+ <a href="https://docs.thatopen.com/intro">documentation</a>
5
+ |
6
+ <a href="https://thatopen.github.io/engine_components/examples/IfcLoader/index.html">demo</a>
7
+ |
8
+ <a href="https://people.thatopen.com/">community</a>
9
+ |
10
+ <a href="https://www.npmjs.com/org/thatopen">npm package</a>
11
+ </p>
12
+
13
+ ![cover](https://thatopen.github.io/engine_components/resources/cover.png)
14
+
15
+ <h1>Open BIM Components <img src="https://thatopen.github.io/engine_components/resources/favicon.ico" width="32"/></h1>
16
+
17
+ [![NPM Package][npm]][npm-url]
18
+ [![NPM Package][npm-downloads]][npm-url]
19
+
20
+ This library is a collection of BIM tools based on [Three.js](https://github.com/mrdoob/three.js/) and other libraries. It includes pre-made features to easily build browser-based 3D BIM applications, such as postproduction, dimensions, floorplan navigation, DXF export and much more.
21
+
22
+
23
+ ## 🤝 Want our help?
24
+ Are you developing a project with our technology and would like our help?
25
+ Apply now to join [That Open Accelerator Program](https://thatopen.com/accelerator)!
26
+
27
+
28
+ ## 🧩 Integration with fragments
29
+ As you might know, we have 4 open source libraries:
30
+ - [web-ifc](https://github.com/ThatOpen/engine_web-ifc): the IFC parser and geometry engine.
31
+ - [fragments](https://github.com/ThatOpen/engine_fragment): the open source format and 3D engine.
32
+ - [components](https://github.com/ThatOpen/engine_components): a set of tools to build BIM software fast.
33
+ - [ui components](https://github.com/ThatOpen/engine_ui-components): our agnostic UI system.
34
+
35
+ Components doesn't work with this new version of Fragments yet. In the next release, at the end of Q2, all components will be updated to work with this new version of Fragments. In the meantime, you have 3 options:
36
+
37
+ - Work with Fragments and build your own BIM components from scratch.
38
+ - Work with Components (which don't use this new version of Fragments).
39
+ - Check out our [Accelerator Program](https://thatopen.com/accelerator) to get previous access to the upcoming components.
40
+
41
+ Once the release at the end of Q2 is made, Components will work natively with this new version of Fragments.
42
+
43
+ ## Packages
44
+
45
+ This library contains 2 packages:
46
+
47
+ `@thatopen/components` - The core functionality. Compatible both with browser and Node.js environments.
48
+
49
+ `@thatopen/components-front` - Features exclusive for browser environments.
50
+
51
+ ## Usage
52
+
53
+ You need to be familiar with [Three.js API](https://github.com/mrdoob/three.js/) to be able to use this library effectively. In the following example, we will create a cube in a 3D scene that can be navigated with the mouse or touch events. You can see the full example [here](https://github.com/ThatOpen/engine_components/blob/main/packages/core/src/core/Worlds/example.ts) and the deployed app [here](https://thatopen.github.io/engine_components/examples/Worlds/index.html).
54
+
55
+ ```js
56
+ /* eslint import/no-extraneous-dependencies: 0 */
57
+
58
+ import * as THREE from "three";
59
+ import * as OBC from "../..";
60
+
61
+ const container = document.getElementById("container")!;
62
+
63
+ const components = new OBC.Components();
64
+
65
+ const worlds = components.get(OBC.Worlds);
66
+
67
+ const world = worlds.create<
68
+ OBC.SimpleScene,
69
+ OBC.SimpleCamera,
70
+ OBC.SimpleRenderer
71
+ >();
72
+
73
+ world.scene = new OBC.SimpleScene(components);
74
+ world.renderer = new OBC.SimpleRenderer(components, container);
75
+ world.camera = new OBC.SimpleCamera(components);
76
+
77
+ components.init();
78
+
79
+ const material = new THREE.MeshLambertMaterial({ color: "#6528D7" });
80
+ const geometry = new THREE.BoxGeometry();
81
+ const cube = new THREE.Mesh(geometry, material);
82
+ world.scene.three.add(cube);
83
+
84
+ world.scene.setup();
85
+
86
+ world.camera.controls.setLookAt(3, 3, 3, 0, 0, 0);
87
+ ```
88
+
89
+
90
+ [npm]: https://img.shields.io/npm/v/@thatopen/components
91
+ [npm-url]: https://www.npmjs.com/package/@thatopen/components
92
+ [npm-downloads]: https://img.shields.io/npm/dw/@thatopen/components
package/dist/index.cjs CHANGED
@@ -11429,7 +11429,7 @@ const _Components = class _Components {
11429
11429
  * The list of components created in this app.
11430
11430
  * The keys are UUIDs and the values are instances of the components.
11431
11431
  */
11432
- __publicField(this, "list", /* @__PURE__ */ new Map());
11432
+ __publicField(this, "list", new FRAGS.DataMap());
11433
11433
  /**
11434
11434
  * If disabled, the animation loop will be stopped.
11435
11435
  * Default value is false.
package/dist/index.d.ts CHANGED
@@ -1058,7 +1058,7 @@ export declare class Components implements Disposable_2 {
1058
1058
  * The list of components created in this app.
1059
1059
  * The keys are UUIDs and the values are instances of the components.
1060
1060
  */
1061
- readonly list: Map<string, Component>;
1061
+ readonly list: DataMap_2<string, Component>;
1062
1062
  /**
1063
1063
  * If disabled, the animation loop will be stopped.
1064
1064
  * Default value is false.
@@ -1630,8 +1630,7 @@ export declare interface ExternalDocumentReference extends DocumentReference {
1630
1630
  }
1631
1631
 
1632
1632
  /**
1633
- * Represents a finder query for retrieving items based on specified parameters.
1634
- * This class encapsulates the query logic, caching mechanism, and result management.
1633
+ * Represents a finder query for retrieving items based on specified parameters. This class encapsulates the query logic, caching mechanism, and result management.
1635
1634
  */
1636
1635
  export declare class FinderQuery {
1637
1636
  description?: string;
@@ -3842,11 +3841,7 @@ export declare class View implements Disposable_2 {
3842
3841
  }
3843
3842
 
3844
3843
  /**
3845
- * Represents a BCF compliant viewpoint from BuildingSMART.
3846
- *
3847
- * The Viewpoint class provides methods for managing and interacting with viewpoints.
3848
- * It includes functionality for setting viewpoint properties, updating the camera,
3849
- * applying color to components, and serializing the viewpoint for export.
3844
+ * Represents a BCF compliant viewpoint from BuildingSMART. The Viewpoint class provides methods for managing and interacting with viewpoints. It includes functionality for setting viewpoint properties, updating the camera, applying color to components, and serializing the viewpoint for export.
3850
3845
  */
3851
3846
  export declare class Viewpoint {
3852
3847
  title?: string;
@@ -4045,8 +4040,7 @@ export declare class Viewpoint {
4045
4040
  }
4046
4041
 
4047
4042
  /**
4048
- * Represents a bitmap image associated with a viewpoint.
4049
- * This interface is compliant with the BCF API specifications.
4043
+ * Represents a bitmap image associated with a viewpoint. This interface is compliant with the BCF API specifications.
4050
4044
  */
4051
4045
  export declare interface ViewpointBitmap {
4052
4046
  /**
@@ -4076,8 +4070,7 @@ export declare interface ViewpointBitmap {
4076
4070
  }
4077
4071
 
4078
4072
  /**
4079
- * Represents the properties of a camera viewpoint in a 3D space.
4080
- * This interface is compliant with the BCF API specifications.
4073
+ * Represents the properties of a camera viewpoint in a 3D space. This interface is compliant with the BCF API specifications.
4081
4074
  */
4082
4075
  export declare interface ViewpointCamera {
4083
4076
  /**