2
0
donutcoffee 5 жил өмнө
parent
commit
759921383e

+ 3 - 8
src/objects/LOD.js

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