-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlive2d.html
executable file
·48 lines (45 loc) · 1.51 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>萌娘助手</title>
<link rel="stylesheet" href="/css/live2d.css" />
<!-- Live2D Library -->
<script src="src/live2d.min.js"></script>
<!-- Live2D Framework -->
<script src="src/Live2DFramework.js"></script>
<!-- User's Script -->
<script src="src/utils/MatrixStack.js"></script>
<script src="src/utils/ModelSettingJson.js"></script>
<script src="src/PlatformManager.js"></script>
<script src="src/LAppDefine.js"></script>
<script src="src/LAppModel.js"></script>
<script src="src/LAppLive2DManager.js"></script>
<script src="src/SampleApp1.js"></script>
<script type="text/javascript" src="/src/jquery.min.js"></script>
<script type="text/javascript" src="/src/message.js"></script>
</head>
<body onload="sampleApp1()">
<p>
<button id="btnChange" class="active" style="display:none">Change Model</button>
</p>
<div id="land" style="border: 0px red solid">
<div class="message" style="opacity:0; position:relative; top:0px">hahahaha</div>
</div>
<canvas id="glcanvas" width="600" height="600" class="live2d" style="border: 0px blue solid">
</canvas>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io();
socket.on('message', (msg) => {
showMessage(msg, 10000);
});
socket.on('motion', (motion) => {
live2DMgr.models[0].startMotion(motion, 0);
});
socket.on('expression', (exp) => {
live2DMgr.models[0].setExpression(exp);
});
</script>
</body>
</html>