-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (92 loc) · 3.34 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <meta name="viewport" content="width=1920, user-scalable=yes"> -->
<link rel="shortcut icon" href="favicon.png"/>
<title>DDID</title>
<link rel="stylesheet" href="css/index.css">
<script src="js/svga.min.js"></script>
<!--[if lt IE 10]>
<script src="js/svga.ie.min.js"></script>
<![endif]-->
<!--[if gte IE 10]><!-->
<script src="js/svga.min.js"></script>
<!--<![endif]-->
</head>
<body>
<div id="app">
<div class="navbg">
<div class="nav">
<div class="left"><img src="img/logo.png" class="logo"></div>
<div class="right">
<a href="https://twitter.com/ddid_io">Twitter</a>
<button id="airdrop" class="button" onclick="topage()">Airdrop</button>
</div>
</div>
</div>
<div class="contentbg">
<div class="content">
<div class="fontStyle">
<img src="img/font.png">
<span>A multi-universe decentralized digital identity management tool that connects the real world and the virtual world.</span>
</div>
<div id="yyzCanvas" class="yyzCanvas" loops="0"></div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
function topage() {
window.location.href = 'https://ddid.io/NFTAirdrop.html'
}
function mouseOverFun(){
var airdrop = document.getElementById('airdrop');
airdrop.innerText = 'under construction';
}
//适配不同屏
function setFill() {
var $_canvas = document.getElementById("yyzCanvas"),
w = window.innerWidth,
h = window.innerHeight,
screen_proportion = h / w,
svga_proportion = 16 / 9;
if (screen_proportion > svga_proportion) {
//长屏幕
$_canvas.style.width = h / svga_proportion + "px";
$_canvas.style.left = (w - h / svga_proportion) / 2 + "px";
} else {
$_canvas.style.height = w * svga_proportion + "px";
$_canvas.style.top = (h - w * svga_proportion) / 2 + "px";
}
}
function myonloadfun(){
var player = new SVGA.Player('#yyzCanvas');
var parser = new SVGA.Parser('#yyzCanvas');
player.clearsAfterStop = false;
parser.load('index.svga', function(videoItem) {
player.loops=0; // 设置循环播放次数是1,0是无限播放
player.setVideoItem(videoItem);
player.startAnimation();
player.onFinished(function(){
alert("动画停止了!!!")
});
})
/*
//https://file.nidong.com/upload/gift/20200520/upload_l3xlns9v1in4heomhwgbndzxt8quc9yb.svga
parser.load('index.svga?t=16009438825', function(videoItem) {
player.loops = 0;//动画循环次数,默认值为 0,表示无限循环
player.clearsAfterStop = false;//默认值为 true,表示当动画结束时,清空画布
player.setVideoItem(videoItem);
player.startAnimation();//从第 0 帧开始播放动画
player.onFrame(function (i) {
});
})*/
}
/*用window.onload调用*/
window.onload=function(){
// setFill();
myonloadfun();
}
</script>
</html>