Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paulwalko committed Dec 10, 2021
0 parents commit 6d56a7e
Show file tree
Hide file tree
Showing 11 changed files with 3,626 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Example

```
const survex = require('survex.js');
survex.load((Survex) => {
Survex.imgOpen('http://10.42.0.203:8081/svn/skydusky/us/va/bland/Skydusky/Skydusky.3d')
.then(img => {
while (img.code >= 0) {
if (img.code === survex.codes['raw']['img_LABEL']) {
console.log(`label: ${img.label}, X: ${img.mv.x}, Y: ${img.mv.y}, Z: ${img.mv.z}`);
}
img = Survex.imgReadItem(img.ptr);
}
});
});
```
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

emcc img.c img_shim.c \
-O3 \
-s EXPORTED_FUNCTIONS="['_free']" \
-s EXPORTED_RUNTIME_METHODS="['FS', 'getValue', 'UTF8ToString']" \
-o img.js
# -s FORCE_FILESYSTEM=1 \
Loading

0 comments on commit 6d56a7e

Please sign in to comment.