webdggrid 1.0.2 → 1.0.4
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/package.json +1 -1
- package/readme.md +31 -7
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
## Web Assembly version of DGGRID
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
  [](https://www.jsdelivr.com/package/npm/webdggrid)
|
|
7
|
+
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
## How to use
|
|
11
|
+
Please check `tests` folder for more examples.
|
|
12
|
+
|
|
13
|
+
in browser
|
|
14
|
+
|
|
15
|
+
```js
|
|
4
16
|
|
|
17
|
+
const WebdggridLocal = await import("../dist/index.js").then(m => m.Webdggrid).catch(console.log);
|
|
18
|
+
import { Webdggrid as WebdggridExternal } from "https://cdn.jsdelivr.net/npm/webDggrid/dist/index.js";
|
|
5
19
|
|
|
6
|
-
|
|
20
|
+
const Webdggrid = WebdggridLocal ?? WebdggridExternal;
|
|
7
21
|
|
|
8
|
-
|
|
9
|
-
|
|
22
|
+
const webdggrid = await Webdggrid.load();
|
|
23
|
+
const seqNum = dggs.geoToSequenceNum([[0, 0]]);
|
|
10
24
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
In nodejs
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import { Webdggrid } from 'webdggrid'
|
|
32
|
+
const dggs = await Webdggrid.load();
|
|
33
|
+
const seqNum = dggs.geoToSequenceNum([[0, 0]]);
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Under development
|