Преглед на файлове

Resize coordinates array in EdgesGeometry

The current position array is too large. It contains 6 extra `0` elements per removed coplanar edge.
dubejf преди 10 години
родител
ревизия
49dc3a3786
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/extras/geometries/EdgesGeometry.js

+ 2 - 0
src/extras/geometries/EdgesGeometry.js

@@ -86,6 +86,8 @@ THREE.EdgesGeometry = function ( geometry, thresholdAngle ) {
 
 	}
 
+	coords = coords.subarray( 0, index );
+
 	this.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
 
 };