sceneview/sceneview

3D & AR SDK for Android (Jetpack Compose + Filament), Apple (SwiftUI + RealityKit), Web, Flutter and React Native. Opens glTF/GLB, 3MF, STL, OBJ and PLY on Android and USDZ on Apple, at real size in AR. Assistant-ready: in-repo MCP server, AGENTS.md and llms.txt — no assistant-specific setup.

SceneView – Declarative 3D & AR for modern UI toolkits

What it is – An open‑source SDK that lets you add real‑time 3‑D rendering and augmented‑reality (AR) experiences to apps written with Jetpack Compose, SwiftUI, web JavaScript, Flutter, React Native, or Kotlin‑Multiplatform. It wraps the native graphics engines (Filament on Android/desktop, RealityKit on Apple, Filament.js on the web) behind a declarative, composable API, so you can treat a 3‑D scene much like a UI layout.

Why “AI‑first” matters – The project ships a tiny Model‑Context‑Protocol (MCP) server and a plain‑text llms.txt file that describe the whole public API. AI assistants (Claude, Codex, Copilot, Gemini, etc.) can query the server to validate snippets, fetch node signatures, or list sample code, enabling a workflow where you ask an LLM “Add a 3‑D model viewer to my Compose screen” and get working code on the first try.


Core features (grounded in the README)

Feature How it works Platforms
Declarative 3‑D scene graph SceneView { … } is a composable that hosts a Filament/RealityKit viewport. Inside you place node composables (ModelNode, CubeNode, LightNode, etc.) that automatically recompute when state changes. Android (Compose), iOS/macOS/visionOS (SwiftUI), Web (JS/Kotlin‑JS), Compose‑Multiplatform, Flutter, React Native
AR integration ARSceneView builds on the same composable model but drives the camera from ARCore (Android) or ARKit/RealityKit (Apple). Nodes can be anchored to real‑world surfaces (AnchorNode, PlaneNode, CloudAnchorNode, geospatial anchors, etc.). Android, iOS/macOS/visionOS
Cross‑platform renderers • Android & desktop – Filament (high‑performance Vulkan/OpenGL).
• Apple – RealityKit (Metal).
• Web – Filament.js (WebGL2/WASM).
All listed platforms
Rich node library 27 3‑D nodes + 15 AR‑specific nodes covering models, primitives, geometry, lights, sky, physics, cameras, UI‑in‑3‑D, Gaussian splats, etc. All platforms (native nodes; Flutter/React Native expose a subset)
Physics & collision Pure‑Kotlin‑Multiplatform rigid‑body simulation, ray‑casting, and collision detection, usable on any platform that runs the core library. Android, Compose‑Multiplatform, Desktop
Gestures & animation Nodes can be marked isEditable to get drag, pinch‑to‑scale, rotate, and tap handling. glTF/GLB models animate automatically; additional spring/property animations are available. All platforms
Environment & post‑processing HDR IBL lighting, skyboxes, bloom, depth‑of‑field, SSAO, tone‑mapping, custom Filament materials. Android, Web, Desktop
Compose‑in‑3‑D ViewNode renders any Compose UI onto a textured plane that remains fully interactive (buttons, scrolling, etc.). Android Compose, Compose‑Multiplatform
AR recording & replay rememberARRecorder() captures a session; ARSceneView(playbackDataset = file) replays it 1:1 for debugging. Android AR
Rerun.io live debug bridge Streams poses, planes, point clouds to the Rerun viewer for visual debugging. Android AR

Getting started (quick‑start snippets from the README)

Android (Jetpack Compose)

implementation("io.github.sceneview:sceneview:4.51.0")

@Composable
fun ModelScreen() {
    SceneView(modifier = Modifier.fillMaxSize()) {
        rememberModelInstance(modelLoader, "models/helmet.glb")?.let {
            ModelNode(modelInstance = it, scaleToUnits = 1f, autoAnimate = true)
        }
    }
}

The helper rememberModelInstance loads the GLB on the main thread and triggers recomposition when ready.

Android AR

implementation("io.github.sceneview:arsceneview:4.51.0")

@Composable
fun ARScreen() {
    var anchor by remember { mutableStateOf<Anchor?>(null) }
    ARSceneView(modifier = Modifier.fillMaxSize(), planeRenderer = true) { _, frame ->
        if (anchor == null) {
            anchor = frame.getUpdatedPlanes()
                .firstOrNull { it.type == Plane.Type.HORIZONTAL_UPWARD_FACING }
                ?.let { frame.createAnchorOrNull(it.centerPose) }
        }
    } {
        val helmet = rememberModelInstance(modelLoader, "models/helmet.glb")
        anchor?.let { AnchorNode(anchor = it) { helmet?.let { ModelNode(modelInstance = it, scaleToUnits = 0.5f) } } }
    }
}

State (anchor) is ordinary Kotlin state – when it changes the UI recomposes and the model appears.

iOS / macOS / visionOS (SwiftUI)

import SceneViewSwift

struct ModelScreen: View {
    @State private var model: ModelNode?
    var body: some View {
        SceneView { root in
            if let model { root.addChild(model.entity) }
        }
        .contentID(model != nil)
        .cameraControls(.orbit)
        .task { model = try? await ModelNode.load("helmet.usdz") }
    }
}

.contentID forces the builder to run again once the async load finishes.

Web (plain HTML/JS)

<canvas id="viewer" style="width:100%;height:480px"></canvas>
<script src="https://cdn.jsdelivr.net/gh/sceneview/sceneview@v4.51.0/website-static/js/filament/filament.js"></script>
<script src="https://cdn.jsdelivr.net/gh/sceneview/sceneview@v4.51.0/website-static/js/sceneview.js"></script>
<script>SceneView.modelViewer("viewer", "model.glb")</script>

One‑liner that creates a Filament viewer and loads a GLB model.

Flutter

final controller = SceneViewController();
SceneView(
  controller: controller,
  onViewCreated: () => controller.loadModel(
    const ModelNode(modelPath: 'models/helmet.glb'),
  ),
);

React Native (TypeScript)

<SceneView
  style={{flex:1}}
  modelNodes={[{src:'models/helmet.glb', position:[0,0,-2]}]}
  cameraControlMode="orbit"
/>

AI‑first workflow

  1. API reference – llms.txt contains every composable, node, and threading rule in a single searchable file. The CI compiles the snippets, guaranteeing they stay in sync.
  2. MCP server – A tiny local server (sceneview-mcp) that LLM plugins can call:
    • validate_code – checks a snippet against the real public API.
    • list_samples / get_sample – fetches one of the 38 ready‑made demos.
    • get_setup – returns the Gradle/Swift/JS boiler‑plate needed for a platform.
  3. Plug‑in support – OpenAI plugin, Claude Code plugin, and Copilot CLI integration are pre‑configured in the repo, so assistants can automatically discover the three skills (sceneview, sceneview-ios, sceneview-web).
  4. Prompt example – After installing the MCP server (npx -y sceneview-mcp), you can ask an LLM:

    “Add a 3‑D model viewer to my Compose screen.” The assistant will:

    • query the MCP for the correct composable names,
    • generate the minimal code shown in the quick‑start, and
    • optionally run validate_code before you paste it.

Project health & community

Indicator Value
License Apache 2.0 (permissive, commercial‑friendly)
Latest stable releases Android 3‑D 4.51.0, AR 4.51.0, Swift 4.39.0, Web 4.51.0
Package distribution Maven Central, Swift Package Registry, npm, pub.dev, Maven Central for Android AR, etc.
CI GitHub Actions run on every push; CI also compiles the llms.txt snippets.
Community Discord server, Open Collective for funding, GitHub stars, and an active plugin ecosystem.
Documentation README with platform‑specific quickstarts, samples/ folder with 38 demos, and a live web playground.

Who should use it?

  • App developers who want 3‑D or AR without learning a full game engine.
  • Product teams looking to prototype immersive features quickly and keep the codebase in the same UI language (Compose, SwiftUI, etc.).
  • AI‑enhanced development workflows – teams that already use LLM assistants can plug the MCP server in and get auto‑validated, up‑to‑date snippets.

TL;DR

SceneView is a genuine, production‑ready SDK that brings declarative 3‑D rendering and AR to the major UI toolkits of today. It abstracts native graphics engines behind composable APIs, supplies a full‑text API spec (llms.txt) and an MCP server for LLM integration, and ships on all major package registries. If you need to drop a model viewer, place virtual objects in the real world, or let an AI write the code for you, SceneView is purpose‑built for that.

Related

  • Project
  • Project
  • Project
  • Project
  • Project