-
Notifications
You must be signed in to change notification settings - Fork 155
/
index.html
220 lines (207 loc) · 8.9 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<!--
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,600" />
<link rel="stylesheet" href="santaselfie-scene.css" />
</head>
<body>
<div id="module-santaselfie">
<div class="santaselfie">
<div class="scene">
<div class="Background-mirror">
<div class="Background-pole">
<div class="Background-pole--background"></div>
<div class="Background-pole--stripesContainer">
<div class="Background-pole--stripes"></div>
</div>
<div class="Background-pole--foreground"></div>
</div>
<div class="Background-photos"></div>
</div>
<div class="Background-chair"></div>
<div class="Buttons">
<button id="reset-button" class="Button Button--round Button--refresh"></button>
<button id="share-button" class="Button Button--round Button--share"></button>
</div>
<div class="Santa">
<div class="Body"></div>
<div class="Face Face--happy">
<div class="eye eye--left"></div>
<div class="eye eye--right"></div>
<div class="eyebrow eyebrow--left"></div>
<div class="eyebrow eyebrow--right"></div>
<div class="cheek cheek--left"></div>
<div class="cheek cheek--right"></div>
<canvas id="beard" class="beard"></canvas>
<div class="nose"></div>
<div class="mouth"></div>
</div>
</div>
<div class="Tools board">
<div class="Tools--scrollable">
<div class="Tool Tool-ornament"></div>
<div class="Tool-container Tool-shadow Tool-shadow--clipper Tool--mobile">
<div class="Tool Tool-clipper">
<div class="Tool-animation Tool-clipper--animate"></div>
</div>
</div>
<div class="Tool-container Tool-shadow Tool-shadow--hairgrow Tool--mobile">
<div class="Tool Tool-hairgrow">
<div class="Tool-animation Tool-hairgrow--animate"></div>
</div>
</div>
<div class="Tool-container Tool-shadow Tool-shadow--hairclean">
<div class="Tool Tool-hairclean">
<div class="Tool-animation Tool-hairclean--animate"></div>
</div>
</div>
<div class="Tool-container Tool-shadow Tool-shadow--hairdryer Tool--mobile">
<div class="Tool Tool-hairdryer"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray Tool--mobile">
<div class="Tool Tool-spray Tool-spray--red"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray">
<div class="Tool Tool-spray Tool-spray--orange"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray">
<div class="Tool Tool-spray Tool-spray--yellow"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray Tool--mobile">
<div class="Tool Tool-spray Tool-spray--green"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray Tool--mobile">
<div class="Tool Tool-spray Tool-spray--cyan"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray">
<div class="Tool Tool-spray Tool-spray--purple"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray">
<div class="Tool Tool-spray Tool-spray--pink"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--spray">
<div class="Tool Tool-spray Tool-spray--blue"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--snowman">
<div class="Tool Tool-decoration Tool-decoration--snowman"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--bauble">
<div class="Tool Tool-decoration Tool-decoration--bauble"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--bow">
<div class="Tool Tool-decoration Tool-decoration--bow"></div>
</div>
<div class="Tool-container Tool-container--small Tool-shadow Tool-shadow--holly">
<div class="Tool Tool-decoration Tool-decoration--holly"></div>
</div>
</div>
</div>
<!-- These images are use by canvases-->
<div class="hidden">
<img id="spray--red" src="img/tools/sprays/red.png" width="128" height="128" />
<img id="spray--orange" src="img/tools/sprays/orange.png" width="128" height="128" />
<img id="spray--yellow" src="img/tools/sprays/yellow.png" width="128" height="128" />
<img id="spray--green" src="img/tools/sprays/green.png" width="128" height="128" />
<img id="spray--cyan" src="img/tools/sprays/cyan.png" width="128" height="128" />
<img id="spray--purple" src="img/tools/sprays/purple.png" width="128" height="128" />
<img id="spray--pink" src="img/tools/sprays/pink.png" width="128" height="128" />
<img id="spray--blue" src="img/tools/sprays/blue.png" width="128" height="128" />
<img id="snowman" src="img/tools/decorations/snowman.svg" width="84" height="138" />
<img id="bauble" src="img/tools/decorations/bauble.svg" width="75" height="128" />
<img id="bow" src="img/tools/decorations/bow.svg" width="127" height="94" />
<img id="holly" src="img/tools/decorations/holly.svg" width="120" height="138" />
</div>
</div>
</div>
</div>
<script src="../../node_modules/web-animations-js/web-animations-next.min.js"></script>
<script src="../../node_modules/jquery/dist/jquery.min.js"></script>
<script type="module">
import api from '../../src/scene/api.js';
import Game from './:closure.js';
api.preload.sounds('selfie_load_sounds');
api.preload.images(
'img/background/chair.svg',
'img/background/mirror.svg',
'img/background/photos.svg',
'img/background/pole--background.svg',
'img/background/pole--foreground.svg',
'img/background/pole--stripes.svg',
'img/face/eye--blink.svg',
'img/face/eye--closed.svg',
'img/face/eye.svg',
'img/face/mouth--breath.svg',
'img/face/mouth--smile.svg',
'img/face/nose.svg',
'img/icons/reset.svg',
'img/loading.svg',
'img/pole.svg',
'img/santa/body.svg',
'img/santa/face.svg',
'img/share.svg',
'img/sprites/clipper.png',
'img/sprites/hairclean.png',
'img/sprites/hairgrow.png',
'img/tools/clipper.svg',
'img/tools/decorations/bauble.svg',
'img/tools/decorations/bow.svg',
'img/tools/decorations/holly.svg',
'img/tools/decorations/snowman.svg',
'img/tools/hairclean.svg',
'img/tools/hairdryer--center.svg',
'img/tools/hairdryer--left.svg',
'img/tools/hairdryer--right.svg',
'img/tools/hairgrow.svg',
'img/tools/shadows/bauble.svg',
'img/tools/shadows/bow.svg',
'img/tools/shadows/clipper.svg',
'img/tools/shadows/hairclean.svg',
'img/tools/shadows/hairdryer.svg',
'img/tools/shadows/hairgrow.svg',
'img/tools/shadows/holly.svg',
'img/tools/shadows/snowman.svg',
'img/tools/shadows/spray.svg',
'img/tools/spray--blue.svg',
'img/tools/spray--cyan.svg',
'img/tools/spray--green.svg',
'img/tools/spray--orange.svg',
'img/tools/spray--pink.svg',
'img/tools/spray--purple.svg',
'img/tools/spray--red.svg',
'img/tools/spray--yellow.svg',
'img/tools/sprays/blue.png',
'img/tools/sprays/cyan.png',
'img/tools/sprays/green.png',
'img/tools/sprays/orange.png',
'img/tools/sprays/pink.png',
'img/tools/sprays/purple.png',
'img/tools/sprays/red.png',
'img/tools/sprays/yellow.png',
'img/tray_lg.svg',
'img/tray_ornament_lg.svg',
);
const game = new Game(document.getElementById('module-santaselfie'), (data) => api.data(data));
api.config({
sound: ['music_start_ingame', 'selfie_start'],
});
api.ready(async (data) => {
game.start(data);
});
</script>
</body>
</html>