-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
57 lines (51 loc) · 2.45 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
<!--
This is a p5.js page where the user plays
Rock, Paper, Scissors game against a CPU,
taking as input a picture of the user's hand,
recognized by a Google Teachable Machine image
AI model, and pressing a button to capture it.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rock Paper Scissors with AI!</title>
<!-- Loading p5.js and Google TM libraries -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script src="https://unpkg.com/ml5@latest/dist/ml5.min.js" type="text/javascript"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Merriweather&display=swap" rel="stylesheet">
</head>
<body class="bb" id="body">
<div class="container text-center">
<div class="row">
<div class="col col-3"></div>
<div class="col col-6">
<div class="row">
<h1 id="title" class="bb">RPS: Albuquerque Edition</h1>
<p><b>Play RPS against Albuquerque's baddest!</b><br>
Make your choice by placing your hand near the camera and press go! <br>
If your choice is not being recognized, try putting your hand in front
of a white background.
</p>
<button id ="button" class="bb" type="button" disabled>Go!</button>
</div>
</div>
<div class="col col-3"></div>
</div>
<div class="row">
<div class="col col-2"></div>
<div class="col col-8" id="forCanvas"></div>
<div class="col col-2"></div>
</div>
</div>
<button id="skinToggler" class="btn bcs" type="button" onclick="swapSkins()">.......</button>
</body>
<script src="sketch.js"></script>
</html>