-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
117 lines (102 loc) · 5.87 KB
/
index.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
<title>Web Game Controller</title>
<meta charset="utf-8">
<link rel="icon" type="image/svg+xml" href="/icon.svg">
<script type="text/javascript" src="gamepad.js"></script>
<link rel="stylesheet" href="/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#282a2e">
<meta property="og:title" content="Web game controller">
<meta property="og:description" content="Gamepad API and Gamepad Haptics API in action.">
<meta property="og:url" content="https://gamepad.berryscript.com">
<meta property="og:image" content="/thumb.png">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Web game controller">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="referrer" content="origin-when-cross-origin">
<meta name="description" content="Gamepad API and Gamepad Haptics API in action.">
<meta name="keywords" content="javascript,game,gamedev,video-games,webgl,games,web,discord,video-game,webapp,game-dev">
<link rel="shortcut icon" href="/icon.svg">
<meta name="next-head-count" content="24">
<meta name="robots" content="all">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-180205191-3"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-180205191-3');</script>
</head>
<body>
<h2 id="start">
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24"><g><rect fill="none" height="24" width="24"></rect></g><g><g><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z" fill="currentColor"></path></g></g></svg>
<a class="status">Press start</a>
</h2>
<div class="print">Connect a wireless controller</div>
<div class="button help">How to connect</div>
<div class="buttons">
<div class="button rumble">Rumble!</div>
<div class="button rumble double">Double rumble!!</div>
<div class="button rumble godlike">Godlike rumble!!!!!</div>
</div>
<div class="footer">
<a href="https://berryscript.com" class="link"></a>
<a class="message">Made by Ben with </a>
<img src="/emoji/Red-Heart-Emoji.png" width="17" height="17" style="opacity:.5">
</div>
<div class="github" title="Fork on Github" onclick="window.location.href = 'https://github.com/benhatsor/web-game-controller'">
<svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" fill="currentColor"></path></svg>
</div>
<div class="dialog-wrapper">
<div class="dialog">
<div class="dialog-header">
<div class="dialog-title">Connect a controller</div>
<div class="dialog-close">
<svg aria-hidden="false" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"></path></svg>
</div>
</div>
<div class="dialog-content">
<div class="dialog-radiogroup">
<div class="radio-box checked" id="playstation">
<svg aria-hidden="false" width="24" height="24" viewBox="0 0 24 24" class="radio-button">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
fill="currentColor"
></path>
<circle cx="12" cy="12" r="5" class="radio-fill" fill="currentColor"></circle>
</svg>
<a>PlayStation</a>
</div>
<div class="radio-box" id="xbox">
<svg aria-hidden="false" width="24" height="24" viewBox="0 0 24 24" class="radio-button">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
fill="currentColor"
></path>
<circle cx="12" cy="12" r="5" class="radio-fill" fill="currentColor"></circle>
</svg>
<a>Xbox</a>
</div>
</div>
<div class="dialog-video-container">
<iframe width="100%" height="315" src="https://www.youtube-nocookie.com/embed/pe9rAJMJq8c" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
<div class="dialog-footer"><div class="button primary dialog-done">Done</div></div>
</div>
</div>
<div class="splash"></div>
<div class="emoji-preloader">
<img src="/emoji/Up-Arrow-Emoji.png">
<img src="/emoji/Down-Arrow-Emoji.png">
<img src="/emoji/Left-Arrow-Emoji.png">
<img src="/emoji/Right-Arrow-Emoji.png">
<img src="/emoji/Index-Pointing-Up-Emoji.png">
<img src="/emoji/Backhand-Index-Pointing-Up-Emoji.png">
<img src="/emoji/Play-Button-Emoji.png">
<img src="/emoji/Pistol-Emoji.png">
<img src="/emoji/House-Emoji.png">
<img src="/emoji/Window-Emoji.png">
</div>
</body>
</html>