-
Notifications
You must be signed in to change notification settings - Fork 59
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
Meshlib WASM Web Execution #2720
Comments
Hello!
Basically you should be able to build MeshLib for wasm with https://github.com/MeshInspector/MeshLib#wasmemscripten this instruction. Please describe what errors have you got?
If you only need some functions easiest way is to create your own cpp project linked with MeshLib, create decorator functions in your project and expose it to js with https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html (we use https://emscripten.org/docs/api_reference/emscripten.h.html#c.EMSCRIPTEN_KEEPALIVE this way to mark cpp functions that we need to be called from js code) |
Thanks for the info! I'll get back to you with more information once I get the time to work on this |
Hi @Grantim, I had another go at Emscripten and managed to do the following:
My end goal is to be able to use meshlib functions on meshes in a javascrip webapp.
Thanks in advance & kind regards, |
Hello @emil-peters !
For now we does not have JS version for MeshLib (but is in our plans). Lines 1 to 10 in 425fcfb
MeshLib/source/MRViewer/MRColorTheme.cpp Lines 31 to 40 in 425fcfb
This method is quite simple, it has types limitations, so it will be more like C API if you need to access classes Other way is what we plan to do with meshlib in future: embind |
Heya,
I know you have the MeshInspector cloud/local software and was wondering how you guys do things in the cloud?
I was planning on making a small web-app which would use some meshlib calls.
I saw there is some WASM docs but I wasn't able to make this work?
What would be the best way to use MeshLib in a cloud webapp?
The text was updated successfully, but these errors were encountered: