There is a new interesting development in 3D rendering. Lars Ivar Hatledal just announced full kotlin-jvm port of three-js library: GitHub - markaren/three.kt: Three.js port for the JVM (desktop). It is not JS wrapper, but a complete port to desktop OpenGL. We had a small discussion about it and it seems to be possible to create a full multi-platform support for this effort including wrapper for JS, stand-alone implementation for JVM (I hope to also add JavaFX back-end) and in future native wrapper of native OpenGL.
The problem is that project is too large for two of us because it is not primary concern for both (I am OK with web version for now and Lars needs only desktop-JVM). So the question is how much interest does this project rise and are there people willing to work on it.
I had vague plans to do start almost exactly that project in the future, and would be willing to work on this instead, but I might have to put off some other things to find time to work on this in the near future. The idea of a comprehensive 3D rendering library which is portable between Android, web and other is very appealing.
A few years ago there was a similar project, but rewritten in Java rather than Kotlin, called Parallax 3D, and I started porting it to Android. I never finished it, but I did do enough to get several of the demos working. But upstream is no longer under development, and Kotlin happened.
Most of the difficulty in making Three cross-platform is coping with the different OpenGL/ES/WebGL APIs so what I was planning to do this time was write wrapper libraries to provide the WebGL API to Kotlin on native and JVM platforms. Much of the process can be scripted. I think that should make maintenance of the rest of the library simpler. Would that be helpful for three.kt?
Personally, I do not need Game engine, I need a 3D visualization library. Also I am not sure that it will be possible to create a multiplatform from it. Three already has web.
Why would you prefer a JMonkey API over a Three.js API? Honest question. IMO, three.js is much simpler, supports more 3D formats, looks better with less work, has better examples and documentation and a bigger and more active community.
My previous comment was sponsored by beer (I thought your “impossible” was about three in multiplatform). I re-read your comment and now i see what did you mean. I like idea of multiplatform three.
Wow that’s great then…but what I’m looking for is to integrate three.js into my kotlin mobile app using Android studio, I want 3D objects and simulations in real time…I don’t know if this is possible…
And, I would appreciate it if you could point me to a resource relating to what I just asked… thanks.
Three-js is a JS library. So, the only way to “integrate it in mobile app” is to open it in embedded browser. If you want native application, you need to use a framework that works with android graphics.