ciesm-prism 1.0.1363 → 1.0.1366

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/README.md CHANGED
@@ -192,7 +192,7 @@ PRISM is developed by Kaveh Rassoulzadegan for the Mediterranean Science Commiss
192
192
  memory of his father, Professor of Microbiology Fereidoun Rassoulzadegan (1944–2026).
193
193
 
194
194
  <img src="docs/images/claude.svg" width="16" height="16" alt="Claude logo"> Written with Claude Code, Anthropic’s
195
- coding agent, co-author of 1,337 of its commits.
195
+ coding agent.
196
196
 
197
197
  <img src="docs/images/openai.svg" width="16" height="16" alt="OpenAI logo"> OpenAI’s Codex and GPT models contributed
198
198
  to some of the foundations and planning of the early versions.
package/data/profile.json CHANGED
@@ -11,7 +11,12 @@
11
11
  "Copyright ©2006-2026 Mediterranean Science Commission (CIESM Monaco - Paris). Author: Kaveh Rassoulzadegan.",
12
12
  "Released under the MIT License."
13
13
  ],
14
- "logo": { "splash": "logo/prism_logo_animated.mp4", "splashType": "video", "menu": "logo/prism_logo_64x64.png" },
14
+ "logo": {
15
+ "splash": "logo/prism_logo_animated.mp4",
16
+ "splashType": "video",
17
+ "menu": "logo/prism_logo_64x64.png",
18
+ "menuVideo": "logo/prism_logo_animated_192.mp4"
19
+ },
15
20
  "poweredBy": { "label": "PRISM", "url": "https://github.com/KavehR/prism" },
16
21
  "spinoff": { "title": "CIESM Prism 3D data visualization", "credits": "", "publishFolder": "programs/HMS" }
17
22
  }
@@ -0,0 +1,104 @@
1
+ {
2
+ "format": "prism-tutorial/v1",
3
+ "title": "UU-P07: the mantle under Italy",
4
+ "start": { "example": "earthquakes-uup07" },
5
+ "intro": "The UU-P07 tomography model of the mantle's temperature anomalies, with 38,677 earthquakes. Where to change how a volume is drawn, light it and cut it at a depth.",
6
+ "end": "Render Mode, Lighting and the clipping depths belong to the selected volume: each volume keeps its own.",
7
+ "steps": [
8
+ {
9
+ "id": "s1",
10
+ "kind": "control",
11
+ "control": "render_mode",
12
+ "label": "Render Mode: MIP → ISO Surface (UU-P07 - Mantle Temperature Anomalies)",
13
+ "rows": [
14
+ {
15
+ "id": "01a24c72-e2a5-7642-b1c9-9ceb8a60a71a",
16
+ "name": "UU-P07 - Mantle Temperature Anomalies",
17
+ "bundle": "uup07",
18
+ "group": "CIESM C1"
19
+ }
20
+ ],
21
+ "before": "mip",
22
+ "after": "iso",
23
+ "view": {
24
+ "camera": {
25
+ "position": [1.3965131812841383, -0.4425756126202164, 2.0171013890556706],
26
+ "target": [0.6538389511341121, -0.3767922593888717, 0.9938923627262801],
27
+ "up": [0, 1, 0]
28
+ },
29
+ "viewport": { "lonMin": 6.75, "lonMax": 22.25, "latMin": 29.75, "latMax": 45.25 },
30
+ "currentView": "persp",
31
+ "currentProjection": "planar",
32
+ "isOrthographic": false,
33
+ "elevationExaggerationSurface": 103,
34
+ "elevationExaggerationDepth": 7,
35
+ "clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
36
+ },
37
+ "caption": "Set the volume's Render Mode to ISO Surface"
38
+ },
39
+ {
40
+ "id": "s2",
41
+ "kind": "control",
42
+ "control": "lighting",
43
+ "label": "Lighting: 0.00 → 1.20 (UU-P07 - Mantle Temperature Anomalies)",
44
+ "rows": [
45
+ {
46
+ "id": "01a24c72-e2a5-7642-b1c9-9ceb8a60a71a",
47
+ "name": "UU-P07 - Mantle Temperature Anomalies",
48
+ "bundle": "uup07",
49
+ "group": "CIESM C1"
50
+ }
51
+ ],
52
+ "before": 0,
53
+ "after": 1.2,
54
+ "view": {
55
+ "camera": {
56
+ "position": [1.3965131812841383, -0.4425756126202164, 2.0171013890556706],
57
+ "target": [0.6538389511341121, -0.3767922593888717, 0.9938923627262801],
58
+ "up": [0, 1, 0]
59
+ },
60
+ "viewport": { "lonMin": 6.75, "lonMax": 22.25, "latMin": 29.75, "latMax": 45.25 },
61
+ "currentView": "persp",
62
+ "currentProjection": "planar",
63
+ "isOrthographic": false,
64
+ "elevationExaggerationSurface": 103,
65
+ "elevationExaggerationDepth": 7,
66
+ "clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
67
+ },
68
+ "caption": "Set its Lighting to 1.20: the surfaces shaded"
69
+ },
70
+ {
71
+ "id": "s3",
72
+ "kind": "clip",
73
+ "field": "topDepth",
74
+ "userField": null,
75
+ "bucket": "depth",
76
+ "rows": [
77
+ {
78
+ "id": "01a24c72-e2a5-7642-b1c9-9ceb8a60a71a",
79
+ "name": "UU-P07 - Mantle Temperature Anomalies",
80
+ "bundle": "uup07",
81
+ "group": "CIESM C1"
82
+ }
83
+ ],
84
+ "label": "Clipping Top Depth (km): 5 km → 125 km (UU-P07 - Mantle Temperature Anomalies)",
85
+ "before": 5,
86
+ "after": 125,
87
+ "view": {
88
+ "camera": {
89
+ "position": [1.3965131812841383, -0.4425756126202164, 2.0171013890556706],
90
+ "target": [0.6538389511341121, -0.3767922593888717, 0.9938923627262801],
91
+ "up": [0, 1, 0]
92
+ },
93
+ "viewport": { "lonMin": 6.75, "lonMax": 22.25, "latMin": 29.75, "latMax": 45.25 },
94
+ "currentView": "persp",
95
+ "currentProjection": "planar",
96
+ "isOrthographic": false,
97
+ "elevationExaggerationSurface": 103,
98
+ "elevationExaggerationDepth": 7,
99
+ "clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
100
+ },
101
+ "caption": "Cut its top 125 km away: clipping Top Depth"
102
+ }
103
+ ]
104
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "format": "prism-tutorial/v1",
3
+ "title": "GEOTRACES GA04N: what the stations measured",
4
+ "start": { "example": "geotraces-ga04n" },
5
+ "intro": "The GEOTRACES GA04N section of 2013: 68 stations from Lisbon to the Black Sea and back, each a water column of bottle samples. Where to choose what the columns show and how.",
6
+ "end": "Parameter, Interpolation and Size on screen are shared by every station. The timeline replays the cruise, station by station.",
7
+ "steps": [
8
+ {
9
+ "id": "s1",
10
+ "kind": "control",
11
+ "control": "geotraces_parameter",
12
+ "label": "Parameter: Temperature (°C) → Oxygen (sensor) (µmol/kg) (Station 05 · 64PE373)",
13
+ "rows": [{ "id": "01a24c72-9e28-7b00-8d19-bed6dfa3466d", "name": "Station 05 · 64PE373", "group": "GEOTRACES" }],
14
+ "before": "CTDTMP",
15
+ "after": "CTDOXY",
16
+ "view": {
17
+ "camera": { "position": [0, 0.9, 1.3], "target": [0, -0.05, 0.02], "up": [0, 1, 0] },
18
+ "viewport": { "lonMin": -15.75, "lonMax": 42.25, "latMin": 29.75, "latMax": 46.75 },
19
+ "currentView": "persp",
20
+ "currentProjection": "planar",
21
+ "isOrthographic": false,
22
+ "elevationExaggerationSurface": 40,
23
+ "elevationExaggerationDepth": 40,
24
+ "clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
25
+ },
26
+ "caption": "Set the stations' Parameter to Oxygen: the deep Black Sea has none"
27
+ },
28
+ {
29
+ "id": "s2",
30
+ "kind": "control",
31
+ "control": "geotraces_render_mode",
32
+ "label": "Interpolation: Linear → Nearest (Station 05 · 64PE373)",
33
+ "rows": [{ "id": "01a24c72-9e28-7b00-8d19-bed6dfa3466d", "name": "Station 05 · 64PE373", "group": "GEOTRACES" }],
34
+ "before": "linear",
35
+ "after": "nearest",
36
+ "view": {
37
+ "camera": { "position": [0, 0.9, 1.3], "target": [0, -0.05, 0.02], "up": [0, 1, 0] },
38
+ "viewport": { "lonMin": -15.75, "lonMax": 42.25, "latMin": 29.75, "latMax": 46.75 },
39
+ "currentView": "persp",
40
+ "currentProjection": "planar",
41
+ "isOrthographic": false,
42
+ "elevationExaggerationSurface": 40,
43
+ "elevationExaggerationDepth": 40,
44
+ "clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
45
+ },
46
+ "caption": "Set Interpolation to Nearest: each bottle keeps its own value"
47
+ },
48
+ {
49
+ "id": "s3",
50
+ "kind": "control",
51
+ "control": "geotraces_screen_size",
52
+ "label": "Size on screen: 10 px → 26 px (Station 05 · 64PE373)",
53
+ "rows": [{ "id": "01a24c72-9e28-7b00-8d19-bed6dfa3466d", "name": "Station 05 · 64PE373", "group": "GEOTRACES" }],
54
+ "before": 10,
55
+ "after": 26,
56
+ "view": {
57
+ "camera": { "position": [0, 0.9, 1.3], "target": [0, -0.05, 0.02], "up": [0, 1, 0] },
58
+ "viewport": { "lonMin": -15.75, "lonMax": 42.25, "latMin": 29.75, "latMax": 46.75 },
59
+ "currentView": "persp",
60
+ "currentProjection": "planar",
61
+ "isOrthographic": false,
62
+ "elevationExaggerationSurface": 40,
63
+ "elevationExaggerationDepth": 40,
64
+ "clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
65
+ },
66
+ "caption": "Set the stations' Size on screen to 26 px"
67
+ }
68
+ ]
69
+ }
@@ -5,6 +5,21 @@
5
5
  "id": "tutorials-medsea-temperature",
6
6
  "label": "MEDSEA Temperature: a volume",
7
7
  "name": "medsea-temperature"
8
+ },
9
+ {
10
+ "id": "tutorials-geotraces-ga04n",
11
+ "label": "GEOTRACES GA04N: stations along a section",
12
+ "name": "geotraces-ga04n"
13
+ },
14
+ {
15
+ "id": "tutorials-tsunami-world",
16
+ "label": "World Tsunami Risk: layers and the globe",
17
+ "name": "tsunami-world"
18
+ },
19
+ {
20
+ "id": "tutorials-earthquakes-uup07",
21
+ "label": "UU-P07: the mantle under Italy",
22
+ "name": "earthquakes-uup07"
8
23
  }
9
24
  ]
10
25
  }
@@ -0,0 +1,106 @@
1
+ {
2
+ "format": "prism-tutorial/v1",
3
+ "title": "World Tsunami Risk: its layers, then the globe",
4
+ "start": { "example": "tsunami-world" },
5
+ "intro": "The tsunami flood risk of the world's coasts, from 51 recorded and 53 potential earthquakes. Where to hide a group of layers, fade a layer, widen its outlines and turn the map into a globe.",
6
+ "end": "A group's eye shows or hides all its rows. Projection turns the map into a globe and back at any time.",
7
+ "steps": [
8
+ {
9
+ "id": "s1",
10
+ "kind": "eye",
11
+ "label": "Hide Recorded tsunamis (5 rows)",
12
+ "rows": [
13
+ { "id": "tsunami-risk", "name": "Depth colours", "group": "Recorded tsunamis" },
14
+ { "id": "tsunami-outlines", "name": "Outlines", "group": "Recorded tsunamis" },
15
+ { "id": "tsunami-faults-other", "name": "Faults (normal, strike-slip)", "group": "Recorded tsunamis" },
16
+ { "id": "tsunami-faults-thrust", "name": "Faults (thrust)", "group": "Recorded tsunamis" },
17
+ { "id": "tsunami-waves", "name": "Recorded tsunami waves", "group": "Recorded tsunamis" }
18
+ ],
19
+ "before": {
20
+ "tsunami-risk": true,
21
+ "tsunami-outlines": true,
22
+ "tsunami-faults-other": true,
23
+ "tsunami-faults-thrust": true,
24
+ "tsunami-waves": true
25
+ },
26
+ "after": {
27
+ "tsunami-risk": false,
28
+ "tsunami-outlines": false,
29
+ "tsunami-faults-other": false,
30
+ "tsunami-faults-thrust": false,
31
+ "tsunami-waves": false
32
+ },
33
+ "view": {
34
+ "camera": { "position": [0, 1.05, 1.2], "target": [0, -0.04, 0.05], "up": [0, 1, 0] },
35
+ "viewport": { "lonMin": 122.25, "lonMax": 150.25, "latMin": 25.75, "latMax": 45.75 },
36
+ "currentView": "persp",
37
+ "currentProjection": "planar",
38
+ "isOrthographic": false,
39
+ "elevationExaggerationSurface": 40,
40
+ "elevationExaggerationDepth": 40,
41
+ "clipping": { "west": 122, "east": 150.5, "south": 25.5, "north": 46 }
42
+ },
43
+ "caption": "Hide the recorded tsunamis: the potential ones stay"
44
+ },
45
+ {
46
+ "id": "s2",
47
+ "kind": "control",
48
+ "control": "opacity",
49
+ "label": "Opacity: 100% → 60% (Depth colours)",
50
+ "rows": [{ "id": "tsunami-potential-risk", "name": "Depth colours", "group": "Potential tsunamis" }],
51
+ "before": 1,
52
+ "after": 0.6,
53
+ "view": {
54
+ "camera": { "position": [0, 1.05, 1.2], "target": [0, -0.04, 0.05], "up": [0, 1, 0] },
55
+ "viewport": { "lonMin": 122.25, "lonMax": 150.25, "latMin": 25.75, "latMax": 45.75 },
56
+ "currentView": "persp",
57
+ "currentProjection": "planar",
58
+ "isOrthographic": false,
59
+ "elevationExaggerationSurface": 40,
60
+ "elevationExaggerationDepth": 40,
61
+ "clipping": { "west": 122, "east": 150.5, "south": 25.5, "north": 46 }
62
+ },
63
+ "caption": "Set the potential flood colours' Opacity to 60 %"
64
+ },
65
+ {
66
+ "id": "s3",
67
+ "kind": "control",
68
+ "control": "lineWidth",
69
+ "label": "Line Width: 2.0 px → 4.0 px (Outlines)",
70
+ "rows": [{ "id": "tsunami-potential-outlines", "name": "Outlines", "group": "Potential tsunamis" }],
71
+ "before": 2,
72
+ "after": 4,
73
+ "view": {
74
+ "camera": { "position": [0, 1.05, 1.2], "target": [0, -0.04, 0.05], "up": [0, 1, 0] },
75
+ "viewport": { "lonMin": 122.25, "lonMax": 150.25, "latMin": 25.75, "latMax": 45.75 },
76
+ "currentView": "persp",
77
+ "currentProjection": "planar",
78
+ "isOrthographic": false,
79
+ "elevationExaggerationSurface": 40,
80
+ "elevationExaggerationDepth": 40,
81
+ "clipping": { "west": 122, "east": 150.5, "south": 25.5, "north": 46 }
82
+ },
83
+ "caption": "Set the potential flood outlines' Line Width to 4 px"
84
+ },
85
+ {
86
+ "id": "s4",
87
+ "kind": "panel",
88
+ "control": "Projection",
89
+ "label": "Projection: Planar → Spherical",
90
+ "before": "Planar",
91
+ "after": "Spherical",
92
+ "view": {
93
+ "camera": { "position": [0, 1.05, 1.2], "target": [0, -0.04, 0.05], "up": [0, 1, 0] },
94
+ "viewport": { "lonMin": 122.25, "lonMax": 150.25, "latMin": 25.75, "latMax": 45.75 },
95
+ "currentView": "persp",
96
+ "currentProjection": "spherical",
97
+ "isOrthographic": false,
98
+ "elevationExaggerationSurface": 40,
99
+ "elevationExaggerationDepth": 40,
100
+ "clipping": { "west": -180, "east": 180, "south": -90, "north": 90 },
101
+ "globe": { "lon": 136.25, "lat": 35.75, "width": 360, "height": 180, "heading": 0 }
102
+ },
103
+ "caption": "Set Projection to Spherical"
104
+ }
105
+ ]
106
+ }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ciesm-prism",
3
- "version": "1.0.1363",
3
+ "version": "1.0.1366",
4
4
  "description": "PRISM: ocean and Earth data in one interactive 3-D view, in the web browser. Run it with npx ciesm-prism, or copy it to any web server.",
5
5
  "keywords": [
6
6
  "ocean",
package/src/app/Panels.js CHANGED
@@ -133,7 +133,13 @@ export function createPanels(app, page = {}) {
133
133
  ? spinoffMenus(spinoff, (action) => action in actions, spinoffTitle(app.profile, spinoff.about))
134
134
  : (page.menus ?? {});
135
135
  if (menus) {
136
- app.menuBar = new MenuBar({ logoUrl: app.profile.logo.menu, name: app.profile.name, menus });
136
+ // The logo animated where the profile gives a video of it (PRISM's own), else its picture
137
+ app.menuBar = new MenuBar({
138
+ logoUrl: app.profile.logo.menu,
139
+ logoVideo: app.profile.logo.menuVideo,
140
+ name: app.profile.name,
141
+ menus,
142
+ });
137
143
  app.menuBar.mount(document.body);
138
144
  app.menuBar.on('action', ({ action, item }) => {
139
145
  log.debug('Menu action:', action);
@@ -327,24 +327,28 @@ export const projectHistory = createHistory();
327
327
 
328
328
  /**
329
329
  * A row as a step names it: its id, with what the examples' recipes find it
330
- * by (its bundle key, its name: RecipeRunner stepDataset).
330
+ * by (its bundle key, its name: RecipeRunner stepDataset) and its Outliner
331
+ * group (two rows of one name in two groups: a tutorial's start opened again).
331
332
  * @param {Object} dataset
332
- * @returns {{id: string, name: string, bundle?: string}}
333
+ * @returns {{id: string, name: string, bundle?: string, group?: string}}
333
334
  */
334
335
  export function rowOf(dataset) {
335
336
  const bundle = bundleKeyOf(dataset);
336
- return { id: dataset.id, name: dataset.name, ...(bundle && { bundle }) };
337
+ const group = dataset.dataMetadata?.group;
338
+ return { id: dataset.id, name: dataset.name, ...(bundle && { bundle }), ...(group && { group }) };
337
339
  }
338
340
 
339
341
  /**
340
- * The row a step names, as the recipes find it: by id, else its bundle key, else its name.
342
+ * The row a step names, as the recipes find it: by id, else its bundle key, else its name in its group, else its name.
341
343
  * @returns {Object|null} The dataset
342
344
  */
343
345
  export function findRow(projectManager, row) {
346
+ const all = () => projectManager.getAllDatasets();
344
347
  return (
345
348
  projectManager.getDataset(row.id) ??
346
349
  (row.bundle ? bundledDataset(projectManager, row.bundle) : null) ??
347
- projectManager.getAllDatasets().find((d) => d.name === row.name) ??
350
+ (row.group ? all().find((d) => d.name === row.name && d.dataMetadata?.group === row.group) : null) ??
351
+ all().find((d) => d.name === row.name) ??
348
352
  null
349
353
  );
350
354
  }
@@ -145,6 +145,8 @@ function createPlayer(app, tutorial, { history, speed: startSpeed, onClose }) {
145
145
  let current = null;
146
146
  /** A control of the bar is being carried out (next, previous): the others wait */
147
147
  let busy = false;
148
+ /** A slider glides to its step's value */
149
+ let gliding = false;
148
150
  /** Timers and animations on the tutorial's clock */
149
151
  const pending = new Set();
150
152
  /** Waiting for play */
@@ -577,15 +579,15 @@ function createPlayer(app, tutorial, { history, speed: startSpeed, onClose }) {
577
579
  if (!datasets.length || selected(datasets)) return;
578
580
  const node = await outlinerNode(datasets);
579
581
  checkpoint(id);
580
- const title = node?.span?.querySelector('.fancytree-title') ?? node?.span ?? null;
581
- if (title) await pointAt(() => title, id);
582
+ const title = () => node?.span?.querySelector('.fancytree-title') ?? node?.span ?? null;
583
+ if (title()) await pointAt(title, id);
582
584
  await click(id, () => select(datasets, node));
583
585
  }
584
586
 
585
- /** A button of a row in the Outliner (its eye, its bin) */
587
+ /** A button of a row in the Outliner (its eye, its bin), found again each frame: its row is drawn again on a click */
586
588
  async function outlinerButton(datasets, selector) {
587
- const span = (await outlinerNode(datasets))?.span;
588
- return span?.querySelector(selector) ?? span?.querySelector('.fancytree-title') ?? null;
589
+ const node = await outlinerNode(datasets);
590
+ return () => node?.span?.querySelector(selector) ?? node?.span?.querySelector('.fancytree-title') ?? null;
589
591
  }
590
592
 
591
593
  /** A global control's widget (View, Projection, Geographic Clipping…) and its folder */
@@ -620,20 +622,19 @@ function createPlayer(app, tutorial, { history, speed: startSpeed, onClose }) {
620
622
  return;
621
623
  }
622
624
  el.closest('.prism-control-row')?.scrollIntoView?.({ block: 'nearest' });
625
+ // The widget as the panel shows it now (a change may build the selection's controls again)
626
+ const shown = () => (widget()?.element?.isConnected ? widget().element : el);
623
627
  const range = el.type === 'range' && Number.isFinite(step.before) && Number.isFinite(step.after);
624
628
  if (!range) {
625
- await pointAt(() => el, id);
629
+ await pointAt(shown, id);
626
630
  await click(id, () => doStep(step));
627
631
  return;
628
632
  }
629
633
  // A slider: the pointer on its thumb, dragged to the value, the scene following
630
- await pointAt(
631
- () => el,
632
- id,
633
- () => thumbAt(el, step.before)
634
- );
634
+ await pointAt(shown, id, () => thumbAt(el, step.before));
635
635
  ui.ripple();
636
636
  let frames = 0;
637
+ gliding = true;
637
638
  await animate(
638
639
  TIMING.slide,
639
640
  (t) => {
@@ -646,7 +647,7 @@ function createPlayer(app, tutorial, { history, speed: startSpeed, onClose }) {
646
647
  }
647
648
  },
648
649
  id
649
- );
650
+ ).finally(() => (gliding = false));
650
651
  await doStep(step);
651
652
  checkpoint(id);
652
653
  await wait(TIMING.settle, id);
@@ -662,22 +663,23 @@ function createPlayer(app, tutorial, { history, speed: startSpeed, onClose }) {
662
663
  await clickLeg(step, () => place, id);
663
664
  }
664
665
 
665
- /** The pointer to a place, a click there: the step's action */
666
+ /** The pointer to a place (an element, or what finds it each frame), a click there: the step's action */
666
667
  async function clickLeg(step, target, id) {
667
- const el = await target();
668
+ const got = await target();
668
669
  checkpoint(id);
669
- if (el) await pointAt(() => el, id);
670
+ const find = typeof got === 'function' ? got : () => got;
671
+ if (find()) await pointAt(find, id);
670
672
  await click(id, () => doStep(step));
671
673
  }
672
674
 
673
675
  /**
674
676
  * The pointer glides to a place (its element's middle, or `at()`), the halo round the element
675
- * @param {Function} element - () => the element (read each frame: the page may lay it out again)
677
+ * @param {Function} element - () => the element (read each frame: the page may lay it out again, or draw it anew)
676
678
  */
677
679
  async function pointAt(element, id, at = null) {
678
680
  const el = element();
679
681
  if (!el) return;
680
- ui.halo(el);
682
+ ui.halo(element);
681
683
  const from = ui.at();
682
684
  await animate(
683
685
  TIMING.glide,
@@ -720,9 +722,12 @@ function createPlayer(app, tutorial, { history, speed: startSpeed, onClose }) {
720
722
  get tutorial() {
721
723
  return tutorial;
722
724
  },
723
- /** Where it stands: its phase, the step shown (-1 its title card, its step count at its end), playing, speed */
725
+ /**
726
+ * Where it stands: its phase, the step shown (-1 its title card, its step count at its end), playing, speed,
727
+ * whether a slider glides
728
+ */
724
729
  get state() {
725
- return { phase, pos, steps: n, playing, speed };
730
+ return { phase, pos, steps: n, playing, speed, gliding };
726
731
  },
727
732
  };
728
733
  return player;
@@ -957,6 +962,8 @@ function createOverlay(title, on) {
957
962
  let x = window.innerWidth / 2;
958
963
  let y = window.innerHeight / 2;
959
964
  let target = null;
965
+ // The last element the halo's target was (a finder may miss a frame while the page draws it again)
966
+ let last = null;
960
967
  let caption = null;
961
968
  let shown = false;
962
969
 
@@ -979,9 +986,10 @@ function createOverlay(title, on) {
979
986
  shown = visible;
980
987
  pointer.classList.toggle('shown', visible);
981
988
  },
982
- /** The halo round an element (null: none) */
989
+ /** The halo round an element, or round what a function finds each frame (null: none) */
983
990
  halo(el) {
984
991
  target = el;
992
+ last = null;
985
993
  if (!el) halo.classList.remove('shown');
986
994
  },
987
995
  caption(text) {
@@ -1033,7 +1041,10 @@ function createOverlay(title, on) {
1033
1041
  * sight), on the side towards the middle of the screen, else beside the pointer
1034
1042
  */
1035
1043
  follow() {
1036
- const r = target?.isConnected ? target.getBoundingClientRect() : null;
1044
+ const found = typeof target === 'function' ? target() : target;
1045
+ if (found?.isConnected) last = found;
1046
+ const el = last?.isConnected ? last : null;
1047
+ const r = el ? el.getBoundingClientRect() : null;
1037
1048
  const marked = !!r && (r.width > 0 || r.height > 0);
1038
1049
  halo.classList.toggle('shown', marked);
1039
1050
  if (marked) {
@@ -1054,7 +1065,7 @@ function createOverlay(title, on) {
1054
1065
  bubble.style.top = '96px';
1055
1066
  return;
1056
1067
  }
1057
- const row = target.closest?.('.prism-control-row, .fancytree-node') ?? target;
1068
+ const row = el.closest?.('.prism-control-row, .fancytree-node') ?? el;
1058
1069
  const a = row.getBoundingClientRect();
1059
1070
  const middle = (a.top + a.bottom) / 2;
1060
1071
  const toRight = (a.left + a.right) / 2 < window.innerWidth / 2;
@@ -200,12 +200,14 @@ export class MenuBar {
200
200
  * Create a MenuBar
201
201
  * @param {Object} [options={}] - Configuration options
202
202
  * @param {string} [options.logoUrl='logo/prism_logo_64x64.png'] - Logo image URL
203
+ * @param {string} [options.logoVideo] - The logo animated (a looping silent video, the picture its poster)
203
204
  * @param {string} [options.name='PRISM'] - The app's name (the logo's text)
204
205
  * @param {Object} [options.menus] - Custom menu structure (merges with defaults)
205
206
  */
206
207
  constructor(options = {}) {
207
208
  this.options = {
208
209
  logoUrl: options.logoUrl || 'logo/prism_logo_64x64.png',
210
+ logoVideo: options.logoVideo || null,
209
211
  name: options.name || 'PRISM',
210
212
  menus: { ...DEFAULT_MENUS, ...options.menus },
211
213
  };
@@ -264,6 +266,36 @@ export class MenuBar {
264
266
  }
265
267
  }
266
268
 
269
+ /**
270
+ * The logo: its looping silent video where one is given (its picture shown until it plays), else its picture
271
+ * @returns {HTMLElement}
272
+ * @private
273
+ */
274
+ _createLogo() {
275
+ const { logoUrl, logoVideo, name } = this.options;
276
+ if (!logoVideo) {
277
+ const img = document.createElement('img');
278
+ img.className = 'prism-menubar-logo';
279
+ img.src = logoUrl;
280
+ img.alt = name;
281
+ return img;
282
+ }
283
+ const video = document.createElement('video');
284
+ video.className = 'prism-menubar-logo animated';
285
+ video.poster = logoUrl;
286
+ // Silent, so it may start by itself
287
+ video.muted = true;
288
+ video.defaultMuted = true;
289
+ video.loop = true;
290
+ video.autoplay = true;
291
+ video.playsInline = true;
292
+ video.disablePictureInPicture = true;
293
+ video.setAttribute('muted', '');
294
+ video.setAttribute('aria-label', name);
295
+ video.src = logoVideo;
296
+ return video;
297
+ }
298
+
267
299
  /**
268
300
  * Create a menu item element
269
301
  * @param {Object} menu - Menu definition
@@ -283,11 +315,7 @@ export class MenuBar {
283
315
  trigger.className = 'prism-menu-trigger';
284
316
 
285
317
  if (menu.isLogo) {
286
- const logo = document.createElement('img');
287
- logo.className = 'prism-menubar-logo';
288
- logo.src = this.options.logoUrl;
289
- logo.alt = this.options.name;
290
- trigger.appendChild(logo);
318
+ trigger.appendChild(this._createLogo());
291
319
  } else {
292
320
  trigger.textContent = menu.label;
293
321
  }
@@ -524,6 +524,16 @@ video.prism-splash-logo {
524
524
  transform: scale(1.1);
525
525
  }
526
526
 
527
+ /* The animated logo (its video, MenuBar.js): its near-black ground dropped against the bar, its edges faded */
528
+ .prism-menubar-logo.animated {
529
+ width: 24px;
530
+ height: 24px;
531
+ margin: 0 7px;
532
+ mix-blend-mode: screen;
533
+ -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
534
+ mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
535
+ }
536
+
527
537
  .prism-menu-item {
528
538
  position: relative;
529
539
  height: 100%;
package/src/version.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "format": "prism-version/v1",
3
- "version": "1.0.1363",
3
+ "version": "1.0.1366",
4
4
  "release": "1.0",
5
- "build": 1363,
6
- "commit": "206bc18b",
5
+ "build": 1366,
6
+ "commit": "a8707695",
7
7
  "date": "2026-12-06"
8
8
  }