clean up FixedOrbitCameraDelegate
This commit is contained in:
@@ -90,7 +90,9 @@ class OrbitInputHandlerDelegate implements InputHandlerDelegate {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> handle(List<InputEvent> events) async {
|
Future<void> handle(List<InputEvent> events) async {
|
||||||
|
|
||||||
final activeCamera = await view.getCamera();
|
final activeCamera = await view.getCamera();
|
||||||
|
|
||||||
if (!_isInitialized) {
|
if (!_isInitialized) {
|
||||||
await _initializeFromCamera(activeCamera);
|
await _initializeFromCamera(activeCamera);
|
||||||
}
|
}
|
||||||
@@ -163,8 +165,10 @@ class OrbitInputHandlerDelegate implements InputHandlerDelegate {
|
|||||||
localFocalPointDelta: final localFocalPointDelta
|
localFocalPointDelta: final localFocalPointDelta
|
||||||
):
|
):
|
||||||
if (numPointers == 1) {
|
if (numPointers == 1) {
|
||||||
deltaAzimuth -= localFocalPointDelta!.$1 * sensitivity.touchSensitivity;
|
deltaAzimuth -=
|
||||||
deltaElevation -= localFocalPointDelta.$2 * sensitivity.touchSensitivity;
|
localFocalPointDelta!.$1 * sensitivity.touchSensitivity;
|
||||||
|
deltaElevation -=
|
||||||
|
localFocalPointDelta.$2 * sensitivity.touchSensitivity;
|
||||||
} else {
|
} else {
|
||||||
_radiusScaleFactor = scaleFactor;
|
_radiusScaleFactor = scaleFactor;
|
||||||
}
|
}
|
||||||
@@ -221,15 +225,3 @@ class OrbitInputHandlerDelegate implements InputHandlerDelegate {
|
|||||||
await activeCamera.setModelMatrix(modelMatrix);
|
await activeCamera.setModelMatrix(modelMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// _lastPointerPosition =
|
|
||||||
// localFocalPoint;
|
|
||||||
// } else if (_isPointerDown && _lastPointerPosition != null) {
|
|
||||||
// final currentDragDelta = localPosition! - _lastPointerPosition!;
|
|
||||||
// deltaAzimuth -=
|
|
||||||
// currentDragDelta.x * sensitivity.touchSensitivity;
|
|
||||||
// deltaElevation -=
|
|
||||||
// currentDragDelta.y * sensitivity.touchSensitivity;
|
|
||||||
// _lastPointerPosition = localPosition;
|
|
||||||
// }
|
|
||||||
Reference in New Issue
Block a user