-
Notifications
You must be signed in to change notification settings - Fork 0
/
kyaru.html
48 lines (48 loc) · 1.9 KB
/
kyaru.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>接 头 霸 王</title>
<link rel="stylesheet" href="./assets/kyaru.css">
</head>
<body>
<div id="kyaru">
<section class="row-1">
<fieldset class="victim-field">
<legend>选 择 受 害 者</legend>
<div class="selector-box">
<input type="file" id="selector" name="selector" id="" @change="fileUploaded" accept="image/png,image/jpeg">
</div>
</fieldset>
<fieldset class="finish-field" v-if="!isMobile">
<legend>完 成 迫 害</legend>
<button class="finish-btn" @click="finishKyaru">キャル it!</button>
</fieldset>
</section>
<fieldset>
<legend>选 头 <span v-if="!isMobile">(拖 到 受 害 者 头 上)</span></legend>
<section v-if="isMobile">
<button class="need-more-btn" @click="showMoreHead = !showMoreHead">{{showMoreHead ? '收起' : '需要更多的头...'}}</button>
</section>
<section class="kyaru-heads" v-show="!isMobile || showMoreHead">
<img
v-for="head in heads" crossorigin
style="width: 60px; height: 60px;"
:key="head" :src="'http://www.marunhao.cn/kyaru/' + head + '.png'"
draggable @dragstart="dragStart" @dragEnd="dragEnd"
@click="mobileAddHead"
>
</section>
</fieldset>
<fieldset @drop.prevent="ondrop" id="paintBox">
<legend>加 大 力 度</legend>
<canvas id="canvas" :width="isMobile ? mobileCanvasWidth + '' : '800'" height="600"></canvas>
</fieldset>
<button class="finish-btn--mobile" v-if="isMobile" @click="finishKyaru_mobile">迫 害 完 成!</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./assets/fabric.js"></script>
<script src="./dist/bundle.js"></script>
</body>
</html>