소스 검색

Merge pull request #2013 from bghgary/glTFFileLoader_uint32_support

Add missing uint32 support to glTF 2.0 file loader
David Catuhe 8 년 전
부모
커밋
56d25d13a6
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts
  2. 1 0
      loaders/src/glTF/2.0/babylon.glTFLoaderUtils.ts

+ 1 - 0
loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts

@@ -14,6 +14,7 @@ module BABYLON.GLTF2 {
         UNSIGNED_BYTE = 5121,
         SHORT = 5122,
         UNSIGNED_SHORT = 5123,
+        UNSIGNED_INT = 5125,
         FLOAT = 5126
     }
 

+ 1 - 0
loaders/src/glTF/2.0/babylon.glTFLoaderUtils.ts

@@ -92,6 +92,7 @@ module BABYLON.GLTF2 {
                 case EComponentType.UNSIGNED_BYTE: return new Uint8Array(buffer, byteOffset, byteLength);
                 case EComponentType.SHORT: return new Int16Array(buffer, byteOffset, byteLength);
                 case EComponentType.UNSIGNED_SHORT: return new Uint16Array(buffer, byteOffset, byteLength);
+                case EComponentType.UNSIGNED_INT: return new Uint32Array(buffer, byteOffset, byteLength);
                 default: return new Float32Array(buffer, byteOffset, byteLength);
             }
         }