This repo consists of two projects:
- a crate with wasm bindings for bin_packer_3d
- an SPA to demonstrate the abilities of this crate
wasm-pack test --headless --firefox
wasm-pack build
(TODO: update the upstream wasm-pack lib to avoid having to do this manually)
- add
"bin_packer_3d_wasm_bg.js"
to the package.json'sfiles
field perhaps related issue: rustwasm/wasm-pack#199 - add
"main": "bin_packer_3d_wasm.js",
to enable importing as esm from node - add
"type": "module",
to enable importing as esm from node - rename the package.json to
"name": "bin_packer_3d"
This crate is namedbin_packer_3d_wasm
to avoid naming conflicts with thebin_packer_3d
crate. - bump the package.json version
wasm-pack publish
cd wwww
npm start
(TODO: add this)
This crate was generated using cargo generate
with wasm-pack-template
. Learn more about cargo generate
here.
cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
cd my-project