Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeshurun Hembd committed May 8, 2024
1 parent a8bbeaa commit 8002727
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/engine/Source/Scene/GltfLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,13 +813,16 @@ async function loadAccessorBufferView(
useQuaternion,
values
) {
// Save a link to the gltfJson, which is removed after bufferViewLoader.load()
const { gltfJson } = loader;

await bufferViewLoader.load();
if (loader.isDestroyed()) {
return;
}

const typedArray = getPackedTypedArray(
loader.gltfJson,
gltfJson,
accessor,
bufferViewLoader.typedArray
);
Expand Down Expand Up @@ -1564,6 +1567,7 @@ function loadSpecular(loader, specularInfo, frameState) {

/**
* Load textures and parse factors and flags for a glTF material
*
* @param {GltfLoader} loader
* @param {object} gltfMaterial An entry from the <code>.materials</code> array in the glTF JSON
* @param {FrameState} frameState
Expand Down
1 change: 1 addition & 0 deletions packages/engine/Source/Scene/Model/ModelUtility.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ ModelUtility.supportedExtensions = {
KHR_techniques_webgl: true,
KHR_materials_common: true,
KHR_materials_pbrSpecularGlossiness: true,
KHR_materials_specular: true,
KHR_materials_unlit: true,
KHR_mesh_quantization: true,
KHR_texture_basisu: true,
Expand Down

0 comments on commit 8002727

Please sign in to comment.