diff --git a/README.md b/README.md index f7f65eb..0693cc9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ indexing API and the browser frontend (plain ES modules and WebGL2, no build ste | ![2D map](docs/images/map-2d.png) | **2D map**: a squarified treemap of every file, sized by lines or references, with source code rendered right on the tiles as you zoom in. | | ![3D landscape](docs/images/landscape-3d.png) | **3D landscape**: the same map extruded, orbit, pan and dolly around it. | | ![Routes in the city](docs/images/city-routes.png) | **City**: folders become districts and blocks, files become buildings (footprint from lines, height from complexity, lit windows from definitions). Select a file to see its imports as cyan routes and its dependents as pulsing magenta routes along the streets. | -| ![Walking the city](docs/images/city-walk.png) | **Walk and fly** at street level with signs on every wall, folder street signs on the corners, source code on the facade in front of you, wandering residents and a city wall covered in posters. | +| ![Walking the city](docs/images/city-walk.png) | **Walk and fly** at street level past lit doorways, streetlights, bins, benches and trees, with signs on every wall, folder street signs on the corners, source code on the facade in front of you, wandering residents and a city wall covered in posters. | Also: diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 50f2475..a03f33a 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -77,17 +77,27 @@ Plain ES modules, no framework, no build step. nested pavements a few centimetres apart can't z-fight). 2. **Buildings and wall:** instanced boxes. The city shader adds procedural windows (lit share from definition count), neon edges, a concrete wall and exponential fog. -3. **Effects:** additive and never occluding. Search beacons, fire and smoke particles (stateless, +3. **Doors and street furniture:** small instanced boxes (lit doorways, lamp posts and heads, bins, + benches, trees, hydrants, post boxes) drawn with a separate shader variant, and only within a few + hundred metres of the camera. Streetlights stand on folder boundaries, and everything sits on + folder pavements, never the road. +4. **Effects:** additive and never occluding. Lamp light pools, search beacons, fire and smoke particles (stateless, animated in the vertex shader), residents (procedural stick-figure sprites), street routes (mitred ribbons with chevrons or pulsing dashes, kept in right-hand lanes) and import arcs. -4. **Signs:** textured quads from the label atlas, depth-tested but not depth-writing. A shader test +5. **Signs:** textured quads from the label atlas, depth-tested but not depth-writing. A shader test discards any quad face that would read mirrored, which is how two-faced blade signs work. ### Routing -- **Grid:** a 3 m occupancy grid blocks buildings (grown by 0.5 m) and the city wall, and makes - pavements slightly dearer than roads. -- **Search:** one Dijkstra run from the selected building's doors reaches every import and +- **Grid:** a 3 m occupancy grid blocks buildings (grown by 2 m, so a ribbon in its lane can't clip a + wall) and the city wall, and makes pavements slightly dearer than roads. +- **Doors:** each building gets one door, centred where possible and clear of its corners. Street + doors face the nearest open street. Buildings with no frontage get a back door whose path follows + a distance-to-street field computed once on a 0.5 m grid (chamfer sweeps until stable) through the + 2.4 m alleys. +- **Search:** one Dijkstra run from the selected building's doorstep reaches every import and dependent (paths cost the same both ways). It uses float64 distances and a settled set. -- **Shaping:** routes are straightened by line-of-sight, extended into both buildings, and boxed-in - targets fall back to the nearest reachable street. +- **Shaping:** street paths are straightened by line-of-sight (sampled every quarter cell), then joined + to each building's door path: inside the building, out through the doorway, along the alley, onto + the street. Alley points are drawn narrower and centred. Buildings with no door fall back to the + nearest reachable street. diff --git a/docs/CITY.md b/docs/CITY.md index d40355d..dc4a885 100644 --- a/docs/CITY.md +++ b/docs/CITY.md @@ -21,6 +21,9 @@ scale, so a large repository is a large city. | **Yellow tape** rising across the walls | Dependabot alert (on the manifest file) | | **Red tape** falling across the walls | Code scanning alert | | **Light beam** into the sky | A search result | +| **Lit doorway** | The building's door: facing the street, or a back door onto an alley for files in the middle of a folder | +| **Streetlights** with pools of light | The edges of each folder: lights stand on its boundary, at every corner and every 20 m or so | +| **Bins, benches, trees, hydrants, post boxes** | Street furniture on the folder's pavement. Purely for atmosphere | | **Cyan chevrons** on the road | Route to a file the selected file imports (**amber** if the import was inferred) | | **Pulsing magenta dashes** on the road | Route from a file that imports the selected file | | **Arcs** in the sky | The same import relationships, as the crow flies | @@ -48,7 +51,9 @@ the selected file's routes. ## Following dependencies Select a file (click it, search for it, or pick it from the sidebar). Routes appear on the streets -to everything it imports and from everything that imports it. With a file selected, switching to +to everything it imports and from everything that imports it. Every route leaves through the +building's door, follows the alley to the street if it's a back door, and goes in through the other +building's door. Alley stretches are drawn thinner. With a file selected, switching to **Walk** puts you at its door facing along the first route: follow the arrows. ## Tour and links diff --git a/docs/images/city-routes.png b/docs/images/city-routes.png index fa2bceb..a2e5917 100644 Binary files a/docs/images/city-routes.png and b/docs/images/city-routes.png differ diff --git a/docs/images/city-walk.png b/docs/images/city-walk.png index fe2b12d..13a517b 100644 Binary files a/docs/images/city-walk.png and b/docs/images/city-walk.png differ diff --git a/docs/images/city-wall.png b/docs/images/city-wall.png new file mode 100644 index 0000000..c487e1b Binary files /dev/null and b/docs/images/city-wall.png differ diff --git a/docs/images/city.png b/docs/images/city.png index 756c0fa..068cc05 100644 Binary files a/docs/images/city.png and b/docs/images/city.png differ diff --git a/docs/images/landscape-3d.png b/docs/images/landscape-3d.png index b021f7c..800a373 100644 Binary files a/docs/images/landscape-3d.png and b/docs/images/landscape-3d.png differ diff --git a/docs/images/map-2d.png b/docs/images/map-2d.png index 79bf472..cf58bf7 100644 Binary files a/docs/images/map-2d.png and b/docs/images/map-2d.png differ diff --git a/docs/images/welcome.png b/docs/images/welcome.png index 2bd6344..9e46e74 100644 Binary files a/docs/images/welcome.png and b/docs/images/welcome.png differ