@xeokit/xeokit-sdk 2.2.1-beta.1 → 2.2.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 +83 -16
- package/dist/xeokit-sdk.cjs.js +543 -539
- package/dist/xeokit-sdk.es.js +543 -539
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,30 +4,97 @@
|
|
|
4
4
|
[](https://badge.fury.io/js/%40xeokit%2Fxeokit-sdk)
|
|
5
5
|
[](https://www.jsdelivr.com/package/npm/@xeokit/xeokit-sdk)
|
|
6
6
|
|
|
7
|
-
[xeokit](http://xeokit.io) is a JavaScript software development kit from [xeolabs](http://xeolabs.com) for viewing
|
|
7
|
+
[xeokit](http://xeokit.io) is a JavaScript software development kit from [xeolabs](http://xeolabs.com) for viewing
|
|
8
8
|
high-detail, full-precision 3D engineering and BIM models in the browser.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Installing
|
|
11
|
+
|
|
12
|
+
````bash
|
|
13
|
+
npm i @xeokit/xeokit-sdk
|
|
14
|
+
````
|
|
11
15
|
|
|
12
16
|
## Usage
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
The xeokit SDK lets us develop our own browser-based BIM viewer, which we can fully customize and extend with
|
|
19
|
+
plugins.
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
Let's create a [Viewer](https://xeokit.github.io/xeokit-sdk/docs/class/src/viewer/Viewer.js~Viewer.html) with
|
|
22
|
+
a [WebIFCLoaderPlugin](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js~WebIFCLoaderPlugin.html)
|
|
23
|
+
to view a IFC model in the browser, then view a sample IFC model from
|
|
24
|
+
the [Open IFC Model Database](http://openifcmodel.cs.auckland.ac.nz/Model/Details/274).
|
|
25
|
+
|
|
26
|
+
> > [Run this example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_WebIFCLoaderPlugin_Duplex)
|
|
27
|
+
>
|
|
28
|
+
> > [Read the full tutorial](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-WebIFCLoaderPlugin-9a572b801af949bf87a21c88968bd251)
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
````html
|
|
33
|
+
<!doctype html>
|
|
34
|
+
<html>
|
|
35
|
+
<head>
|
|
36
|
+
<meta charset="utf-8">
|
|
37
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
38
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
39
|
+
<title>xeokit Example</title>
|
|
40
|
+
<style>
|
|
41
|
+
body {
|
|
42
|
+
margin: 0;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
user-select: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#myCanvas {
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
position: absolute;
|
|
52
|
+
background: lightblue;
|
|
53
|
+
background-image: linear-gradient(lightblue, white);
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
56
|
+
</head>
|
|
57
|
+
<body>
|
|
58
|
+
<canvas id="myCanvas"></canvas>
|
|
59
|
+
</body>
|
|
60
|
+
<script id="source" type="module">
|
|
61
|
+
|
|
62
|
+
import {Viewer, WebIFCLoaderPlugin} from
|
|
63
|
+
"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
64
|
+
|
|
65
|
+
const viewer = new Viewer({
|
|
66
|
+
canvasId: "myCanvas",
|
|
67
|
+
transparent: true
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
viewer.camera.eye = [-3.933, 2.855, 27.018];
|
|
71
|
+
viewer.camera.look = [4.400, 3.724, 8.899];
|
|
72
|
+
viewer.camera.up = [-0.018, 0.999, 0.039];
|
|
73
|
+
|
|
74
|
+
const webIFCLoader = new WebIFCLoaderPlugin(viewer, {
|
|
75
|
+
wasmPath: "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/"
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const model = webIFCLoader.load({
|
|
79
|
+
src: "Duplex.ifc",
|
|
80
|
+
edges: true
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
</script>
|
|
84
|
+
</html>
|
|
18
85
|
````
|
|
19
86
|
|
|
20
|
-
## Resources
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
87
|
+
## Resources
|
|
88
|
+
|
|
89
|
+
* [xeokit.io](https://xeokit.io/)
|
|
90
|
+
* [Examples](http://xeokit.github.io/xeokit-sdk/examples/)
|
|
91
|
+
* [Guides](https://www.notion.so/xeokit/xeokit-Documentation-4598591fcedb4889bf8896750651f74e)
|
|
92
|
+
* [API Docs](https://xeokit.github.io/xeokit-sdk/docs/)
|
|
93
|
+
* [Changelog](https://xeokit.github.io/xeokit-sdk/CHANGE_LOG)
|
|
94
|
+
* [Features](https://xeokit.io/index.html?foo=1#features)
|
|
95
|
+
* [FAQ](https://xeokit.io/index.html?foo=1#faq)
|
|
96
|
+
* [Blog](https://xeokit.io/blog.html)
|
|
97
|
+
* [License](https://xeokit.io/index.html#pricing)
|
|
31
98
|
|
|
32
99
|
|
|
33
100
|
|