feat(optimize): optimize Falukant 3D models during build and update deployment scripts
All checks were successful
Deploy to production / deploy (push) Successful in 3m3s

This commit is contained in:
Torsten Schulz (local)
2026-07-24 13:31:08 +02:00
parent e2ed65bede
commit b3f6429307
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);