@a2f0/skyline 0.2.6 → 0.2.7
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 +2 -1
- package/package.json +1 -1
- package/site/viewer-page.js +8 -4
package/docs/package.md
CHANGED
|
@@ -138,7 +138,8 @@ the scene's code cannot load, building details in a panel over the skyline, and
|
|
|
138
138
|
reduced motion. `F`, pressed inside the viewer, shows its element fullscreen.
|
|
139
139
|
|
|
140
140
|
The scene's control bar starts folded behind its star; set `controls: 'open'` to
|
|
141
|
-
start it open, with no fold, from its first frame
|
|
141
|
+
start it open, with no fold, from its first frame, as the site's own viewer at
|
|
142
|
+
skyline.devopsrockstars.com does. Visitors can still fold it.
|
|
142
143
|
Open, the bar shows the camera hint and the OpenStreetMap credit for the streets
|
|
143
144
|
and footprints. Set `attribution: false` to leave the credit out. OpenStreetMap's
|
|
144
145
|
[licence](https://www.openstreetmap.org/copyright) requires crediting its contributors
|
package/package.json
CHANGED
package/site/viewer-page.js
CHANGED
|
@@ -2,14 +2,18 @@ import { mountViewer } from "./skyline-shell.js";
|
|
|
2
2
|
// index.html: the site's own viewer, mounted the way a host mounts the package, through the
|
|
3
3
|
// same shell and viewer module, from the assets beside this script, with the site's toolbar
|
|
4
4
|
// along its top. Its address takes the package's options: `?embed=1` shows the viewer as a
|
|
5
|
-
// host does, without the toolbar; `?controls=open` starts the scene's
|
|
6
|
-
// `?attribution=hidden` leaves out the OpenStreetMap credit.
|
|
5
|
+
// host does, without the toolbar; `?controls=open` or `?controls=closed` starts the scene's
|
|
6
|
+
// bar open or folded; and `?attribution=hidden` leaves out the OpenStreetMap credit. The site
|
|
7
|
+
// starts the bar open, to show what the scene can do; embedded, it starts folded behind its
|
|
8
|
+
// star, as `mountSkyline` does.
|
|
7
9
|
const settings = new URLSearchParams(location.search);
|
|
10
|
+
const embedded = settings.get("embed") === "1";
|
|
11
|
+
const controls = settings.get("controls");
|
|
8
12
|
mountViewer(document.querySelector("#viewer"), {
|
|
9
13
|
assetsUrl: new URL("./", import.meta.url),
|
|
10
14
|
title: "Chicago skyline",
|
|
11
|
-
controls:
|
|
15
|
+
controls: controls === "open" || controls === "closed" ? controls : embedded ? "closed" : "open",
|
|
12
16
|
attribution: settings.get("attribution") !== "hidden",
|
|
13
|
-
navigation:
|
|
17
|
+
navigation: !embedded,
|
|
14
18
|
page: true,
|
|
15
19
|
});
|