-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (29 loc) · 1.19 KB
/
index.html
File metadata and controls
31 lines (29 loc) · 1.19 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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Spin The Wheel - By ttv/JasperDiscovers</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div id="app">
<div id="arrow">
<svg viewBox="0 0 10 30" width="13">
<polygon points="5,0 10,10, 5,30, 0,10" fill="rgb(184, 3, 124)"></polygon>
</svg>
</div>
<div id="board">
<div class="stud" v-for="(prize, index) in storedPrizes" :style="{transform: 'rotate(' + ((index * radius) - (radius / 2)) + 'deg)'}"></div>
<div id="wheel">
<div class="piece" v-for="(prize, index) in storedPrizes" :style="{transform: 'rotate(' + index * radius + 'deg)'}">
<div class="bg" :style="{transform: 'rotate(calc(360deg/' + index + '))'}"></div>
</div>
<p v-for="(prize, index) in storedPrizes" :style="{transform: 'translateX(-50%) rotate(' + ((index * radius) - (radius / 2)) + 'deg)'}">{{ prize }}</p>
</div>
</div>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenMax.min.js'></script>
<script src="./script.js"></script>
</body>
</html>