-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathavatar.html
474 lines (421 loc) · 14.3 KB
/
avatar.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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
<!DOCTYPE html>
<html>
<head>
<title>SWGOH Tools - Avatar Creator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<meta charset="utf-8" />
<style>
p { max-width: 800px;}
.swgoh_ad {
position: absolute;
left:0;
top:90px;
width:0;
height:0px;
}
#ad {
width:100%;
height:60px;
}
.hint {
color: #999;
font-size: 0.8em;
}
#canvasContainer {
width:310px;
height:310px;
}
#canvasCrop {
width: 300px;
height: 300px;
border: 3px solid #bd8b28;
cursor: move;
z-index: 1;
}
.overlay {
width: 300px;
height: 300px;
position: absolute;
margin-top: 3px;
margin-left: 3px;
z-index: 2;
cursor: move;
display: none;
}
#overlay_13s, #overlay_l85s, #overlay_s7 {
display: block;
}
#controls {
width: 306px;
text-align: center;
display: none;
}
#uploadbuttons {
margin-top: 20px;
width: 306px;
text-align: center;
}
#downloadbuttons {
margin-top: 10px;
margin-bottom: 40px;
width: 306px;
text-align: center;
display: none;
}
#canvasContainer.rotateLeft #canvasCrop {
transform:rotate(270deg);
-ms-transform:rotate(270deg); /* IE 9 */
-webkit-transform:rotate(270deg);
}
#canvasContainer.rotateRight #canvasCrop {
transform:rotate(90deg);
-ms-transform:rotate(90deg); /* IE 9 */
-webkit-transform:rotate(90deg);
}
#canvasContainer.rotateUp #canvasCrop {
transform:rotate(180deg);
-ms-transform:rotate(180deg); /* IE 9 */
-webkit-transform:rotate(180deg);
}
p#cropLabel {
color: #999;
font-size: 0.8em;
margin:0px;
text-align: center;
width: 306px;
}
#chooseafile {
display: inline-block;
text-align: center;
}
#chooseafile .inputfile {
margin: 0 auto;
}
.inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
}
.inputfile + label {
-webkit-border-radius: 11;
-moz-border-radius: 11;
border-radius: 11px;
font-family: Georgia;
color: #422e07;
font-size: 17px;
background: #e0af1d;
padding: 10px 20px 10px 20px;
border: solid #bd8b28 2px;
text-decoration: none;
}
.inputfile:hover + label {
color: #e0af1d;
background: #422e07;
text-decoration: none;
cursor: pointer;
}
.no-js .inputfile + label {
display: none;
}
.inputfile:focus + label,
.inputfile.has-focus + label {
outline: 1px dotted #000;
outline: -webkit-focus-ring-color auto 5px;
}
.inputfile + label img,
#js_startWebcam img {
width: 1em;
height: 1em;
vertical-align: middle;
fill: currentColor;
margin-top: -0.25em;
margin-right: 0.25em;
}
.inputfile:focus + label,
.inputfile.has-focus + label,
.inputfile + label:hover {
color: #e0af1d;
background: #422e07;
text-decoration: none;
cursor: pointer;
}
.circle_btn {
width: 45px;
height: 45px;
text-align: center;
border-radius: 100%;
display: inline-block;
position: relative;
}
select {
margin-top:5px;
}
.zoom_btn,
.rotate_btn {
line-height: 39px;
font-size: 2.8em;
color: white;
cursor: pointer;
}
.rotate_btn .height-adjuster {
opacity: 0;
}
.rotate_btn img {
position: absolute;
top: 7px;
left: 10px;
width: 24px;
height: auto;
}
.btn_label {
display: inline-block;
margin: 10px;
text-align: center;
width: 75px;
vertical-align: top;
}
.btn_label h4 {
font-size: 14px;
opacity: .6;
margin: 10px 0px 10px 0px;
}
.btn_label:hover h4 {
opacity: 1;
}
.btn_black {
background-color: #1E252C;
}
.btn_black:hover {
background-color: #22282f;
}
#webcamerror, #js_takePhoto {
display: none;
}
#video {
display: none;
}
@media (max-width: 1072px) {
.ninthAvatar {
display: none;
}
}
@media (max-width: 666px) {
.ninthAvatar {
display: inline-block;
}
}
@media (max-width: 510px) {
.ninthAvatar {
display: none;
}
}
@media (max-width: 354px) {
.half.textcenter {
text-align: center;
}
.ninthAvatar {
display: inline-block;
}
}
@media(min-width: 520px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 328px; height: 90px; } }
@media(min-width: 720px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 528px; height: 90px; } }
@media(min-width: 920px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 728px; height: 90px; } }
@media(min-width: 1200px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 1000px; height: 90px; } }
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script src="jquery.js"></script>
<script src="photo.js"></script>
</head>
<body>
<div id="top">
<a href="http://www.swgoh.life/index.html" id="logoClick"></a>
<div id="ad">
<!-- Swgoh.life -->
<ins class="adsbygoogle swgoh_ad"
style="display:block"
data-ad-client="ca-pub-0176506581219642"
data-ad-slot="9855290481"
data-ad-format="horizontal"></ins>
<script>
//https://support.google.com/adsense/answer/6307124
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
<div id="middleSolo">
<h1><a href="http://www.swgoh.life/index.html">More Tools</a> > Avatar Creator</h1>
<p>Create your own SWGOH Avatar! Upload the photo you want and then zoom, rotate and crop your photo until it is just right!</p>
<div class="half">
<p id="error" class="small dim" style="display:none;"><b>Oops!</b> The file you uploaded was either too big or was not an image. Please choose a file with the extension .gif, .png or .jpg.</p>
<div id="canvasContainer">
<img src="images/avatar_13s.png" id="overlay_13s" class="overlay" />
<img src="images/avatar_1s.png" id="overlay_1s" class="overlay" />
<img src="images/avatar_2s.png" id="overlay_2s" class="overlay" />
<img src="images/avatar_3s.png" id="overlay_3s" class="overlay" />
<img src="images/avatar_4s.png" id="overlay_4s" class="overlay" />
<img src="images/avatar_5s.png" id="overlay_5s" class="overlay" />
<img src="images/avatar_6s.png" id="overlay_6s" class="overlay" />
<img src="images/avatar_7s.png" id="overlay_7s" class="overlay" />
<img src="images/avatar_8s.png" id="overlay_8s" class="overlay" />
<img src="images/avatar_9s.png" id="overlay_9s" class="overlay" />
<img src="images/avatar_10s.png" id="overlay_10s" class="overlay" />
<img src="images/avatar_11s.png" id="overlay_11s" class="overlay" />
<img src="images/avatar_12s.png" id="overlay_12s" class="overlay" />
<img src="images/avatar_l1s.png" id="overlay_l1s" class="overlay" />
<img src="images/avatar_l10s.png" id="overlay_l10s" class="overlay" />
<img src="images/avatar_l55s.png" id="overlay_l55s" class="overlay" />
<img src="images/avatar_l60s.png" id="overlay_l60s" class="overlay" />
<img src="images/avatar_l69s.png" id="overlay_l69s" class="overlay" />
<img src="images/avatar_l70s.png" id="overlay_l70s" class="overlay" />
<img src="images/avatar_l80s.png" id="overlay_l80s" class="overlay" />
<img src="images/avatar_l84s.png" id="overlay_l84s" class="overlay" />
<img src="images/avatar_l85s.png" id="overlay_l85s" class="overlay" />
<img src="images/avatar_l99s.png" id="overlay_l99s" class="overlay" />
<img src="images/avatar_s0.png" id="overlay_s0" class="overlay" />
<img src="images/avatar_s1.png" id="overlay_s1" class="overlay" />
<img src="images/avatar_s2.png" id="overlay_s2" class="overlay" />
<img src="images/avatar_s3.png" id="overlay_s3" class="overlay" />
<img src="images/avatar_s4.png" id="overlay_s4" class="overlay" />
<img src="images/avatar_s5.png" id="overlay_s5" class="overlay" />
<img src="images/avatar_s6.png" id="overlay_s6" class="overlay" />
<img src="images/avatar_s7.png" id="overlay_s7" class="overlay" />
<img src="images/avatar_1.png" id="overlay_1" class="overlay" />
<img src="images/avatar_2.png" id="overlay_2" class="overlay" />
<img src="images/avatar_3.png" id="overlay_3" class="overlay" />
<img src="images/avatar_4.png" id="overlay_4" class="overlay" />
<img src="images/avatar_5.png" id="overlay_5" class="overlay" />
<img src="images/avatar_6.png" id="overlay_6" class="overlay" />
<img src="images/avatar_7.png" id="overlay_7" class="overlay" />
<img src="images/avatar_8.png" id="overlay_8" class="overlay" />
<img src="images/avatar_9.png" id="overlay_9" class="overlay" />
<img src="images/avatar_10.png" id="overlay_10" class="overlay" />
<img src="images/avatar_11.png" id="overlay_11" class="overlay" />
<img src="images/avatar_12.png" id="overlay_12" class="overlay" />
<img src="images/avatar_13.png" id="overlay_13" class="overlay" />
<img src="images/avatar_l1.png" id="overlay_l1" class="overlay" />
<img src="images/avatar_l10.png" id="overlay_l10" class="overlay" />
<img src="images/avatar_l55.png" id="overlay_l55" class="overlay" />
<img src="images/avatar_l60.png" id="overlay_l60" class="overlay" />
<img src="images/avatar_l69.png" id="overlay_l69" class="overlay" />
<img src="images/avatar_l70.png" id="overlay_l70" class="overlay" />
<img src="images/avatar_l80.png" id="overlay_l80" class="overlay" />
<img src="images/avatar_l84.png" id="overlay_l84" class="overlay" />
<img src="images/avatar_l85.png" id="overlay_l85" class="overlay" />
<img src="images/avatar_l99.png" id="overlay_l99" class="overlay" />
<div id="canvasCrop"></div>
</div>
<p id="cropLabel" style="display:none">Drag image to crop</p>
<div id="controls">
<div class="btn_label">
<a id="magup" class="circle_btn btn_black zoom_btn">+</a>
<h4>Zoom In</h4>
</div>
<div class="btn_label">
<a id="rotate" class="circle_btn btn_black rotate_btn"><img src="images/rotate.svg"/><span class="height-adjuster">r</span></a>
<h4>Rotate</h4>
</div>
<div class="btn_label">
<a id="magdown" class="circle_btn btn_black zoom_btn">-</a>
<h4>Zoom Out</h4>
</div>
</div>
<div id="downloadbuttons">
<select id="rarity">
<option value="7" selected="selected">7*</option>
<option value="6">6*</option>
<option value="5">5*</option>
<option value="4">4*</option>
<option value="3">3*</option>
<option value="2">2*</option>
<option value="1">1*</option>
<option value="0">0*</option>
</select> <input type="checkbox" id="stars" value="1" checked="checked" />Show Stars<br />
<select id="gear">
<option value="13" selected="selected">Gear 13</option>
<option value="12">Gear 12</option>
<option value="11">Gear 11</option>
<option value="10">Gear 10</option>
<option value="9">Gear 9</option>
<option value="8">Gear 8</option>
<option value="7">Gear 7</option>
<option value="6">Gear 6</option>
<option value="5">Gear 5</option>
<option value="4">Gear 4</option>
<option value="3">Gear 3</option>
<option value="2">Gear 2</option>
<option value="1">Gear 1</option>
</select><br />
<select id="level">
<option value="99">Level 99</option>
<option value="85" selected="selected">Level 85</option>
<option value="84">Level 84</option>
<option value="80">Level 80</option>
<option value="70">Level 70</option>
<option value="69">Level 69</option>
<option value="60">Level 60</option>
<option value="55">Level 55</option>
<option value="10">Level 10</option>
<option value="1">Level 1</option>
</select><br />
<br /><br />
<a class="btn" id="js_download">Download SWGOH Avatar</a>
<span class="hint"><br /><br />Downloads don't seem to work from inside the Reddit app, so switch to your web browser if it isn't working.</span>
</div>
<div id="uploadbuttons">
<div id="chooseafile">
<input type="file" accept="image/*" name="file" id="fileInput" class="inputfile" />
<label for="fileInput"><img src="images/upload.svg" /><span id="file-prompt">Select a Photo</span></label>
</div>
<a class="btn" style="display:none" id="js_startWebcam"><img src="images/camera.svg" />Webcam</a>
<span class="hint"><br /><br />
Nothing is uploaded to our servers. All the magic happens in your web browser.
</span>
</div>
<!-- Invisible But necessary elements -->
<img src="images/sampleBlank.png" id="sample" style="display:none;" />
<canvas width="500" height="500" id="canvasOut" style="display:none;"></canvas>
<!-- Invisible But necessary elements -->
<p id="webcamerror">There was a "<span id="errordetails"></span>" error connecting to your webcam. Sorry! Please make sure that you have a webcam and that you give permission for our website to access it.</p>
<video id="video" width="300" height="300" autoplay></video>
<br />
<a class="btn" id="js_takePhoto">Snap Photo</a>
</div>
<div class="half textcenter">
<h3>Examples</h3>
<img src="images/avatars/c3po.png" width="150" height="150" />
<img src="images/avatars/porg.png" width="150" height="150" />
<img src="images/avatars/jarjar.png" width="150" height="150" />
<img src="images/avatars/doc.png" width="150" height="150" />
<img src="images/avatars/carbonite.png" width="150" height="150" />
<img src="images/avatars/anakin.png" width="150" height="150" />
<img src="images/avatars/bender.png" width="150" height="150" />
<img src="images/avatars/spock.png" width="150" height="150" />
<img src="images/avatars/cat.png" width="150" height="150" class="ninthAvatar" />
</div>
<br /><br /><hr /><ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-format="fluid"
data-ad-layout="in-article"
data-ad-client="ca-pub-0176506581219642"
data-ad-slot="6732943283"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-92624-14', 'auto');
ga('send', 'pageview');
</script>
</div>
<div id="foot">
<p>SWGOH.LIFE is not affiliated with EA, EA Capital Games, Disney or Lucasfilm LTD.</p>
</div>
</body>
</html>