Surma
Surma
Yeah, Comlink does not (cannot?) handle this directly. For this purpose, each proxy has a [`createEndpoint`](https://github.com/GoogleChromeLabs/comlink?tab=readme-ov-file#comlinkcreateendpoint) method that creates a new `MessagePort` endpoint for the same object. You can transfer...
I think this is still relevant :)
That is disgusting. But it works, so I shall use a variation of it for now.
“exposed object” is the object that you pass to `expose()`. So if you do this: ```js Comlink.expose({ a: 1, b: "lol", [Comlink.finalizer]() { console.log("Finalized"); } }); ``` the finalizer will...
> 1. Is it ok to call `expose` multiple times in the same worker? No > 2. Is it ok to call `wrap` on a worker multiple times? No >...
`wrap()` is what returns a proxy. `proxy() is just a marker function that says a value should be proxied across the boundary. You are right that the docs should be...
I would heartily recommend going with [rquickjs](https://docs.rs/rquickjs) instead. Compiles really well to Wasm, and Amazon’s [llrt](https://github.com/awslabs/llrt) has all kinds of plugins to provide the standard globals like `TextEncoder`, `crypto.subtle` etc
Easiest way: [wasm-pack](https://rustwasm.github.io/wasm-pack/). It even generates a `package.json` and stuff. And for all the low-level questions and needs you might have about compiling Rust to WebAssembly, I'll shamelessly self-plug [my...
One consideration I would like to add: Shutter angle alone will make the motion blur inherently frame rate dependent and therefore potentially device specific. We know that most devices run...
Wow that is surprising that VS Code would do that. Obviously, it’s less than ideal like this :S For context: I am working on a small program that emits WebAssembly...