vrlizate library
vrlizate — VR 3D engine for Flutter.
Complete VR framework: scene graph, PBR materials, mesh rendering, lighting with shadows, stereoscopic projection, head/hand tracking, raycasting, spatial UI, locomotion, physics, animation with skeletal deformation, glTF loading, effects, and WebXR session management.
import 'package:vrlizate/vrlizate.dart';
final engine = VREngine();
engine.scene.add(LitMeshNode(
geometry: CubeGeometry(),
material: PBRMaterial(color: Color(0xFF2E90FA), metallic: 0.8),
));
engine.scene.add(Light.directional());
engine.enableHeadTracking();
engine.start();
CustomPaint(painter: engine.stereoPainter)
Classes
- Aabb
- Axis-aligned bounding box for frustum culling.
- AnimationClip
- A clip containing multiple tracks that animate a node.
- AnimationMixer
- Plays and blends multiple animation clips on a node.
- AnimationPlayback
- Handle to control a playing animation.
- AnimationTrack
- A track that animates a single property of a node.
- Billboard
- A node that always faces the camera (billboarding).
- BloomEffect
- Simple bloom effect applied as a post-process overlay. Draws bright areas with gaussian blur to simulate light bleed.
- Bone
- A bone in a skeleton hierarchy.
- CameraRig
- Camera rig for VR: head position + rotation, with stereo eye offsets. Produces view and projection matrices for left/right eyes.
- ControllerState
- Represents the state of a VR controller (left or right hand).
- CsiFrame
- A simulated raw Channel State Information frame. Represents OFDM subcarrier amplitudes affected by human movement.
- CubeGeometry
- CylinderGeometry
- DebugOverlay
- Debug overlay that displays performance metrics in VR.
- DeviceParams
- VR headset device parameters. Different headsets have different lens properties.
- DistortionMesh
- Polynomial radial distortion for VR lens correction. Based on Google Cardboard SDK distortion algorithm.
- FlyLocomotion
- Free-fly locomotion: move in any direction including up/down.
- FogEffect
- Distance-based fog effect.
- GazePointer
- Gaze-based pointer for VR interaction (look to select). Fires a ray from the camera center forward direction.
- Geometry
- Raw vertex data for a 3D geometry.
- GltfParser
- Lightweight glTF 2.0 JSON parser for vrlizate. Handles meshes, materials, and node hierarchy. Does NOT handle textures (use PBRMaterial.colorMap for that).
- GltfResult
- Result of parsing a glTF file.
- GPURenderer
- GPU rendering abstraction layer.
- GPURendererStub
- Stub implementation that reports GPU is not available. Replace with real implementation when flutter_gpu is stable.
- Grabbable
- Makes a node grabbable via controller grip or pinch.
- GridFloor
- A grid rendered on the XZ plane for spatial reference.
- HandBone
- Represents a bone connection between a parent and child joint in the hand skeleton.
- HandState
- Represents the tracked state of a hand with 26 joints following OpenXR standard.
- HeadTracker
- Head tracking input via device gyroscope with calibration and background Isolate.
- HologramMeshNode
- Advanced Volumetric Hologram Simulation Node implementing multi-pass shell rendering, vertex glitched offsets, time-based flickering, and scanline overlay.
-
Keyframe<
T> - A single keyframe in an animation track.
- LensDistortion
- Lens distortion parameters for VR optics. Barrel distortion corrects for the magnification effect of VR lenses.
- Light
- Light source in the scene.
- LitMeshNode
- Renders a mesh with per-face lighting from scene lights.
- MeshNode
- A renderable 3D mesh node with geometry and material.
- Node
- Base node in the scene graph with parent-child hierarchy. All spatial objects inherit from Node.
- Offset3D
- PBRMaterial
- Physically-Based Rendering material with texture maps. Inspired by Thermion/Filament PBR and three_js MeshStandardMaterial.
- PhysicsWorld
- Simple physics world that manages rigid bodies.
- PlaneGeometry
- Pointable
- Makes a node respond to pointer hover and click events.
- ProjectedPoint
- Projected 2D point with depth info for z-sorting.
- QuaternionTrack
- Animates a Quaternion property (rotation).
- Raycaster
- Raycaster for testing ray-mesh intersections in the scene.
- RaycastHit
- Result of a raycast hit.
- RenderPass
- Render pass that traverses the scene and renders to a canvas. Handles: frustum culling, depth sorting, lighting injection, background.
- RigidBody
- Simple 3D rigid body physics for VR interactions. Handles gravity, velocity, collision response, and damping.
- RotationTarget
- Interface for anything that can receive rotation input.
- Scene
- Root of the scene graph. Contains the environment and all nodes.
- ShaderProgram
- Abstraction for a shader program (vertex + fragment).
- ShaderRegistry
- Registry of available shader programs.
- ShaderUniform
- A shader uniform variable.
- ShadowConfig
- Shadow configuration for a light source.
- ShadowRenderer
- Simple shadow renderer that projects shadows onto the ground plane. Uses a simplified shadow map approach for Canvas rendering.
- Skeleton
- A skeleton is a hierarchy of bones used for mesh deformation.
- SkinDeformer
- Deforms mesh vertices using skeletal bone weights. CPU-based linear blend skinning (LBS).
- SpatialButton
- A clickable 3D button in VR space.
- SpatialPanel
- A floating UI panel in VR space. Renders a rectangle with background, border, and content callback.
- SpatialText
- 3D text that floats in VR space, always facing the camera.
- SphereGeometry
- SSAOEffect
- Screen-Space Ambient Occlusion approximation for Canvas rendering. Uses a simplified approach: darkens corners and edges of the viewport to simulate ambient light being blocked by nearby surfaces.
- StereoscopicProjection
- Stereoscopic projection engine. Projects 3D points to left/right eye viewports.
- TeleportLocomotion
- Teleportation locomotion: point at floor, press trigger, move there.
- Transform3D
- Full 3D transform with position, rotation (quaternion), and scale. Uses dirty-flagged matrix caching for performance.
- Vector3Track
- Animates a Vector3 property (position, scale).
- VignetteEffect
- Vignette effect for VR lens simulation. Darkens the edges of each eye viewport to simulate lens optics.
- VRCamera
- Legacy VR camera with spherical orientation (theta/phi). Used by the original neom_vr particle system. For new code, prefer CameraRig which uses Matrix4 + Quaternion.
- VRConnection
- A line connecting two VR elements.
- VRElement
- Base class for any object rendered in the VR scene.
- VREngine
- Main VR engine. Manages the game loop, scene, camera, and rendering.
- VREnginePainter
- CustomPainter that renders the VR engine output.
- VrFrustum
- View frustum defined by 6 planes. Used for culling objects outside the camera view.
- VRMaterial
- Material defines the visual appearance of a mesh surface.
- VRMonoPainter
- Paints a VR scene in monoscopic (single eye) mode.
- VRParticle
- A point/particle in VR space.
- VrRay
- A ray defined by origin and direction. Named VrRay to avoid collision with vector_math's Ray.
- VRRenderer
- Abstract renderer that VR scenes implement.
- VRRing
- A ring/circle in VR space (rendered as an arc at its projected position).
- VRScene
- A scene containing VR elements that can be rendered stereoscopically.
- VRStereoPainter
- Paints a VR scene in stereoscopic split-screen mode.
- VRTexture
- Texture for mapping images onto mesh surfaces.
- WalkLocomotion
- Thumbstick-based walk locomotion.
- WifiRadarNode
- A 3D node representing the WiFi electromagnetic sensing grid and radar fields.
- WifiSensingSystem
- SOTA WiFi Sensing Engine that processes raw CSI frames in a background Isolate to track movement, presence, and vitals (respiration) of human subjects.
- WifiTrackedSubject
- Represents a physical entity tracked in the room through WiFi CSI (Channel State Information).
- XRSession
- Abstract XR session for future WebXR/AndroidXR integration.
- XRSessionStub
- Stub implementation for platforms without XR support.
Enums
- ControllerHand
- CullResult
- EasingFunction
- Easing functions for interpolation.
- HandJoint
- 26 joints per hand following the OpenXR hand tracking standard.
- LightType
- TextureFilter
- TextureWrap
- UniformType
- Shader uniform value types.
- XRReferenceSpaceType
- XRSessionMode
Functions
-
applyEasing(
double t, EasingFunction easing) → double - Applies easing to a normalized t (0-1).
-
lerpDouble(
double a, double b, double t) → double - Interpolates between two doubles.
-
lerpVector3(
Vector3 a, Vector3 b, double t) → Vector3 - Interpolates between two Vector3.
-
slerpQuaternion(
Quaternion a, Quaternion b, double t) → Quaternion - Spherical linear interpolation between two quaternions.