Browse Source

Merge pull request #2013 from bghgary/glTFFileLoader_uint32_support

Add missing uint32 support to glTF 2.0 file loader
David Catuhe 8 years ago
parent
commit
56d25d13a6

+ 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);
             }
         }