initialize viewportDimensions to (0,0) in ThermionViewer

This commit is contained in:
Nick Fisher
2024-09-13 10:35:57 +08:00
parent 60b8716315
commit a434829a6c

View File

@@ -61,7 +61,7 @@ abstract class ThermionViewer {
/// ///
/// The current dimensions of the viewport (in physical pixels). /// The current dimensions of the viewport (in physical pixels).
/// ///
late (double, double) viewportDimensions; var viewportDimensions = (0.0,0.0);
/// ///
/// The current ratio of logical to physical pixels. /// The current ratio of logical to physical pixels.
@@ -575,7 +575,7 @@ abstract class ThermionViewer {
double aperture, double shutterSpeed, double sensitivity); double aperture, double shutterSpeed, double sensitivity);
/// ///
/// Rotate the camera by [rads] around the given axis. Note this is not persistent - any viewport navigation will reset the camera transform. /// Rotate the camera by [rads] around the given axis.
/// ///
Future setCameraRotation(Quaternion quaternion); Future setCameraRotation(Quaternion quaternion);
@@ -728,6 +728,7 @@ abstract class ThermionViewer {
/// Sets the options for manipulating the camera via the viewport. /// Sets the options for manipulating the camera via the viewport.
/// ManipulatorMode.FREE_FLIGHT and ManipulatorMode.MAP are currently unsupported and will throw an exception. /// ManipulatorMode.FREE_FLIGHT and ManipulatorMode.MAP are currently unsupported and will throw an exception.
/// ///
@Deprecated("Use ThermionGestureHandler instead")
Future setCameraManipulatorOptions( Future setCameraManipulatorOptions(
{ManipulatorMode mode = ManipulatorMode.ORBIT, {ManipulatorMode mode = ManipulatorMode.ORBIT,
double orbitSpeedX = 0.01, double orbitSpeedX = 0.01,