feat: add 3D hydronic manifolds buffer tanks and fresh water stations

This commit is contained in:
jhartworks committed 2026-11-12 14:28:30 +01:00
1 parent 93c015ec77
commit 173d02e3cc
37 files changed
+3253 -1815

No files matched your search

+9 -2
View File
@@ -22,7 +22,7 @@ const common = {
legalComments: "eof",
banner: { js: "/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */" },
logLevel: "info",
define: { __NF_TREND_HASH__: JSON.stringify("dev") },
define: { __NF_TREND_HASH__: JSON.stringify("dev"), __NF_HYDRONIC_HASH__: JSON.stringify("dev") },
};
const hashOf = (file) => createHash("sha256").update(readFileSync(file)).digest("hex").slice(0, 12);
@@ -34,6 +34,7 @@ const langs = JSON.stringify(Object.fromEntries(langFiles.map((f) => [f.slice(0,
const viewerConfig = { ...common, entryPoints: ["src/viewer/viewer3d.ts"], outfile: `${out}/nextfloor-3d.js` };
const trendConfig = { ...common, entryPoints: ["src/components/trend-dialog.ts"], outfile: `${out}/nextfloor-trend.js` };
const hydronicConfig = { ...common, entryPoints: ["src/components/hydronic-card.ts"], outfile: `${out}/nextfloor-hydronics.js` };
// the card's visual editor only loads in the dashboard's card dialog
const cardEditorConfig = { ...common, entryPoints: ["src/card-editor.ts"], outfile: `${out}/nextfloor-card-editor.js`, define: { __NF_LANGS__: langs, "globalThis.__NF_SHARED_TEXTS__": "true" } };
// the editor is only needed by admins who open it, so it is a bundle of its own as well
@@ -111,7 +112,8 @@ function copySymconAssets() {
// Size budgets, small enough for old wall tablets. The editor bundles only load for admins and the card's settings, so they
// may grow more than the view; German and English texts ride in every bundle.
// Native utility discovery/reports plus the building/floor overview need about 14 KB in the shared runtime.
const BUDGET = { "nextfloor.js": 668 * 1024, "nextfloor-3d.js": 1000 * 1024, "nextfloor-editor.js": 720 * 1024, "nextfloor-card-editor.js": 240 * 1024, "nextfloor-trend.js": 100 * 1024 };
// Hydronic geometry/readouts load separately; only model references, anchors and the loader join the host.
const BUDGET = { "nextfloor.js": 672 * 1024, "nextfloor-3d.js": 1000 * 1024, "nextfloor-editor.js": 720 * 1024, "nextfloor-card-editor.js": 240 * 1024, "nextfloor-trend.js": 100 * 1024, "nextfloor-hydronics.js": 100 * 1024 };
copyAssets();
copySymconAssets();
@@ -120,6 +122,8 @@ if (watch) {
for (const c of [
viewerConfig,
trendConfig,
hydronicConfig,
{ ...hydronicConfig, outfile: `${symconOut}/nextfloor-hydronics.js` },
{ ...trendConfig, outfile: `${symconOut}/nextfloor-trend.js` },
editorConfig("dev"),
cardEditorConfig,
@@ -134,6 +138,9 @@ if (watch) {
await build(trendConfig);
copyFileSync(trendConfig.outfile, `${symconOut}/nextfloor-trend.js`);
common.define.__NF_TREND_HASH__ = JSON.stringify(hashOf(trendConfig.outfile));
await build(hydronicConfig);
copyFileSync(hydronicConfig.outfile, `${symconOut}/nextfloor-hydronics.js`);
common.define.__NF_HYDRONIC_HASH__ = JSON.stringify(hashOf(hydronicConfig.outfile));
await build(viewerConfig);
const editor = editorConfig(hashOf(viewerConfig.outfile));
await build(editor);