roamwright 0.61.15 → 0.61.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -24
- package/examples/effects.js +19 -13
- package/examples/island.js +21 -14
- package/examples/ruins.js +3 -2
- package/examples/stage.js +0 -6
- package/examples/world-map.html +162 -0
- package/examples/world-map.js +475 -0
- package/index.js +67 -0
- package/package.json +1 -1
- package/rendering/map-glyphs.js +494 -0
- package/rendering/map-input.js +143 -0
- package/rendering/map-labels.js +181 -0
- package/rendering/map-relief.js +330 -0
- package/rendering/map-signs.js +124 -0
- package/rendering/place-names.js +408 -0
- package/rendering/portrait-studio.js +213 -0
- package/rendering/scatter-instances.js +12 -0
- package/rendering/screen-pick.js +75 -0
- package/runtime/build-freshness.js +133 -0
- package/runtime/compass-strip.js +232 -0
- package/runtime/context-lost.js +108 -0
- package/runtime/doorways.js +98 -0
- package/runtime/hud-frame.js +74 -0
- package/runtime/map-relief.js +236 -0
- package/runtime/map-spot.js +120 -0
- package/runtime/map-view.js +229 -0
- package/runtime/panel-shell.js +90 -0
- package/runtime/relation-graph.js +163 -0
- package/runtime/stage-frame.js +263 -0
- package/runtime/url-router.js +162 -0
- package/runtime/way-back.js +71 -0
- package/runtime/whereabouts.js +210 -0
- package/runtime/world-controls.js +265 -0
- package/tools/beasts-near.cjs +17 -0
- package/tools/beasts-near.test.cjs +36 -1
- package/tools/viewport-check.cjs +56 -21
package/README.md
CHANGED
|
@@ -30,30 +30,31 @@ npm resolves the Three.js peer in a new project. Roamwright targets Three.js **0
|
|
|
30
30
|
|
|
31
31
|
## Examples
|
|
32
32
|
|
|
33
|
-
Browse all twenty examples on the [live showcase](https://enestaylan.github.io/roamwright/).
|
|
34
|
-
|
|
35
|
-
| Live example
|
|
36
|
-
|
|
|
37
|
-
| [A small world](https://enestaylan.github.io/roamwright/examples/small-world.html?seed=42)
|
|
38
|
-
| [Towns](https://enestaylan.github.io/roamwright/examples/towns.html?seed=7)
|
|
39
|
-
| [Town fittings](https://enestaylan.github.io/roamwright/examples/town-fittings.html?seed=42)
|
|
40
|
-
| [Fortification](https://enestaylan.github.io/roamwright/examples/fortification.html?seed=11)
|
|
41
|
-
| [Harbour of ships](https://enestaylan.github.io/roamwright/examples/ships.html?seed=42)
|
|
42
|
-
| [Alpine viaduct](https://enestaylan.github.io/roamwright/examples/viaduct.html?seed=42)
|
|
43
|
-
| [Crowds and herds](https://enestaylan.github.io/roamwright/examples/crowds.html?seed=17)
|
|
44
|
-
| [Animal kit](https://enestaylan.github.io/roamwright/examples/animals.html?seed=42)
|
|
45
|
-
| [Figure motion](https://enestaylan.github.io/roamwright/examples/figure-motion.html?seed=11)
|
|
46
|
-
| [Fliers](https://enestaylan.github.io/roamwright/examples/fliers.html?seed=7)
|
|
47
|
-
| [Rooms](https://enestaylan.github.io/roamwright/examples/rooms.html?seed=42)
|
|
48
|
-
| [House kit](https://enestaylan.github.io/roamwright/examples/house-kit.html?seed=42)
|
|
49
|
-
| [Props and plants](https://enestaylan.github.io/roamwright/examples/props-and-plants.html?seed=42)
|
|
50
|
-
| [Effects by day and night](https://enestaylan.github.io/roamwright/examples/effects.html?seed=3)
|
|
51
|
-
| [Soundscape](https://enestaylan.github.io/roamwright/examples/soundscape.html?seed=42)
|
|
52
|
-
| [Figures](https://enestaylan.github.io/roamwright/examples/figure.html?seed=7)
|
|
53
|
-
| [A baked land](https://enestaylan.github.io/roamwright/examples/land.html?seed=7)
|
|
54
|
-
| [Island](https://enestaylan.github.io/roamwright/examples/island.html?seed=42)
|
|
55
|
-
| [Pacing and measuring](https://enestaylan.github.io/roamwright/examples/pacing.html?seed=42)
|
|
56
|
-
| [Ruins, rocks & paved roads](https://enestaylan.github.io/roamwright/examples/ruins.html?seed=42)
|
|
33
|
+
Browse all twenty-one examples on the [live showcase](https://enestaylan.github.io/roamwright/).
|
|
34
|
+
|
|
35
|
+
| Live example | What the example shows | Source |
|
|
36
|
+
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
37
|
+
| [A small world](https://enestaylan.github.io/roamwright/examples/small-world.html?seed=42) | A coastal valley with a walled harbour town, lamps, market crowd, pasture herds, ships and a passing day/night sky. | [small-world.js](examples/small-world.js) |
|
|
38
|
+
| [Towns](https://enestaylan.github.io/roamwright/examples/towns.html?seed=7) | A village streaming in block by block along a winding valley road, with street lamps and windows lit after dark. | [towns.js](examples/towns.js) |
|
|
39
|
+
| [Town fittings](https://enestaylan.github.io/roamwright/examples/town-fittings.html?seed=42) | Walled courtyard gardens with instanced shrubs, harbour works and breakwater moles, street lamps and a desert storm wall. | [town-fittings.js](examples/town-fittings.js) |
|
|
40
|
+
| [Fortification](https://enestaylan.github.io/roamwright/examples/fortification.html?seed=11) | Walled coastal or inland town with towers, battlements, vaulted gatehouses, wall-walk and portal in three styles. | [fortification.js](examples/fortification.js) |
|
|
41
|
+
| [Harbour of ships](https://enestaylan.github.io/roamwright/examples/ships.html?seed=42) | Every preset of the ship kit moored stern-on to a stone harbour quay while a cog and rowing boat tack offshore. | [ships.js](examples/ships.js) |
|
|
42
|
+
| [Alpine viaduct](https://enestaylan.github.io/roamwright/examples/viaduct.html?seed=42) | Watch an electric train cross eight stone arches above a forested alpine river from valley, trackside or riverbank. | [viaduct.js](examples/viaduct.js) |
|
|
43
|
+
| [Crowds and herds](https://enestaylan.github.io/roamwright/examples/crowds.html?seed=17) | Instanced market crowd, patrolling camp walkers, street dogs, grazing cattle and poultry with crowd alarms. | [crowds.js](examples/crowds.js) |
|
|
44
|
+
| [Animal kit](https://enestaylan.github.io/roamwright/examples/animals.html?seed=42) | Horses, cattle, sheep, a pack camel, dogs and a cat animated on procedural quadruped skeletons in a fenced paddock. | [animals.js](examples/animals.js) |
|
|
45
|
+
| [Figure motion](https://enestaylan.github.io/roamwright/examples/figure-motion.html?seed=11) | Full-body procedural locomotion on uneven ground: walk, run, sit, bow, draw and sheathe a blade, and mount a horse. | [figure-motion.js](examples/figure-motion.js) |
|
|
46
|
+
| [Fliers](https://enestaylan.github.io/roamwright/examples/fliers.html?seed=7) | Moths around a lantern, animated and perched corvids on a crag, wheeling bird flocks and four-winged gliders aloft. | [fliers.js](examples/fliers.js) |
|
|
47
|
+
| [Rooms](https://enestaylan.github.io/roamwright/examples/rooms.html?seed=42) | A furnished beamed room and a domed arcaded hall with baked window, lamp and hearth light by day or night. | [rooms.js](examples/rooms.js) |
|
|
48
|
+
| [House kit](https://enestaylan.github.io/roamwright/examples/house-kit.html?seed=42) | Every built-in architectural form — gable, hip, flat, tower, round, dome and courtyard — arranged round a town square. | [house-kit.js](examples/house-kit.js) |
|
|
49
|
+
| [Props and plants](https://enestaylan.github.io/roamwright/examples/props-and-plants.html?seed=42) | Camp, market, farm and road props beside every tree, shrub, grass tussock and waterside reed in the plant kit. | [props-and-plants.js](examples/props-and-plants.js) |
|
|
50
|
+
| [Effects by day and night](https://enestaylan.github.io/roamwright/examples/effects.html?seed=3) | Budgeted campfires and light pools, drifting smoke shadows, hollow mist and particle bursts that scorch the ground. | [effects.js](examples/effects.js) |
|
|
51
|
+
| [Soundscape](https://enestaylan.github.io/roamwright/examples/soundscape.html?seed=42) | Synthesised spatial audio and surface-aware stride foley across a lakeside shore of water, mud, sand, stone and earth. | [soundscape.js](examples/soundscape.js) |
|
|
52
|
+
| [Figures](https://enestaylan.github.io/roamwright/examples/figure.html?seed=7) | Sculpted procedural characters from plain look specs — faces, hair, clothing, cloaks and custom weapons, near and far. | [figure.js](examples/figure.js) |
|
|
53
|
+
| [A baked land](https://enestaylan.github.io/roamwright/examples/land.html?seed=7) | One height sheet baked row by row with erosion, coast, river ford, banked road, cliff-faced tel, quarry and upland mere. | [land.js](examples/land.js) |
|
|
54
|
+
| [Island](https://enestaylan.github.io/roamwright/examples/island.html?seed=42) | Fractal terrain shapes a coastline, sandy coves, weathered boulders and coastal pines in turquoise shallows. | [island.js](examples/island.js) |
|
|
55
|
+
| [Pacing and measuring](https://enestaylan.github.io/roamwright/examples/pacing.html?seed=42) | Device-aware presets, ground render order, frame-pacing watch and a live performance box over a coastal valley. | [pacing.js](examples/pacing.js) |
|
|
56
|
+
| [Ruins, rocks & paved roads](https://enestaylan.github.io/roamwright/examples/ruins.html?seed=42) | Hilltop ruins, buried-town mounds, bedded outcrops, a paved arch highway with cedar avenue and a flagstone plaza. | [ruins.js](examples/ruins.js) |
|
|
57
|
+
| [World map and wayfinding](https://enestaylan.github.io/roamwright/examples/world-map.html?seed=42) | Shaded atlas relief, baked terrain sheets, collision-free lettering, interactive pan/zoom/tap and a live compass strip. | [world-map.js](examples/world-map.js) |
|
|
57
58
|
|
|
58
59
|
### Run locally
|
|
59
60
|
|
package/examples/effects.js
CHANGED
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
createParticleSystem,
|
|
10
10
|
createSiteSchedule,
|
|
11
11
|
createSkyPanorama,
|
|
12
|
-
|
|
12
|
+
scatterInstances,
|
|
13
13
|
scatterTrees,
|
|
14
14
|
} from 'roamwright';
|
|
15
15
|
import { sstep } from 'roamwright/math/scalar.js';
|
|
16
|
-
import { C
|
|
16
|
+
import { C } from 'roamwright/geometry/primitives.js';
|
|
17
17
|
import { createProps } from 'roamwright/geometry/props.js';
|
|
18
18
|
import { createParticleEmitters, shakeCamera } from 'roamwright/rendering/particle-emitters.js';
|
|
19
19
|
import { createParticleBursts } from 'roamwright/rendering/particle-bursts.js';
|
|
@@ -118,17 +118,23 @@ sites.push(
|
|
|
118
118
|
createHouseKitMeshes({ materials: createHouseKitMaterials({ doubleSide: true }) }).kitStatic(propKit, worldGroup);
|
|
119
119
|
|
|
120
120
|
// Boulders and pines ringing the hillside behind the camp and misty hollow.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
121
|
+
scatterInstances({
|
|
122
|
+
geometries: [shapes.rock.clone().scale(1.4, 0.9, 1)],
|
|
123
|
+
parent: worldGroup,
|
|
124
|
+
material: new THREE.MeshStandardMaterial({ vertexColors: true, roughness: 0.94, flatShading: true }),
|
|
125
|
+
attempts: 24,
|
|
126
|
+
maxPerBucket: 24,
|
|
127
|
+
random,
|
|
128
|
+
sample: () => {
|
|
129
|
+
const a = random() * Math.PI * 2,
|
|
130
|
+
r = 25 + random() * 24;
|
|
131
|
+
return [campCenter.x + Math.cos(a) * r, campCenter.z + Math.sin(a) * r];
|
|
132
|
+
},
|
|
133
|
+
groundAt,
|
|
134
|
+
sink: 0.1,
|
|
135
|
+
scaleRange: [0.6, 1.3],
|
|
136
|
+
colorAt: color => color.fromArray(C(0x6e6a62, 0.15, random)),
|
|
137
|
+
});
|
|
132
138
|
|
|
133
139
|
scatterTrees({
|
|
134
140
|
parent: worldGroup,
|
package/examples/island.js
CHANGED
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
createRenderContext,
|
|
7
7
|
createSimpleWater,
|
|
8
8
|
createUnitShapes,
|
|
9
|
-
|
|
9
|
+
scatterInstances,
|
|
10
10
|
scatterTrees,
|
|
11
11
|
mulberry32,
|
|
12
12
|
} from 'roamwright';
|
|
13
13
|
import { createHash } from 'roamwright/math/random.js';
|
|
14
14
|
import { sstep } from 'roamwright/math/scalar.js';
|
|
15
|
-
import { C
|
|
15
|
+
import { C } from 'roamwright/geometry/primitives.js';
|
|
16
16
|
import { createHeightfieldMesh } from 'roamwright/geometry/heightfield.js';
|
|
17
17
|
import { readSeed } from './stage.js';
|
|
18
18
|
|
|
@@ -53,18 +53,25 @@ const island = createHeightfieldMesh({
|
|
|
53
53
|
island.castShadow = true;
|
|
54
54
|
worldGroup.add(island);
|
|
55
55
|
|
|
56
|
-
// Sculpted weathered boulders along the rocky headland and coves.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
// Sculpted weathered boulders along the rocky headland and coves, each tinted its own way.
|
|
57
|
+
scatterInstances({
|
|
58
|
+
geometries: [shapes.rock.clone().scale(1.35, 0.82, 1)],
|
|
59
|
+
parent: worldGroup,
|
|
60
|
+
material: new THREE.MeshStandardMaterial({ vertexColors: true, roughness: 0.93, flatShading: true }),
|
|
61
|
+
attempts: 140,
|
|
62
|
+
maxPerBucket: 140,
|
|
63
|
+
random,
|
|
64
|
+
sample: () => {
|
|
65
|
+
const x = (random() - 0.5) * 82,
|
|
66
|
+
z = (random() - 0.5) * 82,
|
|
67
|
+
y = height(x, z);
|
|
68
|
+
return y < -0.3 || y > 18 ? null : [x, z];
|
|
69
|
+
},
|
|
70
|
+
groundAt: height,
|
|
71
|
+
sink: 0.25,
|
|
72
|
+
scaleRange: [0.45, 1.65],
|
|
73
|
+
colorAt: color => color.fromArray(C(0x838076, 0.18, random)),
|
|
74
|
+
});
|
|
68
75
|
|
|
69
76
|
// Coastal pines and cedars clustered on the sheltered green slopes.
|
|
70
77
|
scatterTrees({
|
package/examples/ruins.js
CHANGED
|
@@ -16,7 +16,8 @@ import {
|
|
|
16
16
|
import { instanceArrays, instancedMesh, putInstance } from 'roamwright/geometry/instances.js';
|
|
17
17
|
import { C, TRS } from 'roamwright/geometry/primitives.js';
|
|
18
18
|
import { sstep, TAU } from 'roamwright/math/scalar.js';
|
|
19
|
-
import {
|
|
19
|
+
import { createHeightfieldMesh } from 'roamwright/geometry/heightfield.js';
|
|
20
|
+
import { initExample } from './stage.js';
|
|
20
21
|
|
|
21
22
|
const { canvas, renderer, camera, scene, worldGroup, seed, noise, hash, shapes } = initExample({
|
|
22
23
|
fallbackSeed: 42,
|
|
@@ -48,7 +49,7 @@ const scrubTone = new THREE.Color(0x9a9168);
|
|
|
48
49
|
const rockTone = new THREE.Color(0xb6a382);
|
|
49
50
|
const hillTone = new THREE.Color(0xc2b296);
|
|
50
51
|
|
|
51
|
-
const terrain =
|
|
52
|
+
const terrain = createHeightfieldMesh({
|
|
52
53
|
size: 360,
|
|
53
54
|
segs: 180,
|
|
54
55
|
heightAt: height,
|
package/examples/stage.js
CHANGED
|
@@ -27,9 +27,3 @@ export function initExample({ fallbackSeed = 42, fov = 42 } = {}) {
|
|
|
27
27
|
const shapes = createUnitShapes(noise.fbm);
|
|
28
28
|
return { canvas, ...ctx, seed, random, noise, hash, shapes };
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Vertex-colored rolling terrain mesh with natural variation.
|
|
33
|
-
*/
|
|
34
|
-
// the examples' old name for the engine's rolling ground, kept for pages that still import it from here
|
|
35
|
-
export { createHeightfieldMesh as makeRollingGround } from 'roamwright/geometry/heightfield.js';
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="theme-color" content="#152c2c" />
|
|
7
|
+
<title>World map and wayfinding · Roamwright</title>
|
|
8
|
+
<link rel="stylesheet" href="./showcase.css" />
|
|
9
|
+
<style>
|
|
10
|
+
aside#wayfinding {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 56px;
|
|
13
|
+
left: 50%;
|
|
14
|
+
transform: translateX(-50%);
|
|
15
|
+
z-index: 2;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: 4px;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
}
|
|
22
|
+
#compass {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: min(360px, 76vw);
|
|
25
|
+
height: 28px;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
border: 1px solid #f7edcf48;
|
|
28
|
+
border-radius: 0.45rem;
|
|
29
|
+
background: #0f2324d8;
|
|
30
|
+
}
|
|
31
|
+
#compass-strip {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
height: 100%;
|
|
36
|
+
will-change: transform;
|
|
37
|
+
}
|
|
38
|
+
#compass-strip span,
|
|
39
|
+
#compass-strip i {
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 4px;
|
|
42
|
+
transform: translateX(-50%);
|
|
43
|
+
font-size: 11px;
|
|
44
|
+
color: #d9e8e3;
|
|
45
|
+
}
|
|
46
|
+
#compass-strip span.c {
|
|
47
|
+
font-weight: 700;
|
|
48
|
+
color: #fff6df;
|
|
49
|
+
}
|
|
50
|
+
#compass-strip span.n {
|
|
51
|
+
color: #ffb25a;
|
|
52
|
+
}
|
|
53
|
+
#compass-strip i {
|
|
54
|
+
top: 10px;
|
|
55
|
+
width: 1px;
|
|
56
|
+
height: 6px;
|
|
57
|
+
background: #f7edcf55;
|
|
58
|
+
}
|
|
59
|
+
#compass-strip .mk {
|
|
60
|
+
position: absolute;
|
|
61
|
+
bottom: 2px;
|
|
62
|
+
width: 5px;
|
|
63
|
+
height: 5px;
|
|
64
|
+
border-radius: 50%;
|
|
65
|
+
background: #62e6cb;
|
|
66
|
+
transform: translateX(-50%);
|
|
67
|
+
}
|
|
68
|
+
#compass-strip .mk.wp {
|
|
69
|
+
background: #ffb25a;
|
|
70
|
+
}
|
|
71
|
+
#compass-strip .mk b {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
#where-line {
|
|
75
|
+
padding: 3px 10px;
|
|
76
|
+
border-radius: 0.35rem;
|
|
77
|
+
background: #0f2324cc;
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
color: #f3ecd9;
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
}
|
|
82
|
+
#pick-card {
|
|
83
|
+
position: absolute;
|
|
84
|
+
right: clamp(10px, 1.8vw, 22px);
|
|
85
|
+
top: 62px;
|
|
86
|
+
z-index: 2;
|
|
87
|
+
max-width: 240px;
|
|
88
|
+
padding: 8px 11px;
|
|
89
|
+
border: 1px solid #f7edcf48;
|
|
90
|
+
border-radius: 0.45rem;
|
|
91
|
+
background: #0f2324e4;
|
|
92
|
+
color: #f3ecd9;
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
pointer-events: auto;
|
|
95
|
+
}
|
|
96
|
+
#pick-card b {
|
|
97
|
+
display: block;
|
|
98
|
+
font-size: 13px;
|
|
99
|
+
color: #fff6df;
|
|
100
|
+
}
|
|
101
|
+
#pick-card small {
|
|
102
|
+
display: block;
|
|
103
|
+
color: #8ff0dc;
|
|
104
|
+
margin: 2px 0 4px;
|
|
105
|
+
}
|
|
106
|
+
#pick-card p {
|
|
107
|
+
margin: 0;
|
|
108
|
+
color: #d9e8e3;
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
111
|
+
<script type="importmap">
|
|
112
|
+
{
|
|
113
|
+
"imports": {
|
|
114
|
+
"three": "../node_modules/three/build/three.module.js",
|
|
115
|
+
"three/addons/": "../node_modules/three/examples/jsm/",
|
|
116
|
+
"roamwright": "../index.js",
|
|
117
|
+
"roamwright/": "../"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
121
|
+
</head>
|
|
122
|
+
<body>
|
|
123
|
+
<canvas
|
|
124
|
+
tabindex="0"
|
|
125
|
+
aria-label="Interactive cartographic atlas and shaded terrain map with collision-free labels, signs and relief"
|
|
126
|
+
></canvas>
|
|
127
|
+
<header>
|
|
128
|
+
<a class="back" href="../index.html"><span aria-hidden="true">←</span> Roamwright</a>
|
|
129
|
+
<div class="meta">
|
|
130
|
+
<a class="source" href="https://github.com/enestaylan/roamwright/blob/main/examples/world-map.js">Source</a>
|
|
131
|
+
<form method="get">
|
|
132
|
+
<label for="seed">Seed</label>
|
|
133
|
+
<input id="seed" name="seed" type="number" step="1" min="-2147483648" max="2147483647" value="42" required />
|
|
134
|
+
<button type="submit" title="Generate another archipelago" aria-label="Generate another archipelago">→</button>
|
|
135
|
+
</form>
|
|
136
|
+
</div>
|
|
137
|
+
</header>
|
|
138
|
+
<aside id="wayfinding" aria-label="Compass and whereabouts">
|
|
139
|
+
<div id="compass"><div id="compass-strip"></div></div>
|
|
140
|
+
<div id="where-line"></div>
|
|
141
|
+
</aside>
|
|
142
|
+
<aside id="pick-card" hidden aria-label="Selected place">
|
|
143
|
+
<b id="pick-name"></b>
|
|
144
|
+
<small id="pick-kind"></small>
|
|
145
|
+
<p id="pick-desc"></p>
|
|
146
|
+
</aside>
|
|
147
|
+
<footer>
|
|
148
|
+
<div class="caption">
|
|
149
|
+
<h1>World map and wayfinding</h1>
|
|
150
|
+
<p>Shaded atlas relief, baked terrain sheets, collision-free lettering, interactive pan/zoom/tap, and a live compass strip.</p>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="tools">
|
|
153
|
+
<div class="views" role="group" aria-label="Map view">
|
|
154
|
+
<button type="button" data-view="atlas" aria-pressed="true">Atlas</button>
|
|
155
|
+
<button type="button" data-view="terrain" aria-pressed="false">Terrain sheet</button>
|
|
156
|
+
<button type="button" data-view="parchment" aria-pressed="false">Parchment</button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</footer>
|
|
160
|
+
<script type="module" src="./world-map.js"></script>
|
|
161
|
+
</body>
|
|
162
|
+
</html>
|