@xeokit/xeokit-sdk 2.6.30 → 2.6.32
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 +17 -23
- package/dist/xeokit-sdk.cjs.js +353 -336
- package/dist/xeokit-sdk.es.js +353 -336
- package/dist/xeokit-sdk.es5.js +412 -408
- package/dist/xeokit-sdk.min.cjs.js +4 -4
- package/dist/xeokit-sdk.min.es.js +5 -5
- package/dist/xeokit-sdk.min.es5.js +3 -3
- package/package.json +1 -1
- package/src/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.js +110 -33
- package/src/plugins/GLTFLoaderPlugin/GLTFSceneModelLoader.js +7 -2
- package/src/plugins/TreeViewPlugin/TreeViewPlugin.js +1 -1
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +5 -1
- package/src/plugins/ZonesPlugin/ZonesPlugin.js +97 -148
- package/src/plugins/lib/html/Dot.js +2 -2
- package/src/viewer/scene/webgl/Renderer.js +132 -154
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +5 -3
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +2 -2
- package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +3 -3
package/README.md
CHANGED
|
@@ -28,22 +28,20 @@ npm i @xeokit/xeokit-sdk
|
|
|
28
28
|
|
|
29
29
|
The xeokit SDK lets us develop our own browser-based BIM viewer, which we can fully customize and extend with
|
|
30
30
|
plugins. Let's create a [Viewer](https://xeokit.github.io/xeokit-sdk/docs/class/src/viewer/Viewer.js~Viewer.html) with
|
|
31
|
-
a [
|
|
32
|
-
to view
|
|
31
|
+
a [XKTLoaderPlugin](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js~XKTLoaderPlugin.html)
|
|
32
|
+
to view an XKT model in the browser, which was pre-converted from IFC model from
|
|
33
33
|
the [Open IFC Model Database](http://openifcmodel.cs.auckland.ac.nz/Model/Details/274).
|
|
34
34
|
|
|
35
|
-
This is just one way to load our models into xeokit
|
|
35
|
+
This is just one way to load our models into xeokit: by converting it to XKT and loading via XKTLoaderPlugin.
|
|
36
|
+
We can also load models from other formats directly,
|
|
36
37
|
including [CityJSON](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.js~CityJSONLoaderPlugin.html),
|
|
37
38
|
[glTF](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js~GLTFLoaderPlugin.html),
|
|
38
39
|
[LAZ](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js~LASLoaderPlugin.html)
|
|
39
|
-
and [OBJ](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js~OBJLoaderPlugin.html)
|
|
40
|
-
as well as xeokit's own native highly-compressed [XKT](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js~XKTLoaderPlugin.html) format,
|
|
41
|
-
which we can pre-convert offline from other formats.
|
|
40
|
+
and [OBJ](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js~OBJLoaderPlugin.html).
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
* [Read the full tutorial](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-WebIFCLoaderPlugin-9a572b801af949bf87a21c88968bd251)
|
|
42
|
+
[Run this example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_Duplex)
|
|
45
43
|
|
|
46
|
-

|
|
47
45
|
|
|
48
46
|
|
|
49
47
|
````html
|
|
@@ -76,9 +74,9 @@ which we can pre-convert offline from other formats.
|
|
|
76
74
|
</body>
|
|
77
75
|
<script id="source" type="module">
|
|
78
76
|
|
|
79
|
-
import {
|
|
77
|
+
import {XKTLoaderPlugin, Viewer} from
|
|
80
78
|
"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
81
|
-
|
|
79
|
+
|
|
82
80
|
const viewer = new Viewer({
|
|
83
81
|
canvasId: "xeokit_canvas",
|
|
84
82
|
transparent: true,
|
|
@@ -89,20 +87,16 @@ which we can pre-convert offline from other formats.
|
|
|
89
87
|
viewer.camera.look = [4.400, 3.724, 8.899];
|
|
90
88
|
viewer.camera.up = [-0.018, 0.999, 0.039];
|
|
91
89
|
|
|
92
|
-
const
|
|
93
|
-
IfcAPI.SetWasmPath("https://cdn.jsdelivr.net/npm/web-ifc@0.0.51/");
|
|
90
|
+
const xktLoader = new XKTLoaderPlugin(viewer);
|
|
94
91
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const model = ifcLoader.load({
|
|
102
|
-
src: "Duplex.ifc",
|
|
103
|
-
edges: true
|
|
104
|
-
});
|
|
92
|
+
const sceneModel = xktLoader.load({
|
|
93
|
+
id: "myModel",
|
|
94
|
+
src: "Duplex.xkt",
|
|
95
|
+
saoEnabled: true,
|
|
96
|
+
edges: true,
|
|
97
|
+
dtxEnabled: true
|
|
105
98
|
});
|
|
99
|
+
|
|
106
100
|
</script>
|
|
107
101
|
</html>
|
|
108
102
|
````
|