|
@@ -156,6 +156,14 @@ THREE.BufferGeometry.prototype = {
|
|
this.addAttribute( 'position', positions.copyVector3sArray( geometry.vertices ) );
|
|
this.addAttribute( 'position', positions.copyVector3sArray( geometry.vertices ) );
|
|
this.addAttribute( 'color', colors.copyColorsArray( geometry.colors ) );
|
|
this.addAttribute( 'color', colors.copyColorsArray( geometry.colors ) );
|
|
|
|
|
|
|
|
+ if ( geometry.lineDistances && geometry.lineDistances.length === geometry.vertices.length ) {
|
|
|
|
+
|
|
|
|
+ var lineDistances = new THREE.Float32Attribute( geometry.lineDistances.length, 1 );
|
|
|
|
+
|
|
|
|
+ this.addAttribute( 'lineDistance', lineDistances.copyArray( geometry.lineDistances ) );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
if ( geometry.boundingSphere !== null ) {
|
|
if ( geometry.boundingSphere !== null ) {
|
|
|
|
|
|
this.boundingSphere = geometry.boundingSphere.clone();
|
|
this.boundingSphere = geometry.boundingSphere.clone();
|
|
@@ -266,6 +274,21 @@ THREE.BufferGeometry.prototype = {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ( geometry.lineDistancesNeedUpdate ) {
|
|
|
|
+
|
|
|
|
+ var attribute = this.attributes.lineDistance;
|
|
|
|
+
|
|
|
|
+ if ( attribute !== undefined ) {
|
|
|
|
+
|
|
|
|
+ attribute.copyArray( geometry.lineDistances );
|
|
|
|
+ attribute.needsUpdate = true;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ geometry.lineDistancesNeedUpdate = false;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
return this;
|
|
return this;
|
|
|
|
|
|
},
|
|
},
|