forked from fguby/live2D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlive2D.html
130 lines (115 loc) · 3.97 KB
/
live2D.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Live2D SampleApp1</title>
</meta>
<meta name="viewport" content="width=device-width, initial-scale=0.5, minimum-scale=1.0, maximum-scale=4.0">
</meta>
<style>
html, body {
oveflow: hidden;
height: 100%;
}
body{
margin:0px ;
padding:0px ;
}
#glcanvas {
/*
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
*/
background-size: 150%;
background-position: 50% 50%;
/* background-image: url(assets/image/back_class_normal.png); */
}
button {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #ffffff;
padding: 10px 20px;
-moz-border-radius: 30px;
-webkit-border-radius: 30px;
border-radius: 30px;
-moz-box-shadow:
0px 1px 3px rgba(0,0,0,0.5),
inset 0px 0px 1px rgba(255,255,255,0.7);
-webkit-box-shadow:
0px 1px 3px rgba(0,0,0,0.5),
inset 0px 0px 1px rgba(255,255,255,0.7);
box-shadow:
0px 1px 3px rgba(0,0,0,0.5),
inset 0px 0px 1px rgba(255,255,255,0.7);
text-shadow:
0px -1px 0px rgba(0,0,0,0.4),
0px 1px 0px rgba(255,255,255,0.3);
}
button.active {
background: linear-gradient(
to bottom,
#3498db,
#2980b9);
background: -moz-linear-gradient(
top,
#3498db 0%,
#2980b9);
background: -webkit-gradient(
linear, left top, left bottom,
from(#3498db),
to(#2980b9));
border: 1px solid #2980b9;
}
button.inactive {
background: linear-gradient(
to bottom,
#e74c3c,
#c0392b);
background: -moz-linear-gradient(
top,
#e74c3c 0%,
#c0392b);
background: -webkit-gradient(
linear, left top, left bottom,
from(#e74c3c),
to(#c0392b));
border: 1px solid #c0392b;
}
</style>
</head>
<body onload="InitLive2D()">
<audio id="my_audio"></audio>
<p>
<button id="Change" class="active">Change Model</button>
</p>
<div>
<canvas id="mycanvas" width="300" height="500"
style="border:dashed 1px #CCC">
</canvas>
</div>
<div id="myconsole" style="color:#000">---- Log ----</div>
<!-- Live2D Library -->
<script src="js/live2d.min.js"></script>
<script src="js/LAppDefine.js"></script>
<script>
function test() {
var model = new LAppModel();
model.startAppointMotion("start",3,10);
}
function color() {
var model = new LAppModel();
model.startAppointMotion("start",3,3)
}
function colorAndCrisps() {
var model = new LAppModel();
model.startAppointMotion("start",3,6)
}
function changeTexure() {
var model = new LAppModel();
model.changeTexure(1);
}
</script>
</body>
</html>