@nika-js/onlymap 0.6.15 → 0.6.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/CHANGELOG.md +21 -0
- package/README.md +2 -2
- package/bin/onlymapjs.mjs +287 -24
- package/dist/{LercDecode.es-BWmtr6fp.js → LercDecode.es-DjPA9zLm.js} +1 -1
- package/dist/actions.d.ts +0 -9
- package/dist/{basemap-DQeUv-pk.js → basemap-DwN5jPCj.js} +1 -1
- package/dist/elements/om-map.d.ts +7 -0
- package/dist/elements/om-story.d.ts +29 -0
- package/dist/{geoparquet-DsYXvvEo.js → geoparquet-DG3VtNgs.js} +1 -1
- package/dist/html-data.d.ts +1 -1
- package/dist/{index-BTJy4dWy.js → index-BM-txQRw.js} +1 -1
- package/dist/{index-Bnkk4jcp.js → index-CX4qxgVT.js} +48373 -48080
- package/dist/{index-DMRuqiXV.js → index-DceORL-v.js} +2 -2
- package/dist/{index-CbHslg3u.js → index-DlXIfdhF.js} +1 -1
- package/dist/{index-gMV11Nr5.js → index-Yl9rVUWh.js} +1 -1
- package/dist/layers/feature-mesh-layer.d.ts +7 -7
- package/dist/layers/warm-tile3d-layer.d.ts +24 -0
- package/dist/{lerc-Cw1YMyb0.js → lerc-BD1Any2Z.js} +2 -2
- package/dist/onlymap.standalone.js +59243 -58950
- package/dist/onlymapjs.js +1 -1
- package/dist/paced-flyby.d.ts +51 -0
- package/dist/{raster-BJaQlAzq.js → raster-Cv5w_kS7.js} +2 -2
- package/dist/{raster-pipeline-BCVaME9y.js → raster-pipeline-Nl0EF5em.js} +1 -1
- package/dist/runtime-core.d.ts +6 -0
- package/dist/telemetry-schema.d.ts +10 -2
- package/dist/telemetry.d.ts +4 -0
- package/dist/tile-warm.d.ts +144 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-C6xeWGwX.js → zarr-aau6eARi.js} +2 -2
- package/docs/design/paced-flyby.md +42 -0
- package/docs/stories.md +22 -0
- package/docs/telemetry.md +2 -0
- package/llms.txt +4 -2
- package/onlymapjs.html-data.json +18 -0
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +12 -2
|
@@ -16,8 +16,8 @@ Vite/npm project:
|
|
|
16
16
|
Static CDN page (raw-file CDNs only — unpkg/jsDelivr; never esm.sh or another rebundling CDN, which duplicates the WebGL runtime and breaks layer shaders):
|
|
17
17
|
|
|
18
18
|
```html
|
|
19
|
-
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.
|
|
20
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.
|
|
19
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.17/dist/onlymapjs.css">
|
|
20
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.17"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Always include `onlymapjs.css` — it carries the MapLibre basemap styles and the no-JS fallback rules (`<om-fallback>` / default banner). For the fallback to work in script-disabled previews it must load without JavaScript: a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages (a bundler-emitted stylesheet is fine in npm projects).
|
|
@@ -573,6 +573,10 @@ duration?}`, `zoom-to-feature` `{layer, featureId, duration?}`, `set-basemap`
|
|
|
573
573
|
|
|
574
574
|
Rich sparse HTML anchored to the map.
|
|
575
575
|
|
|
576
|
+
**Styling — overlay content renders inside a shadow root (style isolation, same as widgets), so page stylesheets and their classes DO NOT reach it.** Style overlay content with inline `style="…"` attributes, or put a `<style>` element INSIDE the overlay (children are moved into the shadow root wholesale, so it applies there). Inheritable properties and CSS custom properties set on `om-overlay`/`om-map` do pierce the boundary. A `.card` class defined in the page's `<head>` will silently not apply — the content renders unstyled.
|
|
577
|
+
|
|
578
|
+
Also note for story "cards": an overlay is geo-anchored, and by default it HIDES whenever its anchor leaves the viewport — on a moving story camera an anchored card can vanish mid-step. Pin narrative cards that must persist across camera motion in a widget slot (custom `<om-widget position="bottom-center">`) instead; use anchored overlays for cards that belong to a place (they track it and legitimately go away when it leaves frame).
|
|
579
|
+
|
|
576
580
|
Anchors:
|
|
577
581
|
|
|
578
582
|
- `anchor="[lng, lat]"`
|
|
@@ -664,6 +668,12 @@ Example:
|
|
|
664
668
|
|
|
665
669
|
### Stories
|
|
666
670
|
|
|
671
|
+
Add `warm-tiles` on `<om-story>` to pre-load 3D tilesets along the story's fly-to route in the background at load — flybys play sharp instead of refining from blurry. Manual form: the `warm-tiles` action (`{story?, samples?, budget?}`); completion fires `om-tiles-warmed` on `<om-map>`. Persistent knob: `load-options='{"tileset":{"maximumMemoryUsage":512}}'` on the tiles layer.
|
|
672
|
+
|
|
673
|
+
Add `paced` on `<om-story>` for load-paced playback: the story steps its own clock frame by frame (optionally `paced="60"` story-fps, default 30), drives the camera itself along the fly-to route, and never advances a frame while any 3D tileset is still refining — no frame ever shows unrefined tiles, at the cost of wall-clock time (playback is not real-time; use it for recorded takes or heavy tilesets like Google Photorealistic 3D Tiles, where no amount of pre-warming fits the flight in cache). Emits `om-paced-tick` (`detail = {t, waitedMs}`) on the story per frame; `waitedMs > 0` means that frame paused for tiles. Composes with `warm-tiles` (warm first → far shorter waits). During a paced run only `fly-to` steps steer the camera (data-dependent camera steps like `zoom-to-feature` are skipped with a warning) and user gestures don't pause playback — pause via the player widget or `story-pause`.
|
|
674
|
+
|
|
675
|
+
To output an actual video: `npx onlymapjs record map.html --out flyby.mp4` (playwright dev-installed; ffmpeg assembles, else you get PNG frames + the command) plays the story paced in isolated headless Chromium and screenshots every frame — widgets, overlays, and attribution included, every frame fully refined. Options: `--story <id>`, `--fps <n>`, `--width/--height/--scale`, `--gpu` (hardware rendering; ~3× shorter tile holds on heavy 3D scenes — recommended), `--keep-frames`, `--timeout <s>` (frames survive a deadline hit in `<out>.frames/`), `--max-hold <s|none>` (per-frame tile-wait cap, default 10s — also authorable as `paced-max-hold` on `<om-story>`; frames that keep hitting the cap may stay slightly blurry — raise it, or `none` makes the gate absolute for guaranteed-sharp takes). It executes the page's scripts — trusted, browser-runnable manifests only. For custom recorders in-page, `storyEl.setPacedCapture(async (tick) => {...})` is awaited per frame before that frame's `om-paced-tick` (capture race-free; the ended-state tick = all frames captured).
|
|
676
|
+
|
|
667
677
|
Use `<om-story>` with `<om-step>` children. Stories are siblings of layers/overlays, not containers.
|
|
668
678
|
|
|
669
679
|
```html
|