Open trusktr opened 4 years ago
hey @trusktr! Your project looks super cool!
I think that what you describe is possible, I will be happy to have a skype/zoom/whatever call about it My email is me@bnaya.net
If you are working with well-defined objects shapes you may want to also look at: https://github.com/GoogleChromeLabs/buffer-backed-object#readme Maybe it will be a better fit for your use case
Oh neat, thanks for sharing buffer-backed-object!
My username on Discord is trusktr#1223
. That's the best place to chat, if you're on there.
Any update on this? @Bnaya Is it possible to share object buffer with assemblyscript?
This seems like it might be the tool for the job. I saw you comments in the WebAssembly Discord #assemblyscript channel. Btw there's an official AssemblyScript Discord server now!
I'm working to port Three.js to AssemblyScript.
For people who will write in AssemblyScript, they'll just import the code and use it like normal. But there will be people who will (and for some of my projects I will) want to or need to write JavaScript and interface with things in WebAssembly. As an example, I'm working on custom elements that represent objects to draw on the screen with WebGL. It currently uses Three.js under the hood, in plain JS. But once I have ported enough of it to AssemblyScript, I'd like to run the WebGL engine in WebAssembly but I will need to interface with the custom elements which are JavaScript.
I've no idea how it will work yet, but something like what you are working seems like a possible way to create interfaces to the same objects that live in a WebAssembly module.
For example, if I were writing in pure AssemblyScript, then I could make a
new Mesh
and set some properties on it. But if I'm in JS, I would also like to do the same (but still have it be in the WASM module).Any thoughts on this?