diff --git a/crates/daemon/names/shops.txt b/crates/daemon/names/shops.txt index f797728..36f2ee5 100644 --- a/crates/daemon/names/shops.txt +++ b/crates/daemon/names/shops.txt @@ -60,3 +60,16 @@ Osgood's Delacroix & Fils Pemberton's Marlborough House Stores +[s8] +Crossroads Service +Blue Star Gasoline +Highway Garage +Libertyville Motors +Fairway Service Station +Red Arrow Filling +Pioneer Gas & Oil +Summit Service +Milestone Garage +Oak Lane Service +Golden Mile Motors +Cornerstone Fuel diff --git a/crates/daemon/src/plan.rs b/crates/daemon/src/plan.rs index fa66a74..514fd8c 100644 --- a/crates/daemon/src/plan.rs +++ b/crates/daemon/src/plan.rs @@ -489,6 +489,7 @@ pub const BLUEPRINTS: &[Blueprint] = &[ bp("c6", "Craftsman bungalow", Cottage, &[Village], 1, 450), bp("c7", "Half-timbered house", Cottage, &[Village], 1, 550), bp("s2", "Corner café", Shop, &[MainStreet, Downtown], 1, 500), + bp("s8", "Filling station", Shop, &[MainStreet], 1, 500), bp("s6", "Tower brewery", Workshop, &[Works], 1, 600), bp("s5", "Department store", Shop, &[Downtown], 2, 1200), bp( diff --git a/crates/daemon/src/world.rs b/crates/daemon/src/world.rs index 13c43b4..05d4909 100644 --- a/crates/daemon/src/world.rs +++ b/crates/daemon/src/world.rs @@ -2196,7 +2196,7 @@ mod tests { let w = c.world(None, Timestamp::UNIX_EPOCH, &TimeZone::UTC); let shops = w.needs.iter().find(|n| n.id == "hamlet-shops").unwrap(); assert!(shops.fits.is_empty()); - assert_eq!(shops.fits_locked, ["s1", "s3", "s2"]); + assert_eq!(shops.fits_locked, ["s1", "s3", "s2", "s8"]); } #[test] diff --git a/docs/APP.md b/docs/APP.md index 18442b1..4891870 100644 --- a/docs/APP.md +++ b/docs/APP.md @@ -108,7 +108,8 @@ are blueprints and their prices. | S4 | Brick factory | workshop | `s4_factory.py` | in | | S5 | Department store | shop classic | `s5_store.py` | in | | S6 | Tower brewery | workshop | `s6_brewery.py` | in | -| S7-S9 | Corner store, filling station, market hall | shop | | | +| S8 | Filling station | shop diner | `s8_station.py` | in | +| S7, S9 | Corner store, market hall | shop | | | | A1 | Pre-war brick block | apartment classic | `a1_apartment.py` | in | | A2 | Brownstone row | apartment townhouse | `a2_brownstone.py` | in | | A3 | Balcony block | apartment classic | `a3_balcony.py` | in | @@ -147,7 +148,7 @@ carry a FOR SALE board. Park spots draw the decorations bought for them (`SPOTS` in `models.ts`). Signs that carry a name (S1's fascia; the café, diner and works friezes, -S6's painted wall; the office, L2 and S5 name panels and canopies; L1 and +S6's painted wall, S8's canopy fascia; the office, L2 and S5 name panels and canopies; L1 and L3's gilt names) show the building's own name: `NameSheet` in `real.ts` paints each name into a shared sheet the first time a building asks for it. A1's two shop signs are stock, by seed. diff --git a/ui/blender/real/build.py b/ui/blender/real/build.py index f2021ab..b2833a3 100644 --- a/ui/blender/real/build.py +++ b/ui/blender/real/build.py @@ -15,7 +15,7 @@ import lib # noqa: E402 -MODELS = {"a1": "a1_apartment", "a2": "a2_brownstone", "c1": "c1_farmhouse", "c2": "c2_cottage", "c3": "c3_modern", "c4": "c4_aframe", "s1": "s1_shop", "s2": "s2_cafe", "s3": "s3_diner", "s4": "s4_factory", "o1": "o1_tower", "o2": "o2_round", "o3": "o3_brutalist", "l1": "l1_deco", "l2": "l2_supertall", "s5": "s5_store", "s6": "s6_brewery", "l3": "l3_gothic", "a3": "a3_balcony", "c5": "c5_stone", "c6": "c6_bungalow", "c7": "c7_timber", "a4": "a4_deco", "a5": "a5_paris", "a6": "a6_modern", "cars": "vehicles", "trees": "trees", "street": "street", "bridge": "bridge", "civic": "civic", "p1": "p1_substation", "f1": "f1_fire", "e1": "e1_school", "h1": "h1_clinic", "l5": "l5_cityhall", "e2": "e2_police", "e3": "e3_library", "h2": "h2_hospital", "p2": "p2_power", "w2": "w2_pumping"} +MODELS = {"a1": "a1_apartment", "a2": "a2_brownstone", "c1": "c1_farmhouse", "c2": "c2_cottage", "c3": "c3_modern", "c4": "c4_aframe", "s1": "s1_shop", "s2": "s2_cafe", "s3": "s3_diner", "s4": "s4_factory", "o1": "o1_tower", "o2": "o2_round", "o3": "o3_brutalist", "l1": "l1_deco", "l2": "l2_supertall", "s5": "s5_store", "s6": "s6_brewery", "l3": "l3_gothic", "a3": "a3_balcony", "c5": "c5_stone", "c6": "c6_bungalow", "c7": "c7_timber", "a4": "a4_deco", "a5": "a5_paris", "a6": "a6_modern", "cars": "vehicles", "trees": "trees", "street": "street", "bridge": "bridge", "civic": "civic", "s8": "s8_station", "p1": "p1_substation", "f1": "f1_fire", "e1": "e1_school", "h1": "h1_clinic", "l5": "l5_cityhall", "e2": "e2_police", "e3": "e3_library", "h2": "h2_hospital", "p2": "p2_power", "w2": "w2_pumping"} argv = sys.argv[sys.argv.index("--") + 1 :] if "--" in sys.argv else [] flags = {a for a in argv if a.startswith("--")} diff --git a/ui/blender/real/s8_station.py b/ui/blender/real/s8_station.py new file mode 100644 index 0000000..a9f77cb --- /dev/null +++ b/ui/blender/real/s8_station.py @@ -0,0 +1,490 @@ +# S8, filling station: a streamline service station of the late 1940s. A +# low building in white porcelain-enamel panels with a band of colour along +# its base and parapet: the office on the left with a ribbon of glass that +# wraps its rounded corner, a glass door, two service bays on the right (one +# door rolled up on a lift and a bench, one closed), the restrooms' doors on +# the side. A fin tower over the office's corner with speed lines and a neon +# tube up its nose. In front, a flat canopy on two stainless columns over two +# pump islands, four pumps with lit globes, the station's name on the +# canopy's fascia; a pylon sign at the corner of the lot, an air post, a rack +# of oil cans, an ice chest and tyres by the bays. The app picks the enamel +# colour, the neon and the name. +# +# Pieces (base at the origin): +# body the building to its wall head, the bay's insides, the canopy, +# islands, pumps, the pylon and the forecourt's furniture +# roof parapet and band, the fin tower, the deck and its plant +import math + +from mathutils import Vector + +from lib import Model, Side, Z, letters, neon, new_id, pane, sides + +ID = "s8" +XL, XR = -6.4, 6.4 # the building's ends +YF, YB = 0.0, 6.3 # its front and back walls +CY = (YF + YB) / 2 +R = 1.6 # the office's rounded corner, front left +TOP = 3.8 # wall head: the roof piece's base +PL = 0.15 # the office floor above the forecourt +RIB = (0.6, 3.1) # the office's ribbon of glass +IS = 0.2 # pump islands' top +ISL = [-2.6, 2.6] # their x; they run back from the street +ISY = (-5.5, -1.7) +PUMPS = [-4.75, -2.45] # pumps' y on each island; the column between them +COL = -3.6 +CAN = (-5.4, 5.4, -6.3, -0.8) # canopy plan: x0, x1, y0, y1 +CZ = 4.3 # canopy soffit +CF = 5.05 # top of its fascia +DOOR = (-2.85, -1.9) # the office door +BAYS = [(-0.95, 2.15), (2.7, 5.8)] # service bay openings; the first stands open +BH = 3.2 # their head +PY = (6.4, -5.95) # the pylon sign, x and y + + +def build(out, bake=True): + M = Model(ID) + M.piece("body") + body(M) + M.piece("roof", (0, 0, TOP)) + roof(M) + M.export(out, bake) + + +def arc(n=8): + """The rounded corner as (point, outward normal) pairs, from the side wall round to the front.""" + cx, cy = XL + R, YF + R + out = [] + for i in range(n + 1): + a = math.pi + i / n * math.pi / 2 + out.append((Vector((cx + R * math.cos(a), cy + R * math.sin(a), 0)), Vector((math.cos(a), math.sin(a), 0)))) + return out + + +def outline(): + """The building's plan, counter-clockwise from above: round the corner, then the square ones.""" + return [(p.x, p.y) for p, _ in arc()] + [(XR, YF), (XR, YB), (XL, YB)] + + +def facets(m, z=0.0): + """The corner's facets as Sides (u from 0 to their length), with their lengths.""" + pts = arc() + out = [] + for (p0, n0), (p1, n1) in zip(pts, pts[1:]): + t = p1 - p0 + out.append((Side(m, p0 + Vector((0, 0, z)), t, (n0 + n1).normalized()), t.length)) + return out + + +def walls(m): + """The building's straight walls as Sides; u runs left to right seen from outside.""" + return sides(m, XR - XL, YB - YF, (XL + XR) / 2, CY) + + +def strip(F, u0, u1, z0, z1, holes, role, w0=0.0, w1=0.02): + """A band proud of the wall from u0 to u1, broken where an opening crosses it.""" + cuts = sorted((a, b) for a, b, c, e, *_ in holes if c < z1 and e > z0) + u = u0 + for a, b in cuts: + if a > u + 1e-6: + F.box(role, u, min(a, u1), z0, z1, w0, w1) + u = max(u, b) + if u1 > u + 1e-6: + F.box(role, u, u1, z0, z1, w0, w1) + + +# ---- body ----------------------------------------------------------------------------- + + +def body(M): + m = M.m + W = walls(m) + building(M, m, W) + open_bay(m, W["front"]) + closed_door(W["front"], *BAYS[1]) + canopy(M, m) + for x in ISL: + island(m, x) + pylon(m) + furniture(m) + + +def ribbon(M, F, u0, u1, wid, at, total, ends=(False, False)): + """The office's glass band on F from u0 to u1, set back 0.1 m; `at` is where it + starts along the whole ribbon and `total` its length, for the window's UVs.""" + m = M.m + c, e = RIB + D_ = 0.1 + F.box("enamel", u0, u1, 0.0, 0.55, 0, 0.03, skip=("back",)) + F.quad("cream", u0, u1, 0.55, c) + F.quad("cream", u0, u1, e, TOP) + uv = lambda u, z: (wid + (at + u - u0) / total, (z - c) / (e - c)) # noqa: E731 + F.quad("shopglass", u0, u1, c, e, -D_, uvs=[uv(u0, c), uv(u1, c), uv(u1, e), uv(u0, e)]) + # Sill and head in stainless, and the reveals at a free end. + F.box("stainless", u0, u1, c - 0.04, c, -D_, 0.05, skip=()) + m.poly("stainless", [F.p(u0, e, 0), F.p(u1, e, 0), F.p(u1, e, -D_), F.p(u0, e, -D_)], out=-Z) + for u, s, end in ((u0, 1, ends[0]), (u1, -1, ends[1])): + if end: + m.poly("stainless", [F.p(u, c, 0), F.p(u, c, -D_), F.p(u, e, -D_), F.p(u, e, 0)], out=F.t * s) + + +def building(M, m, W): + wid = new_id() + # The ribbon: the side window, round the corner, along the front to the door. + side_u = (0.0, CY - YF - R) # left wall u, which runs towards the front + front_u = (XL + R, DOOR[0] - 0.12) + fac = facets(m) + total = (side_u[1] - side_u[0]) + sum(L for _, L in fac) + (front_u[1] - front_u[0]) + at = 0.0 + ribbon(M, W["left"], *side_u, wid, at, total, ends=(True, False)) + at += side_u[1] - side_u[0] + for i, (F, L) in enumerate(fac): + ribbon(M, F, 0, L, wid, at, total) + if i % 2 == 0: + F.box("stainless", -0.025, 0.025, RIB[0], RIB[1], -0.1, -0.04, skip=()) + at += L + ribbon(M, W["front"], *front_u, wid, at, total, ends=(False, True)) + F = W["front"] + for u in (-4.0, front_u[1] - 0.02): + F.box("stainless", u - 0.025, u + 0.025, RIB[0], RIB[1], -0.1, -0.04, skip=()) + W["left"].box("stainless", 0.6 - 0.025, 0.6 + 0.025, RIB[0], RIB[1], -0.1, -0.04, skip=()) + # Front: the door, two bays between enamel-capped piers. + a, b = DOOR + holes = [(a, b, PL, 2.75, 0.2)] + [(u0, u1, 0.0, BH, 0.25) for u0, u1 in BAYS] + F.wall("cream", front_u[1], XR, 0, TOP, holes, reveal="stainless") + strip(F, front_u[1], XR, 0, 0.55, holes, "enamel", 0, 0.03) + for u0, u1 in BAYS: + F.box("stainless", u0 - 0.06, u1 + 0.06, BH, BH + 0.06, 0, 0.05) + door(F, a, b) + m.box("concrete", (a - 0.3, YF - 0.6, 0), (b + 0.3, YF, PL), skip=("y1",)) + # A pinstripe of enamel under the wall head, all the way round. + m.psweep("enamel", outline(), [(0.0, 3.32), (0.03, 3.32), (0.03, 3.42), (0.0, 3.42)]) + # Left side: the restrooms' doors, behind the office. + S = W["left"] + rest = [(-2.75, -1.85), (-1.45, -0.55)] + S.wall("cream", -CY + YF, side_u[0], 0, TOP, [(u0, u1, 0, 2.2, 0.12) for u0, u1 in rest], reveal="stainless") + strip(S, -CY + YF, side_u[0], 0, 0.55, [(u0, u1, 0, 2.2) for u0, u1 in rest], "enamel", 0, 0.03) + for u0, u1 in rest: + S.quad("door", u0, u1, 0, 2.2, -0.12) + for k in range(4): + z = 0.25 + k * 0.48 + S.box("door", u0 + 0.12, u1 - 0.12, z, z + 0.3, -0.12, -0.1) + S.box("brass", u1 - 0.18, u1 - 0.12, 1.0, 1.06, -0.12, -0.06) + S.box("dark", u0 + 0.2, u1 - 0.2, 2.35, 2.6, 0, 0.02) + S.box("cream", u0 + 0.25, u1 - 0.25, 2.4, 2.55, 0.02, 0.025) + # Right side: a window over the bench, the ladder to the roof. + S = W["right"] + win = (-0.8, 0.6, 1.5, 2.7) + S.wall("cream", -CY + YF, CY - YF, 0, TOP, [(*win, 0.18)], reveal="stainless") + strip(S, -CY + YF, CY - YF, 0, 0.55, [], "enamel", 0, 0.03) + wid2 = new_id() + S.box("stainless", win[0], win[1], win[2] - 0.04, win[2], -0.18, 0.06, skip=()) + pane(S, "glass", *win, *win, -0.12, wid2) + S.box("stainless", (win[0] + win[1]) / 2 - 0.02, (win[0] + win[1]) / 2 + 0.02, win[2], win[3], -0.12, -0.08) + for u in (1.9, 2.35): + S.box("iron", u - 0.025, u + 0.025, 0.9, TOP + 1.1, 0.12, 0.16, skip=()) + for k in range(int((TOP + 0.9 - 1.0) / 0.3) + 1): + z = 1.0 + k * 0.3 + S.box("iron", 1.9, 2.35, z - 0.015, z + 0.015, 0.125, 0.155, skip=()) + for z in (1.3, TOP - 0.2): + S.box("iron", 1.88, 1.92, z - 0.02, z + 0.02, 0, 0.14) + S.box("iron", 2.33, 2.37, z - 0.02, z + 0.02, 0, 0.14) + # Back: the stores' door, the bays' high windows, a downpipe. + B = W["back"] + hi = [(-5.6, -3.4, 2.2, 3.0), (-2.8, -0.6, 2.2, 3.0)] + holes = hi + [(3.6, 4.5, 0, 2.2, 0.12)] + B.wall("cream", XL, XR, 0, TOP, holes, reveal="stainless") + strip(B, XL, XR, 0, 0.55, holes, "enamel", 0, 0.03) + for a_, b_, c, e in hi: + g = new_id() + B.box("stainless", a_, b_, c - 0.04, c, -0.18, 0.05, skip=()) + pane(B, "glass", a_, b_, c, e, a_, b_, c, e, -0.12, g) + for k in (1, 2, 3): + u = a_ + k * (b_ - a_) / 4 + B.box("stainless", u - 0.02, u + 0.02, c, e, -0.12, -0.08) + B.quad("door", 3.6, 4.5, 0, 2.2, -0.12) + B.box("iron", 3.65, 3.72, 1.0, 1.06, -0.12, -0.06) + B.box("lamp", 4.65, 4.85, 2.3, 2.5, 0, 0.12) + m.box("gutter", (XR - 0.4, YB + 0.03, 0.05), (XR - 0.3, YB + 0.13, TOP)) + # A lid over the wall head, seen while the roof is not yet on. + m.poly("dark", [(x, y, TOP - 0.02) for x, y in outline()], out=Z) + + +def door(F, a, b): + """The office door: a stainless frame round a single glass leaf, a transom, a push bar.""" + D_ = 0.2 + c, e = PL, 2.75 + wid = new_id() + t = 2.3 + fr = "stainless" + F.box(fr, a, a + 0.06, c, e, -D_, -D_ + 0.08) + F.box(fr, b - 0.06, b, c, e, -D_, -D_ + 0.08) + F.box(fr, a + 0.06, b - 0.06, e - 0.06, e, -D_, -D_ + 0.08) + F.box(fr, a + 0.06, b - 0.06, t - 0.05, t + 0.05, -D_, -D_ + 0.08) + F.box(fr, a + 0.06, b - 0.06, c, c + 0.22, -D_, -D_ + 0.08) + pane(F, "doorglass", a, b, c, e, a + 0.06, b - 0.06, c + 0.22, t - 0.05, -D_ + 0.04, wid) + pane(F, "doorglass", a, b, c, e, a + 0.06, b - 0.06, t + 0.05, e - 0.06, -D_ + 0.04, wid) + F.box("brass", a + 0.12, b - 0.12, c + 0.95, c + 1.0, -D_ + 0.08, -D_ + 0.13) + + +def open_bay(m, F): + """The first bay, its door rolled up: a lift with its arms, a bench, tyres, a tool chest, a light.""" + a, b = BAYS[0] + y0, y1 = YF + 0.25, YB - 0.25 + x0, x1 = a - 0.5, b + 0.3 + h = 3.5 + m.poly("concrete", [(x0, y0, 0.005), (x1, y0, 0.005), (x1, y1, 0.005), (x0, y1, 0.005)], out=Z) + m.poly("paint", [(x0, y1, 0), (x1, y1, 0), (x1, y1, h), (x0, y1, h)], out=(0, -1, 0)) + m.poly("paint", [(x0, y0, 0), (x0, y1, 0), (x0, y1, h), (x0, y0, h)], out=(1, 0, 0)) + m.poly("paint", [(x1, y0, 0), (x1, y1, 0), (x1, y1, h), (x1, y0, h)], out=(-1, 0, 0)) + m.poly("paint", [(x0, y0, h), (x1, y0, h), (x1, y1, h), (x0, y1, h)], out=-Z) + m.poly("paint", [(a, y0, BH), (b, y0, BH), (b, y0, h), (a, y0, h)], out=(0, 1, 0)) + # A dado of enamel round the bay's walls. + m.poly("enamel", [(x0, y1 - 0.01, 0), (x1, y1 - 0.01, 0), (x1, y1 - 0.01, 1.0), (x0, y1 - 0.01, 1.0)], out=(0, -1, 0)) + # The door, rolled up under the ceiling on its tracks. + m.box("paint", (a + 0.05, y0 + 0.1, h - 0.12), (b - 0.05, y0 + 3.0, h - 0.06)) + for x in (a + 0.02, b - 0.06): + m.box("iron", (x, y0, 0.0), (x + 0.04, y0 + 0.08, BH)) + m.box("iron", (x, y0, h - 0.14), (x + 0.04, y0 + 3.1, h - 0.1)) + # Two-post lift, its arms swung in. + for x in (a + 0.15, b - 0.45): + m.box("enamel", (x, 2.6, 0), (x + 0.3, 3.0, 3.1)) + m.box("iron", (x - 0.05, 2.55, 0), (x + 0.35, 3.05, 0.04)) + m.box("stainless", (x + 0.02, 2.5, 0.45), (x + 0.28, 2.6, 0.6)) + for dy in (-1.1, 0.9): + m.box("iron", (x + 0.05, 2.75, 0.48), (x + 0.25, 2.75 + dy + (0.2 if dy < 0 else 0), 0.56)) + m.box("iron", (a + 0.15, 2.7, 3.05), (b - 0.15, 2.9, 3.15)) + # Bench along the back wall, a vice; a red tool chest; tyres stacked. + m.box("wood", (a + 0.2, y1 - 0.7, 0.88), (b - 0.2, y1, 0.93)) + for x in (a + 0.25, b - 0.3): + m.box("iron", (x, y1 - 0.65, 0), (x + 0.05, y1 - 0.05, 0.88)) + m.box("iron", (a + 0.25, y1 - 0.6, 0.25), (b - 0.25, y1 - 0.05, 0.28)) + m.box("steel", (a + 0.6, y1 - 0.75, 0.93), (a + 0.8, y1 - 0.6, 1.08)) + m.box("enamel", (b - 0.15 - 0.7, y1 - 1.25, 0), (b - 0.15, y1 - 0.8, 1.0)) + for k in range(5): + z = 0.1 + k * 0.18 + m.box("dark", (b - 0.82, y1 - 1.26, z), (b - 0.18, y1 - 1.25, z + 0.02)) + for k in range(3): + m.cyl("tyre", x0 + 0.45, y1 - 0.5, 0.33, k * 0.22, k * 0.22 + 0.21, seg=16) + m.box("dark", (a + 0.3, y1 - 0.02, 1.3), (b - 0.3, y1 - 0.01, 2.4)) # the pegboard + m.box("lamp", ((a + b) / 2 - 0.6, 2.8, h - 0.06), ((a + b) / 2 + 0.6, 2.95, h)) + + +def closed_door(F, a, b): + """The second bay's sectional door: four panels, the third glazed.""" + D_ = 0.18 + n = 4 + ph = BH / n + wid = new_id() + for k in range(n): + z0, z1 = k * ph, (k + 1) * ph + F.quad("dark", a, b, z0, z1, -D_ - 0.03) + if k == 2: + F.box("paint", a + 0.02, b - 0.02, z0 + 0.01, z0 + 0.14, -D_ - 0.02, -D_, skip=("back",)) + F.box("paint", a + 0.02, b - 0.02, z1 - 0.14, z1 - 0.01, -D_ - 0.02, -D_, skip=("back",)) + wn = 5 + gw = (b - a - 0.04) / wn + for i in range(wn): + u0 = a + 0.02 + i * gw + F.box("paint", u0, u0 + 0.1, z0 + 0.14, z1 - 0.14, -D_ - 0.02, -D_, skip=("back",)) + pane(F, "glass", a, b, z0, z1, u0 + 0.1, u0 + gw, z0 + 0.14, z1 - 0.14, -D_ - 0.01, wid) + F.box("paint", b - 0.12, b - 0.02, z0 + 0.14, z1 - 0.14, -D_ - 0.02, -D_, skip=("back",)) + else: + F.box("paint", a + 0.02, b - 0.02, z0 + 0.01, z1 - 0.01, -D_ - 0.02, -D_, skip=("back",)) + for i in range(4): + u0 = a + 0.12 + i * (b - a - 0.24) / 4 + F.box("paint", u0 + 0.04, u0 + (b - a - 0.24) / 4 - 0.04, z0 + 0.15, z1 - 0.15, -D_, -D_ + 0.02, skip=("back",)) + F.box("stainless", (a + b) / 2 - 0.2, (a + b) / 2 + 0.2, 0.9, 0.96, -D_, -D_ + 0.06) + + +# ---- canopy, islands, pumps ----------------------------------------------------------- + + +def canopy(M, m): + x0, x1, y0, y1 = CAN + # The slab, its soffit and lights, a fascia of enamel all round with a + # cream pinstripe and a stainless coping. + m.box("paint", (x0 + 0.05, y0 + 0.05, CZ), (x1 - 0.05, y1 - 0.05, CF - 0.05), skip=("z0", "z1")) + m.poly("paint", [(x0, y0, CZ), (x0, y1, CZ), (x1, y1, CZ), (x1, y0, CZ)], out=-Z) + m.sweep("enamel", x1 - x0, y1 - y0, [(0.0, CZ), (0.06, CZ), (0.06, CF), (0.0, CF)], cx=(x0 + x1) / 2, cy=(y0 + y1) / 2) + m.sweep("cream", x1 - x0, y1 - y0, [(0.06, CZ + 0.08), (0.075, CZ + 0.08), (0.075, CZ + 0.15), (0.06, CZ + 0.15)], cx=(x0 + x1) / 2, cy=(y0 + y1) / 2) + m.sweep("stainless", x1 - x0, y1 - y0, [(-0.02, CF), (0.08, CF), (0.08, CF + 0.05), (-0.02, CF + 0.05)], cx=(x0 + x1) / 2, cy=(y0 + y1) / 2) + m.poly("roof", [(x0 + 0.06, y0 + 0.06, CF - 0.05), (x1 - 0.06, y0 + 0.06, CF - 0.05), (x1 - 0.06, y1 - 0.06, CF - 0.05), (x0 + 0.06, y1 - 0.06, CF - 0.05)], out=Z) + for x in ISL: + for y in (y0 + 1.3, (y0 + y1) / 2, y1 - 1.3): + for dx in (-1.6, 1.6): + m.poly("lamp", [(x + dx - 0.6, y - 0.2, CZ - 0.01), (x + dx - 0.6, y + 0.2, CZ - 0.01), (x + dx + 0.6, y + 0.2, CZ - 0.01), (x + dx + 0.6, y - 0.2, CZ - 0.01)], out=-Z) + # The station's name on the front fascia, from the app's sheet. + F = Side(m, (0, y0 - 0.06, 0), (1, 0, 0), (0, -1, 0)) + F.quad("stationname", -3.9, 3.9, CZ + 0.24, CZ + 0.73, 0.004, uvs=[(0, 0), (1, 0), (1, 1), (0, 1)], m=M.decal) + # The columns, stainless, on the islands. + for x in ISL: + m.box("stainless", (x - 0.14, COL - 0.14, IS), (x + 0.14, COL + 0.14, CZ)) + m.box("stainless", (x - 0.2, COL - 0.2, IS), (x + 0.2, COL + 0.2, IS + 0.12)) + + +def island(m, x): + y0, y1 = ISY + m.sweep("concrete", 1.1, y1 - y0, [(0.0, 0.0), (0.0, IS - 0.03), (-0.03, IS), (-0.04, IS)], cx=x, cy=(y0 + y1) / 2) + m.poly("concrete", [(x - 0.51, y0 + 0.04, IS), (x + 0.51, y0 + 0.04, IS), (x + 0.51, y1 - 0.04, IS), (x - 0.51, y1 - 0.04, IS)], out=Z) + for y in (y0 - 0.25, y1 + 0.25): + m.cyl("enamel", x, y, 0.09, 0, 0.95, seg=12) + m.cyl("cream", x, y, 0.095, 0.7, 0.8, seg=12, top=False) + for y in PUMPS: + pump(m, x, y) + m.cyl("iron", x, (y0 + y1) / 2 + 0.55, 0.2, IS, IS + 0.75, seg=12) # a bin by the column + + +def pump(m, x, y): + """A pump of the late forties: enamel body, a cream head with a dial each side, a lit globe; a hose each side.""" + z = IS + m.box("iron", (x - 0.27, y - 0.33, z), (x + 0.27, y + 0.33, z + 0.08)) + m.box("enamel", (x - 0.24, y - 0.3, z + 0.08), (x + 0.24, y + 0.3, z + 1.05)) + m.box("stainless", (x - 0.26, y - 0.32, z + 1.03), (x + 0.26, y + 0.32, z + 1.09)) + m.box("cream", (x - 0.23, y - 0.29, z + 1.09), (x + 0.23, y + 0.29, z + 1.55), skip=("z1",)) + m.sweep("cream", 0.46, 0.58, [(0.0, z + 1.55), (-0.03, z + 1.61), (-0.08, z + 1.65), (-0.14, z + 1.67)], cx=x, cy=y) + m.poly("cream", [(x - 0.09, y - 0.15, z + 1.67), (x + 0.09, y - 0.15, z + 1.67), (x + 0.09, y + 0.15, z + 1.67), (x - 0.09, y + 0.15, z + 1.67)], out=Z) + m.cyl("stainless", x, y, 0.09, z + 1.67, z + 1.73, seg=14) + m.cyl("lamp", x, y, 0.15, z + 1.73, z + 2.02, seg=16, r1=0.11) + for s in (-1, 1): + F = Side(m, (x + s * 0.23, y, 0), (0, s, 0), (s, 0, 0)) + F.box("stainless", -0.2, 0.2, z + 1.15, z + 1.47, 0, 0.015) + F.quad("dark", -0.17, 0.17, z + 1.18, z + 1.44, 0.016) + F.box("cream", -0.13, 0.13, z + 1.36, z + 1.41, 0.016, 0.02) + F.box("lamp", -0.08, 0.08, z + 1.22, z + 1.28, 0.016, 0.02) + F.box("dark", -0.18, 0.18, z + 0.55, z + 0.85, 0.01, 0.015) # the maker's plate + # The nozzle in its holster, the hose looping down from the head. + F.box("stainless", -0.27, -0.17, z + 0.82, z + 1.0, 0.01, 0.1) + F.box("iron", -0.25, -0.19, z + 0.9, z + 1.12, 0.06, 0.14) + hose = [F.p(0.22, z + 1.0, 0.03), F.p(0.26, z + 0.7, 0.12), F.p(0.15, z + 0.3, 0.22), F.p(-0.05, z + 0.25, 0.24), F.p(-0.18, z + 0.45, 0.2), F.p(-0.22, z + 0.85, 0.1)] + m.tube("rubber", hose, 0.018, F.n.cross(Z), closed=False, seg=5) + + +def pylon(m): + """The sign at the lot's corner: two enamel posts, a lit price board, a tall box with GAS down it under a neon edge.""" + x, y = PY + m.box("concrete", (x - 0.8, y - 0.35, 0), (x + 0.8, y + 0.35, 0.45)) + for dx in (-0.45, 0.45): + m.box("enamel", (x + dx - 0.08, y - 0.08, 0.45), (x + dx + 0.08, y + 0.08, 3.0)) + m.box("dark", (x - 0.6, y - 0.1, 1.9), (x + 0.6, y + 0.1, 2.85)) + m.box("stainless", (x - 0.62, y - 0.12, 2.85), (x + 0.62, y + 0.12, 2.9)) + m.box("stainless", (x - 0.62, y - 0.12, 1.85), (x + 0.62, y + 0.12, 1.9)) + z0, z1 = 3.0, 6.6 + m.box("enamel", (x - 0.65, y - 0.15, z0), (x + 0.65, y + 0.15, z1)) + m.box("stainless", (x - 0.7, y - 0.2, z1), (x + 0.7, y + 0.2, z1 + 0.06)) + for s in (-1, 1): + F = Side(m, (x, y + s * 0.15, 0), (-s, 0, 0), (0, s, 0)) + for k, zz in enumerate((2.65, 2.35, 2.05)): + F.box("lamp", -0.5, 0.1, zz - 0.07, zz + 0.07, 0.1, 0.105) + F.box("lamp", 0.2, 0.5, zz - 0.07, zz + 0.07, 0.1, 0.105) + F.box("cream", -0.5, 0.5, z0 + 0.2, z1 - 0.2, 0, 0.02) + for k, ch in enumerate("GAS"): + letters(m, "enamel", F, 0, z1 - 0.75 - k * 1.05, 0.02, ch, 0.85, depth=0.04, offset=0.01) + loop = [F.p(-0.58, z0 + 0.08, 0.03), F.p(0.58, z0 + 0.08, 0.03), F.p(0.58, z1 - 0.08, 0.03), F.p(-0.58, z1 - 0.08, 0.03)] + m.tube("neon", loop, 0.02, F.n, seg=5) + + +def furniture(m): + # The air and water post by the office's corner, its hose coiled on a hook. + x, y = -5.6, -0.9 + m.box("concrete", (x - 0.25, y - 0.25, 0), (x + 0.25, y + 0.25, 0.12)) + m.cyl("enamel", x, y, 0.12, 0.12, 1.3, seg=14) + m.cyl("cream", x, y, 0.17, 1.3, 1.5, seg=16) + m.cyl("stainless", x, y, 0.13, 1.5, 1.56, seg=16) + F = Side(m, (x, y - 0.17, 0), (1, 0, 0), (0, -1, 0)) + F.quad("dark", -0.1, 0.1, 1.34, 1.46, 0.002) + ring = [Vector((x + 0.22 * math.cos(a), y - 0.14, 0.95 + 0.22 * math.sin(a))) for a in [k / 10 * math.tau for k in range(10)]] + m.tube("rubber", ring, 0.016, (0, 1, 0), seg=5) + # A rack of oil cans before the office window. + x0, x1, y0 = -4.6, -3.4, YF - 0.45 + for xx in (x0, x1): + m.box("iron", (xx - 0.02, y0 - 0.2, 0), (xx + 0.02, y0 + 0.2, 1.1)) + for k, (z, dy) in enumerate(((0.3, -0.12), (0.65, 0.0), (1.0, 0.12))): + m.box("iron", (x0, y0 - 0.2 + dy, z - 0.02), (x1, y0 + 0.1 + dy, z)) + for i in range(6): + cx = x0 + 0.12 + i * 0.19 + m.cyl("enamel" if (i + k) % 2 else "cream", cx, y0 - 0.05 + dy, 0.075, z, z + 0.2, seg=10) + m.cyl("stainless", cx + 0.03, y0 - 0.05 + dy, 0.015, z + 0.2, z + 0.24, seg=6) + # An ice chest by the door, ICE on its front. + x, y = -1.4, YF - 0.45 + m.box("cream", (x - 0.45, y - 0.35, 0.1), (x + 0.45, y + 0.35, 1.0)) + m.box("enamel", (x - 0.47, y - 0.37, 1.0), (x + 0.47, y + 0.37, 1.08)) + for dx in (-0.4, 0.4): + m.box("iron", (x + dx - 0.03, y - 0.3, 0), (x + dx + 0.03, y + 0.3, 0.1)) + F = Side(m, (x, y - 0.35, 0), (1, 0, 0), (0, -1, 0)) + letters(m, "enamel", F, 0, 0.6, 0, "ICE", 0.36, depth=0.03, offset=0.006) + # Tyres for sale on a stand by the pier between the bays. + x, y = (BAYS[0][1] + BAYS[1][0]) / 2, YF - 0.5 + m.box("iron", (x - 0.25, y - 0.3, 0), (x + 0.25, y + 0.3, 0.06)) + for k in range(4): + m.cyl("tyre", x, y, 0.32, 0.06 + k * 0.21, 0.26 + k * 0.21, seg=18) + m.cyl("dark", x, y, 0.16, 0.06, 0.06 + 4 * 0.21 + 0.005, seg=12) + + +# ---- roof ----------------------------------------------------------------------------- + + +def roof(M): + m = M.m + W = walls(m) + pz = TOP + 0.75 # parapet top + deck = TOP + 0.2 + fac = facets(m) + side_end = CY - YF - R + runs = [ + (W["left"], -CY + YF, side_end), + *[(F, 0, L) for F, L in fac], + (W["front"], XL + R, XR), + (W["right"], -CY + YF, CY - YF), + (W["back"], XL, XR), + ] + for F, u0, u1 in runs: + F.quad("cream", u0, u1, TOP, pz) + F.quad("cream", u1, u0, deck, pz, -0.25, out=-F.n) + # The band of colour and the coping, mitred round the plan. + plan = outline() + m.psweep("enamel", plan, [(0.0, TOP + 0.12), (0.06, TOP + 0.12), (0.06, TOP + 0.6), (0.0, TOP + 0.6)]) + m.psweep("stainless", plan, [(-0.25, pz), (0.08, pz), (0.08, pz + 0.05), (-0.25, pz + 0.05), (-0.25, pz)]) + # SERVICE over the bays, in cream on the band. + F = W["front"] + letters(m, "cream", F, (BAYS[0][0] + BAYS[1][1]) / 2, TOP + 0.36, 0.06, "SERVICE", 0.34, depth=0.03, offset=0.006, spacing=1.25) + # The deck. + inner = [(p.x - n.x * 0.25, p.y - n.y * 0.25) for p, n in arc()] + poly = [*inner, (XR - 0.25, YF + 0.25), (XR - 0.25, YB - 0.25), (XL + 0.25, YB - 0.25)] + m.poly("roof", [(x, y, deck) for x, y in poly], out=Z) + fin(m, deck) + # Plant: a vent over the bays, an extract fan, a hatch, a stub stack. + m.box("ac", (2.0, 3.6, deck), (3.2, 4.6, deck + 0.8)) + m.cyl("dark", 2.6, 4.1, 0.35, deck + 0.8, deck + 0.82, seg=16) + m.box("concrete", (1.9, 3.5, deck), (3.3, 4.7, deck + 0.08)) + m.cyl("ac", 0.6, 2.4, 0.25, deck, deck + 0.5, seg=12) + m.cyl("steel", 0.6, 2.4, 0.32, deck + 0.5, deck + 0.56, seg=12) + m.box("wood", (-1.6, 4.4, deck), (-0.8, 5.2, deck + 0.35)) + m.box("steel", (-1.65, 4.35, deck + 0.35), (-0.75, 5.25, deck + 0.4)) + m.cyl("ac", 4.8, 5.4, 0.08, deck, deck + 0.9, seg=10) + m.cyl("ac", 4.8, 5.4, 0.12, deck + 0.9, deck + 1.0, seg=10) + + +def fin(m, deck): + """The tower over the office's corner: a slab fin with round ends, three speed lines round it, a neon tube up its nose.""" + x, y0, y1 = XL + R - 0.1, YF + 0.6, YF + 2.0 # the centres of its nose and tail + t = 0.24 # half its thickness + z1 = TOP + 5.4 + + def body(role, z0, z1_, grow=0.0): + m.box(role, (x - t - grow, y0, z0), (x + t + grow, y1, z1_), skip=("y0", "y1")) + for y in (y0, y1): + m.cyl(role, x, y, t + grow, z0, z1_, seg=20) + + body("cream", deck, z1) + # Speed lines near the top, the band at its foot, a stainless cap. + for k in range(3): + z = z1 - 1.1 - k * 0.38 + body("enamel", z, z + 0.16, 0.03) + body("enamel", deck, TOP + 1.3, 0.03) + body("stainless", z1, z1 + 0.08, 0.05) + # The neon up the nose, from the band to the speed lines, on stand-offs. + ny = y0 - t - 0.07 + m.tube("neon", [(x, ny, TOP + 1.45), (x, ny, z1 - 2.05)], 0.03, (1, 0, 0), closed=False, seg=6) + for z in (TOP + 1.55, (TOP + z1) / 2, z1 - 2.15): + m.box("stainless", (x - 0.02, ny, z), (x + 0.02, y0 - t + 0.01, z + 0.04)) diff --git a/ui/src-tauri/models.json b/ui/src-tauri/models.json index a2eb61d..6a86b8d 100644 --- a/ui/src-tauri/models.json +++ b/ui/src-tauri/models.json @@ -1,6 +1,6 @@ { - "id": "69b5b45241f8dd01", - "url": "https://github.com/Sagyam/DeepWork/releases/download/models-69b5b45241f8dd01/", + "id": "39218fff38c933a7", + "url": "https://github.com/Sagyam/DeepWork/releases/download/models-39218fff38c933a7/", "files": [ { "path": "a1.glb", @@ -224,6 +224,12 @@ "sha256": "b07216f9ba9e2a5bd1669e897e69cc5c6ff65509505e08bf79fee2914f32c1ce", "asset": "s6.glb" }, + { + "path": "s8.glb", + "size": 180024, + "sha256": "6c2b763aa77c1d3910ea93f2ee43ccd14d7198eff18d9eec54bd238f1903ecea", + "asset": "s8.glb" + }, { "path": "street.glb", "size": 58531, @@ -244,8 +250,8 @@ }, { "path": "bc7.json", - "size": 2070, - "sha256": "1cf3de656aa25dae3be51d07e57d07cb92cbe54dc5835330f3e91fe625c52382", + "size": 2078, + "sha256": "3bdb6724a8fea310ea98388e3d1a3a3a5d851f2e37d4c68577c58f707ef66b6d", "asset": "bc7.json" }, { @@ -470,6 +476,12 @@ "sha256": "57455a4355b7e9e7d600f45cefd76625595ce5f675113d7dbde270858da5918e", "asset": "s6_ao.bc7" }, + { + "path": "s8_ao.bc7", + "size": 2681684, + "sha256": "6cb6cfa4a1ba5aeeed842cb3129c718c12e0ee889232444ccc583c289a9968ef", + "asset": "s8_ao.bc7" + }, { "path": "street_ao.bc7", "size": 2979625, diff --git a/ui/src/city/models.ts b/ui/src/city/models.ts index 506b29e..2cf606d 100644 --- a/ui/src/city/models.ts +++ b/ui/src/city/models.ts @@ -453,6 +453,15 @@ function realYard(p: Parts, rp: Parts, s: Spec, def: RealDef, r: () => number) { fenceRun(p, "fence_panel", half, back + 0.1, -half, back + 0.1); break; } + case "s8": { + // Concrete to the pavement and under the canopy, a car drawn up at the + // pumps (between the islands or outside one); the bins out back. + p.box(mat(0xb2aea6, { roughness: 0.92 }), LOT - 0.4, KERB, LOT - 0.4, 0, 0, cz); + parked(p, s.seed % 2 ? 0 : -4.3, 3.6, 0, s.seed + 3); + const bin = mat(0x2a4a34, { roughness: 0.6 }); + for (let i = 0; i < 2; i++) p.box(bin, 0.7, 1.1, 0.7, 2.0 + i * 0.85, KERB, back + 0.7); + break; + } case "s6": { // Setts to the pavement before the cart arch, the casks on them; // behind, the yard with the brewery's van along the back wall and the bins. diff --git a/ui/src/city/plan.ts b/ui/src/city/plan.ts index 8886d1c..e9ec76a 100644 --- a/ui/src/city/plan.ts +++ b/ui/src/city/plan.ts @@ -53,6 +53,7 @@ export const DESIGNS: Record = { s4: { kind: "shop", style: "factory" }, s5: { kind: "shop", style: "classic" }, s6: { kind: "shop", style: "factory" }, + s8: { kind: "shop", style: "diner" }, a1: { kind: "apartment", style: "classic" }, a2: { kind: "apartment", style: "townhouse" }, a3: { kind: "apartment", style: "classic" }, diff --git a/ui/src/city/real.ts b/ui/src/city/real.ts index 4592dba..aedb512 100644 --- a/ui/src/city/real.ts +++ b/ui/src/city/real.ts @@ -98,6 +98,8 @@ const S2_F2 = 3.2; /** S2's frieze, cornice and roof above its top storey: the slates start 1.04 m up, the stacks top out 4.8 m up. */ const S2_EAVES = 1.04; const S3_TOP = 3.36; +/** S8's wall head: the roof piece (parapet, fin tower) stands on it. */ +const S8_TOP = 3.8; const S4_TOP = 5.3; const P1_EAVES = 3.0; const F1_G = 5.0; @@ -485,6 +487,21 @@ export const DEFS: Record = { smoke: () => new THREE.Vector3(-1.2, 4.05, -3.4), debris: 0xb4b8bc, }, + s8: { + id: "s8", + kind: "shop", + style: "diner", + // The canopy's fascia to the back wall, the air post to the pylon sign. + w: 14.2, + d: 12.8, + front: 1.2, + floors: () => 1, + stack: (floors, roof) => [...(floors > 0 ? [{ piece: "body", y: 0 }] : []), ...(roof ? [{ piece: "roof", y: S8_TOP }] : [])], + top: () => S8_TOP, + // The fin tower's cap. + height: () => S8_TOP + 5.5, + debris: 0xe8e2d4, + }, s4: { id: "s4", kind: "shop", @@ -1445,6 +1462,19 @@ const dinerNames = new NameSheet(1, 8, 2048, 128, ["STARLITE DINER", "MOONBEAM D g.fillText(text, 1024, y, 1900); }); +/** Filling stations' names for the canopy's fascia, 2048 x 128 a row: white sans capitals with a dark edge, on clear. */ +const stationNames = new NameSheet(1, 8, 2048, 128, ["CROSSROADS SERVICE", "BLUE STAR GASOLINE", "HIGHWAY GARAGE", "PIONEER GAS & OIL", "SUMMIT SERVICE", "MILESTONE GARAGE", "OAK LANE SERVICE", "GOLDEN MILE MOTORS"], (g, _x, y0, name) => { + const y = y0 + 66; + const text = spaced(name.toUpperCase(), 2); + g.textAlign = "center"; + g.textBaseline = "middle"; + g.font = "800 88px 'Helvetica Neue', Helvetica, Arial, sans-serif"; + g.fillStyle = "rgba(10,10,12,0.55)"; + g.fillText(text, 1028, y + 4, 1880); + g.fillStyle = "#fbf8f0"; + g.fillText(text, 1024, y, 1880); +}); + /** Firms' names painted on a factory's frieze, 2048 x 128 a row: cream letters, weathered, on clear. */ const worksNames = new NameSheet(1, 8, 2048, 128, ["HOLLIS & WARD · ENGINEERS", "BRANDT MACHINE WORKS", "NORTHGATE FOUNDRY CO.", "EAGLE SPRING & AXLE CO.", "MERCER BROS. · BOILERMAKERS", "UNION BOX & PAPER CO.", "CALDER WORSTED MILLS", "PARAGON CASTINGS LTD."], (g, _x, y0, name) => { g.textAlign = "center"; @@ -1516,6 +1546,7 @@ function namesFor(id: string, role: string): NameSheet | null { case "works": return worksNames; case "cafename": return cafeNames; case "deconame": return decoNames; + case "stationname": return stationNames; default: return null; } } @@ -1938,7 +1969,7 @@ export function groundMat(name: string, tile: number, opts: Std & { normal?: num */ export function realMat(id: string, role: string, paint: Paint, damage: number, variant = ""): THREE.Material { const pick = (list: number[], i: number) => list[((i % list.length) + list.length) % list.length]; - const tinted = ["brick", "bluebrick", "rubbed", "steelframe", "doors", "corrugated", "works", "siding", "shutter", "shopframe", "door", "shingle", "sign", "cornice", "ghost", "render", "cladding", "alu", "shake", "boards", "timber", "chair", "enamel", "neon", "neon2", "dinername", "carpaint", "slate", "ridge", "rustic", "cafename", "parasol", "officeglass", "spandrel", "mullion", "blades", "towername", "cladstone", "boardform", "floodstone", "deco", "bronze", "deconame", "brownstone", "door2", "door3", "infill", "fieldstone", "stoneslate", "oak", "plaintile", "zincseam", "band", "fin", "modbrick", ...LEAVES, "hedge"].includes(role) || (id === "a2" && role === "frame") || (id === "a5" && role === "stone"); + const tinted = ["brick", "bluebrick", "rubbed", "steelframe", "doors", "corrugated", "works", "siding", "shutter", "shopframe", "door", "shingle", "sign", "cornice", "ghost", "render", "cladding", "alu", "shake", "boards", "timber", "chair", "enamel", "neon", "neon2", "dinername", "carpaint", "slate", "ridge", "rustic", "cafename", "parasol", "officeglass", "spandrel", "mullion", "blades", "towername", "cladstone", "boardform", "floodstone", "deco", "bronze", "deconame", "stationname", "brownstone", "door2", "door3", "infill", "fieldstone", "stoneslate", "oak", "plaintile", "zincseam", "band", "fin", "modbrick", ...LEAVES, "hedge"].includes(role) || (id === "a2" && role === "frame") || (id === "a5" && role === "stone"); const names = namesFor(id, role); const cell = names?.cell(paint.name, paint.signs) ?? -1; const key = `${id}:${role}:${damage}:${variant}:${tinted ? `${paint.wall}:${paint.accent}:${paint.roof}:${paint.signs}:${cell}` : ""}`; @@ -2092,6 +2123,12 @@ export function realMat(id: string, role: string, paint: Paint, damage: number, if (damage < 2) m.userData.night = 0.45; break; } + case "stationname": { + const t = stationNames.texture(cell); + m = new THREE.MeshStandardMaterial({ map: t, alphaTest: 0.5, roughness: 0.3, emissive: 0xffffff, emissiveMap: t, emissiveIntensity: 0, polygonOffset: true, polygonOffsetFactor: -2, polygonOffsetUnits: -2 }); + if (damage < 2) m.userData.night = 0.6; + break; + } case "gravel": m = w(pbr("gravel", [1.5, 1.5], { roughness: 0.95 }), 0.6); break; case "sedum": m = w(pbr("sedum", [1.2, 1.2], { roughness: 0.9 })); break; // A6's are black monocrystalline panels: the cells' grid stays, the blue goes. diff --git a/ui/src/mockcity.ts b/ui/src/mockcity.ts index 8e69283..1d0a147 100644 --- a/ui/src/mockcity.ts +++ b/ui/src/mockcity.ts @@ -91,6 +91,7 @@ const BLUEPRINTS: Omit[] = [ { id: "o1", name: "Curtain-wall office tower", kind: "office", districts: ["downtown"], level: 2, price: 1500 }, { id: "o2", name: "Round glass tower", kind: "office", districts: ["downtown"], level: 2, price: 1800 }, { id: "o3", name: "Brutalist office", kind: "office", districts: ["downtown"], level: 2, price: 1600 }, + { id: "s8", name: "Filling station", kind: "shop", districts: ["main_street"], level: 1, price: 500 }, { id: "s6", name: "Tower brewery", kind: "workshop", districts: ["works"], level: 1, price: 600 }, { id: "s5", name: "Department store", kind: "shop", districts: ["downtown"], level: 2, price: 1200 }, { id: "l1", name: "Art deco skyscraper", kind: "tower", districts: ["downtown"], level: 2, price: 3000 }, @@ -136,6 +137,7 @@ const PILES: Record = { o3: ["Federation House", "Concord House", "Bastion House", "Keystone House", "Monolith House", "Unity House", "Meridian House", "One Harbour Place"], l1: ["The Orion Building", "Halcyon Tower", "Continental Life", "The Zenith Building"], s5: ["Hargreaves & Co.", "The Emporium", "Whitlock's", "Fairbanks & Sons"], + s8: ["Crossroads Service", "Blue Star Gasoline", "Highway Garage", "Pioneer Gas & Oil"], s6: ["Kestrel Ales", "Old Mill Brewery", "Castle Brewery Co.", "Hartley & Sons · Brewers"], l3: ["The Cathedral Building", "Ashford Tower", "Mercantile Trust", "The Guildhall Tower"], l2: ["Horizon Tower", "The Spire", "Apex Tower", "Vantage Tower"], diff --git a/ui/src/proto/main.ts b/ui/src/proto/main.ts index 9ac1230..54cf744 100644 --- a/ui/src/proto/main.ts +++ b/ui/src/proto/main.ts @@ -1,7 +1,7 @@ // Viewer for the realistic models (blender/real, `bun run models`): one // building on its lot, built by the app's own code (models.ts), on a street // corner. Open /proto.html in the dev server with -// ?model=a1|a2|a3|a4|a5|a6|c1|c2|c3|c4|c5|c6|c7|s1|s2|s3|s4|o1|o2|o3|l1|l2|p1|f1|e1|h1|l5|e2|e3|h2|p2|w2 &floors=7 &seed=3 &damage=0|1|2|3 (3: the ruin) +// ?model=a1|a2|a3|a4|a5|a6|c1|c2|c3|c4|c5|c6|c7|s1|s2|s3|s4|s5|s6|s8|o1|o2|o3|l1|l2|p1|f1|e1|h1|l5|e2|e3|h2|p2|w2 &floors=7 &seed=3 &damage=0|1|2|3 (3: the ruin) // &view=hero|city|detail|roof|back|street &hour=15 // &count=N is a stress test: N buildings on a grid, drawn instanced (or one // mesh each with &draw=separate).