feat: Add legacy shaders, model I/O, and project panel functionality
continuous-integration/drone/push Build is passing

- Introduced `legacy-shaders.js` containing vertex and fragment shaders for rendering.
- Implemented `model-io.js` for parsing and encoding GLB files, ensuring compatibility with glTF 2.0.
- Created `project-panel.js` to manage project resources and survey overlays, enhancing user interaction.
- Added `solar.js` for calculating solar positions based on UTC time, latitude, and longitude.
- Developed `three-renderer.js` as a standard backend for Three.js, managing scene rendering and material synchronization.
- Included a new GLB model `dum.glb` for testing and demonstration purposes.
- Established `data_checks.mjs` for validating model data and ensuring integrity of assets.
- Created `prepare_export.py` to facilitate Blender GLB exports, maintaining material and node references.
- Added `vendor_three.py` to download and configure a local version of Three.js for the project.
This commit is contained in:
martin.fencl
2026-10-22 01:04:21 +02:00
parent c5fcd79fe9
commit ba7790daba
85 changed files with 21 additions and 18 deletions
+15
View File
@@ -0,0 +1,15 @@
{
"version": "locenice-web-01",
"model": "./models/dum.glb",
"renderer": "auto",
"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",
"cdnTimeoutMs": 6500,
"maxPixelRatio": 1.5,
"startAutoRotate": false,
"catalog": "./data/catalog.json",
"assets": "./data/assets.json",
"references": "./data/references.json",
"sceneMetadata": "./data/scene.json",
"site": "./data/site.json"
}
+52
View File
@@ -0,0 +1,52 @@
{
"page12": "./assets/catalog/page12.jpg",
"page13": "./assets/catalog/page13.jpg",
"page14": "./assets/catalog/page14.jpg",
"page15": "./assets/catalog/page15.jpg",
"page16": "./assets/catalog/page16.jpg",
"page17": "./assets/catalog/page17.jpg",
"page18": "./assets/catalog/page18.jpg",
"page19": "./assets/catalog/page19.jpg",
"page20": "./assets/catalog/page20.jpg",
"page21": "./assets/catalog/page21.jpg",
"page22": "./assets/catalog/page22.jpg",
"page23": "./assets/catalog/page23.jpg",
"page24": "./assets/catalog/page24.jpg",
"page25": "./assets/catalog/page25.jpg",
"lam1": "./assets/catalog/lam1.jpg",
"lam2": "./assets/catalog/lam2.jpg",
"lam3": "./assets/catalog/lam3.jpg",
"lam4": "./assets/catalog/lam4.jpg",
"lam5": "./assets/catalog/lam5.jpg",
"lam6": "./assets/catalog/lam6.jpg",
"lam7": "./assets/catalog/lam7.jpg",
"lam8": "./assets/catalog/lam8.jpg",
"lam9": "./assets/catalog/lam9.jpg",
"tile1": "./assets/catalog/tile1.jpg",
"tile2": "./assets/catalog/tile2.jpg",
"tile3": "./assets/catalog/tile3.jpg",
"tile4": "./assets/catalog/tile4.jpg",
"tile5": "./assets/catalog/tile5.jpg",
"tile6": "./assets/catalog/tile6.jpg",
"tile7": "./assets/catalog/tile7.jpg",
"tile8": "./assets/catalog/tile8.jpg",
"tile9": "./assets/catalog/tile9.jpg",
"door0": "./assets/catalog/door0.jpg",
"door1": "./assets/catalog/door1.jpg",
"door2": "./assets/catalog/door2.jpg",
"door3": "./assets/catalog/door3.jpg",
"door4": "./assets/catalog/door4.jpg",
"door5": "./assets/catalog/door5.jpg",
"door6": "./assets/catalog/door6.jpg",
"door7": "./assets/catalog/door7.jpg",
"requestedDoor": "./assets/catalog/requestedDoor.jpg",
"roof0": "./assets/catalog/roof0.jpg",
"roof1": "./assets/catalog/roof1.jpg",
"roof2": "./assets/catalog/roof2.jpg",
"roof3": "./assets/catalog/roof3.jpg",
"roof4": "./assets/catalog/roof4.jpg",
"intsill0": "./assets/catalog/intsill0.jpg",
"intsill1": "./assets/catalog/intsill1.jpg",
"intsill2": "./assets/catalog/intsill2.jpg",
"prum": "./assets/catalog/prum.jpg"
}
+529
View File
@@ -0,0 +1,529 @@
{
"rooms": [
[
"101",
"Zádveří",
"5,20",
"lam"
],
[
"102",
"Chodba",
"6,36",
"lam"
],
[
"103",
"Pokoj 1",
"10,62",
"lam"
],
[
"104",
"Pokoj 2",
"12,35",
"lam"
],
[
"105",
"Koupelna",
"7,72",
"tile"
],
[
"106",
"WC",
"1,40",
"tile"
],
[
"107",
"Ložnice",
"15,86",
"lam"
],
[
"108",
"Obývací pokoj + KK",
"37,69",
"lam"
],
[
"109",
"Technická místnost",
"3,09",
"tile"
]
],
"options": {
"entryModel": [
[
"solid",
"Plné",
"",
false,
"door0"
],
[
"line1",
"Jemná linka",
"",
true,
"door1"
],
[
"line2",
"Dvě linky",
"",
true,
"door2"
],
[
"slit",
"Svislé sklo",
"",
true,
"door3"
],
[
"three",
"3 skla",
"",
true,
"requestedDoor"
],
[
"four",
"4 skla",
"",
true,
"door5"
],
[
"five",
"5 skel",
"",
true,
"door6"
],
[
"wide",
"Velké sklo",
"",
true,
"door7"
]
],
"entryColor": [
[
"3003",
"RAL 3003",
"#8d1d2c"
],
[
"7012",
"RAL 7012",
"#575d5e"
],
[
"7016",
"RAL 7016",
"#383e42"
],
[
"9016",
"RAL 9016",
"#f1f0ea"
]
],
"extSill": [
[
"anthracite",
"Antracit",
"#383e42"
],
[
"white",
"Bílá",
"#eeefeb"
],
[
"elox",
"Elox",
"#bfc3c4"
],
[
"silver",
"Stříbrná",
"#b2b5b5"
],
[
"brown",
"Hnědá",
"#5c4338",
true
]
],
"gutter": [
[
"015",
"015 CERN",
"#262b2b"
],
[
"087",
"087 TMSE",
"#444f52"
],
[
"035",
"035 BRSE",
"#394c55"
],
[
"434",
"434 HNED",
"#5a4441"
],
[
"758",
"758 TMCE",
"#82282d",
true
],
[
"742",
"742 CICE",
"#a34832",
true
],
[
"045",
"045 SMET",
"#aaaeb2",
true
],
[
"044",
"044 SEME",
"#82878b",
true
]
],
"roof": [
[
"chestnut",
"Kaštanová",
"#6e3930",
false,
"roof0"
],
[
"brick",
"Cihlová",
"#934837",
false,
"roof1"
],
[
"terracotta",
"Terakota",
"#94402e",
false,
"roof2"
],
[
"black",
"Černá",
"#252a2b",
false,
"roof3"
],
[
"darkgray",
"Tmavě šedivá",
"#464a48",
false,
"roof4"
]
],
"blindColor": [
[
"140H",
"140 H",
"#e6e7e5"
],
[
"9007",
"9007",
"#969996"
],
[
"7012",
"7012",
"#575d5e"
],
[
"7022",
"7022",
"#4c4a44"
],
[
"7016",
"7016",
"#383e42"
]
],
"intSill": [
[
"white",
"Bílá",
"#edecea",
false,
"intsill0"
],
[
"gray",
"Žíhaná šedá",
"#b9b9b5",
false,
"intsill1"
],
[
"brown",
"Žíhaná hnědá",
"#b4a692",
false,
"intsill2"
]
],
"intHandle": [
[
"square",
"Hranatá"
],
[
"round",
"Oblá"
]
],
"shower": [
[
"tray",
"S vaničkou"
],
[
"walkin",
"Walk-in"
]
],
"kitchenColor": [
[
"#35463e",
"Zelená",
"#35463e"
],
[
"#eeeae1",
"Krémová",
"#eeeae1"
],
[
"#e9e9e5",
"Bílá",
"#e9e9e5"
],
[
"#b3aaa0",
"Kašmír",
"#b3aaa0"
],
[
"#686d69",
"Šedá",
"#686d69"
],
[
"#343a3d",
"Antracit",
"#343a3d"
]
],
"worktop": [
[
"oak",
"Dřevo",
"#b59369"
],
[
"white",
"Bílá",
"#eeeeea"
],
[
"graphite",
"Grafit",
"#444946"
],
[
"stone",
"Kámen",
"#c7c5b9"
]
],
"backsplash": [
[
"stone",
"Světlý kámen",
"#c7c5b9"
],
[
"white",
"Bílá",
"#eaeae5"
],
[
"worktop",
"Jako deska",
"#b59369"
]
],
"faucet": [
[
"chrome",
"Chrom",
"#bec1c1"
],
[
"black",
"Černá",
"#303434"
]
],
"wallPaint": [
[
"#ffffff",
"HET bílá",
"#ffffff"
],
[
"#eeeae1",
"Teplá bílá",
"#eeeae1"
],
[
"#ded4c7",
"Písková",
"#ded4c7"
],
[
"#ccd2c5",
"Šalvěj",
"#ccd2c5"
]
],
"kitchenBodyColor": [
[
"#35463e",
"Zelená",
"#35463e"
],
[
"#eeeae1",
"Krémová",
"#eeeae1"
],
[
"#e9e9e5",
"Bílá",
"#e9e9e5"
],
[
"#b3aaa0",
"Kašmír",
"#b3aaa0"
],
[
"#686d69",
"Šedá",
"#686d69"
],
[
"#343a3d",
"Antracit",
"#343a3d"
]
]
},
"defaults": {
"entryModel": "three",
"entryColor": "7016",
"extSill": "anthracite",
"gutter": "015",
"roof": "darkgray",
"blinds": false,
"blindColor": "7016",
"blindDrop": 100,
"floors": {
"101": {
"type": "lam",
"sample": 6
},
"102": {
"type": "lam",
"sample": 6
},
"103": {
"type": "lam",
"sample": 6
},
"104": {
"type": "lam",
"sample": 6
},
"105": {
"type": "tile",
"sample": 1
},
"106": {
"type": "tile",
"sample": 1
},
"107": {
"type": "lam",
"sample": 6
},
"108": {
"type": "lam",
"sample": 6
},
"109": {
"type": "tile",
"sample": 1
}
},
"wallTile105": 1,
"wallTile106": 1,
"tileCorner": "profile",
"intSill": "white",
"wallPaint": "#ffffff",
"intDoor": "sample",
"intDoorColor": "#c3aa85",
"intDoorCode": "",
"intDoorType": "hinged",
"intHandle": "square",
"kitchenColor": "#35463e",
"kitchenBodyColor": "#35463e",
"worktop": "oak",
"backsplash": "stone",
"shower": "tray",
"faucet": "chrome",
"hood": "facade",
"fans": true,
"aircon": true,
"ventilation": "local",
"hotWaterCirculation": false,
"radiator": "electric",
"note": ""
}
}
+32
View File
@@ -0,0 +1,32 @@
{
"plan": {
"title": "D.1.1.2.1.1 · Půdorys 1. NP",
"caption": "Dodaný projektový podklad. Dispozice a popisky místností vycházejí z tohoto výkresu.",
"src": "./assets/references/plan.jpg"
},
"kitchen1": {
"title": "Kuchyň · mrvz1_uprava.jpg",
"caption": "Dodaný referenční obrázek kuchyně. V modelu jsou moduly přizpůsobené půdorysu; jejich výrobní rozměry nejsou doložené.",
"src": "./assets/references/kitchen1.jpg"
},
"kitchen2": {
"title": "Kuchyň · mrvz2.jpeg",
"caption": "Dodaný referenční obrázek kuchyně.",
"src": "./assets/references/kitchen2.jpg"
},
"view1": {
"title": "Výhled · pohled_ven.jpeg",
"caption": "Dodaný referenční obrázek obytného prostoru a výhledu. Není použit jako georeferencované panorama.",
"src": "./assets/references/view1.jpg"
},
"view2": {
"title": "Obytný prostor · PHOTO-2026-05-26-20-38-11.jpg",
"caption": "Dodaný referenční obrázek materiálů, trámů a obytného prostoru.",
"src": "./assets/references/view2.jpg"
},
"survey": {
"title": "Polohopis a vyskopis - dodany podklad",
"caption": "Vysky jsou v Bpv. Body v modelu maji polohu graficky odectenou z PDF; nejde o zamerene souradnice domu.",
"src": "./assets/references/survey.png"
}
}
File diff suppressed because it is too large Load Diff
+326
View File
@@ -0,0 +1,326 @@
{
"version": "2026-10-site-01",
"referenceElevation": 591.84,
"source": "C.2-C.5 and Locenice p.c.3480/37 polohopis a vyskopis; digitized PDF vectors, not survey coordinates.",
"cadastralAreaInProject": 1010,
"digitizedOutlineArea": 987.89,
"note": "The graphical outline is about 988 m2, versus 1010 m2 in the project. It is NOT scaled to force area equality; house dimensions are unchanged.",
"finishedGroundC3": [
[
-7.67,
4.695,
-0.48
],
[
-7.67,
-4.695,
-0.48
],
[
3.713,
-4.695,
-0.992
],
[
3.713,
-0.688,
-0.871
],
[
7.67,
-0.688,
-1.14
],
[
7.67,
4.695,
-0.971
],
[
-1.113,
4.695,
-0.48
]
],
"surveyPoints": [
{
"id": 1,
"xz": [
-22.86387745468233,
6.9162902718421835
],
"altitude": 593.13
},
{
"id": 2,
"xz": [
-26.00649803769423,
5.740604360018231
],
"altitude": 593.19
},
{
"id": 3,
"xz": [
-22.733664786123356,
-2.9186632403462283
],
"altitude": 592.64
},
{
"id": 4,
"xz": [
-19.66526683318922,
-1.6042685750232388
],
"altitude": 592.54
},
{
"id": 5,
"xz": [
-16.849177040431528,
-9.283203935982339
],
"altitude": 592.08
},
{
"id": 6,
"xz": [
-19.809586816163616,
-10.38887051378567
],
"altitude": 592.09
},
{
"id": 7,
"xz": [
-19.100913252951532,
0.5664836927799971
],
"altitude": 592.84
},
{
"id": 8,
"xz": [
-21.249447968471955,
7.071889756172209
],
"altitude": 592.85
},
{
"id": 9,
"xz": [
-19.62233327368599,
2.5536226040233165
],
"altitude": 592.59
},
{
"id": 10,
"xz": [
-9.809681750990507,
7.518430876054446
],
"altitude": 592.14
},
{
"id": 11,
"xz": [
-8.73082925476737,
0.6499201351270848
],
"altitude": 591.85
},
{
"id": 12,
"xz": [
7.4440611266407775,
0.4236299245776415
],
"altitude": 590.74
},
{
"id": 13,
"xz": [
8.057613164117942,
7.427291898661351
],
"altitude": 590.96
},
{
"id": 14,
"xz": [
22.42368569156818,
7.487149207097606
],
"altitude": 589.96
},
{
"id": 15,
"xz": [
22.980738978199824,
0.027095859342831083
],
"altitude": 589.65
},
{
"id": 16,
"xz": [
25.962873515635593,
7.010131955908398
],
"altitude": 589.82
},
{
"id": 17,
"xz": [
36.80267751573004,
5.954683418127402
],
"altitude": 589.03
},
{
"id": 18,
"xz": [
37.69887332216715,
-0.19213899494552378
],
"altitude": 588.82
},
{
"id": 19,
"xz": [
47.409464441441116,
4.094040845154811
],
"altitude": 588.54
},
{
"id": 20,
"xz": [
51.16376748811935,
-2.0537658393134657
],
"altitude": 588.06
},
{
"id": 21,
"xz": [
54.12316842449226,
-9.187005561860445
],
"altitude": 587.79
},
{
"id": 22,
"xz": [
41.075319538836055,
-8.900127720728307
],
"altitude": 588.45
},
{
"id": 23,
"xz": [
23.482474278537843,
-7.205827671852879
],
"altitude": 589.47
},
{
"id": 24,
"xz": [
6.9940948033230175,
-7.604159411778007
],
"altitude": 590.56
},
{
"id": 25,
"xz": [
-5.631153944681365,
-8.570201470985344
],
"altitude": 591.41
},
{
"id": 26,
"xz": [
-14.560744944331192,
-8.695220715590304
],
"altitude": 591.9
},
{
"id": 27,
"xz": [
-17.020111569954853,
-2.760537937058604
],
"altitude": 592.24
}
],
"parkingSpot": 0.39,
"entranceSpot": -0.48,
"gardenStairSpot": -1.395,
"originalNodeCount": 111,
"originalBinaryBytes": null,
"terrainClosure": {
"version": "2",
"description": "Continuous boundary walls and underside added to the three terrain slabs. Original grass surfaces and house geometry unchanged.",
"thickness_m": 0.6
},
"cadastralSource": "VYKAZ DOSAVADNIHO A NOVEHO STAVU UDAJU KN, plan 738-33/2023, 1.8.2023",
"cadastralCoordinates": [
{
"id": "461-1364",
"Y": 754888.21,
"X": 1183134.81,
"qualityCode": 8
},
{
"id": "461-1508",
"Y": 754858.48,
"X": 1183140.31,
"qualityCode": 8
},
{
"id": "559-1",
"Y": 754878.61,
"X": 1183200.41,
"qualityCode": 8
},
{
"id": "559-2",
"Y": 754846.53,
"X": 1183210.96,
"qualityCode": 8
},
{
"id": "1",
"Y": 754873.34,
"X": 1183137.56,
"qualityCode": 8
},
{
"id": "2",
"Y": 754860.49,
"X": 1183206.37,
"qualityCode": 8
},
{
"id": "3",
"Y": 754866.57,
"X": 1183185.6,
"qualityCode": 3
}
],
"cadastralBoundary3480_37": [
"1",
"461-1508",
"559-2",
"2",
"3"
],
"sourceDistinction": "Cadastral coordinates are S-JTSK plan coordinates. Survey heights are Bpv. Survey xz is a graphical registration in the existing model, not a geodetic transformation. No house setting-out coordinates were provided."
}