scene library
3D rendering for Flutter, built on Flutter GPU and Impeller.
The entry points most applications need are:
- Scene — the scene graph root and renderer. Construct one, attach
Nodes, and call Scene.render from a
CustomPainter(or anydart:uiCanvas). - Node — a transform in the scene graph that may carry a Mesh and
child nodes. Load 3D content with loadScene (preprocessed
.fscenebpackages, by source path) or Node.fromGlbBytes / Node.fromGlbAsset (runtime glTF binary). - Camera / PerspectiveCamera — view configuration passed to Scene.render.
- Material, PhysicallyBasedMaterial, UnlitMaterial,
Environment— shading. - Animation, AnimationClip, AnimationPlayer — playback and blending of imported animations.
Flutter Scene currently requires the Flutter master channel because it depends on the Flutter GPU API.
Classes
- AmbientOcclusionSettings Rendering
- Screen-space ambient occlusion settings for a Scene.
- Animation Animation
- A reusable description of an animation, parsed from a model.
- AnimationClip Animation
- An instance of an Animation that has been bound to a specific Node.
- AnimationPlayer Animation
- Drives playback and blending for the AnimationClips on a single node subtree.
- BasicCollider Physics
- Pure-Dart Collider implementation registered with the ancestor BasicPhysicsWorld on mount.
- BasicKinematicBody Physics
- Pure-Dart RigidBody implementation. Always BodyType.kinematic; the user moves the owning node's transform directly and the body records velocity for components that read it. There is no dynamics solver in the basic backend, so force and impulse APIs are no-ops.
- BasicPhysicsWorld Physics
- Pure-Dart PhysicsWorld suitable for picking, area triggers, and kinematic-only gameplay.
- BezierPath Geometry
- A path of joined cubic Bezier segments.
- BillboardGeometry Geometry
- A batch of camera-facing quads ("billboards"), expanded from per-instance data in the vertex shader and drawn in a single instanced call.
- BloomSettings Rendering
- Makes bright areas bleed light into their surroundings. Computed in a chain of HDR passes and added back to the scene before tone mapping.
- BoxShape Physics
- An axis-aligned box of the given halfExtents centered at the collider's local origin.
- BoxVolumeBounds Lighting and environment
- An axis-aligned box region.
- Camera Scene graph
- A view onto a scene: a world-space eye position and orientation paired with a lens projection, used by Scene.render to map the scene into clip space.
- CameraComponent Scene graph
- An engine Component that places a Camera in the scene.
- CameraProjection Scene graph
- A lens projection that maps view-space coordinates into clip space.
- CapsuleGeometry Geometry
- A capsule (a cylinder capped by two hemispheres) aligned with the Y axis, centered on the origin.
- CapsuleShape Physics
- A capsule aligned with the local Y axis. halfHeight is the half length of the cylindrical section, excluding the hemispherical caps.
- CatmullRomPath Geometry
- A smooth curve passing through every one of a list of points.
- ChromaticAberrationSettings Rendering
- Splits the red and blue channels toward the edges, like a simple lens. Sampled from the scene color before grading and tone mapping.
- Collider Physics
- Common surface for a collision volume attached to a Node.
- CollisionBegan Physics
- Fired the first step a pair of solid colliders touch.
- CollisionEnded Physics
- Fired the step a previously-touching solid pair separates.
- CollisionEvent Physics
- Base type for collision lifecycle events streamed by a physics world.
- ColorGradingSettings Rendering
- Color grading applied to the linear HDR scene color, before exposure and tone mapping.
- Component Scene graph
- A unit of data or behavior attached to a Node.
- CompoundChild Physics
- One child of a CompoundShape: a shape positioned by localPose relative to the compound's origin.
- CompoundShape Physics
- A union of children, each positioned by its own local pose.
- ContactPoint Physics
- One contact point in a CollisionBegan event.
- ConvexHullShape Physics
-
The convex hull of points, stored as packed
xyztriplets. - CuboidGeometry Geometry
-
An axis-aligned box geometry spanning
-extents/2to+extents/2on each axis, with flat per-face normals. - CustomRenderPass Rendering
-
A user-supplied render pass inserted into the built-in pipeline at a
named stage. Add one with
Scene.addRenderPass. - CylinderGeometry Geometry
- A cylinder aligned with the Y axis, centered on the origin.
- CylinderShape Physics
- A cylinder aligned with the local Y axis. halfHeight is half the total height.
- DashPattern Geometry
- A repeating dash-and-gap pattern for a PolylineGeometry, measured in scene units along the line's arc length.
- DepthOfField Rendering
-
Depth-of-field settings for a
Scene(scene.depthOfField), disabled by default. - DirectionalLight Lighting and environment
- An infinitely-distant light source (e.g. the sun) that illuminates the whole scene from a single direction.
- DirectionalLightComponent Scene graph
- An engine Component that places a DirectionalLight in the scene.
- DiscGeometry Geometry
-
A flat filled disc in the XZ plane, centered on the origin, facing
+Y. - EnvironmentMap Lighting and environment
- A source of image-based lighting: diffuse irradiance plus prefiltered specular radiance, both derived from an equirectangular environment.
- EnvironmentSettings Lighting and environment
- A copyable, interpolatable snapshot of a Scene's scene-wide look.
- EnvironmentSkySource Lighting and environment
- Shows the scene's image-based-lighting environment as the background, optionally blurred.
- EnvironmentVolume Lighting and environment
- A region that overrides the scene look with its settings, contributing by camera position.
- EnvironmentVolumeBounds Lighting and environment
- The shape of an EnvironmentVolume's region.
- EnvironmentVolumeComponent Lighting and environment
- A Component that contributes a spatial environment volume: a region whose look (settings) overrides the scene environment, blended by camera position so the environment transitions as the camera moves between areas.
- ExtrudeGeometry Geometry
- An arbitrary closed 2D profile swept along a ScenePath.
- FilmGrainSettings Rendering
- Adds animated noise over the final image, after tone mapping.
- FixedJoint Physics
- Welds two bodies together with zero degrees of freedom.
- FmatMaterialRegistry Materials
-
Resolves and loads
.fmatmaterials registered through DataAssets. - Fog Lighting and environment
- Distance fog for a Scene: geometry blends toward color the farther it is from the camera, evaluated per-fragment in linear HDR before tone mapping so fog is exposed and tone-mapped along with the scene.
- GaussianSplats Gaussian splatting
- A loaded Gaussian splat set, the decoded arrays plus the GPU textures the splat shaders fetch from.
- GenericJoint Physics
- A fully configurable six-degree-of-freedom joint.
- Geometry Geometry
- Vertex (and optional index) data along with the vertex shader used to transform it.
- GeometryBuilder Geometry
- Assembles a MeshGeometry one vertex and triangle at a time.
- GodRaysSettings Lighting and environment
- Directional volumetric god rays (crepuscular rays / light shafts).
- GpuTextureSource Assets and loading
- Wraps a raw gpu.Texture as a TextureSource, for advanced or interop cases that already own a GPU texture (widget/particle textures, custom pipelines) and do not need Texture2D's image decode and mip generation.
- GradientSkySource Lighting and environment
- A stylized gradient sky: zenith, horizon, and ground colors with an HDR sun disk.
- HeightFieldShape Physics
- A row-major heightfield of width x depth samples, scaled by scale. Heights are sampled in the local XZ plane and offset along Y.
- HighlightStyle Rendering
-
How the selection outline (around nodes with a
Node.highlightColor) is drawn. Reachable throughScene.highlightStyle. - IcosphereGeometry Geometry
- A geodesic sphere built by subdividing an icosahedron, centered on the origin.
- InstancedMesh Scene graph
- Many copies of one Geometry / Material pair, each placed by its own model transform.
- InstancedMeshComponent Scene graph
- An engine Component that draws an InstancedMesh.
- Joint Physics
- A constraint linking the owning node's rigid body to another body.
- JointAxisConfig Physics
- The configuration of one of a GenericJoint's six axes.
- JointMotor Physics
- A spring-damper drive on a single GenericJoint axis.
- Lighting Lighting and environment
- The lighting state handed to a Material when it binds for a draw.
- LineSegmentData Geometry
- Disconnected line segments (point pairs) derived from a mesh, the output of MeshData.extractEdges.
- LineSegmentsGeometry Geometry
- A batch of thick, disconnected line segments, each expanded into a camera-facing quad of a fixed world-space width in the vertex shader and drawn in a single instanced call.
- LodComponent Scene graph
- A MeshComponent that draws one of several level-of-detail variants of an object, chosen each frame from how large the object appears on screen.
- LodLevel Scene graph
-
One level of detail for an LodComponent: a drawable variant shown while
the object's projected on-screen size (see
lodScreenSize) is at least screenSize, a fraction of the viewport height. - Material Materials
- Base class for shading a MeshPrimitive.
- MaterialParameters Materials
- Type-checked, name-addressed parameters for a custom material.
- Mesh Geometry
- Defines the shape and appearance of a 3D model in the scene.
- MeshAttributeData Geometry
-
One named per-vertex attribute stream carried by a MeshData, matching a
custom material's
attributesentry (seeGeometry.setCustomAttribute). - MeshComponent Scene graph
- An engine Component that draws a Mesh.
- MeshData Geometry
- An isolate-transferable snapshot of a mesh's vertex and index data.
- MeshGeometry Geometry
- A triangle mesh built at runtime from vertex attribute arrays.
- MeshPrimitive Geometry
- Represents a single part of a Mesh, containing both Geometry and Material properties.
- MeshTriangle Geometry
- One triangle of a MeshData, yielded by MeshData.triangles.
- Node Scene graph
-
A
Noderepresents a single element in a 3D scene graph. - NodeCamera Scene graph
-
A Camera whose view comes from a node's world transform: the
+Zaxis is the look direction,+Yis up, and the translation is the eye. This is the inverse of the eye/target/up convention PerspectiveCamera builds, so a node placed atinverse(camera.getViewMatrix())yields the same view. - NodeFilter Rendering
- Selects which scene nodes an object-filtered draw includes.
- OverlapHit Physics
- One collider returned by an overlap query (sphere or box).
- PerspectiveCamera Scene graph
- A standard pinhole-style perspective camera.
- PerspectiveProjection Scene graph
- A standard pinhole perspective projection.
- PhysicallyBasedMaterial Materials
- A glTF-style metallic-roughness physically based material with image-based lighting.
- PhysicalSkySource Lighting and environment
- A physically based daylight sky: an analytic single-scattering atmosphere (Rayleigh and Mie terms) with an HDR sun disk, producing plausible day, sunset, and twilight skies from a sun direction.
- PhysicsMaterial Physics
- Surface properties (friction, restitution, density) of a collider.
- PhysicsWorld Physics
- The simulation world for a subtree of the scene graph.
- PlaneGeometry Geometry
-
A flat rectangular grid in the XZ plane, centered on the origin, with
its surface facing
+Y. - PointLight Lighting and environment
- A light that radiates from a single world-space point equally in every direction, its influence falling off with distance.
- PointLightComponent Scene graph
- An engine Component that places a PointLight in the scene.
- PolylineGeometry Geometry
- A thick, camera-facing line through a list of points.
- PolylinePath Geometry
- A path of straight segments connecting a list of points.
- PostEffect Rendering
- A custom, user-authored post-processing effect: a fragment shader that reads the current color and writes a new one.
- PostProcessSettings Rendering
- Built-in post-processing settings for a Scene.
- PreprocessedMaterial Materials
-
A material driven by a
.fmatcustom-material shader and its sidecar metadata (produced at build time bybuildMaterials). - PreprocessedSky Lighting and environment
-
A sky driven by a
.fmatsky shader (sky { vec3 Sky(vec3 direction) }) and its sidecar metadata (produced at build time bybuildMaterials). - PrismaticJoint Physics
- A slider: one translational degree of freedom along a shared axis.
- RaycastHit Physics
-
The closest collider intersected by a
Ray, or one entry of a raycast-all result list. - RenderPassContext Rendering
- The frame context handed to CustomRenderPass.execute.
- RenderTexture Rendering
-
An offscreen render target a
RenderViewcan render into. - RenderTextureSampling Rendering
- Sampling options used when a material samples a RenderTexture.
- RenderTextureUpdate Rendering
- When a RenderTexture re-renders.
- RenderTextureView
- Displays a live RenderTexture in the widget tree.
- RenderView Rendering
-
One view of a
Scene: a camera plus where and how its image is drawn. - ResourceGroup Assets and loading
- Tracks a set of in-flight resource loads so a scene can wait for all of them before it is shown, and report aggregate progress while they run.
- RevoluteJoint Physics
- A hinge: one rotational degree of freedom around a shared axis.
- RibbonGeometry Geometry
- A flat strip of constant width swept along a ScenePath.
- RigidBody Physics
- A simulated rigid body attached to a Node.
- RingGeometry Geometry
-
A flat annulus (a disc with a concentric hole) in the XZ plane,
centered on the origin, facing
+Y. - Scene Scene graph
- Represents a 3D scene, which is a collection of nodes that can be rendered onto the screen.
- ScenePath Geometry
- A curve through 3D space, independent of any geometry or rendering.
- ScenePathFrame Geometry
- An oriented coordinate frame at a point along a ScenePath.
- ScenePointer Picking and input
- A programmatic pointer into a scene: a crosshair, a gamepad-driven cursor, a VR laser, or the built-in pointer behind automatic widget input.
- SceneRaycastHit Picking and input
-
A render-geometry intersection from raycastNode (or
Scene.raycast). - SceneRegistry Assets and loading
-
Resolves DataAssets-backed
.fscenebfiles by source path, the.fscenecounterpart ofModelRegistry. - SceneScope
- Exposes the active Scene (and the per-frame elapsed time) to descendants of a SceneView.
- SceneView
- A widget that renders a Scene and drives its per-frame repaint.
- ScreenSpaceReflectionsSettings Rendering
- Screen-space reflection settings for a Scene.
- SemanticsComponent Accessibility
-
Exposes the owning
Nodeto assistive technology (screen readers, switch access) as one element of the enclosingSceneView's semantics. - ShaderMaterial Materials
- A Material backed by a caller-supplied fragment shader.
- ShaderSkySource Lighting and environment
- Draws a custom sky from a fragment shader.
- ShadowCascade Lighting and environment
- One cascade of a cascaded shadow map, produced by DirectionalLight.computeCascades.
- Shape Physics
- Geometric description of a collider's volume.
- ShapeCastHit Physics
- The first collider intersected by a shape cast, with the same fields as RaycastHit plus the cast direction's hit distance.
- Skin Geometry
- A skeletal binding used by skinned meshes for animation.
- SkinnedGeometry Geometry
- Geometry whose vertices use the skinned 80-byte layout: the unskinned attributes followed by 4 joint indices and 4 joint weights.
- Skybox Lighting and environment
- The visible background drawn behind a Scene.
- SkyEnvironment Lighting and environment
-
Drives
Scene.environmentfrom a sky on a refresh policy. - SkySource Lighting and environment
- A source of skybox color as a function of world-space view direction.
- SphereGeometry Geometry
- A UV sphere centered on the origin.
- SphereShape
- A sphere centered at the collider's local origin.
- SphereVolumeBounds Lighting and environment
- A sphere region.
- SphericalJoint
- A ball-and-socket joint: three rotational degrees of freedom, zero translational.
- SplatComponent Gaussian splatting
- An engine component that draws a GaussianSplats set.
- SplatData Gaussian splatting
- The CPU-side contents of a Gaussian splat set as flat, index-parallel arrays (one entry per splat).
- SpotLight Lighting and environment
- A light that radiates from a world-space point within a cone, combining a PointLight's distance falloff with an angular falloff between an inner and outer cone.
- SpotLightComponent Scene graph
- An engine Component that places a SpotLight in the scene.
- Sprite Geometry
- A single camera-facing textured quad, ready to attach to a Node.
- SpriteMaterial Materials
- A material for camera-facing quads drawn by BillboardGeometry.
- SunLight Lighting and environment
- Aims a scene's directional light at a SunSky's sun, so cast shadows track the sky.
- SunSky Lighting and environment
- A sky that exposes a directional sun, so the engine can drive a matching shadow-casting directional light from it.
- Surface Rendering
- Manages the swapchain color textures a Scene composites onto the Flutter canvas, plus the pools of transient render-graph attachments.
- Texture2D Assets and loading
- A 2D image texture ready to bind to a material's texture slot.
- TextureAtlas Assets and loading
-
A uniform grid texture atlas: one or more equally sized PBR maps packed as
columnsxrowssquare tiles, with an optional gutter of padding texels around each tile so mip sampling does not bleed across tile edges. - TextureSampling Assets and loading
- How a texture is sampled. The defaults are trilinear, anisotropic, and mipmapped, the tasteful default for material textures viewed in 3D.
- TextureSource Assets and loading
-
Something a material can sample: it yields the GPU texture to sample for the
current frame and the sampler to bind it with. Implemented by Texture2D
(a static image) and
RenderTexture(a live, rendered-into texture). - TorusGeometry Geometry
- A torus (ring) lying in the XZ plane, centered on the origin.
- TransientWriter Rendering
- Destination for per-frame transient GPU data (uniform blocks, instance vertex data). Emplaced data is valid for the current frame only.
- TriggerEntered Physics
- Fired the first step a non-trigger collider overlaps a trigger volume.
- TriggerExited Physics
- Fired the step a previously-overlapping pair stops overlapping a trigger volume.
- TriMeshShape Physics
-
A triangle mesh defined by vertices (packed
xyztriplets) and indices (groups of three vertex indices forming one triangle each). - TubeGeometry Geometry
- A round cross-section of constant radius swept along a ScenePath.
- UnlitMaterial Materials
- A material that draws geometry with a flat color or texture, ignoring scene lighting.
- UnskinnedGeometry Geometry
-
Geometry whose vertices use the unskinned 48-byte layout: position
(
vec3), normal (vec3), tex coords (vec2), color (vec4). - VignetteSettings Rendering
- Darkens the image toward the edges, after tone mapping.
- WedgeGeometry Geometry
-
A triangular-prism wedge (a ramp), centered on the origin in X and Z
with its base on the
y = 0plane. - WidgetComponent
- A live widget subtree on a scene surface.
- WidgetTexture
- Hosts a live widget subtree and streams its visual output into a WidgetTextureController's texture for sampling inside a scene.
- WidgetTextureController
- Owns the gpu.Texture a WidgetTexture streams its child into.
- WidgetUpdatePolicy
-
When a WidgetTexture (or a
WidgetComponent) re-captures its child.
Enums
- AlphaMode Materials
-
How a PhysicallyBasedMaterial's alpha channel is interpreted,
matching glTF's
alphaMode. - AntiAliasingMode Scene graph
- Anti-aliasing strategy used when rendering a Scene.
- BillboardFacing Geometry
- How a billboard quad orients itself toward the camera.
- BodyType Physics
- Simulation mode for a RigidBody.
- CombineRule Physics
- How a per-contact friction or restitution value is derived from the two participating materials.
- DepthOfFieldQuality Rendering
- Depth-of-field quality tiers, trading gather taps and cleanup passes for frame time. See DepthOfField.quality.
- EnvironmentVolumeShape Lighting and environment
- The region shape of an EnvironmentVolumeComponent.
- FogMode Lighting and environment
- How fog density grows with distance from the camera.
- GeometryStorage Geometry
- How a MeshGeometry manages its GPU buffers over its lifetime.
- JointAxis Physics
- One of the six degrees of freedom a GenericJoint constrains. The linear axes are translations along, and the angular axes rotations about, the joint frame's local X / Y / Z (oriented by the joint's local bases on each body).
- JointAxisMotion Physics
- Whether a GenericJoint axis is locked, free, or limited.
- JointMotorModel
- How a JointMotor turns its drive parameters into a force.
- PolylineCap Geometry
- How a PolylineGeometry finishes its two end points.
- PolylineWidthMode Geometry
- How a PolylineGeometry's width is measured.
- PostInsertion Rendering
- Where in the post-processing chain a PostEffect runs.
- RenderInput Rendering
- An engine geometry buffer a CustomRenderPass can request through CustomRenderPass.inputs. Declaring one makes the engine produce it this frame and exposes it on the RenderPassContext, so a pass can read the scene's geometry (depth, normals, shadows), not just its color. Together they turn the custom-pass API into a general depth/shadow-aware post-process system (contact shadows, custom occlusion, volumetrics, and so on).
- RenderStage Rendering
- A named anchor point in the built-in render pipeline where a CustomRenderPass runs. Ordering within one stage follows the order the passes were added.
- RibbonAlignment Geometry
- How a RibbonGeometry orients its strip across the path.
- ShadowCasterFaces Lighting and environment
- Which faces of a shadow caster are rendered into the shadow map (the others are culled). Trades the two shadow-map failure modes (self-shadow acne vs peter-panning) against each other.
- SkyEnvironmentRefresh Lighting and environment
- When a SkyEnvironment re-bakes the sky into the scene's lighting.
- SpecularAmbientOcclusionMode Rendering
- How AmbientOcclusionSettings occludes indirect specular reflections.
- SplatColorSpace Gaussian splatting
- How a splat file's colors relate to the renderer's linear HDR pipeline.
- SplatCropMode Gaussian splatting
-
How a crop box filters the splats of a
SplatComponent. - SplatFormat Gaussian splatting
- The splat file formats the runtime loader understands.
- SpriteBlendMode Materials
- Selects how a sprite's color is blended into the scene.
- SsrDebugView Rendering
- A diagnostic visualization for ScreenSpaceReflectionsSettings.debugView.
- TextureContent Assets and loading
- What a texture's pixels represent, which controls how mip levels are downsampled so the result is correct (color must average in linear light, normals must be averaged as vectors and renormalized).
- ToneMappingMode Rendering
- Tone mapping operator applied when resolving the linear HDR scene color to the display-referred image (see Scene.toneMapping).
- UnweldAttribute Geometry
- The canned per-triangle attributes MeshData.unweld can attach to its output, under the names custom materials read them by.
- WidgetInput
- How a WidgetComponent receives pointer input.
Mixins
- SceneGraph Scene graph
-
Defines a common interface for managing a scene graph, allowing the addition and removal of
Nodes.
Extensions
- QuaternionSlerp on Quaternion Scene graph
-
Spherical interpolation helpers on
Quaternion. - Vector3Lerp on Vector3 Scene graph
-
Per-component arithmetic helpers on
Vector3.
Constants
- kDiffuseShCoefficientCount → const int Lighting and environment
- Number of L2 spherical-harmonic coefficients used for diffuse irradiance (bands 0..2).
- kRenderLayerAll → const int Rendering
- A layer mask that selects every layer (the default render-view mask).
- kRenderLayerDefault → const int Rendering
- The default layer a Node occupies (bit 0).
Properties
- baseShaderLibrary → ShaderLibrary Assets and loading
-
The shader bundle shipped with
flutter_scene.no setter
Functions
-
blendEnvironmentVolumes(
EnvironmentSettings base, List< Lighting and environmentEnvironmentVolume> volumes, Vector3 cameraPosition) → EnvironmentSettings -
Blends
volumesoverbasefor a camera atcameraPosition. A thin wrapper overblendEnvironmentContributionsfor the manual volume API. -
environmentAssetPathOf(
EnvironmentMap environment) → String? Lighting and environment -
The radiance asset path
environmentwas loaded from through EnvironmentMap.fromAssets, or null for environments built another way. -
generateSolidColorAtlasPixels(
{required List< Assets and loadingVector4> tileColors, required int columns, required int tileSize, int padding = 0}) → Uint8List -
Builds RGBA8888 pixels (row-major, top-left origin) for a placeholder grid
atlas laid out to match a TextureAtlas with the same
columns,tileSize, andpadding. Each tile's whole cell (content plus padding gutter) is filled with its solid color fromtileColors((r, g, b, a)in[0, 1]), so a tile never bleeds into its neighbor. Cells pasttileColors.lengthare left transparent. -
gpuTextureFromAsset(
String assetPath) → Future< Assets and loadingTexture> -
Loads an image from the asset bundle at
assetPathand uploads it as a Flutter GPU texture. -
gpuTextureFromImage(
Image image) → Future< Assets and loadingTexture> -
Uploads a decoded
dart:uiui.Image to a Flutter GPU texture. -
imageFromAsset(
String assetPath, {AssetBundle? bundle}) → Future< Assets and loadingImage> -
Loads and decodes an image from the asset bundle at
assetPath. -
imageFromBytes(
Uint8List bytes) → Future< Assets and loadingImage> -
Decodes an encoded image (PNG, JPEG, etc.) from raw
bytes. -
loadBaseShaderLibrary(
) → Future< Assets and loadingvoid> - Asynchronously loads and caches the base shader bundle. Idempotent. Called by Scene.initializeStaticResources so the synchronous baseShaderLibrary getter has a cached library to return (shader assets can't be read synchronously on any backend).
-
loadFmatMaterial(
String sourcePath, {String? package, String? bundleName, AssetBundle? bundle}) → Future< MaterialsPreprocessedMaterial> -
loadFmatSky(
String sourcePath, {String? package, String? bundleName, AssetBundle? bundle}) → Future< MaterialsPreprocessedSky> -
Loads a DataAssets-backed
.fmatsky by its source path relative to the owning package's root (for exampleassets/gradient_sky.fmat). -
loadScene(
String sourcePath, {String? package, AssetBundle? bundle, FsceneComponentRegistry? registry, SceneReloadCallback? onReload, Scene? applyStageTo}) → Future< Node> -
Loads a DataAssets-backed
.fscenebscene by its source path relative to the owning package's root (for exampleassets/levels/forest.glb). -
loadSceneSubtree(
Node node, {String? package, AssetBundle? bundle, FsceneComponentRegistry? registry}) → Future< Assets and loadingvoid> -
Streams a lazy placeholder
node's prefab content under it, resolving the referenced prefab by its source path (the registry-aware counterpart ofloadSubtreefor scenes loaded with loadScene). -
prefilterEquirectRadiance(
Texture sourceEquirect, {bool sourceIsLinear = false, bool mipLayout = false}) → Texture Lighting and environment - Prefilters an equirectangular radiance texture for image-based specular lighting.
-
raycastNode(
Node root, Ray ray, {double maxDistance = double.infinity, int layerMask = 0xFFFFFFFF, bool where(Node node)?, bool includeInvisible = false}) → SceneRaycastHit? Picking and input -
Casts
ray(direction need not be normalized) throughroot's subtree and returns the nearest hit, or null. -
raycastNodeAll(
Node root, Ray ray, {double maxDistance = double.infinity, int layerMask = 0xFFFFFFFF, bool where(Node node)?, bool includeInvisible = false}) → List< Picking and inputSceneRaycastHit> -
Casts
raythroughroot's subtree and returns every hit, sorted nearest-first. Parameters as in raycastNode.
Typedefs
-
GltfResourceResolver
= Future<
Uint8List> Function(String uri) Assets and loading -
Resolves an external resource referenced by a multi-file glTF
document (a
.binbuffer or an image file). - SceneCameraBuilder = Camera Function(Duration elapsed)
-
Builds a Camera for the current frame from the
elapsedtime since the view started ticking. Use this for time-based cameras (for example an orbiting view); pass a fixed SceneView.camera instead when the camera does not change over time. - SceneLoadingBuilder = Widget Function(BuildContext context, double progress)
-
Builds the widget shown while a SceneView waits for its resources to load,
given the current load
progress(0 to 1). See SceneView.loadingBuilder. - SceneReloadCallback = void Function(Node root) Assets and loading
-
Called after a hot-reloaded scene has been patched in place (see
loadScene), so the app can re-apply per-instance customizations the
patch may have discarded: re-apply a custom material, or re-grab inner
nodes by name.
rootis the same root instance the app holds. - SceneTickCallback = void Function(Duration elapsed, double deltaSeconds)
-
Called once per frame with the total
elapsedtime and thedeltaSecondssince the previous tick. Drive per-frame app logic here, or advance the scene with a supplied timestep via Scene.update (after which Scene.render skips its implicit wall-clock tick for that frame).