瀏覽代碼

USDCParser: Fixed scalar handling.

Mr.doob 1 月之前
父節點
當前提交
43166fcb2c
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      examples/jsm/loaders/usd/USDCParser.js

+ 3 - 1
examples/jsm/loaders/usd/USDCParser.js

@@ -1261,6 +1261,8 @@ class USDCParser {
 
 
 		switch ( type ) {
 		switch ( type ) {
 
 
+			case TypeEnum.Invalid:
+				return null;
 			case TypeEnum.Bool:
 			case TypeEnum.Bool:
 				return reader.readUint8() !== 0;
 				return reader.readUint8() !== 0;
 			case TypeEnum.UChar:
 			case TypeEnum.UChar:
@@ -1402,7 +1404,7 @@ class USDCParser {
 					} else {
 					} else {
 
 
 						reader.position = valueRep.payload;
 						reader.position = valueRep.payload;
-						value = this._readScalarValue( valueRep );
+						value = this._readScalarValue( valueRep.typeEnum );
 
 
 					}
 					}
 
 

粤ICP备19079148号