Skip to content

Commit 37a1c3e

Browse files
committed
Format with prettier
1 parent 40e7e10 commit 37a1c3e

3 files changed

Lines changed: 79 additions & 70 deletions

File tree

examples/map-server/mcp-app.html

Lines changed: 71 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,83 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>CesiumJS Globe</title>
77
<!-- CesiumJS is loaded dynamically from CDN in mcp-app.ts because static
88
<script src=""> tags don't work in srcdoc iframes -->
99
<style>
10-
html, body {
11-
width: 100%;
12-
height: 100%;
13-
margin: 0;
14-
padding: 0;
15-
overflow: hidden;
16-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
17-
background: transparent;
18-
}
19-
#cesiumContainer {
20-
width: 100%;
21-
height: 100%;
22-
touch-action: none;
23-
}
24-
#fullscreen-btn {
25-
position: absolute;
26-
top: 10px;
27-
right: 10px;
28-
width: 36px;
29-
height: 36px;
30-
background: rgba(0, 0, 0, 0.7);
31-
border: none;
32-
border-radius: 6px;
33-
cursor: pointer;
34-
z-index: 1000;
35-
display: none;
36-
align-items: center;
37-
justify-content: center;
38-
transition: background 0.2s;
39-
}
40-
#fullscreen-btn:hover {
41-
background: rgba(0, 0, 0, 0.85);
42-
}
43-
#fullscreen-btn svg {
44-
width: 20px;
45-
height: 20px;
46-
fill: white;
47-
}
48-
#loading {
49-
position: absolute;
50-
top: 50%;
51-
left: 50%;
52-
transform: translate(-50%, -50%);
53-
background: rgba(0, 0, 0, 0.8);
54-
color: white;
55-
padding: 20px 30px;
56-
border-radius: 8px;
57-
font-size: 16px;
58-
z-index: 1001;
59-
}
10+
html,
11+
body {
12+
width: 100%;
13+
height: 100%;
14+
margin: 0;
15+
padding: 0;
16+
overflow: hidden;
17+
font-family:
18+
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
19+
background: transparent;
20+
}
21+
#cesiumContainer {
22+
width: 100%;
23+
height: 100%;
24+
touch-action: none;
25+
}
26+
#fullscreen-btn {
27+
position: absolute;
28+
top: 10px;
29+
right: 10px;
30+
width: 36px;
31+
height: 36px;
32+
background: rgba(0, 0, 0, 0.7);
33+
border: none;
34+
border-radius: 6px;
35+
cursor: pointer;
36+
z-index: 1000;
37+
display: none;
38+
align-items: center;
39+
justify-content: center;
40+
transition: background 0.2s;
41+
}
42+
#fullscreen-btn:hover {
43+
background: rgba(0, 0, 0, 0.85);
44+
}
45+
#fullscreen-btn svg {
46+
width: 20px;
47+
height: 20px;
48+
fill: white;
49+
}
50+
#loading {
51+
position: absolute;
52+
top: 50%;
53+
left: 50%;
54+
transform: translate(-50%, -50%);
55+
background: rgba(0, 0, 0, 0.8);
56+
color: white;
57+
padding: 20px 30px;
58+
border-radius: 8px;
59+
font-size: 16px;
60+
z-index: 1001;
61+
}
6062
</style>
61-
</head>
62-
<body>
63+
</head>
64+
<body>
6365
<div id="cesiumContainer"></div>
6466
<button id="fullscreen-btn" title="Toggle fullscreen">
65-
<!-- Expand icon (shown when inline) -->
66-
<svg id="expand-icon" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>
67-
<!-- Compress icon (shown when fullscreen) -->
68-
<svg id="compress-icon" style="display:none" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>
67+
<!-- Expand icon (shown when inline) -->
68+
<svg id="expand-icon" viewBox="0 0 24 24">
69+
<path
70+
d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"
71+
/>
72+
</svg>
73+
<!-- Compress icon (shown when fullscreen) -->
74+
<svg id="compress-icon" style="display: none" viewBox="0 0 24 24">
75+
<path
76+
d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"
77+
/>
78+
</svg>
6979
</button>
7080
<div id="loading">Loading globe...</div>
7181
<script type="module" src="/src/mcp-app.ts"></script>
72-
</body>
82+
</body>
7383
</html>

examples/shadertoy-server/src/mcp-app.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
html, body {
1+
html,
2+
body {
23
margin: 0;
34
width: 100%;
45
height: 100%;
@@ -19,15 +20,13 @@ html, body {
1920
border-radius: 0;
2021
}
2122

22-
2323
#canvas {
2424
width: 100%;
2525
height: 100%;
2626
display: block;
2727
touch-action: none;
2828
}
2929

30-
3130
#canvas.hidden {
3231
display: none;
3332
}
@@ -71,7 +70,9 @@ html, body {
7170
display: none; /* Hidden by default, shown when fullscreen available */
7271
align-items: center;
7372
justify-content: center;
74-
transition: background 0.2s, opacity 0.2s;
73+
transition:
74+
background 0.2s,
75+
opacity 0.2s;
7576
opacity: 0; /* Initially invisible, shown on View hover */
7677
z-index: 100;
7778
}

examples/wiki-explorer-server/src/mcp-app.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,9 @@ const graph = new ForceGraph<NodeData, LinkData>(container)
117117
const graphCanvas = container.querySelector("canvas");
118118
if (graphCanvas) {
119119
for (const eventName of ["touchstart", "touchmove"] as const) {
120-
graphCanvas.addEventListener(
121-
eventName,
122-
(e) => e.preventDefault(),
123-
{ passive: false },
124-
);
120+
graphCanvas.addEventListener(eventName, (e) => e.preventDefault(), {
121+
passive: false,
122+
});
125123
}
126124
}
127125

0 commit comments

Comments
 (0)