feat: Update model and configuration for improved loading and kitchen color adjustments
continuous-integration/drone/push Build is passing

This commit is contained in:
martin.fencl
2026-10-22 02:12:08 +02:00
parent 00810a0d17
commit 0fd866506e
6 changed files with 27 additions and 16 deletions
+4 -3
View File
@@ -6,8 +6,9 @@ try{
const response=await fetch(config.model);if(!response.ok)throw Error('Model / HTTP '+response.status);
const modelBytes=new Uint8Array(await response.arrayBuffer());
config.threeModule=new URL(config.threeModule,location.href).href;config.threeLoader=new URL(config.threeLoader,location.href).href;
// The standard GLTFLoader imports the same pinned Three.js copy.
const map=document.createElement('script');map.type='importmap';map.textContent=JSON.stringify({imports:{three:config.threeModule}});document.head.appendChild(map);
// The standard GLTFLoader imports the same pinned Three.js copy. app.html normally adds this map
// before any module loads (Firefox ignores a later one); this is only the fallback.
if(!document.querySelector('script[type=importmap]')){const map=document.createElement('script');map.type='importmap';map.textContent=JSON.stringify({imports:{three:config.threeModule}});document.head.appendChild(map);}
const hash=location.hash;
if(hash.startsWith('#vyber='))try{
let text=hash.slice(7).replace(/-/g,'+').replace(/_/g,'/');text+='='.repeat((4-text.length%4)%4);
@@ -16,7 +17,7 @@ try{
document.getElementById('stdSavedState').textContent=JSON.stringify({selection:payload.selection});
}catch(error){console.warn('Invalid shared selection:',error);}
window.LOCENICE_RESOURCES={config,catalog,assets,references,scene,site,modelBytes};
await import('./app.js?v=20261022b');
await import('./app.js?v=20261022c');
}catch(error){
console.error(error);const box=document.getElementById('loading');box.className='error';box.innerHTML='<div class="errorDetail"></div><p>Nahrajte celou slozku vcetne js, css, data, models a assets. Otevrete ji pres HTTP(S), nikoli dvojklikem na HTML.</p><a href="./models/dum.glb" download>Stahnout model GLB</a>';
box.querySelector('.errorDetail').textContent=error.message;document.getElementById('webStatus').textContent='Chyba nacitani';