Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
124 lines (124 loc) · 6.16 KB
/
Copy pathindex.html
File metadata and controls
124 lines (124 loc) · 6.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Interrupted Contours</title>
<meta property="og:title" content="Interrupted Contours" />
<meta property="og:description" content="What if contour lines weren't continuous? Shadow density and minimum spacing modes generate discontinuous contours in the browser, per tile, as vector geometry." />
<meta property="og:image" content="https://mappingmashups.github.io/contourvolution/images/colorado-river.png" />
<meta property="og:url" content="https://mappingmashups.github.io/contourvolution/" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<style>
html, body, #map { margin: 0; height: 100%; }
body { background: #f4f1ea; font-family: system-ui, sans-serif; }
#status {
position: absolute; left: 10px; bottom: 30px; padding: 4px 8px;
background: rgb(255 255 255 / 0.85); border-radius: 4px; font-size: 12px;
}
#info {
position: absolute; top: 10px; left: 10px; width: 280px;
background: rgb(255 255 255 / 0.92); border-radius: 6px;
padding: 14px 16px; font-size: 13px; line-height: 1.5;
box-shadow: 0 1px 6px rgb(0 0 0 / 0.15);
color: #2a2a2a; z-index: 2;
}
@media (max-width: 600px) {
.lil-gui { display: none !important; }
}
#info .info-header {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
#info h1 {
margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; flex: 1;
}
#info .toggle-btn {
flex-shrink: 0; background: none; border: none; cursor: pointer;
font-size: 16px; line-height: 1; color: #888; padding: 0 2px;
transition: color 0.15s;
}
#info .toggle-btn:hover { color: #333; }
#info .info-body { margin-top: 8px; }
#info.collapsed .info-body { display: none; }
#info p { margin: 0 0 8px; }
#info p:last-child { margin: 0; }
#info strong { font-weight: 600; color: #1a1a1a; }
#info a { color: #4a7fa5; text-decoration: none; }
#info a:hover { text-decoration: underline; }
#info .modes { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
#info .mode-btn {
display: block; width: 100%; text-align: left; cursor: pointer;
padding: 8px 10px; border-radius: 4px; border: 1.5px solid transparent;
background: rgb(0 0 0 / 0.04); font: inherit; font-size: 13px;
color: inherit; line-height: 1.5; transition: background 0.15s, border-color 0.15s;
}
#info .mode-btn:hover { background: rgb(0 0 0 / 0.08); }
#info .mode-btn.active { background: rgb(74 127 165 / 0.12); border-color: #4a7fa5; }
#info .mode-name { font-weight: 600; }
#info .animate-btn {
display: block; width: 100%; text-align: center; cursor: pointer;
margin-top: 6px; padding: 6px 10px; border-radius: 4px;
border: 1.5px solid transparent; background: rgb(0 0 0 / 0.04);
font: inherit; font-size: 13px; color: inherit;
transition: background 0.15s, border-color 0.15s;
}
#info .animate-btn:hover { background: rgb(0 0 0 / 0.08); }
#info .animate-btn.active { background: rgb(74 127 165 / 0.12); border-color: #4a7fa5; }
#info .search { display: flex; gap: 6px; margin-top: 10px; }
#info .search input {
flex: 1; padding: 6px 8px; border-radius: 4px; border: 1.5px solid #d0ccc4;
font: inherit; font-size: 13px; background: #fff; color: inherit;
outline: none;
}
#info .search input:focus { border-color: #4a7fa5; }
#info .search input::placeholder { color: #aaa; }
#info .search button {
padding: 6px 10px; border-radius: 4px; border: 1.5px solid #d0ccc4;
background: #fff; cursor: pointer; font: inherit; font-size: 13px; color: inherit;
transition: background 0.15s;
}
#info .search button:hover { background: rgb(0 0 0 / 0.06); }
#info .search-error { font-size: 12px; color: #b04040; margin: -6px 0 6px; }
</style>
</head>
<body>
<div id="map"></div>
<div id="status"></div>
<div id="info">
<div class="info-header">
<h1>Interrupted Contours</h1>
<button class="toggle-btn" id="info-toggle" title="Toggle panel">▾</button>
</div>
<div class="info-body">
<p>On maps, <em>"contours"</em> are <em>unbroken</em> curves showing lines of equal
elevation. But… what if they <em>weren't</em> continuous? What if discontinuous contour
lines could give us a different perspective on the landscape?</p>
<div class="modes">
<button class="mode-btn" data-mode="density">
<span class="mode-name">Shadow Density</span> — line density encodes terrain
steepness: more lines in shadow, fewer in light.
</button>
<button class="mode-btn" data-mode="minspacing">
<span class="mode-name">Minimum Spacing</span> — contours are drawn in priority
order (by elevation subdivision) and masked wherever they crowd together. Lines in
shadow get thicker to fill the space.
</button>
</div>
<button class="animate-btn" id="animate-light-btn">Animate light ↺</button>
<p>Made for the <a href="https://30daymapchallenge.com/" target="_blank">#30DayMapChallenge</a>
Day 2: Lines. Concept and direction by
<a href="https://mappingmashups.net/" target="_blank">Alan McConchie</a>,
code implemented by <a href="https://claude.ai" target="_blank">Claude</a>.</p>
<p><a href="https://github.com/mappingmashups/contourvolution#readme"
target="_blank">Read more on GitHub →</a></p>
<div class="search">
<input id="geocoder-input" type="text" placeholder="Search for a place…" />
<button id="geocoder-btn">Go</button>
</div>
<div class="search-error" id="geocoder-error" hidden></div>
</div>
</div>
<script type="module" src="/src/main.js"></script>
</body>
</html>