VREngine class

Main VR engine. Manages the game loop, scene, camera, and rendering.

final engine = VREngine();
engine.scene.add(myMesh);
engine.start();

// In your widget:
CustomPaint(painter: engine.stereoPainter)

Constructors

VREngine({Scene? scene, CameraRig? cameraRig})

Properties

cameraRig CameraRig
final
culledCount int
no setter
fps double
no setter
frameCount int
no setter
frameTimeMs double
no setter
hashCode int
The hash code for this object.
no setterinherited
headTracker HeadTracker?
getter/setter pair
isRunning bool
no setter
monoPainter VREnginePainter
Creates a CustomPainter that renders monoscopically.
no setter
onUpdate ↔ void Function(double dt)?
Callback fired each frame after update.
getter/setter pair
renderedCount int
no setter
renderPass RenderPass
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scene Scene
final
stereoPainter VREnginePainter
Creates a CustomPainter that renders stereoscopically.
no setter

Methods

disableHeadTracking() → void
Disables head tracking.
dispose() → void
enableHeadTracking({double sensitivity = 0.03}) → void
Enables gyroscope head tracking.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() → void
Starts the game loop at ~60fps.
stop() → void
Stops the game loop.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited