feat(embeds): geo/gpx/3D/YouTube/media keyword system + docs, sanitized mirrors
- new snippet geo_map_render.js: [map] inline geomaps (tree order, tint, theme-following), [gpx] stats card + elevation profile with hover cursor (km from start, d-height, vertical guide), [yt] privacy click-to-load facade, [video]/[audio] inline players fed from the new geoData indexes - 3d_model_viewer.js: [cad] keyword + title/ID resolution via geoData.cad, sizes/captions, real occt-wasm ESM pair (fixes 'STEP worker error'), code-span-safe keyword scan (docs can show examples) - blog_generator.js: buildGeoData() v6 – maps (geolocation + geoShape point/line/polygon + child GPX tracks), gpx/cad/media indexes, branch-change rebuild for route reordering - generated/geo_data.js placeholder; docs/embed-keywords.md (new) + embed-3d-model Option D; README layout/wiring/notes tables updated - license: runtime components (MapLibre ISC, VersaTiles MIT/ODbL, YouTube) - hygiene: removed leaked note IDs and instance domain from theme docs
This commit is contained in:
+17
-1
@@ -7,7 +7,7 @@ available space instead of the readable content width. **Inline viewers embedded
|
||||
articles** (Options B and C) are limited to the content width (`model-viewer-inline`). The caption below the model always shows
|
||||
`<file name> · <size> · <triangle count>` (e.g. `Wrench.stl · 711 KB · 14.6k triangles`).
|
||||
|
||||
There are three ways to embed a model, depending on how you store the file.
|
||||
There are four ways to embed a model, depending on how you store the file.
|
||||
|
||||
## Option A – Model as its own note (file note)
|
||||
|
||||
@@ -47,6 +47,22 @@ exists as its own (published) file note — the model stays in one place.
|
||||
> STEP tessellation is set to `linearDeflection: 0.4, angularDeflection: 0.2`
|
||||
> (≈480k triangles for the ignis battery module; tuned for mobile).
|
||||
|
||||
## Option D – `[cad]` keyword (editor-safe, no HTML or links)
|
||||
|
||||
Plain-text keyword, robust against editor re-saves (unlike raw HTML embeds, which CKEditor strips):
|
||||
|
||||
```
|
||||
[cad <id|title>] # e.g. [cad base] or [cad __MODEL_FILE_NOTE_ID__]
|
||||
[cad <id|title>|small] # small | medium | large (viewer height)
|
||||
[cad <id|title>|Own caption] # free text as caption
|
||||
```
|
||||
|
||||
The key resolves through the **`cad` index** in `window.geoData` (built by `blog_generator.js`,
|
||||
scans the blog tree for `.stl` / `.step` / `.stp` file notes; the extension may live in the
|
||||
note title **or** `#originalFileName`). The model file note does **not** need its own `publish`
|
||||
label — it only has to be inside the blog subtree. See `docs/embed-keywords.md` for the whole
|
||||
keyword family (`map`, `gpx`, `cad`, `yt`, `video`, `audio`).
|
||||
|
||||
## Requirements
|
||||
|
||||
- The `3d model viewer` script must be wired: `~shareHtml → 3d model viewer`
|
||||
|
||||
Reference in New Issue
Block a user