https://github.com/vuurvos1/wasm-marching-cubes
WASM Marching cubes implementation
https://github.com/vuurvos1/wasm-marching-cubes
marching-cubes metaballs rust wasm
Last synced: about 2 months ago
JSON representation
WASM Marching cubes implementation
- Host: GitHub
- URL: https://github.com/vuurvos1/wasm-marching-cubes
- Owner: Vuurvos1
- License: mit
- Created: 2024-12-31T13:34:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-29T15:37:15.000Z (over 1 year ago)
- Last Synced: 2025-03-02T09:14:44.765Z (over 1 year ago)
- Topics: marching-cubes, metaballs, rust, wasm
- Language: Rust
- Homepage: https://vuurvos1.github.io/wasm-marching-cubes/
- Size: 297 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Marching Cubes Meta Balls
A simple implementation of the marching cubes algorithm with meta balls in Rust and WebAssembly.
> [!NOTE]
> Currently the WASM performance seems to be about 1.6x faster than the THREE.js implementation but there might be more room for optimization.
## Developing
Once you've created a project and installed dependencies with `pnpm install`, start a development server:
```bash
pnpm dev
# or start the server and open the app in a new browser tab
pnpm dev -- --open
```
## Building
To create a production version of your app:
```bash
pnpm build
```
### Building the wasm module
To build the wasm module, you need to install `wasm-bindgen-cli`:
```bash
cargo install wasm-bindgen-cli
```
Then you can build the wasm module with:
```bash
pnpm build:wasm
```
You can preview the production build with `pnpm preview`.
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.