Bläddra i källkod

Update LOD.js

donutcoffee 5 år sedan
förälder
incheckning
759921383e
1 ändrade filer med 3 tillägg och 8 borttagningar
  1. 3 8
      src/objects/LOD.js

+ 3 - 8
src/objects/LOD.js

@@ -7,7 +7,6 @@ import { Object3D } from '../core/Object3D.js';
  * @author mrdoob / http://mrdoob.com/
  */
 
-var _currentLevel = 0;
 var _v1 = new Vector3();
 var _v2 = new Vector3();
 
@@ -15,6 +14,8 @@ function LOD() {
 
 	Object3D.call( this );
 
+	this.currentLevel = 0;
+
 	this.type = 'LOD';
 
 	Object.defineProperties( this, {
@@ -79,12 +80,6 @@ LOD.prototype = Object.assign( Object.create( Object3D.prototype ), {
 		return this;
 
 	},
-	
-	getCurrentLevel: function () {
-
-		return _currentLevel;
-
-	},
 
 	getObjectForDistance: function ( distance ) {
 
@@ -154,7 +149,7 @@ LOD.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 			}
 
-			_currentLevel = i - 1;
+			this.currentLevel = i - 1;
 
 			for ( ; i < l; i ++ ) {