Skip to content

Commit

Permalink
Use Comlink instead of rolling our own message passing (#13)
Browse files Browse the repository at this point in the history
* Use Comlink instead of rolling our own message passing

* Add sector parse and fetch cache

* Ensure ArrayBuffer copied per worker and cleanup

* Compute bounding sphere of BufferGeometry

This keeps THREE.js from trying to compute it based on the vertex data,
which is very slow.

* Let webpack select an available port automatically

* Handle memory properly for faces

* Bump webpack version

* Fix parsing of F3DF and move from ArrayBuffer to Uint8Array

Using Uint8Array everywhere is more explicit about the type and allows
us to use &[u8] when receiving data in Rust instead of adding an
additional conversion step.

* Remove extra createCache file

* Add proper types to workers
  • Loading branch information
dragly authored and larsmoa committed Nov 10, 2019
1 parent 3a5f8d6 commit 8693d79
Show file tree
Hide file tree
Showing 15 changed files with 699 additions and 508 deletions.
212 changes: 75 additions & 137 deletions Cargo.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions Cargo.toml
Expand Up @@ -10,10 +10,10 @@ crate-type = ["cdylib"]
path = "rust/lib.rs"

[dependencies]
wasm-bindgen = { version = "0.2.49", features = ["serde-serialize"] }
js-sys = "0.3.26"
serde = { version = "1.0.80", features = ["derive"] }
serde_derive = "^1.0.59"
wasm-bindgen = { version = "0.2.54", features = ["serde-serialize"] }
js-sys = "0.3.31"
serde = { version = "1.0.102", features = ["derive"] }
serde_derive = "1.0.102"
arraymap = "0.1.1"
console_error_panic_hook = "0.1.6"
serde-wasm-bindgen = "0.1.3"
Expand All @@ -23,12 +23,8 @@ openctm = { git = "https://github.com/cognitedata/openctm-rs", rev="cbaf8e71b344
i3df = { git = "https://github.com/cognitedata/reveal-rs", rev="9eac0c208ceec2cbbff39b37cf992f42585d6e3d" }
f3df = { git = "https://github.com/cognitedata/reveal-rs", rev="9eac0c208ceec2cbbff39b37cf992f42585d6e3d" }

[profile.release]
# TODO this enables debug symbols - remove when actually releasing to reduce file size
debug = true

[dependencies.web-sys]
version = "0.3.4"
version = "0.3.31"
features = [
'console',
'Headers',
Expand All @@ -38,3 +34,7 @@ features = [
'Response',
'Window',
]

[profile.release]
# TODO this enables debug symbols - remove when actually releasing to reduce file size
debug = true

0 comments on commit 8693d79

Please sign in to comment.