浏览代码

Add comments to describe the modification

Shun-An Lee 10 年之前
父节点
当前提交
9b781b1542
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/js/loaders/STLLoader.js

+ 2 - 1
examples/js/loaders/STLLoader.js

@@ -68,8 +68,9 @@ THREE.STLLoader.prototype = {
 				
 				
 			}
 			}
 
 
+			// some binary files will have different size from expected,
+			// checking characters higher than ASCII to confirm is binary
 			var fileLength = reader.byteLength;
 			var fileLength = reader.byteLength;
-
 			for ( var index = 0; index < fileLength; index ++ ) {
 			for ( var index = 0; index < fileLength; index ++ ) {
 
 
 				if ( reader.getUint8(index, false) > 127 ) {
 				if ( reader.getUint8(index, false) > 127 ) {