Can Panda3D be integrated with the web? Like, is there a way to build a website where the user can test an application made in Panda3D without them needing to download a file and without a dump in performance?
Yes. But it’s experimental, and you should probably expect a performance degradation compared to running natively, because everything has to run inside the browser’s VM.
Demo:
https://rdb.name/panda3d-webgl/editor.html
Instructions:
https://rdb.name/panda3d-webgl.md.html
Thread:
I see. Thank you for your answer!
Btw, do you know when will this integration be fully released (that is, after the experimental phase)? And how much of a performance dump should I expect given I’d be running a simulation with hundreds/thousands of agents interacting with one another?
It’s not currently a particularly high priority for the team, so I cannot give any guarantees about when it will no longer be considered “experimental”.
I can’t give you specific numbers, as this will vary a lot between implementations and also depends highly on what you’re doing. Since the Python VM is running entirely inside the browser’s JavaScript VM, anything that is implemented in Python will have an inherent performance penalty. There is also no good support for multi-threading in the browser. I would imagine that code implemented in C/C++ or JavaScript will be faster than code implemented in Python. Maybe the difference with native code has gotten smaller or will get smaller as the quality of WebAssembly implementations improves.