Navigation

Inazuma

The parts of Inazuma built so far: the building kit its towns are made of, the colours of its islands, and the region's data file. Inazuma City stands as one building of the kit at a provisional place until the fit writes it (region buildings).

Building kit

createInazumaBuildingGeometry builds a building from its proportions as three geometries, one per material: timber, plaster and roof tile. Each storey stands on the roof below, and an upper storey is inset from the one below by the setback, so a tower's storeys step up.

flowchart TD
  OP[InazumaBuildingOptions] --> FL[Timber floor slab on corner posts, floor height above the ground]
  FL --> WL[Corner posts and top beams, plaster panels between]
  WL --> RF[Roof on the walls, eaves past them by the overhang]
  RF -->|another storey| IN[Next storey stands on the roof, inset by the setback]
  IN --> WL

The roof is a convex solid: its base closes it, so a camera under the eaves sees a ceiling. Its ridge runs along the longer side, and a hipped roof slopes on all four sides while a gabled one closes its ends with gables.

Palette

services/inazuma/constants.ts holds each island's colours in sRGB, chosen from the names the proposal gives each island and provisional until each island is measured against its reference. The building kit's timber, plaster and tile colours are there too.

Region data

data/regions/inazuma.json is the region's data in the shape regionDataSchema reads, holding Inazuma City's building. Narukami Island's outline is a provisional square round the city, so the region is fetched as the camera nears it.

Key files

FileRole
packages/genshin-world/src/services/inazuma/createInazumaBuildingGeometry.tsThe building kit: floors, frame, plaster and storeys
packages/genshin-world/src/services/inazuma/createInazumaRoofGeometry.tsA hipped or gabled roof as a closed convex solid
packages/genshin-world/src/models/inazuma/InazumaBuildingOptions.tsA building's proportions in metres
packages/genshin-world/src/services/inazuma/constants.tsThe island palettes and the building colours
packages/genshin-world/src/data/regions/inazuma.jsonInazuma City's building, at a provisional place

Details

Command palette

Keyboard shortcuts