Files

46 lines
2.9 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* set-footprints.js — LEGO Hidden Side set footprint presets for the layout editor.
Units: centimetres (1 Three.js unit = 1 cm). width = X extent, depth = Z extent,
height = Y extent. Footprint = the two horizontal axes of each build.
Fan/tribute project; not affiliated with or endorsed by the LEGO Group.
Sizes derived from Brickset-published model dimensions (brickset.com/sets/theme-Hidden-Side). */
export const SET_FOOTPRINTS = [
{ setNumber: "70418", name: "J.B.'s Ghost Lab", width: 13, depth: 18, height: 9, year: 2019 },
{ setNumber: "70420", name: "Graveyard Mystery", width: 14, depth: 32, height: 10, year: 2019 },
{ setNumber: "70421", name: "El Fuego's Stunt Truck", width: 10, depth: 10, height: 17, year: 2019 },
{ setNumber: "70422", name: "Shrimp Shack Attack", width: 19, depth: 32, height: 10, year: 2019 },
{ setNumber: "70424", name: "Ghost Train Express", width: 14, depth: 61, height: 15, year: 2019 },
{ setNumber: "70425", name: "Newbury Haunted High School", width: 30, depth: 43, height: 26, year: 2019 },
{ setNumber: "70427", name: "Welcome to the Hidden Side", width: 17, depth: 22, height: 13, year: 2020 },
{ setNumber: "70428", name: "Jack's Beach Buggy", width: 10, depth: 11, height: 8, year: 2020 },
{ setNumber: "70429", name: "El Fuego's Stunt Plane", width: 22, depth: 22, height: 8, year: 2020 },
{ setNumber: "70430", name: "Newbury Subway", width: 15, depth: 26, height: 14, year: 2020 },
{ setNumber: "70431", name: "The Lighthouse of Darkness", width: 29, depth: 22, height: 18, year: 2020 },
{ setNumber: "70432", name: "Haunted Fairground", width: 28, depth: 35, height: 27, year: 2020 },
{ setNumber: "70433", name: "J.B.'s Submarine", width: 21, depth: 19, height: 10, year: 2020 },
{ setNumber: "70434", name: "Supernatural Race Car", width: 19, depth: 11, height: 7, year: 2020 },
{ setNumber: "70435", name: "Newbury Abandoned Prison", width: 19, depth: 30, height: 15, year: 2020 },
{ setNumber: "70437", name: "Mystery Castle (closed)", width: 34, depth: 31, height: 27, year: 2020 },
{ setNumber: "70437o", name: "Mystery Castle (open)", width: 45.5, depth: 26, height: 27, year: 2020 }
];
export function getFootprint(setNumber) {
return SET_FOOTPRINTS.find(s => s.setNumber === setNumber) || null;
}
export function footprintLabel(fp) {
return `${fp.setNumber}${fp.name} (${fp.width} × ${fp.depth} cm)`;
}
/* Turn a preset into a building record the layout editor already understands.
Buildings store size:[w,h,d]; footprint width→X, height→Y, depth→Z. */
export function footprintToBuilding(fp, at = [0, 0, 0]) {
return {
name: `${fp.setNumber} ${fp.name}`,
setNumber: fp.setNumber,
position: [at[0], at[1], at[2]],
size: [fp.width, fp.height, fp.depth],
yawDeg: 0
};
}