Add table dimensions to scene (defaults merged on validate)

This commit is contained in:
2026-07-23 15:18:55 +10:00
parent da8c2038df
commit 5dbfe62499
+1
View File
@@ -34,6 +34,7 @@ function validateScene(s) {
for (const k of ['anchors', 'buildings', 'spawns']) {
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.paths = Array.isArray(s.paths) ? s.paths : [];
for (const pth of s.paths) {
if (!pth.id) throw new Error('path.id required');