@xeokit/xeokit-sdk 2.6.31 → 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 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 [WebIFCLoaderPlugin](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js~WebIFCLoaderPlugin.html)
32
- to view a IFC model in the browser, then view a sample IFC model from
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. We can also load multiple models from other formats,
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
- * [Run this example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_WebIFCLoaderPlugin_Duplex)
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
- ![](https://xeokit.io/img/docs/WebIFCLoaderPlugin/WebIFCLoaderPluginBig.png)
44
+ ![](assets/images/duplex_readme_example.png)
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 {WebIFCLoaderPlugin, Viewer} from
77
+ import {XKTLoaderPlugin, Viewer} from
80
78
  "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
81
- import * as WebIFC from "https://cdn.jsdelivr.net/npm/web-ifc@0.0.51/web-ifc-api.js";
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 IfcAPI = new WebIFC.IfcAPI();
93
- IfcAPI.SetWasmPath("https://cdn.jsdelivr.net/npm/web-ifc@0.0.51/");
90
+ const xktLoader = new XKTLoaderPlugin(viewer);
94
91
 
95
- IfcAPI.Init().then(() => {
96
- const ifcLoader = new WebIFCLoaderPlugin(viewer, {
97
- WebIFC,
98
- IfcAPI
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
  ````