Skip to content
Snippets Groups Projects
Commit 1e21dcbd authored by Robert Long's avatar Robert Long
Browse files

Make gltf-mode-plus use quality qs. Fix materials on mobile.

parent d49b4334
No related branches found
No related tags found
No related merge requests found
......@@ -260,7 +260,7 @@ async function loadGLTF(src, preferredTechnique, onProgress) {
material.extensions.MOZ_alt_materials[preferredTechnique] !== undefined
) {
const altMaterialIndex = material.extensions.MOZ_alt_materials[preferredTechnique];
materials[i] = altMaterialIndex;
materials[i] = materials[altMaterialIndex];
}
}
}
......@@ -312,7 +312,8 @@ AFRAME.registerComponent("gltf-model-plus", {
},
init() {
this.preferredTechnique = AFRAME.utils.device.isMobile() ? "KHR_materials_unlit" : "pbrMetallicRoughness";
this.preferredTechnique =
window.APP && window.APP.quality === "low" ? "KHR_materials_unlit" : "pbrMetallicRoughness";
this.loadTemplates();
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment