Skip to content
프로젝트

소개

Declarative 3D graphics for Kotlin Multiplatform. Build WebGPU/Vulkan scenes using Compose-style syntax with the Materia engine.

디자인 및 미디어

이 수치를 측정하는 방법

What you can do

  • 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).
  • 🖥️ JVM (Desktop): Vulkan-backed rendering.
  • 🌐 Web (JS/Wasm): WebGPU/WebGL2 support.

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Sigil logo Sigil

Declarative 3D for Kotlin Multiplatform & Jetpack Compose

Maven Central License Kotlin 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:

implementation("codes.yousef.sigil:sigil-compose:<version>")
implementation("codes.yousef.sigil:sigil-schema:<version>")

// For SSR with Ktor, Spring Boot, or Quarkus:
implementation("codes.yousef.sigil:sigil-summon:<version>")

Replace <version> with the latest Sigil version from Maven Central.

🚀 Quick Start

Create a stunning 3D scene in just a few lines of code:

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:

🤝 Contributing

Contributions are welcome! Please check our Contributing Guidelines before submitting a PR.

📄 License

This project is licensed under the MIT License.


Built with ❤️ by CodeYousef

관련 프로젝트 살펴보기

불러오는 중…