소스 검색

Default value for offsets if none specified

James Baicoianu 11 년 전
부모
커밋
78c1b94d63
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/core/BufferGeometry.js

+ 1 - 1
src/core/BufferGeometry.js

@@ -252,7 +252,7 @@ THREE.BufferGeometry.prototype = {
 
 				var indices = this.attributes[ "index" ].array;
 
-				var offsets = this.offsets;
+				var offsets = (this.offsets.length > 0 ? this.offsets : [ { start: 0, count: indices.length, index: 0 } ]);
 
 				for ( j = 0, jl = offsets.length; j < jl; ++ j ) {