@a2f0/skyline 0.2.43 → 0.2.45
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/docs/package.md +6 -1
- package/package.json +1 -1
- package/site/building-detail.html +3 -1
- package/site/building-study.html +3 -1
- package/site/index.html +3 -1
- package/site/skyline-3d.html +3 -1
- package/site/skyline-study.html +3 -1
- package/site/skyline-viewer.js +10 -0
- package/site/skyline-webgl.html +3 -0
package/docs/package.md
CHANGED
|
@@ -56,7 +56,8 @@ bun add /tmp/a2f0-skyline-<version>.tgz
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
The tarball includes `lib/` (ESM and declarations), `site/` (the complete static
|
|
59
|
-
viewer), package documentation, and third-party notices.
|
|
59
|
+
viewer), package documentation, and third-party notices. The standalone site's favicons are
|
|
60
|
+
not part of `site/` ([why](#copy-the-viewer-assets)). Sources, test fixtures,
|
|
60
61
|
credentials, deployment configuration, and the unused source photograph are
|
|
61
62
|
excluded. No viewer assets load from a CDN.
|
|
62
63
|
|
|
@@ -109,6 +110,10 @@ await copySkylineAssets('./public/skyline');
|
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
Serve that directory over HTTP at `/skyline/`, preserving all its relative paths.
|
|
113
|
+
The copy holds no favicons. Its pages link `/favicon.ico`, `/favicon.svg` and
|
|
114
|
+
`/apple-touch-icon.png` at the origin's root, so a page opened from the copy shows the
|
|
115
|
+
host's own icons, as long as the host serves those three files; the mounted viewer never
|
|
116
|
+
requests them. The standalone site renders its own icons at deploy time.
|
|
112
117
|
The helper copies files into the supplied directory; it does not clear unrelated
|
|
113
118
|
files already there. Use a dedicated directory for these assets, and clear it before
|
|
114
119
|
copying an upgrade, so files a new version dropped do not linger. All the viewer's
|
package/package.json
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<meta name="robots" content="noindex" />
|
|
7
7
|
<meta name="theme-color" content="#080808" />
|
|
8
|
-
<link rel="icon" href="
|
|
8
|
+
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
9
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
10
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
9
11
|
<title>Building Detail — Chicago Skyline</title>
|
|
10
12
|
<link rel="stylesheet" href="study.css" />
|
|
11
13
|
<!-- Framed by another page, the page leaves its links to the frame's own controls. -->
|
package/site/building-study.html
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<meta name="robots" content="noindex" />
|
|
7
7
|
<meta name="theme-color" content="#080808" />
|
|
8
|
-
<link rel="icon" href="
|
|
8
|
+
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
9
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
10
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
9
11
|
<title>Crain Communications Building — 3D Study</title>
|
|
10
12
|
<link rel="stylesheet" href="study.css" />
|
|
11
13
|
<script type="module" src="click-tracking-page.js"></script>
|
package/site/index.html
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<meta name="robots" content="noindex" />
|
|
7
7
|
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<link rel="icon" href="
|
|
8
|
+
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
9
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
10
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
9
11
|
<title>Chicago Skyline — Living Night</title>
|
|
10
12
|
<!-- viewer-page.js mounts the viewer from skyline-viewer.js, its styles and skyline-3d.html,
|
|
11
13
|
and starts the scene's code; fetch them alongside it. -->
|
package/site/skyline-3d.html
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<meta name="robots" content="noindex" />
|
|
7
7
|
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<link rel="icon" href="
|
|
8
|
+
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
9
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
10
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
9
11
|
<link rel="stylesheet" href="study.css" />
|
|
10
12
|
<title>3D Chicago Skyline</title>
|
|
11
13
|
<script type="module" src="click-tracking-page.js"></script>
|
package/site/skyline-study.html
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<meta name="robots" content="noindex" />
|
|
7
7
|
<meta name="theme-color" content="#080808" />
|
|
8
|
-
<link rel="icon" href="
|
|
8
|
+
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
9
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
10
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
9
11
|
<link rel="stylesheet" href="study.css" />
|
|
10
12
|
<title>Thirty-four on the skyline — Skyline Study</title>
|
|
11
13
|
<script type="module" src="click-tracking-page.js"></script>
|
package/site/skyline-viewer.js
CHANGED
|
@@ -51,6 +51,9 @@ export function mount(root, { assets, signal, controls, colour, theme, attributi
|
|
|
51
51
|
// Keep the drawing reachable until the first 3D frame succeeds, even if the scene's
|
|
52
52
|
// markup or code never loads, and again if its graphics context is lost.
|
|
53
53
|
let sceneUnavailable = true;
|
|
54
|
+
// The toolbar's show original waits while the scene boots, until its first frame, a
|
|
55
|
+
// failure to load, or a lost graphics context.
|
|
56
|
+
let booting = true;
|
|
54
57
|
const frames = {};
|
|
55
58
|
const toolbar = navigation ? createToolbar() : null;
|
|
56
59
|
function updateView() {
|
|
@@ -72,6 +75,7 @@ export function mount(root, { assets, signal, controls, colour, theme, attributi
|
|
|
72
75
|
button.setAttribute("aria-pressed", String(showing));
|
|
73
76
|
button.title = showing ? home.title : toggle.title;
|
|
74
77
|
}
|
|
78
|
+
toolbar.querySelector(`#${toggles.original.id}`).hidden = booting;
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
function showMode(next) {
|
|
@@ -152,6 +156,8 @@ export function mount(root, { assets, signal, controls, colour, theme, attributi
|
|
|
152
156
|
return new Promise(() => { });
|
|
153
157
|
const message = element(document, "p", { className: "loading", textContent: SCENE_FAILURE }, { role: "status" });
|
|
154
158
|
scene.append(message);
|
|
159
|
+
booting = false;
|
|
160
|
+
updateView();
|
|
155
161
|
throw error;
|
|
156
162
|
}
|
|
157
163
|
if (signal.aborted)
|
|
@@ -187,11 +193,13 @@ export function mount(root, { assets, signal, controls, colour, theme, attributi
|
|
|
187
193
|
onShowOriginal: showOriginal,
|
|
188
194
|
onReady() {
|
|
189
195
|
sceneUnavailable = false;
|
|
196
|
+
booting = false;
|
|
190
197
|
updateView();
|
|
191
198
|
resolve();
|
|
192
199
|
},
|
|
193
200
|
onUnavailable() {
|
|
194
201
|
sceneUnavailable = true;
|
|
202
|
+
booting = false;
|
|
195
203
|
updateView();
|
|
196
204
|
},
|
|
197
205
|
});
|
|
@@ -205,6 +213,8 @@ export function mount(root, { assets, signal, controls, colour, theme, attributi
|
|
|
205
213
|
// press away.
|
|
206
214
|
scene.querySelector("#loading").textContent = SCENE_FAILURE;
|
|
207
215
|
scene.querySelectorAll("button, input").forEach((control) => { control.disabled = true; });
|
|
216
|
+
booting = false;
|
|
217
|
+
updateView();
|
|
208
218
|
throw error;
|
|
209
219
|
}
|
|
210
220
|
}
|
package/site/skyline-webgl.html
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<meta name="robots" content="noindex" />
|
|
7
|
+
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
8
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
9
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
7
10
|
<title>WebGL Chicago Skyline Prototype</title>
|
|
8
11
|
<style>
|
|
9
12
|
:root {
|