Hi,
I’ve made a port of the Urho3D engine to Emscripten. The github repo is at github.com/badpixels/Urho3D/tree/1.32-emscripten
It’s based on the 1.32 tag. Many of the changes came from the Atomic Runtime repo. (Thank you Atomic dev(s)). Most of the samples work at some level but there are a few unsolved problems:
- no sound
- terrain doesn’t render
- mouse locking fails
- no networking. As far as I know, javascript only supports http and websockets and I don’t think kNet will work over websockets. (I could be wrong)
- Angelscript fails. I think it has something to do with generic calling conventions but not sure.
- anything else I haven’t tried.
The built samples can be viewed at di01.wwweb3d.net/urho/
I’ve put this up in this state as I don’t have much more time to spend on it in the near term and I thought others might be interested in helping. I would have created a pull request but I don’t know if it’s in a acceptable state of functionality yet and I would need some help rebasing it to HEAD and getting it to work with the new build system.
Most of the changes to the engine source are quite simple and are separated by #if defined(EMSCRIPTEN) directives. I had to move the files Controls.cpp and Controls.h from the Source/Engine/Network directory to Source/Engine/Input but this move doesn’t seem to affect any of the rest of Urho so I assume it’s an acceptable change.
If this is acceptable for a pull request, let me know here and I’ll create one.
Enjoy