Skip to content

Commit

Permalink
fix(gltf): tests for ext-feature-metadata (#2656)
Browse files Browse the repository at this point in the history
  • Loading branch information
mspivak-actionengine authored Sep 22, 2023
1 parent 535a7fd commit fe45578
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/gltf/src/lib/gltf-utils/gltf-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions modules/gltf/test/lib/extensions/EXT_feature_metadata.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit fe45578

Please sign in to comment.