CameraOperations mixin

Mixin that adds camera control to ModelViewerProController.

All methods work by setting properties on the <model-viewer> element via JavaScript. Orbit angles are accepted as degrees and distances are in metres (model-viewer conventions).

Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
webViewController → WebViewController?
The WebViewController supplied by the owning controller.
no setter

Methods

getCameraOrbit() Future<Map<String, dynamic>?>
Returns the current camera orbit as a map with keys theta, phi, and radius (all in SI units from model-viewer: radians / metres).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetCamera() Future<void>
Resets the camera to its default position and clears any turntable offset.
setAutoRotate(bool enabled) Future<void>
Enables or disables continuous auto-rotation of the model.
setCameraOrbit(double theta, double phi, double radius) Future<void>
Moves the camera to the specified orbit position.
setCameraTarget(double x, double y, double z) Future<void>
Sets the point in the scene that the camera looks at.
setFieldOfView(double fov) Future<void>
Sets the camera field of view in degrees.
toString() String
A string representation of this object.
inherited
zoomIn() Future<void>
Zooms in by reducing the orbit radius by 20%.
zoomOut() Future<void>
Zooms out by increasing the orbit radius by 20%.

Operators

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