diff --git a/modules/gltf/src/lib/gltf-utils/gltf-utils.ts b/modules/gltf/src/lib/gltf-utils/gltf-utils.ts index 0c5a031724..dfaea695a7 100644 --- a/modules/gltf/src/lib/gltf-utils/gltf-utils.ts +++ b/modules/gltf/src/lib/gltf-utils/gltf-utils.ts @@ -93,7 +93,7 @@ export function getFloat32ArrayForAccessor( texCoordAccessor: number ): Float32Array | null { const accessor = gltfData.json.accessors?.[texCoordAccessor]; - if (accessor && accessor.bufferView) { + if (accessor && typeof accessor.bufferView !== 'undefined') { // Get `bufferView` of the `accessor` const bufferView = gltfData.json.bufferViews?.[accessor.bufferView]; if (bufferView) { diff --git a/modules/gltf/test/lib/extensions/EXT_feature_metadata.spec.js b/modules/gltf/test/lib/extensions/EXT_feature_metadata.spec.js index 2e3569324d..1f3ab15ee6 100644 --- a/modules/gltf/test/lib/extensions/EXT_feature_metadata.spec.js +++ b/modules/gltf/test/lib/extensions/EXT_feature_metadata.spec.js @@ -300,9 +300,9 @@ test('gltf#EXT_feature_metadata - Should handle feature texture attributes', asy accessors: [ { bufferView: 0, - componentType: 5125, - count: 8, - type: 'SCALAR' + componentType: 5126, + count: 4, + type: 'VEC2' } ], buffers: [