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

fix LineSegmentsGeometry.fromLineSegements and LineGeometry.fromLine

webglzhang преди 5 години
родител
ревизия
ddc8e60dcf
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      examples/js/lines/LineGeometry.js
  2. 1 1
      examples/js/lines/LineSegmentsGeometry.js

+ 1 - 1
examples/js/lines/LineGeometry.js

@@ -77,7 +77,7 @@ THREE.LineGeometry.prototype = Object.assign( Object.create( THREE.LineSegmentsG
 
 		} else if ( geometry.isBufferGeometry ) {
 
-			this.setPositions( geometry.position.array ); // assumes non-indexed
+			this.setPositions( geometry.attributes.position.array ); // assumes non-indexed
 
 		}
 

+ 1 - 1
examples/js/lines/LineSegmentsGeometry.js

@@ -143,7 +143,7 @@ THREE.LineSegmentsGeometry.prototype = Object.assign( Object.create( THREE.Insta
 
 		} else if ( geometry.isBufferGeometry ) {
 
-			this.setPositions( geometry.position.array ); // assumes non-indexed
+			this.setPositions( geometry.attributes.position.array ); // assumes non-indexed
 
 		}