feat(optimize): optimize Falukant 3D models during build and update deployment scripts
All checks were successful
Deploy to production / deploy (push) Successful in 3m3s
All checks were successful
Deploy to production / deploy (push) Successful in 3m3s
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user