Erkko68/filament-kmp
Acerca de
Kotlin Multiplatform 3D graphics wrapper for Google's Filament engine, featuring first-class Compose Multiplatform integration across Android, iOS, Desktop, and Web.
Diseño y multimediaCrecimiento de estrellas medido
- in 24h
- +1
- in 7 days
- +1
- in 15 days
- +2
- in 1 month
- +6
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalFilament KMP
Filament KMP brings Google's Filament physically based renderer to Android, iOS, Desktop and Web from one Kotlin API, with an optional Compose Multiplatform layer on top.
▶ Try the live web demo — every sample scene, in your browser.

FilamentSceneView(
modifier = Modifier.fillMaxSize(),
cameraState = rememberCameraState(initialEye = Position(0f, 1f, 4f)),
postProcessing = PostProcessing(bloom = Bloom(strength = 0.2f)),
) {
Skybox(color = LinearColor(0.1f, 0.12f, 0.15f))
IndirectLight(irradiance = SphericalHarmonics.NeutralStudio) // soft ambient, no file to load
DirectionalLight(direction = Direction(0.3f, -1f, -0.5f), intensity = LightIntensity.LuminousPower(100_000f))
GltfInstance(asset = rememberGltfAsset { Res.readBytes("files/Duck.glb") })
}
- One API everywhere — the Kotlin API is written once in
commonMainover a C API generated from Filament's headers, so it behaves the same on every platform. - Filament's own API — same classes, names and defaults as Filament's C++ API, so Filament's docs apply directly.
- Compose optional —
filament,gltfio,filament-utilsandfilamatare plain bindings: driveEngine/Renderer/SwapChainon your own surface, or render headless (guide).
[!NOTE] Unofficial project. A community-maintained wrapper, not affiliated with, endorsed by, or supported by Google or the Filament team.
Platforms
| Platform | Backend |
|---|---|
| Android (minSdk 24) | OpenGL ES / Vulkan |
| iOS | Metal |
| Desktop / JVM — macOS 11+, Windows 10+, Linux (glibc 2.38+) | Metal / Vulkan / OpenGL, JDK 17+ |
| Web (JS & Wasm) | WebGL 2.0 |
Quick start
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
mavenCentral()
google()
}
}
// build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
// Compose integration (pulls in the engine), or just "…:filament:0.11.1" without Compose.
implementation("io.github.erkko68.filament:filament-compose:0.11.1")
}
}
}
The same coordinates work on every target. Per-platform setup (iOS linking, Web prebuilts, Desktop natives) is in Getting Started.
Modules
| Artifact | Description |
|---|---|
filament |
Core renderer — Engine, Scene, View, Renderer, Camera, Texture, Material. |
filament-compose |
Compose Multiplatform integration — FilamentSceneView, scene DSL, camera state, post-processing. |
gltfio |
glTF / GLB loading — AssetLoader, FilamentAsset, Animator. |
filamat |
Runtime material compilation — MaterialBuilder. |
filament-utils |
Camera manipulators, HDR/KTX loaders, math helpers. |
All under io.github.erkko68.filament, one shared version. Coordinates and per-target dependencies: Modules.
Documentation
- API Reference — generated KDoc for all modules.
- Getting Started — per-platform setup, first scene.
- Compose Integration — scene DSL,
FilamentSceneView/rememberFilamentScene/FilamentView, post-processing. - Using the Engine Without Compose — own render loop, own surface, headless rendering.
- Platform Notes — backends, per-platform gotchas, web limits.
- Versioning & Stability — release policy, what may change, how the API is shaped.
- Migration guides — upgrading across breaking releases.
- All docs, including internals for contributors.
For engine concepts (PBR, lighting, materials), see Filament's own Engine and Materials docs.
Samples & showcase
samples/— one shared Compose app on all four targets, also live on the web.- HexonKMP — a Catan-like strategy board game built with Filament KMP. Play it on the web.
License
Apache License 2.0. Filament itself is also Apache-2.0 licensed by Google.
Explorar proyectos relacionados
Cargando…