|
@@ -95,8 +95,18 @@ THREE.LOD.prototype.update = function () {
|
|
|
|
|
|
}();
|
|
|
|
|
|
-THREE.LOD.prototype.clone = function () {
|
|
|
+THREE.LOD.prototype.clone = function ( object ) {
|
|
|
|
|
|
- // TODO
|
|
|
+ if ( object === undefined ) object = new THREE.LOD();
|
|
|
+
|
|
|
+ THREE.Object3D.prototype.clone.call( this, object );
|
|
|
+
|
|
|
+ for ( var i = 0, l = this.objects.length; i < l; i ++ ) {
|
|
|
+ var x = this.objects[i].object.clone();
|
|
|
+ x.visible = i === 0;
|
|
|
+ object.addLevel( x, this.objects[i].distance );
|
|
|
+ }
|
|
|
+
|
|
|
+ return object;
|
|
|
|
|
|
};
|