@thatopen/components 3.3.0 → 3.3.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.
- package/README.md +81 -76
- package/dist/index.d.ts +1 -2
- package/package.json +59 -59
package/README.md
CHANGED
|
@@ -1,76 +1,81 @@
|
|
|
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
|
-

|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`@thatopen/components
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
OBC.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
world.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
world.scene.
|
|
69
|
-
|
|
70
|
-
world.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
[npm
|
|
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
|
+

|
|
14
|
+
|
|
15
|
+
<h1>Open BIM Components <img src="https://thatopen.github.io/engine_components/resources/favicon.ico" width="32"/></h1>
|
|
16
|
+
|
|
17
|
+
[![Components NPM Package][npm]][npm-url]
|
|
18
|
+
[![Components NPM Package][npm-downloads]][npm-url]
|
|
19
|
+
[![Components Front NPM Package][npm-front]][npm-url-front]
|
|
20
|
+
[![Components Front NPM Package][npm-downloads-front]][npm-url-front]
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 🤝 Want our help?
|
|
26
|
+
Are you developing a project with our technology and would like our help?
|
|
27
|
+
Apply now to join [That Open Accelerator Program](https://thatopen.com/accelerator)!
|
|
28
|
+
|
|
29
|
+
## Packages
|
|
30
|
+
|
|
31
|
+
This library contains 2 packages:
|
|
32
|
+
|
|
33
|
+
`@thatopen/components` - The core functionality. Compatible both with browser and Node.js environments.
|
|
34
|
+
|
|
35
|
+
`@thatopen/components-front` - Features exclusive for browser environments.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
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).
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
/* eslint import/no-extraneous-dependencies: 0 */
|
|
43
|
+
|
|
44
|
+
import * as THREE from "three";
|
|
45
|
+
import * as OBC from "../..";
|
|
46
|
+
|
|
47
|
+
const container = document.getElementById("container")!;
|
|
48
|
+
|
|
49
|
+
const components = new OBC.Components();
|
|
50
|
+
|
|
51
|
+
const worlds = components.get(OBC.Worlds);
|
|
52
|
+
|
|
53
|
+
const world = worlds.create<
|
|
54
|
+
OBC.SimpleScene,
|
|
55
|
+
OBC.SimpleCamera,
|
|
56
|
+
OBC.SimpleRenderer
|
|
57
|
+
>();
|
|
58
|
+
|
|
59
|
+
world.scene = new OBC.SimpleScene(components);
|
|
60
|
+
world.renderer = new OBC.SimpleRenderer(components, container);
|
|
61
|
+
world.camera = new OBC.SimpleCamera(components);
|
|
62
|
+
|
|
63
|
+
components.init();
|
|
64
|
+
|
|
65
|
+
const material = new THREE.MeshLambertMaterial({ color: "#6528D7" });
|
|
66
|
+
const geometry = new THREE.BoxGeometry();
|
|
67
|
+
const cube = new THREE.Mesh(geometry, material);
|
|
68
|
+
world.scene.three.add(cube);
|
|
69
|
+
|
|
70
|
+
world.scene.setup();
|
|
71
|
+
|
|
72
|
+
world.camera.controls.setLookAt(3, 3, 3, 0, 0, 0);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
[npm]: https://img.shields.io/npm/v/@thatopen/components
|
|
77
|
+
[npm-url]: https://www.npmjs.com/package/@thatopen/components
|
|
78
|
+
[npm-downloads]: https://img.shields.io/npm/dw/@thatopen/components
|
|
79
|
+
[npm-front]: https://img.shields.io/npm/v/@thatopen/components-front
|
|
80
|
+
[npm-url-front]: https://www.npmjs.com/package/@thatopen/components-front
|
|
81
|
+
[npm-downloads-front]: https://img.shields.io/npm/dw/@thatopen/components-front
|
package/dist/index.d.ts
CHANGED
|
@@ -1635,8 +1635,7 @@ export declare interface ExternalDocumentReference extends DocumentReference {
|
|
|
1635
1635
|
}
|
|
1636
1636
|
|
|
1637
1637
|
/**
|
|
1638
|
-
* A fast model picker that uses color coding to identify fragment models under the mouse cursor.
|
|
1639
|
-
* This is much faster than raycasting for simple model identification.
|
|
1638
|
+
* A fast model picker that uses color coding to identify fragment models under the mouse cursor. This is much faster than raycasting for simple model identification.
|
|
1640
1639
|
*/
|
|
1641
1640
|
export declare class FastModelPicker implements Disposable_2 {
|
|
1642
1641
|
/** {@link Component.enabled} */
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thatopen/components",
|
|
3
|
-
"description": "Collection of core functionalities to author BIM apps.",
|
|
4
|
-
"version": "3.3.
|
|
5
|
-
"author": "That Open Company",
|
|
6
|
-
"contributors": [
|
|
7
|
-
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
|
|
8
|
-
"Juan Hoyos (https://github.com/HoyosJuan)",
|
|
9
|
-
"Harry Collin (https://github.com/harrycollin)",
|
|
10
|
-
"Pablo Aguilar (https://github.com/pabloaguilarv"
|
|
11
|
-
],
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"homepage": "https://github.com/ThatOpen/engine_components/tree/main/packages/components#readme",
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/ThatOpen/engine_components/issues"
|
|
16
|
-
},
|
|
17
|
-
"type": "module",
|
|
18
|
-
"main": "dist/index.cjs",
|
|
19
|
-
"module": "dist/index.mjs",
|
|
20
|
-
"types": "dist/index.d.ts",
|
|
21
|
-
"files": [
|
|
22
|
-
"dist",
|
|
23
|
-
"README.md"
|
|
24
|
-
],
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/ThatOpen/engine_components/tree/main/packages/components.git"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"dev": "vite --host",
|
|
31
|
-
"test": "jest",
|
|
32
|
-
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
33
|
-
"prepublishOnly": "node ./resources/updateComponentsVersion.mjs && yarn build",
|
|
34
|
-
"publish-repo": "npm publish"
|
|
35
|
-
},
|
|
36
|
-
"publishConfig": {
|
|
37
|
-
"access": "public"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@thatopen/fragments": "~3.3.0",
|
|
41
|
-
"@thatopen/ui": "~3.
|
|
42
|
-
"@types/convert-units": "2.3.11",
|
|
43
|
-
"@types/three": "0.175.0",
|
|
44
|
-
"stats.js": "^0.17.0",
|
|
45
|
-
"three": "^0.175.0",
|
|
46
|
-
"web-ifc": "0.0.74"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"camera-controls": "^2.9.0",
|
|
50
|
-
"fast-xml-parser": "4.4.1",
|
|
51
|
-
"jszip": "3.10.1",
|
|
52
|
-
"three-mesh-bvh": "0.7.0"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"@thatopen/fragments": "~3.3.0",
|
|
56
|
-
"three": ">=0.175.0",
|
|
57
|
-
"web-ifc": ">=0.0.74"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thatopen/components",
|
|
3
|
+
"description": "Collection of core functionalities to author BIM apps.",
|
|
4
|
+
"version": "3.3.1",
|
|
5
|
+
"author": "That Open Company",
|
|
6
|
+
"contributors": [
|
|
7
|
+
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
|
|
8
|
+
"Juan Hoyos (https://github.com/HoyosJuan)",
|
|
9
|
+
"Harry Collin (https://github.com/harrycollin)",
|
|
10
|
+
"Pablo Aguilar (https://github.com/pabloaguilarv"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"homepage": "https://github.com/ThatOpen/engine_components/tree/main/packages/components#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ThatOpen/engine_components/issues"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "dist/index.cjs",
|
|
19
|
+
"module": "dist/index.mjs",
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/ThatOpen/engine_components/tree/main/packages/components.git"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"dev": "vite --host",
|
|
31
|
+
"test": "jest",
|
|
32
|
+
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
33
|
+
"prepublishOnly": "node ./resources/updateComponentsVersion.mjs && yarn build",
|
|
34
|
+
"publish-repo": "npm publish"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@thatopen/fragments": "~3.3.0",
|
|
41
|
+
"@thatopen/ui": "~3.3.0",
|
|
42
|
+
"@types/convert-units": "2.3.11",
|
|
43
|
+
"@types/three": "0.175.0",
|
|
44
|
+
"stats.js": "^0.17.0",
|
|
45
|
+
"three": "^0.175.0",
|
|
46
|
+
"web-ifc": "0.0.74"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"camera-controls": "^2.9.0",
|
|
50
|
+
"fast-xml-parser": "4.4.1",
|
|
51
|
+
"jszip": "3.10.1",
|
|
52
|
+
"three-mesh-bvh": "0.7.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@thatopen/fragments": "~3.3.0",
|
|
56
|
+
"three": ">=0.175.0",
|
|
57
|
+
"web-ifc": ">=0.0.74"
|
|
58
|
+
}
|
|
59
|
+
}
|