This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
forked from download13/blockies
-
Notifications
You must be signed in to change notification settings - Fork 286
/
Copy pathrandom-samples.html
77 lines (59 loc) · 2.01 KB
/
random-samples.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
<!doctype html>
<head>
<meta charset="utf-8">
<style>
body {
background: #f1f1f1;
}
canvas, img {
width: 64px;
height: 64px;
position: absolute;
background-size: cover;
background-repeat: no-repeat;
border-radius: 20% ;
}
canvas {
opacity: 1;
transition: opacity 1s, filter 1.5s;
}
.icon:hover canvas, canvas:hover, img:hover {
opacity: 0;
transition: opacity 0.5s, filter 0.25s;
filter: blur(1px);
}
.icon {
display: inline-block;
position: relative;
width: 64px;
height: 64px;
margin: 8px;
}
</style>
</head>
<body onload="loaded()">
<script src="blockies.js"></script>
<script type="text/javascript" src="hqx.js"></script>
<script>
var loaded = function( img ) {
var addresses =
['0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359', '0x554f8e6938004575bd89cbef417aea5c18140d92', '0xcc6294200fa6e6eb5c3034ed6b0b80401f5b0ceb', '0xbb9bc244d798123fde783fcc1c72d3bb8c189413', '0x6090a6e47849629b7245dfa1ca21d94cd15878ef', '0x314159265dd8dbb310642f98f50c066173c1259b']
for (i = 0; i < 128; i ++ ){
addresses.push(Math.floor(Math.random() * Math.pow(10,10)).toString(16) + Math.floor(Math.random() * Math.pow(10,10)).toString(16) + Math.floor(Math.random() * Math.pow(10,10)).toString(16) + Math.floor(Math.random() * Math.pow(10,10)).toString(16));
}
for (i = 0; i < addresses.length; i ++ ){
var seed = addresses[i].toLowerCase();
var source = blockies.create({ seed:seed ,size: 8,scale: 1});
var icon = document.createElement("div");
icon.className = "icon";
var image = document.createElement("img");
image.src = blockies.create({ seed:seed ,size: 8,scale: 16}).toDataURL();
icon.appendChild( image );
var child = hqx(hqx(source, 4), 4);
icon.appendChild( child );
// var shadow = document.createElement('div');
document.body.appendChild(icon)
}
};
</script>
</body>