JME Running In Web Browsers

Hello Guys,
I have a requirement for running my 3D Scenes in web browsers. Up until now I thought I will need to write a whole new renderer using BabylonJs or Three.JS since JME is Java based and Java cannot run on web browsers but recently I saw that libGDX which is also a Java based library, uses GWT for targeting web deployments.
So, any of you with experience in GWT - do you think it’s feasible for JME to be converted to JS with GWT and run in web browsers?

Thanks a lot!

1 Like

Perhaps see: JSME - Monkey engine with JSweet and WebGL - User Code & Projects - jMonkeyEngine Hub

Or just search GWT on the forums. Many topics on it.

There are several major issues with it:

  1. GWT has poor performance on anything of relative shader complexity.
  2. My understanding is that this only addresses the issue handling the front end from java to javascript. Things like the assetloader, or any reflective access will not work. Using Unsafe probably will not work (which is used heavily in jme for off heap buffers last I checked.)
  3. Loading external DLLs for opengl is hardcoded into jme, there would have to be modifications to the engine to stop the process of unpacking and loading the native libraries.

I’m sure there are other majors roadblocks as well, but these are three off the top of my head.

Perhaps others have dove into this deeper and have a better understanding of the limitations and road blocks.

2 Likes

Just curious: what don’t you like about BabylonJs or Three.JS? I’ve used the latter extensively several years back, and when I combine it with libraries like chandlerprall’s Physijs and such, it has worked quite well for me. It doesn’t come with all the the “game-engine” specific bells and whistles that stuff like JME does, but it works quite well with WebGL-based rendering and can be combined with other libraries to fill in the gaps such as physics, input, and networking.