Building viewer

The building in 3D with the sun, sharing the table's selection.

The property's building in 3D, with the sun (ADR 0041). The model is the converter's output: a labelled glTF and a JSON of storeys, unit footprints and facade panels. The panels show each unit, coloured by its status token. Season and time of day move the sun for the building's own location.

It loads on intent (ADR 0030): three.js and the model download only after the button is pressed. The building poster that should stand in before that is not built yet. The scene is always light, in both colour modes; the controls under it follow the mode.

It shares one selection with the units table. Hover or focus a row to light its unit; pick a unit in the scene to mark its row. Each row's Show in 3D button loads the viewer if needed and turns the camera to that unit; the column only appears once a viewer is on the page. The first view frames the live units, not the whole building. The two find each other only through the drawing reference (ref). The canvas is one tab stop: arrow keys turn, plus and minus zoom, Escape clears.

The model is Hannemanns Hus, the first client file. Only the six homes in the table are live; the rest of the building is plain geometry.

Viewer and table

Tone

The building in 3D

See where each home sits, and how the sun falls on it through the day and the year.

Select a home in the building to see its status.

6 homes

Available homes in this development
AddressTypeSizeRoomsFloorRentStatus
Midgårdsvej 3, 1., 4Apartment42 m²1 room1 / 66.950 kr/md.Available
Midgårdsvej 3, 2., 19Apartment56 m²2 rooms2 / 68.400 kr/md.Available
Midgårdsvej 3, 3., 22Apartment63 m²2 rooms3 / 69.100 kr/md.Reserved
Midgårdsvej 3, 4., 27Apartment78 m²3 rooms4 / 611.200 kr/md.Available
Midgårdsvej 3, 5., 31Apartment84 m²3 rooms5 / 612.400 kr/md.Let
Midgårdsvej 3, 6., 34Penthouse104 m²4 rooms6 / 615.800 kr/md.Available from 1 Dec 2026

Props

packages/primitives/src/BuildingViewer.astro
PropTypeRequired
headingstringyes
introstring—
headingLevel1 | 2 | 3 | 4 | 5 | 6—
model

The converter's two files (ADR 0041 §2).

{ glb: string; data: string }yes
unitsViewerUnit[]yes
timeZone

The building's own time zone and the page's locale, for the clock.

stringyes
localestringyes
labels{ load: string; loading: string; error: string; canvas: string; season: string; summer: string; equinox: string; winter: string; time: string; /* "{unit}" and "{status}" are filled live. */ selected: string; none: string; north: string; /* The unit list's accessible name. */ list: string; /* The unit page link's accessible name; "{unit}" is filled. */ open: string; /* The unit panel: fact names, back to the list, the unit page button, and * the carousel's name. */ area: string; rooms: string; floor: string; rent: string; close: string; more: string; media: string; }yes
classstring—
ViewerUnit — referenced by a prop above
FieldTypeRequired
ref

The drawing reference: the link between the model and the unit.

stringyes
labelstringyes
status"available" | "reserved" | "let" | "coming-soon" | "placeholder"yes
statusLabelstringyes
areaLabelstringyes
roomsLabelstringyes
floorLabelstringyes
priceLabelstringyes
href

The unit's page.

stringyes
floorPlan

The unit panel's carousel: the floor plan first, then the photos.

ViewerPhoto—
photosViewerPhoto[]—