Package-level declarations
Types
What every camera controller can do, so generic UI (a "reset view" button) can drive whichever is active. The camera itself lives in the CameraState: read or set CameraState.viewpoint, or fly with CameraState.animateTo, and the controller carries on from there.
Receiver for the onCreate callback of entity-producing scene composables — Group and the primitives (Cube, Sphere, Plane, Cylinder, Mesh). Exposes the created entity together with the engine, so one-time setup (manager operations, entity-keyed maps) needs no extra plumbing — the same scope-receiver shape as GltfInstance's richer GltfInstanceScope.
Marks Compose Desktop's experimental GPU-to-GPU frame sharing (FilamentComposeDesktop.isGpuToGpuFrameSharingEnabled).
Compose Desktop (JVM) rendering options for filament-compose.
Restricts the implicit-receiver search inside nested scene declarations. See FilamentSceneScope.
A handle to a Filament Scene and its Engine, produced by rememberFilamentScene and consumed by one or more FilamentViews. The scene is the world — entities, lights, skybox, environment — and knows nothing about cameras or viewports.
Receiver for the content lambda of rememberFilamentScene. Scene-content composables (io.github.erkko68.filament.compose.scene.Light, GltfInstance, Group, primitives, FilamentEffect, …) are extensions on this scope, so they only compile inside a scene declaration.
Hoisted handle to a FilamentView's live Filament objects. Create with rememberFilamentViewState, pass to a FilamentView, and use it for imperative access — picking, captures, reading the viewport, or reaching the raw View/Renderer for advanced work.
Drives a CameraState using a Filament Manipulator in FLIGHT mode (first-person), for its damped movement and speed curve. A viewpoint written to the state (by the app or CameraState.animateTo) is where it flies on from.
Pans and zooms a CameraState over the scene, the way Filament's camutils map manipulator does, working on the state itself: drag slides the view, scroll and pinch zoom towards the pointer, no rotation. Set the state up looking down on the ground (an up of -Z puts north at the top); with Projection.Orthographic, zoom scales its extents.
Orbits a CameraState around its target, the way Filament's camutils orbit manipulator does, working on the state itself. Create with rememberOrbitCameraController, pass the same CameraState to FilamentView, and attach Modifier.orbitGestures to the view's surface. Up stays the state's up; the orbit turns around +Y.
Properties
The Engine backing the enclosing rememberFilamentScene, or null outside one.
Functions
Entry point for Filament-powered Compose web apps.
Escape hatch for direct Filament API access inside rememberFilamentScene. Use it to add custom renderables to the scene or drive per-frame updates that the scene composables don't cover. For per-view, imperative access (picking, the raw View/Renderer), use FilamentViewState instead; for the camera, use io.github.erkko68.filament.compose.scene.CameraState.
All-in-one entry point for the common single-view case: declares a scene and renders it through one viewport in a single call. Equivalent to a rememberFilamentScene feeding one FilamentView — reach for those directly when you need multiple views over one scene, or to hoist the scene as a value.
A viewport onto a FilamentScene. Each FilamentView owns one Filament View, Camera, Renderer, and platform surface, and renders the given scene through them. Place several FilamentViews — anywhere in your layout — to render one scene through different cameras and post-processing setups.
Attaches flight camera gesture and keyboard handling to this element.
Attaches map gesture handling to this element.
The single per-frame primitive for filament-compose: runs onFrame once per display refresh (via withFrameNanos) without triggering recomposition. Every other per-frame helper — rememberSceneClock, FilamentEffect's onFrame, rememberFlightCameraController, io.github.erkko68.filament.compose.scene.rememberAnimationState — is built on this.
Attaches orbit gesture handling to this element.
Issues a Filament picking query at every tap position and delivers the result to onPick.
Creates and remembers an Engine for the lifetime of the composition.
Declares a Filament Scene as a value. The content lambda declares the world — lights, models, primitives, groups — via scene composables; it emits no UI and runs once at this call site regardless of how many FilamentViews later render the scene.
Creates and remembers a FilamentViewState.
Creates and remembers a FlightCameraController driving cameraState in FLIGHT mode, starting at its eye and looking towards its target. Home (CameraController.resetToHome) is that first viewpoint.
Creates and remembers a MapCameraController driving cameraState. Home (CameraController.resetToHome) is the state's viewpoint when this is first called; zoomSpeed is reactive.
Creates and remembers an OrbitCameraController that drives cameraState, orbiting around its target. Home (CameraController.resetToHome) is the state's viewpoint when this is first called.
Renders a FilamentScene off-screen through its own camera into a Texture that you can feed back into a material — the building block for mini-maps, security-camera monitors, portals and thumbnails. Returns the color attachment as a sampleable Texture (null until valid).
A monotonic per-frame clock as a State<Float> — seconds elapsed since the composable entered the composition. Reading the value triggers recomposition every frame, so use it with a by delegate inside scene composables to drive animations cheaply: