A5: World art for points of interest, build pieces, vessels and terrain
- PoiMesher dresses every point of interest from its parts: lapped tarred weatherboards, plank boards, stone in a running bond with lichen, tiled roofs with a ridge cap, salt-white trim on paint, crusted salt pans, and a tarred frame round the lighthouse's glowing glass. One mesh per POI. - Huts get a shuttered window in each side wall (non-solid parts, no rng). - Build pieces show their state: building in quarter steps, worn (a third of health gone) and battered (two thirds gone, strips knocked out). StructureView rebuilds a piece's mesh only when its state changes. - VesselModels builds the barge (lofted hull, curved rails, mooring lines, gored envelope) and the sea chests in code; the primitive stand-ins are gone. - Terrain: tussocks, wind-dried patches, shingle on sand, lichen on rock. - test_world_art (9) fails on any primitive stand-in mesh or placeholder resource under src/ or assets/, and covers POI bounds and determinism, windows, the lamp surface, wear and build stages, view rebuilds and the vessel models. - make poi-captures and make build-captures (state card, vessels). Closes #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ const LOOK_ROOF: String = "roof"
|
||||
const LOOK_PAINT: String = "paint"
|
||||
const LOOK_SALT: String = "salt"
|
||||
const LOOK_LAMP: String = "lamp"
|
||||
const LOOK_WINDOW: String = "window"
|
||||
|
||||
const WALL: float = 0.3
|
||||
const DOOR_WIDTH: float = 1.4
|
||||
@@ -154,6 +155,11 @@ func hut(centre: Vector3, width: float, depth: float, height: float, wall_look:
|
||||
box(Vector3(x0 + side_width - 0.12, floor_y, z0 + depth), Vector3(0.12, DOOR_HEIGHT, 0.06), LOOK_PAINT, false)
|
||||
box(Vector3(x0 + side_width + DOOR_WIDTH, floor_y, z0 + depth), Vector3(0.12, DOOR_HEIGHT, 0.06), LOOK_PAINT, false)
|
||||
|
||||
if wall_look != LOOK_STONE:
|
||||
# A shuttered window in each side wall. Decoration only: the wall stays whole.
|
||||
for outside: float in [x0 - 0.03, x0 + width - 0.03]:
|
||||
window(Vector3(outside, floor_y + 1.05, centre.z - 0.45), Vector3(0.06, 0.9, 0.9))
|
||||
|
||||
var door: Vector3 = Vector3(centre.x, floor_y, z0 + depth)
|
||||
var foot: Vector3 = steps_down(door, Vector3(0.0, 0.0, 1.0), DOOR_WIDTH + 0.4, LOOK_STONE)
|
||||
var inside: Vector3 = Vector3(centre.x, floor_y, z0 + depth - 1.2)
|
||||
@@ -162,6 +168,19 @@ func hut(centre: Vector3, width: float, depth: float, height: float, wall_look:
|
||||
add_route([foot + Vector3(0.0, 0.0, 1.5), foot, door, inside, marker])
|
||||
|
||||
|
||||
## A window on a wall's outside face, with a painted shutter either side. Not solid.
|
||||
## `size` is thin along x or z, the axis the window faces.
|
||||
func window(local_min: Vector3, size: Vector3) -> void:
|
||||
box(local_min, size, LOOK_WINDOW, false)
|
||||
var shutter: float = 0.42
|
||||
if size.x <= size.z:
|
||||
for z: float in [local_min.z - shutter - 0.04, local_min.z + size.z + 0.04]:
|
||||
box(Vector3(local_min.x - 0.01, local_min.y - 0.05, z), Vector3(size.x + 0.02, size.y + 0.1, shutter), LOOK_PAINT, false)
|
||||
else:
|
||||
for x: float in [local_min.x - shutter - 0.04, local_min.x + size.x + 0.04]:
|
||||
box(Vector3(x, local_min.y - 0.05, local_min.z - 0.01), Vector3(shutter, size.y + 0.1, size.z + 0.02), LOOK_PAINT, false)
|
||||
|
||||
|
||||
func add_loot(local: Vector3) -> void:
|
||||
loot.append(to_world(local))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user