From c528ad6c4896c36e6e30d90db1c5b0a3d8a2062f Mon Sep 17 00:00:00 2001 From: Carlos Nunes Date: Thu, 19 May 2016 00:20:16 +0100 Subject: [PATCH 1/2] OrbitControls: Added public methods to pan, rotate and dolly camera. (#8906) --- examples/js/controls/OrbitControls.js | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/examples/js/controls/OrbitControls.js b/examples/js/controls/OrbitControls.js index 9ba048dbc9b01..f3d865d0cc8ea 100644 --- a/examples/js/controls/OrbitControls.js +++ b/examples/js/controls/OrbitControls.js @@ -84,6 +84,36 @@ THREE.OrbitControls = function ( object, domElement ) { // public methods // + this.panCamera = function ( deltaX, deltaY ) { + + pan( deltaX, deltaY ); + scope.update(); + }; + + this.dollyInCamera = function() { + + dollyIn( getZoomScale() ); + scope.update(); + }; + + this.dollyOutCamera = function() { + + dollyOut( getZoomScale() ); + scope.update(); + }; + + this.rotateCameraLeft = function( angle ) { + + rotateLeft( angle ); + scope.update(); + }; + + this.rotateCameraUp = function( angle ) { + + rotateUp( angle ); + scope.update(); + }; + this.getPolarAngle = function () { return spherical.phi; From 17dace160f5041e693dec0fbb41a96dccaa5a4ce Mon Sep 17 00:00:00 2001 From: Carlos Nunes Date: Wed, 24 May 2017 01:03:44 +0100 Subject: [PATCH 2/2] OrbitControls: Added public methods to pan, rotate and dolly camera (#8906) --- examples/js/controls/OrbitControls.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/js/controls/OrbitControls.js b/examples/js/controls/OrbitControls.js index 41e9fd615d746..85aa0324e8e72 100644 --- a/examples/js/controls/OrbitControls.js +++ b/examples/js/controls/OrbitControls.js @@ -84,31 +84,31 @@ THREE.OrbitControls = function ( object, domElement ) { // public methods // - this.panCamera = function ( deltaX, deltaY ) { + this.pan = function ( deltaX, deltaY ) { pan( deltaX, deltaY ); scope.update(); }; - this.dollyInCamera = function() { + this.dollyIn = function() { dollyIn( getZoomScale() ); scope.update(); }; - this.dollyOutCamera = function() { + this.dollyOut = function() { dollyOut( getZoomScale() ); scope.update(); }; - this.rotateCameraLeft = function( angle ) { + this.rotateLeft = function( angle ) { rotateLeft( angle ); scope.update(); }; - this.rotateCameraUp = function( angle ) { + this.rotateUp = function( angle ) { rotateUp( angle ); scope.update();