Data centres: multi-storey shell, racks and pods, cooling, fire safety, power
Deploy web Studio / deploy (push) Successful in 1m4s
Deploy web Studio / deploy (push) Successful in 1m4s
datacentre.rhai (palette groups Data centre, Cooling, Fire safety, Power): - dc_building: multi-storey shell (storeys of storey_h), walls in pieces, slabs, roof with parapet, louvres, front door and loading dock; levels cut it open storey by storey - raised_floor; rack_row and dc_pod (cabinets by U, width, depth, equipment, fill, doors, LEDs; in-row coolers; cold / hot aisle containment with vent tiles, roof, end doors, ceiling duct, airflow); dc_cage for colocation - crah, chiller (air-cooled, dry, adiabatic), cooling_tower, pipe_run - smoke_detectors (grid + coverage), fire_pipe (VESDA, sprinkler, gas), gas_bank (Novec 1230, FM-200, Inergen sized for its halls), fire_device (panels, call points, abort switches, beacons, extinguishers) - power_cab (UPS, battery, PDU, switchgear, RPP), busway, cable_tray, transformer - tooltips sum IT load, kW/m2, cooling redundancy per storey, UPS load, battery runtime, plant cooling and agent quantity (warning when short) Engine and stdlib: - part_hidden(o) in house.rhai: parts on closed storeys inside a dc_building are not drawn (they only made sort cycles under the slab above); house parts, furniture and people use it. Existing examples render byte-identical. - overhead services sort in their own "ceiling" layer with tight boxes - sort records which sprites each broken cycle involved; isokit check names them (Rendered.cycle_at) examples/datacentre (three storeys and a roof plant), Data centre demo in the web Studio, tests, SCRIPTING/README/ROADMAP, MCP instructions.
This commit is contained in:
1 parent
c8becc2e59
commit
2810477f1b
22 files changed
+2281
-18
No files matched your search
@@ -3,30 +3,37 @@
|
||||
fn people_colours() { ["hivis", "guest1", "guest2", "guest3", "guest4", "guide", "suit"] }
|
||||
|
||||
fn meta_person() {
|
||||
#{ label: "Person", category: "People", icon: "🧍",
|
||||
#{ label: "Person", category: "People", icon: "🧍", storey: true,
|
||||
props: [
|
||||
#{ key: "cls", type: "choice", def: "hivis", choices: people_colours(), label: "Clothes" },
|
||||
#{ key: "seated", type: "bool", def: false, label: "Seated" },
|
||||
] }
|
||||
}
|
||||
// People are left out like house parts (on a storey above the one a level
|
||||
// cuts open, or inside a closed data centre storey); on a raised floor they
|
||||
// stand on its top.
|
||||
fn prefab_person(o) {
|
||||
if part_hidden(o) { return; }
|
||||
let z = dc_lift(o);
|
||||
let s = sprite();
|
||||
if o.p.seated { s.sit(0.0, 0.0, 0.0, o.p.cls); } else { s.person(0.0, 0.0, 0.0, o.p.cls); }
|
||||
if o.p.seated { s.sit(0.0, 0.0, z, o.p.cls); } else { s.person(0.0, 0.0, z, o.p.cls); }
|
||||
}
|
||||
|
||||
fn meta_crowd() {
|
||||
#{ label: "Crowd", category: "People", icon: "👥",
|
||||
#{ label: "Crowd", category: "People", icon: "👥", storey: true,
|
||||
props: [
|
||||
#{ key: "n", type: "int", def: 5, min: 2, max: 40, step: 1, label: "People" },
|
||||
#{ key: "r", type: "float", def: 2.0, min: 0.6, max: 15.0, step: 0.1, label: "Spread (m)" },
|
||||
] }
|
||||
}
|
||||
fn prefab_crowd(o) {
|
||||
if part_hidden(o) { return; }
|
||||
let z = dc_lift(o);
|
||||
let cols = ["guest1", "guest2", "guest3", "guest4", "hivis"];
|
||||
for i in 0..o.p.n {
|
||||
// one sprite each, scattered deterministically in a disc
|
||||
let a = hash(i * 1.7 + o.x) * 6.2832;
|
||||
let r = o.p.r * hash(i * 3.3 + o.y).sqrt();
|
||||
sprite().person(r * a.cos(), r * a.sin(), 0.0, cols[i % 5]);
|
||||
sprite().person(r * a.cos(), r * a.sin(), z, cols[i % 5]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user