-
Notifications
You must be signed in to change notification settings - Fork 2
Initial WASM implementation #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| if let Some(mesh) = ctx.batch.current_mesh.take() { | ||
| // we defensively apply a small z-offset based on draw_index to preserve painter's algorithm | ||
| let z_offset = ctx.batch.draw_index as f32 * 0.001; | ||
| let z_offset = -(ctx.batch.draw_index as f32 * 0.001); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow evidently I screwed this up again relative to ProcessingProjection.
|
getting this error when building: |
I added a |
|
just seems to install wasm-bindgen and runs wasm-opt for both wasm-build and wasm-serve |
catilac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just needs the #[cfg(not...)] to compile but g2g!
image_load build config logic
Partially addresses #26.
Adds a new
processing_wasmcrate that operates similar toprocessing_ffi, i.e. wrap in a WASM/JS compat function.We're helped by running in a single thread on desktop already, but on web we can't ever block the main thread, so we need a few additional non-blocking flavors of some methods that currently block on desktop.
We're generating JS bindings here because it's helpful to test. Most implementers will likely just bind directly to the WASM module.
Adds a
justfileto help coordinate some of this. If you're not familiar,justis a common task running in the Rust ecosystem that's like a simplified make.