https://github.com/codeyousef/sigil
Declarative 3D graphics for Kotlin Multiplatform. Build WebGPU/Vulkan scenes using Compose-style syntax with the Materia engine.
https://github.com/codeyousef/sigil
3d-graphics compose declarative-ui graphics kotlin kotlin-multiplatform rendering shaders ssr vulkan webgpu wgsl
Last synced: about 2 months ago
JSON representation
Declarative 3D graphics for Kotlin Multiplatform. Build WebGPU/Vulkan scenes using Compose-style syntax with the Materia engine.
- Host: GitHub
- URL: https://github.com/codeyousef/sigil
- Owner: codeyousef
- Created: 2025-12-08T14:28:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-26T09:01:40.000Z (6 months ago)
- Last Synced: 2025-12-27T20:44:29.707Z (6 months ago)
- Topics: 3d-graphics, compose, declarative-ui, graphics, kotlin, kotlin-multiplatform, rendering, shaders, ssr, vulkan, webgpu, wgsl
- Language: Kotlin
- Homepage: https://sigil.yousef.codes
- Size: 3.8 MB
- Stars: 10
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
#
Sigil
**Declarative 3D for Kotlin Multiplatform & Jetpack Compose**
[](https://central.sonatype.com/artifact/codes.yousef.sigil/sigil-compose)
[](https://opensource.org/licenses/MIT)
[](https://kotlinlang.org)
[](https://www.jetbrains.com/lp/compose-multiplatform/)
---
**Sigil** is a powerful library that brings 3D rendering to your Compose Multiplatform applications using a familiar, declarative syntax. Built on top of the **Materia** engine, Sigil bridges the gap between the reactivity of Compose and the performance of low-level graphics APIs (Vulkan, WebGPU, Metal).
## ✨ Features
- **Declarative Syntax**: Build scenes with `Box`, `Sphere`, `Group`, and `Light` composables.
- **Reactive State**: Drive animations and scene updates using standard Compose state (`mutableStateOf`, `animate*AsState`).
- **Multiplatform**:
- 🖥️ **JVM (Desktop)**: Vulkan-backed rendering.
- 🌐 **Web (JS/Wasm)**: WebGPU/WebGL2 support.
- 📱 **Android/iOS**: (Coming Soon)
- **PBR Materials**: Physically Based Rendering for realistic lighting and materials.
- **Zero Boilerplate**: No manual loop management or context handling required.
## 📦 Installation
Add Sigil to your `commonMain` dependencies in `build.gradle.kts`:
```kotlin
implementation("codes.yousef.sigil:sigil-compose:")
implementation("codes.yousef.sigil:sigil-schema:")
// For SSR with Ktor, Spring Boot, or Quarkus:
implementation("codes.yousef.sigil:sigil-summon:")
```
Replace `` with the latest Sigil version from Maven Central.
## 🚀 Quick Start
Create a stunning 3D scene in just a few lines of code:
```kotlin
import codes.yousef.sigil.compose.canvas.MateriaCanvas
import codes.yousef.sigil.compose.composition.*
import io.materia.core.math.Vector3
@Composable
fun RotatingCube() {
var rotationY by remember { mutableStateOf(0f) }
// Your animation logic here...
MateriaCanvas(modifier = Modifier.fillMaxSize()) {
// Lighting
AmbientLight(intensity = 0.5f)
DirectionalLight(position = Vector3(5f, 10f, 5f))
// Objects
Group(rotation = Vector3(0f, rotationY, 0f)) {
Box(
color = 0xFF4488FF.toInt(),
metalness = 0.5f,
roughness = 0.1f
)
}
}
}
```
## 📚 Documentation
Explore the full guides and API reference:
- [**Quickstart Guide**](docs/quickstart.md)
- [**Components Guide**](docs/components.md)
- [**State Management**](docs/state-management.md)
- [**Materials & PBR**](docs/materials.md)
- [**SSR & Hydration**](docs/ssr-hydration.md)
- [**Architecture**](docs/architecture.md)
## 🤝 Contributing
Contributions are welcome! Please check our [Contributing Guidelines](CONTRIBUTING.md) before submitting a PR.
## 📄 License
This project is licensed under the MIT License.
---
*Built with ❤️ by [CodeYousef](https://github.com/codeyousef)*