Powerful optimization of the first KMP 3D Globe en...
# multiplatform
e
Powerful optimization of the first KMP 3D Globe engine WorldWind Kotlin v1.8.2 released https://github.com/WorldWindEarth/WorldWindKotlin/releases/tag/v1.8.2
🚫 1
❤️ 4
f
Does it has iOS support 👀
e
@Fernando For now only Android and Web. Partially Java FX. But it is not very hard to add another platform. Will appreciate if you join and help to add it. We have no experience in iOS development.
d
I asked the same question on their github repo, It would really be something great. Right now the Map players on Compose are: • Google Maps - only android • Mapbox - no KMP support, only android, not open-source, costs a lot • Maplibre - The best features so far, open-source, but is legacy and not kotlin from ground up, it's a wrapper to KMP (all platforms, except WASM) • MapComposeMP - They wrote everything in Compose from ground up, all platforms supported, but small amount of features, supports only Raster tiles no Vector tiles, still early stage, no globe projection And comes WorldWindEarth Kotlin who is Kotlin from ground up, compatible with Compose, no legacy, so if iOS and Desktop targets are added, then the lib can become very useful for KMP developers *Sorry actually it does not have Compose support, but it could be added to Compose apps, which is sad
❤️ 1
e
@Dumitru Preguza we need assistance to complete JavaFX and iOS targets. We do not need them in our production system, that`s why it is low priority already 3 years.
d
@Eugene Maksymenko interesting why you decided to go with JavaFx and not TornadoFx, and why not Compose Desktop ? If you had Compose on Android it would have be very easy (almost zero changes) to add Desktop support as well, but how you did is: you added android non compose, now you have to support Desktop separately, and then iOS too, from design point of view https://github.com/p-lr/MapComposeMP did better
@Eugene Maksymenko I just opened your demos right now, first time looking into them
e
Basically WorldWind Kotlin has nothing with UI framework. It just represents platform native OpenGL views like GLSurfaceView, WebGLCanvas, JPanel etc... You can build in it in any UI framework.
Everything related to 3D globe is incapsulated in OpenGL view. We insert it inside compose as usual Android view in our project.
d
Do you have demo with Compose ?
e
@Dumitru Preguza Yes, but it is restricted to Ukraine only for now https://www.youtube.com/@combat.vision
d
you implemented just the Android View, but it can not be transferred to iOS, Desktop, Web as Composables, whereas if it would have been Jetpack Compose from start it would be easy to go multiplatform from there anyway I don't know the limits of the project, and maybe you have a good point to be UI independent first
e
Btw it has AR kit built-in and also it support RMaps, MBTiles, GeoPakage, ATAK Maps etc.
d
I saw it already, great things, I would like to build a messaging app on top of such SDK
Something similar to https://go.yondar.me/dashboard
e
You can see how we use it

https://www.youtube.com/watch?v=8SI1OxqZhxA

d
I played Supremacy1914 - it's the same
Imagine that instead of these flags, there would be messages that someone from your group left on the map
Anyway, the technology can be used not only for defense strategies right ?
e
Yes. It is a general purpose 3D globe with AR.
d
I need more documentation to it (3D globe, AR integration etc) And Compose Multiplatform support then it's just perfect
e
Copy code
val context = LocalContext.current

AndroidView(
    factory = { WorldWindow(context) },
    modifier = Modifier.fillMaxSize()
)
It is a Surface View. It lives outside of Compose. Basically it is a separate window below it.
d
Yes, it's like iFrame from web inside a react app for example, just for analogy But it gives less control in a fully CMP project
e
In Web it is just WorldWindow(canvas) in android WorldWindow(context). You can easily built it in Compose or any native UI framework.
d
The thing with Compose is that the whole framework is based on a primitive Canvas named Skia that is supported on all platforms at once: Ios, Android, Desktop, with the same API One common codebase for all platforms, same UI, just some platform specific functions maybe
I need to analyse your project more to be honest
e
I do not imagine how to combine various OpenGL implementations into one unified View. It has completely different approach for 3D rendering.
👍🏻 1
May be you can wrap it to this Canvas on top.
r
@Dumitru Preguza
interesting why you decided to go with JavaFx and not TornadoFx
TornadoFX only ever worked with Java 8 and has been dead for years. There was a brief attempt to move it into more modern Java and JavaFX versions a while back, but it never caught on (mostly due to all the hype around compose desktop, which at the time was Coming Soon™). JavaFX on the other hand has continued on and is still quite a nice and mature framework. Hopefully someday compose's feature set and platform integration will be good enough to eclipse JavaFX, but at the moment there's still plenty of use cases where JavaFX is a better fit.
👍🏻 1