Add ghostHeightCm to scene (minifigure-scale default 4 cm)
This commit is contained in:
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user