Ver código fonte

Examples: Clean up.

Mugen87 5 anos atrás
pai
commit
d5343f40e6

+ 1 - 1
examples/js/controls/TrackballControls.js

@@ -358,7 +358,7 @@ THREE.TrackballControls = function ( object, domElement ) {
 
 			_this.object.lookAt( _this.target );
 
-			if ( lastPosition.distanceToSquared( _this.object.position ) > EPS || lastZoom !== _this.object.zoom ) {
+			if ( lastPosition.distanceToSquared( _this.object.position ) > EPS || lastZoom !== _this.object.zoom ) {
 
 				_this.dispatchEvent( changeEvent );
 

+ 0 - 2
examples/js/renderers/Projector.js

@@ -157,14 +157,12 @@ THREE.Projector = function () {
 		var uvs = [];
 
 		var object = null;
-		var material = null;
 
 		var normalMatrix = new THREE.Matrix3();
 
 		function setObject( value ) {
 
 			object = value;
-			material = object.material;
 
 			normalMatrix.getNormalMatrix( object.matrixWorld );
 

+ 1 - 1
examples/jsm/controls/TrackballControls.js

@@ -366,7 +366,7 @@ var TrackballControls = function ( object, domElement ) {
 
 			_this.object.lookAt( _this.target );
 
-			if ( lastPosition.distanceToSquared( _this.object.position ) > EPS || lastZoom !== _this.object.zoom ) {
+			if ( lastPosition.distanceToSquared( _this.object.position ) > EPS || lastZoom !== _this.object.zoom ) {
 
 				_this.dispatchEvent( changeEvent );
 

+ 0 - 2
examples/jsm/renderers/Projector.js

@@ -181,14 +181,12 @@ var Projector = function () {
 		var uvs = [];
 
 		var object = null;
-		var material = null;
 
 		var normalMatrix = new Matrix3();
 
 		function setObject( value ) {
 
 			object = value;
-			material = object.material;
 
 			normalMatrix.getNormalMatrix( object.matrixWorld );