ciesm-prism 1.0.1362 → 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 +1 -1
- package/data/profile.json +6 -1
- package/data/tutorials/earthquakes-uup07.json +104 -0
- package/data/tutorials/geotraces-ga04n.json +69 -0
- package/data/tutorials/index.json +25 -0
- package/data/tutorials/medsea-temperature.json +123 -0
- package/data/tutorials/tsunami-world.json +106 -0
- package/logo/prism_logo_animated_192.mp4 +0 -0
- package/package.json +1 -1
- package/prism-app.html +22 -28
- package/src/app/Panels.js +13 -2
- package/src/app/Prism.js +34 -1
- package/src/history/ProjectHistory.js +58 -12
- package/src/tutorial/Tutorial.js +275 -0
- package/src/tutorial/TutorialPlayer.js +1088 -0
- package/src/tutorial/TutorialWindow.js +225 -0
- package/src/ui/components/ControlFactory.js +14 -0
- package/src/ui/components/MenuBar.js +38 -7
- package/src/ui/panels/HistoryPanel.js +14 -2
- package/src/ui/styles/main.css +134 -0
- package/src/version.json +3 -3
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
|
|
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": {
|
|
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
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "prism-tutorials/v1",
|
|
3
|
+
"items": [
|
|
4
|
+
{
|
|
5
|
+
"id": "tutorials-medsea-temperature",
|
|
6
|
+
"label": "MEDSEA Temperature: a volume",
|
|
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"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "prism-tutorial/v1",
|
|
3
|
+
"title": "MEDSEA Temperature: opacity, colours, clipping",
|
|
4
|
+
"start": { "example": "medsea-temperature" },
|
|
5
|
+
"intro": "The Mediterranean Sea temperature of the CMEMS reanalysis as 3-D volumes. Where to select a volume, change its opacity and its colour ramp, and cut it with the geographic clipping.",
|
|
6
|
+
"end": "Each volume has its controls in Visualization Controls once its row is selected in the Outliner. Edit > Undo takes these steps back one by one.",
|
|
7
|
+
"steps": [
|
|
8
|
+
{
|
|
9
|
+
"id": "s1",
|
|
10
|
+
"kind": "eye",
|
|
11
|
+
"label": "Hide MEDSEA Daily Temperature (2024-2025)",
|
|
12
|
+
"rows": [
|
|
13
|
+
{
|
|
14
|
+
"id": "01a24b50-5c38-73be-a7c7-337b6c89d77c",
|
|
15
|
+
"name": "MEDSEA Daily Temperature (2024-2025)",
|
|
16
|
+
"bundle": "medseaDaily"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"before": { "01a24b50-5c38-73be-a7c7-337b6c89d77c": true },
|
|
20
|
+
"after": { "01a24b50-5c38-73be-a7c7-337b6c89d77c": false },
|
|
21
|
+
"view": {
|
|
22
|
+
"camera": { "position": [0, 1.02, 1.12], "target": [0, -0.06, 0.06], "up": [0, 1, 0] },
|
|
23
|
+
"viewport": { "lonMin": -6.25, "lonMax": 36.25, "latMin": 30.25, "latMax": 46.25 },
|
|
24
|
+
"currentView": "persp",
|
|
25
|
+
"currentProjection": "planar",
|
|
26
|
+
"isOrthographic": false,
|
|
27
|
+
"elevationExaggerationSurface": 40,
|
|
28
|
+
"elevationExaggerationDepth": 40,
|
|
29
|
+
"clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
|
|
30
|
+
},
|
|
31
|
+
"caption": "Hide MEDSEA Daily Temperature (2024-2025)"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "s2",
|
|
35
|
+
"kind": "control",
|
|
36
|
+
"control": "opacity",
|
|
37
|
+
"label": "Opacity: 80% → 40% (MEDSEA Monthly Temperature)",
|
|
38
|
+
"rows": [{ "id": "01a24b50-59ed-7597-89d0-2b4c6c0aff22", "name": "MEDSEA Monthly Temperature", "bundle": "medsea" }],
|
|
39
|
+
"before": 0.8,
|
|
40
|
+
"after": 0.4,
|
|
41
|
+
"view": {
|
|
42
|
+
"camera": { "position": [0, 1.02, 1.12], "target": [0, -0.06, 0.06], "up": [0, 1, 0] },
|
|
43
|
+
"viewport": { "lonMin": -6.25, "lonMax": 36.25, "latMin": 30.25, "latMax": 46.25 },
|
|
44
|
+
"currentView": "persp",
|
|
45
|
+
"currentProjection": "planar",
|
|
46
|
+
"isOrthographic": false,
|
|
47
|
+
"elevationExaggerationSurface": 40,
|
|
48
|
+
"elevationExaggerationDepth": 40,
|
|
49
|
+
"clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
|
|
50
|
+
},
|
|
51
|
+
"caption": "Set MEDSEA Monthly Temperature's Opacity to 40 %"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "s3",
|
|
55
|
+
"kind": "gradient",
|
|
56
|
+
"label": "Color Ramp thermal (MEDSEA Monthly Temperature)",
|
|
57
|
+
"rows": [{ "id": "01a24b50-59ed-7597-89d0-2b4c6c0aff22", "name": "MEDSEA Monthly Temperature", "bundle": "medsea" }],
|
|
58
|
+
"before": {
|
|
59
|
+
"css": "linear-gradient(90deg, rgb(0,0,179) 0%, rgb(128,102,255) 14%, rgb(102,204,230) 29%, rgb(179,255,230) 43%, rgb(255,242,153) 57%, rgb(255,153,77) 71%, rgb(255,26,0) 100%)",
|
|
60
|
+
"colorRamp": { "name": "Rainbow PRISM" }
|
|
61
|
+
},
|
|
62
|
+
"after": {
|
|
63
|
+
"css": "linear-gradient(90deg, rgb(4,35,51) 0%, rgb(31,52,134) 14%, rgb(101,66,151) 29%, rgb(150,87,138) 43%, rgb(203,103,116) 57%, rgb(244,133,75) 71%, rgb(232,250,91) 100%)",
|
|
64
|
+
"colorRamp": { "name": "thermal" }
|
|
65
|
+
},
|
|
66
|
+
"view": {
|
|
67
|
+
"camera": { "position": [0, 1.02, 1.12], "target": [0, -0.06, 0.06], "up": [0, 1, 0] },
|
|
68
|
+
"viewport": { "lonMin": -6.25, "lonMax": 36.25, "latMin": 30.25, "latMax": 46.25 },
|
|
69
|
+
"currentView": "persp",
|
|
70
|
+
"currentProjection": "planar",
|
|
71
|
+
"isOrthographic": false,
|
|
72
|
+
"elevationExaggerationSurface": 40,
|
|
73
|
+
"elevationExaggerationDepth": 40,
|
|
74
|
+
"clipping": { "west": -180, "east": 180, "south": -90, "north": 90 }
|
|
75
|
+
},
|
|
76
|
+
"caption": "Set MEDSEA Monthly Temperature's Color Ramp to thermal"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "s4",
|
|
80
|
+
"kind": "clip",
|
|
81
|
+
"field": "west",
|
|
82
|
+
"userField": "userWest",
|
|
83
|
+
"bucket": "shared",
|
|
84
|
+
"rows": [],
|
|
85
|
+
"label": "Clipping West (°): -180.00° → 15.00°",
|
|
86
|
+
"before": -180,
|
|
87
|
+
"after": 15,
|
|
88
|
+
"view": {
|
|
89
|
+
"camera": { "position": [0, 1.02, 1.12], "target": [0, -0.06, 0.06], "up": [0, 1, 0] },
|
|
90
|
+
"viewport": { "lonMin": -6.25, "lonMax": 36.25, "latMin": 30.25, "latMax": 46.25 },
|
|
91
|
+
"currentView": "persp",
|
|
92
|
+
"currentProjection": "planar",
|
|
93
|
+
"isOrthographic": false,
|
|
94
|
+
"elevationExaggerationSurface": 40,
|
|
95
|
+
"elevationExaggerationDepth": 40,
|
|
96
|
+
"clipping": { "west": 15, "east": 180, "south": -90, "north": 90 }
|
|
97
|
+
},
|
|
98
|
+
"caption": "Set the clipping's West edge to 15.00°"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "s5",
|
|
102
|
+
"kind": "clip",
|
|
103
|
+
"field": "north",
|
|
104
|
+
"userField": "userNorth",
|
|
105
|
+
"bucket": "shared",
|
|
106
|
+
"rows": [],
|
|
107
|
+
"label": "Clipping North (°): 90.00° → 40.00°",
|
|
108
|
+
"before": 90,
|
|
109
|
+
"after": 40,
|
|
110
|
+
"view": {
|
|
111
|
+
"camera": { "position": [0, 1.02, 1.12], "target": [0, -0.06, 0.06], "up": [0, 1, 0] },
|
|
112
|
+
"viewport": { "lonMin": -6.25, "lonMax": 36.25, "latMin": 30.25, "latMax": 46.25 },
|
|
113
|
+
"currentView": "persp",
|
|
114
|
+
"currentProjection": "planar",
|
|
115
|
+
"isOrthographic": false,
|
|
116
|
+
"elevationExaggerationSurface": 40,
|
|
117
|
+
"elevationExaggerationDepth": 40,
|
|
118
|
+
"clipping": { "west": 15, "east": 180, "south": -90, "north": 40 }
|
|
119
|
+
},
|
|
120
|
+
"caption": "Set the clipping's North edge to 40.00°"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -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
package/prism-app.html
CHANGED
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
import { createApp, createVolumeEngine, linkProject, linkViewport } from './src/app/App.js';
|
|
189
189
|
import { BUNDLED, bundledDataset, isBundled } from './src/app/BundledData.js';
|
|
190
190
|
import { exampleStates } from './src/project/ExampleFile.js';
|
|
191
|
-
import { PRISM, applyView, select } from './src/app/Prism.js';
|
|
191
|
+
import { PRISM, applyView, captureView, select } from './src/app/Prism.js';
|
|
192
192
|
import { createCameraMotion } from './src/app/CameraMotion.js';
|
|
193
193
|
import { createControlFolders } from './src/app/ControlFolders.js';
|
|
194
194
|
import { createPanelDock } from './src/app/PanelDock.js';
|
|
@@ -202,6 +202,11 @@
|
|
|
202
202
|
// PRISM History (Undo/Redo): the project's one history
|
|
203
203
|
import { projectHistory } from './src/history/ProjectHistory.js';
|
|
204
204
|
|
|
205
|
+
// Tutorials: the history converted, played in the page (?tutorial=<name>, the Tutorials menu)
|
|
206
|
+
import { tutorialsMenu } from './src/tutorial/Tutorial.js';
|
|
207
|
+
import { playTutorialNamed, readTutorialsIndex } from './src/tutorial/TutorialPlayer.js';
|
|
208
|
+
import { openTutorialWindow } from './src/tutorial/TutorialWindow.js';
|
|
209
|
+
|
|
205
210
|
// PRISM Project System
|
|
206
211
|
import { projectManager, ProjectEvents } from './src/project/ProjectManager.js';
|
|
207
212
|
import { Dataset, DataSpec } from './src/project/Dataset.js';
|
|
@@ -416,12 +421,14 @@
|
|
|
416
421
|
// scenario URLs so the heavy datasets don't compete for the slot
|
|
417
422
|
// pool the example wants to use. Explicit `?autoload=...` overrides.
|
|
418
423
|
const _exampleKey = _urlParamsAutoload.get('example') || null;
|
|
424
|
+
// `?tutorial=<name>` plays data/tutorials/<name>.json once the page is up (it opens its own start)
|
|
425
|
+
const _tutorialName = _urlParamsAutoload.get('tutorial') || null;
|
|
419
426
|
const AUTOLOAD_MODE =
|
|
420
427
|
_autoloadRaw === 'full' ? 'full' :
|
|
421
428
|
(_autoloadRaw === 'false' || _autoloadRaw === 'none') ? 'none' :
|
|
422
429
|
_autoloadRaw === 'bare' ? 'bare' :
|
|
423
430
|
_autoloadRaw === 'minimal' ? 'minimal' :
|
|
424
|
-
_exampleKey ? 'bare' :
|
|
431
|
+
(_exampleKey || _tutorialName) ? 'bare' :
|
|
425
432
|
'minimal'; // coastlines + GEBCO only — lean dev baseline
|
|
426
433
|
APP.autoloadMode = AUTOLOAD_MODE;
|
|
427
434
|
APP.exampleKey = _exampleKey;
|
|
@@ -487,7 +494,8 @@
|
|
|
487
494
|
|
|
488
495
|
splash.setProgress(95, 'Setting up menu bar...');
|
|
489
496
|
// The menu bar and the optional panels, each hidden until opened
|
|
490
|
-
|
|
497
|
+
const [examples, tutorials] = await Promise.all([_readExamplesIndex(), readTutorialsIndex()]);
|
|
498
|
+
initPanels(examples, tutorials);
|
|
491
499
|
await sleep(100);
|
|
492
500
|
|
|
493
501
|
// The Outliner and the dock, with the page's own panels
|
|
@@ -571,6 +579,8 @@
|
|
|
571
579
|
splash.setProgress(100, 'Ready!');
|
|
572
580
|
await sleep(300);
|
|
573
581
|
await splash.hide();
|
|
582
|
+
// A tutorial asked by the address plays now (src/tutorial/TutorialPlayer.js)
|
|
583
|
+
if (_tutorialName) playTutorialNamed(APP, _tutorialName);
|
|
574
584
|
},
|
|
575
585
|
},
|
|
576
586
|
frame: {
|
|
@@ -1298,11 +1308,13 @@
|
|
|
1298
1308
|
let panels = null;
|
|
1299
1309
|
|
|
1300
1310
|
/** The optional panels and the menu bar, with the menu actions only this page has */
|
|
1301
|
-
function initPanels(examples) {
|
|
1311
|
+
function initPanels(examples, tutorials) {
|
|
1302
1312
|
panels = createPanels(APP, {
|
|
1303
|
-
// The app's Examples (with the plugins' submenus they name) and the plugins' menus
|
|
1313
|
+
// The app's Examples (with the plugins' submenus they name), its Tutorials and the plugins' menus
|
|
1314
|
+
// (before About)
|
|
1304
1315
|
menus: {
|
|
1305
1316
|
...(examples && { examples: examplesMenu(examples, EXAMPLES_PATH, APP.plugins) }),
|
|
1317
|
+
tutorials: tutorialsMenu(tutorials),
|
|
1306
1318
|
...pluginMenus(APP.plugins),
|
|
1307
1319
|
},
|
|
1308
1320
|
actions: {
|
|
@@ -1321,6 +1333,9 @@
|
|
|
1321
1333
|
'window:remote-data': () => APP.remoteDataPanel?.toggle(),
|
|
1322
1334
|
'window:console': () => APP.consolePanel?.toggle(),
|
|
1323
1335
|
'create:spinoff': () => APP.spinoffPanel?.show(),
|
|
1336
|
+
// The history's steps as a tutorial (File menu, History window), a tutorial played
|
|
1337
|
+
'file:convert-tutorial': () => openTutorialWindow(APP, { examples }),
|
|
1338
|
+
'tutorials:play': (item) => item?.tutorial && playTutorialNamed(APP, item.tutorial),
|
|
1324
1339
|
'about:shortcuts': () => _toggleShortcutHelp(),
|
|
1325
1340
|
// Every Examples entry: `item.file` points at a
|
|
1326
1341
|
// `data/examples/<key>.prism` file; `APP.handleExampleLoad`
|
|
@@ -1857,29 +1872,8 @@
|
|
|
1857
1872
|
// The stations load again with their bundle
|
|
1858
1873
|
APP._tsLoadComplete = false;
|
|
1859
1874
|
},
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
// moves (on the globe the scene is drawn with its twin: GlobeCamera.js)
|
|
1863
|
-
const cam = APP.userCamera ?? APP.camera;
|
|
1864
|
-
const ctrl = APP.controls;
|
|
1865
|
-
if (!cam || !ctrl) return null;
|
|
1866
|
-
return {
|
|
1867
|
-
camera: {
|
|
1868
|
-
position: [cam.position.x, cam.position.y, cam.position.z],
|
|
1869
|
-
target: [ctrl.target.x, ctrl.target.y, ctrl.target.z],
|
|
1870
|
-
up: [cam.up.x, cam.up.y, cam.up.z],
|
|
1871
|
-
},
|
|
1872
|
-
viewport: viewportManager.getEffectiveLatLonRange(),
|
|
1873
|
-
currentView: APP.currentView || 'persp',
|
|
1874
|
-
currentProjection: APP.currentProjection || 'planar',
|
|
1875
|
-
isOrthographic: APP.isOrthographic || false,
|
|
1876
|
-
elevationExaggerationSurface: APP.elevationExaggerationSurface,
|
|
1877
|
-
elevationExaggerationDepth: APP.elevationExaggerationDepth,
|
|
1878
|
-
clipping: clippingManager.box(),
|
|
1879
|
-
// Saved on the globe, its data viewport: centre, turn, box width (Kaveh 2026-11-14, "Save it")
|
|
1880
|
-
globe: APP.currentProjection === 'spherical' ? viewportManager.globe.state() : undefined,
|
|
1881
|
-
};
|
|
1882
|
-
},
|
|
1875
|
+
// The live view for a .prism save (Prism.js captureView: camera, projection, viewport, clipping)
|
|
1876
|
+
onSerializeView: () => captureView(APP),
|
|
1883
1877
|
|
|
1884
1878
|
onApplyView: _applyView,
|
|
1885
1879
|
});
|
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
|
-
|
|
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);
|
|
@@ -153,7 +159,12 @@ export function createPanels(app, page = {}) {
|
|
|
153
159
|
if (has.dataAnalysis) app.dataAnalysisPanel = new DataAnalysisPanel(document.body, { APP: app });
|
|
154
160
|
if (has.legend) app.legendPanel = new LegendPanel(document.body);
|
|
155
161
|
if (has.rawData) app.rawDataPanel = new RawDataPanel(document.body, { APP: app });
|
|
156
|
-
|
|
162
|
+
// With its Convert to Tutorial button where the page converts (prism-app)
|
|
163
|
+
if (has.history) {
|
|
164
|
+
app.historyPanel = new HistoryPanel(document.body, projectHistory, {
|
|
165
|
+
onConvert: actions['file:convert-tutorial'] ?? null,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
157
168
|
|
|
158
169
|
return {
|
|
159
170
|
/** A rendered frame: the Data Analysis sting gizmo keeps its size on screen */
|