|
@@ -14,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,6 +81,12 @@ LOD.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ getCurrentLevel: function () {
|
|
|
|
+
|
|
|
|
+ return this._currentLevel;
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
getObjectForDistance: function ( distance ) {
|
|
getObjectForDistance: function ( distance ) {
|
|
|
|
|
|
var levels = this.levels;
|
|
var levels = this.levels;
|
|
@@ -147,6 +155,8 @@ LOD.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ this._currentLevel = i - 1;
|
|
|
|
+
|
|
for ( ; i < l; i ++ ) {
|
|
for ( ; i < l; i ++ ) {
|
|
|
|
|
|
levels[ i ].object.visible = false;
|
|
levels[ i ].object.visible = false;
|