feat: Update model and configuration for improved loading and kitchen color adjustments
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+5
-1
@@ -324,7 +324,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script type="module" src="./js/bootstrap.js?v=20261022b"></script>
|
|
||||||
<div id="webStatus" role="status">Načítání modelu…</div>
|
<div id="webStatus" role="status">Načítání modelu…</div>
|
||||||
<button id="projectToggle" class="btn" type="button">Projekt a podklady</button>
|
<button id="projectToggle" class="btn" type="button">Projekt a podklady</button>
|
||||||
<dialog id="projectDialog" aria-labelledby="projectTitle">
|
<dialog id="projectDialog" aria-labelledby="projectTitle">
|
||||||
@@ -343,6 +342,11 @@
|
|||||||
</dialog>
|
</dialog>
|
||||||
<svg id="surveyOverlay" aria-label="Body výškopisu" style="display:none"></svg>
|
<svg id="surveyOverlay" aria-label="Body výškopisu" style="display:none"></svg>
|
||||||
<noscript><div class="web-fatal">Pro 3D model povolte JavaScript. <a href="./models/dum.glb">Stáhnout GLB</a></div></noscript>
|
<noscript><div class="web-fatal">Pro 3D model povolte JavaScript. <a href="./models/dum.glb">Stáhnout GLB</a></div></noscript>
|
||||||
|
<script>
|
||||||
|
// Firefox and Safari accept an import map only before the first module starts loading, so the map
|
||||||
|
// for Three.js is added here and bootstrap.js is requested only afterwards.
|
||||||
|
fetch('./data/app-config.json',{cache:'no-cache'}).then(r=>r.json()).then(c=>{const m=document.createElement('script');m.type='importmap';m.textContent=JSON.stringify({imports:{three:new URL(c.threeModule,location.href).href}});document.head.appendChild(m);}).catch(()=>{}).finally(()=>{const s=document.createElement('script');s.type='module';s.src='./js/bootstrap.js?v=20261022c';document.body.appendChild(s);});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": "locenice-web-01",
|
"version": "locenice-web-01",
|
||||||
"model": "./models/dum.glb?v=20261022b",
|
"model": "./models/dum.glb?v=20261022c",
|
||||||
"renderer": "auto",
|
"renderer": "auto",
|
||||||
"threeModule": "https://cdn.jsdelivr.net/npm/three@0.180.0/build/three.module.js",
|
"threeModule": "https://cdn.jsdelivr.net/npm/three@0.180.0/build/three.module.js",
|
||||||
"threeLoader": "https://cdn.jsdelivr.net/npm/three@0.180.0/examples/jsm/loaders/GLTFLoader.js",
|
"threeLoader": "https://cdn.jsdelivr.net/npm/three@0.180.0/examples/jsm/loaders/GLTFLoader.js",
|
||||||
|
|||||||
@@ -319,9 +319,9 @@
|
|||||||
],
|
],
|
||||||
"kitchenColor": [
|
"kitchenColor": [
|
||||||
[
|
[
|
||||||
"#4e5952",
|
"#4b5449",
|
||||||
"Zelená",
|
"Zelená",
|
||||||
"#4e5952"
|
"#4b5449"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"#eeeae1",
|
"#eeeae1",
|
||||||
@@ -353,7 +353,7 @@
|
|||||||
[
|
[
|
||||||
"oak",
|
"oak",
|
||||||
"Dřevo",
|
"Dřevo",
|
||||||
"#b59369"
|
"#a97a50"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"white",
|
"white",
|
||||||
@@ -372,6 +372,11 @@
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
"backsplash": [
|
"backsplash": [
|
||||||
|
[
|
||||||
|
"none",
|
||||||
|
"Bez obkladu",
|
||||||
|
"#efede8"
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"stone",
|
"stone",
|
||||||
"Světlý kámen",
|
"Světlý kámen",
|
||||||
@@ -385,7 +390,7 @@
|
|||||||
[
|
[
|
||||||
"worktop",
|
"worktop",
|
||||||
"Jako deska",
|
"Jako deska",
|
||||||
"#b59369"
|
"#a97a50"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"faucet": [
|
"faucet": [
|
||||||
@@ -424,9 +429,9 @@
|
|||||||
],
|
],
|
||||||
"kitchenBodyColor": [
|
"kitchenBodyColor": [
|
||||||
[
|
[
|
||||||
"#4e5952",
|
"#4b5449",
|
||||||
"Zelená",
|
"Zelená",
|
||||||
"#4e5952"
|
"#4b5449"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"#eeeae1",
|
"#eeeae1",
|
||||||
@@ -512,10 +517,10 @@
|
|||||||
"intDoorCode": "",
|
"intDoorCode": "",
|
||||||
"intDoorType": "hinged",
|
"intDoorType": "hinged",
|
||||||
"intHandle": "square",
|
"intHandle": "square",
|
||||||
"kitchenColor": "#4e5952",
|
"kitchenColor": "#4b5449",
|
||||||
"kitchenBodyColor": "#4e5952",
|
"kitchenBodyColor": "#4b5449",
|
||||||
"worktop": "oak",
|
"worktop": "oak",
|
||||||
"backsplash": "stone",
|
"backsplash": "none",
|
||||||
"shower": "tray",
|
"shower": "tray",
|
||||||
"faucet": "chrome",
|
"faucet": "chrome",
|
||||||
"hood": "facade",
|
"hood": "facade",
|
||||||
|
|||||||
+3
-2
@@ -752,6 +752,7 @@ let backend=null,projectPanel=null;
|
|||||||
if(e.stdFullOnly && interior.enabled && interior.mode!=='walk')return false;
|
if(e.stdFullOnly && interior.enabled && interior.mode!=='walk')return false;
|
||||||
if(e.stdBlind && (!stdState.blinds || (e.stdBlindFraction!==undefined && e.stdBlindFraction>stdState.blindDrop/100)))return false;
|
if(e.stdBlind && (!stdState.blinds || (e.stdBlindFraction!==undefined && e.stdBlindFraction>stdState.blindDrop/100)))return false;
|
||||||
if(e.stdWhen && Object.entries(e.stdWhen).some(([k,v])=>stdState[k]!==v))return false;
|
if(e.stdWhen && Object.entries(e.stdWhen).some(([k,v])=>stdState[k]!==v))return false;
|
||||||
|
if(e.stdUnless && Object.entries(e.stdUnless).some(([k,v])=>stdState[k]===v))return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
function stdSetMaterial(role,color,texture){
|
function stdSetMaterial(role,color,texture){
|
||||||
@@ -797,8 +798,8 @@ let backend=null,projectPanel=null;
|
|||||||
for(const r of STD_ROOMS){if(v[r[0]]===undefined)continue;const f=v[r[0]];if(!f||!['lam','tile'].includes(f.type)||!Number.isInteger(f.sample)||f.sample<1||f.sample>9)throw Error('Neplatn\u00e1 podlaha m\u00edstnosti '+r[0]);d.floors[r[0]]={type:f.type,sample:f.sample};}
|
for(const r of STD_ROOMS){if(v[r[0]]===undefined)continue;const f=v[r[0]];if(!f||!['lam','tile'].includes(f.type)||!Number.isInteger(f.sample)||f.sample<1||f.sample>9)throw Error('Neplatn\u00e1 podlaha m\u00edstnosti '+r[0]);d.floors[r[0]]={type:f.type,sample:f.sample};}
|
||||||
} else if(['wallPaint','kitchenColor','kitchenBodyColor','intDoorColor'].includes(k)){
|
} else if(['wallPaint','kitchenColor','kitchenBodyColor','intDoorColor'].includes(k)){
|
||||||
if(typeof v!=='string'||!/^#[0-9a-f]{6}$/i.test(v))throw Error('Neplatn\u00e1 barva: '+k);d[k]=v.toLowerCase();
|
if(typeof v!=='string'||!/^#[0-9a-f]{6}$/i.test(v))throw Error('Neplatn\u00e1 barva: '+k);d[k]=v.toLowerCase();
|
||||||
// The kitchen green was re-tinted; selections saved with the previous shade follow it.
|
// The kitchen green was re-tinted; selections saved with an earlier shade follow it.
|
||||||
if(k.startsWith('kitchen')&&d[k]==='#35463e')d[k]='#4e5952';
|
if(k.startsWith('kitchen')&&['#35463e','#4e5952'].includes(d[k]))d[k]='#4b5449';
|
||||||
} else if(STD_OPTIONS[k]){if(!STD_OPTIONS[k].some(o=>o[0]===v))throw Error('Nezn\u00e1m\u00e1 varianta: '+k);d[k]=v;
|
} else if(STD_OPTIONS[k]){if(!STD_OPTIONS[k].some(o=>o[0]===v))throw Error('Nezn\u00e1m\u00e1 varianta: '+k);d[k]=v;
|
||||||
} else if(enums[k]){if(!enums[k].includes(v))throw Error('Nezn\u00e1m\u00e1 varianta: '+k);d[k]=v;
|
} else if(enums[k]){if(!enums[k].includes(v))throw Error('Nezn\u00e1m\u00e1 varianta: '+k);d[k]=v;
|
||||||
} else if(typeof d[k]==='boolean'){if(typeof v!=='boolean')throw Error('Neplatn\u00fd p\u0159ep\u00edna\u010d: '+k);d[k]=v;
|
} else if(typeof d[k]==='boolean'){if(typeof v!=='boolean')throw Error('Neplatn\u00fd p\u0159ep\u00edna\u010d: '+k);d[k]=v;
|
||||||
|
|||||||
Vendored
+4
-3
@@ -6,8 +6,9 @@ try{
|
|||||||
const response=await fetch(config.model);if(!response.ok)throw Error('Model / HTTP '+response.status);
|
const response=await fetch(config.model);if(!response.ok)throw Error('Model / HTTP '+response.status);
|
||||||
const modelBytes=new Uint8Array(await response.arrayBuffer());
|
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;
|
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.
|
// The standard GLTFLoader imports the same pinned Three.js copy. app.html normally adds this map
|
||||||
const map=document.createElement('script');map.type='importmap';map.textContent=JSON.stringify({imports:{three:config.threeModule}});document.head.appendChild(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;
|
const hash=location.hash;
|
||||||
if(hash.startsWith('#vyber='))try{
|
if(hash.startsWith('#vyber='))try{
|
||||||
let text=hash.slice(7).replace(/-/g,'+').replace(/_/g,'/');text+='='.repeat((4-text.length%4)%4);
|
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});
|
document.getElementById('stdSavedState').textContent=JSON.stringify({selection:payload.selection});
|
||||||
}catch(error){console.warn('Invalid shared selection:',error);}
|
}catch(error){console.warn('Invalid shared selection:',error);}
|
||||||
window.LOCENICE_RESOURCES={config,catalog,assets,references,scene,site,modelBytes};
|
window.LOCENICE_RESOURCES={config,catalog,assets,references,scene,site,modelBytes};
|
||||||
await import('./app.js?v=20261022b');
|
await import('./app.js?v=20261022c');
|
||||||
}catch(error){
|
}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>';
|
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';
|
box.querySelector('.errorDetail').textContent=error.message;document.getElementById('webStatus').textContent='Chyba nacitani';
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user