<https://stackoverflow.com/questions/69904006/how-...
# compose
n
https://stackoverflow.com/questions/69904006/how-to-draw-3d-objects-in-jetpack-compose How to draw 3D objects like cube in Jetpack Compose? I want to draw a cube and rotate it. I could find any samples or tutorials for it except this. But it was too difficult for me.
1
s
Here's a rotating cube: https://github.com/sigurdurrafn/compose3d I made this a while ago to play with 3d maths Note that this is doing all the computation manually, no opengl or similar involved
✔️ 1
Haven't looked at it in a while, there might be better canvas draw commands now
r
I have a couple of sample apps that mix Compose and our Filament renderer. The rendering code itself isn't "compose" but there's no interop issue.
But those rely on a real 3D renderer not simple Canvas tricks
c
Slightly off topic. I have a 3d item (a fancy reflective cube) that I just want to keep spinning in my app. Would that be possible to create in Filament and then drop that into our compose app and our ios app? I've never done 3d rendering before, but it sounds like filament would make sense to use, esp if it could be used on our react app and swift UI app.
r
It shouldn’t be an issue yes. Filament supports iOS and Android
K 1
n
@Siggi Gunnarss @romainguy thanks a lot
@Siggi Gunnarss is there any tutorial for it?
s
No documentation, sorry. doesn't even support loading in .obj files. I'll fix that some day