Add ghostHeightCm to scene (minifigure-scale default 4 cm)

This commit is contained in:
2026-07-24 14:10:41 +10:00
parent 053601de32
commit f5536449b2
+1
View File
@@ -35,6 +35,7 @@ function validateScene(s) {
if (!Array.isArray(s[k])) throw new Error(`scene.${k} must be array`); if (!Array.isArray(s[k])) throw new Error(`scene.${k} must be array`);
} }
s.table = Object.assign({ width: 120, depth: 100, offsetX: 0, offsetZ: 0, show: true }, s.table || {}); s.table = Object.assign({ width: 120, depth: 100, offsetX: 0, offsetZ: 0, show: true }, s.table || {});
s.ghostHeightCm = Number(s.ghostHeightCm || 4); // minifigure-scale default
s.paths = Array.isArray(s.paths) ? s.paths : []; s.paths = Array.isArray(s.paths) ? s.paths : [];
for (const pth of s.paths) { for (const pth of s.paths) {
if (!pth.id) throw new Error('path.id required'); if (!pth.id) throw new Error('path.id required');