-
Notifications
You must be signed in to change notification settings - Fork 28
/
cat.html
39 lines (39 loc) · 1.48 KB
/
cat.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="hexo-helper-live2d">
<canvas id="live2dcanvas" width="150" height="300"></canvas>
</div>
<style>
#live2dcanvas{
position: fixed;
width: 150px;
height: 300px;
opacity:1;
left: 200px;
z-index: 999;
pointer-events: none;
bottom: -70px;
}
</style>
<script type="text/javascript" src="./live2d/device.min.js"></script>
<script type="text/javascript" src="./live2d/script.js"></script>
<script type="text/javascript">
const loadScript = function loadScript(c,b){var a=document.createElement("script");a.type="text/javascript";"undefined"!=typeof b&&(a.readyState?a.onreadystatechange=function(){if("loaded"==a.readyState||"complete"==a.readyState)a.onreadystatechange=null,b()}:a.onload=function(){b()});a.src=c;document.body.appendChild(a)};
(function(){
if((typeof(device) != 'undefined') && (device.mobile())){
document.getElementById("live2dcanvas").style.width = '75px';
document.getElementById("live2dcanvas").style.height = '150px';
}else
if (typeof(device) === 'undefined') console.error('Cannot find current-device script.');
loadScript("./live2d/script.js", function(){loadlive2d("live2dcanvas", "./live2d/assets/hijiki.model.json", 0.5);});
})();
</script>
</body>
</html>