@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 CHANGED
@@ -4,30 +4,97 @@
4
4
  [![npm version](https://badge.fury.io/js/%40xeokit%2Fxeokit-sdk.svg)](https://badge.fury.io/js/%40xeokit%2Fxeokit-sdk)
5
5
  [![](https://data.jsdelivr.com/v1/package/npm/@xeokit/xeokit-sdk/badge)](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
- [![Peek-2019-10-22-10-57](https://user-images.githubusercontent.com/83100/67271586-14690780-f4bb-11e9-9e76-203fe425ee08.gif)](https://xeokit.github.io/xeokit-sdk/examples/#storeyViews_StoreyViewsPlugin_recipe2)
10
+ ## Installing
11
+
12
+ ````bash
13
+ npm i @xeokit/xeokit-sdk
14
+ ````
11
15
 
12
16
  ## Usage
13
17
 
14
- To install:
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
- ````bash
17
- npm i @xeokit/xeokit-sdk
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
+ ![](https://xeokit.io/img/docs/WebIFCLoaderPlugin/WebIFCLoaderPluginBig.png)
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
- * [xeokit.io](https://xeokit.io/)
23
- * [Examples](http://xeokit.github.io/xeokit-sdk/examples/)
24
- * [Guides](https://www.notion.so/xeokit/xeokit-Documentation-4598591fcedb4889bf8896750651f74e)
25
- * [API Docs](https://xeokit.github.io/xeokit-sdk/docs/)
26
- * [Changelog](https://xeokit.github.io/xeokit-sdk/CHANGE_LOG)
27
- * [Features](https://xeokit.io/index.html?foo=1#features)
28
- * [FAQ](https://xeokit.io/index.html?foo=1#faq)
29
- * [Blog](https://xeokit.io/blog.html)
30
- * [License](https://xeokit.io/index.html#pricing)
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