Explorar el Código

OrthographicTrackballControls: Make .radius internal.

Mugen87 hace 5 años
padre
commit
cc94d01654

+ 2 - 2
examples/js/controls/OrthographicTrackballControls.js

@@ -19,8 +19,6 @@ THREE.OrthographicTrackballControls = function ( object, domElement ) {
 
 	this.screen = { left: 0, top: 0, width: 0, height: 0 };
 
-	this.radius = 0;
-
 	this.rotateSpeed = 1.0;
 	this.zoomSpeed = 1.2;
 
@@ -36,6 +34,8 @@ THREE.OrthographicTrackballControls = function ( object, domElement ) {
 
 	// internals
 
+	this.radius = 0;
+
 	this.target = new THREE.Vector3();
 
 	var EPS = 0.000001;

+ 0 - 1
examples/jsm/controls/OrthographicTrackballControls.d.ts

@@ -8,7 +8,6 @@ export class OrthographicTrackballControls extends EventDispatcher {
 
   enabled: boolean;
   screen: {left: number; top: number; width: number; height: number};
-  radius: number;
   rotateSpeed: number;
   zoomSpeed: number;
   noRotate: boolean;

+ 2 - 2
examples/jsm/controls/OrthographicTrackballControls.js

@@ -26,8 +26,6 @@ var OrthographicTrackballControls = function ( object, domElement ) {
 
 	this.screen = { left: 0, top: 0, width: 0, height: 0 };
 
-	this.radius = 0;
-
 	this.rotateSpeed = 1.0;
 	this.zoomSpeed = 1.2;
 
@@ -43,6 +41,8 @@ var OrthographicTrackballControls = function ( object, domElement ) {
 
 	// internals
 
+	this.radius = 0;
+
 	this.target = new Vector3();
 
 	var EPS = 0.000001;