feat(optimize): optimize Falukant 3D models during build and update deployment scripts

This commit is contained in:
Torsten Schulz (local)
2026-07-24 13:31:08 +02:00
parent 2b6c747616
commit 12985bf3fa
6 changed files with 51 additions and 20 deletions

View File

@@ -95,6 +95,14 @@ export async function getOptimizedModelPath(filename) {
const sourceDir = getSourceDir();
const sourcePath = path.join(sourceDir, filename);
if (filename.endsWith('_opt.glb')) {
if (!fs.existsSync(sourcePath)) {
throw new Error(`Source model not found: ${filename} (looked in ${sourceDir})`);
}
return sourcePath;
}
const cacheFilename = filename.replace(/\.glb$/, '_opt.glb');
const cachePath = path.join(CACHE_DIR, cacheFilename);