forked from mrdoob/Starter-Kit-Racing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (55 loc) · 2.44 KB
/
index.html
File metadata and controls
55 lines (55 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Racing</title>
<style>
body { margin: 0; overflow: hidden; background: #000; }
canvas { display: block; touch-action: none; }
.corner-link {
position: absolute;
color: #1f2430;
font: 400 13px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
text-decoration: none;
background: rgba(255,255,255,0.92);
padding: 9px 18px;
border-radius: 999px;
border: 1px solid rgba(0,0,0,0.06);
box-shadow: 0 4px 14px rgba(0,0,0,0.18);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
z-index: 10;
transition: background 0.15s;
}
.corner-link:hover { background: #fff; }
#editor-link { bottom: 12px; right: 12px; }
#github-link { top: 12px; right: 12px; padding: 8px; line-height: 0; }
#github-link svg { display: block; width: 20px; height: 20px; }
</style>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.184.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.184.0/examples/jsm/",
"crashcat": "https://esm.sh/crashcat@0.0.3"
}
}
</script>
</head>
<body>
<a id="github-link" class="corner-link" href="https://github.com/mrdoob/Starter-Kit-Racing" aria-label="View source on GitHub">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56v-2.05c-3.2.7-3.88-1.36-3.88-1.36-.52-1.34-1.28-1.69-1.28-1.69-1.05-.71.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.55-.29-5.23-1.28-5.23-5.69 0-1.26.45-2.29 1.19-3.1-.12-.29-.51-1.46.11-3.05 0 0 .97-.31 3.18 1.18.92-.26 1.91-.39 2.89-.39.98 0 1.97.13 2.89.39 2.21-1.5 3.18-1.18 3.18-1.18.62 1.59.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1 0 4.42-2.69 5.39-5.25 5.68.41.36.78 1.06.78 2.13v3.16c0 .31.21.67.79.56C20.21 21.39 23.5 17.07 23.5 12 23.5 5.65 18.35.5 12 .5z"/></svg>
</a>
<a id="editor-link" class="corner-link" href="editor.html">Create new track</a>
<script>
const map = new URLSearchParams( location.search ).get( 'map' );
if ( map ) {
const link = document.getElementById( 'editor-link' );
link.href = 'editor.html?map=' + map;
link.textContent = 'Edit this track';
}
</script>
<script type="module" src="js/main.js"></script>
</body>
</html>