-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
205 lines (149 loc) · 5.39 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!-- created by yasai
2018/06/27 -->
<!-- forked by Egbert
2020/04/27 -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>艺术可视化形式2.0test </title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<link rel="icon" href="image/1.ico" type="image/x-icon">
<link rel="shortcut icon" href="image/1.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="fonts.css">
<script type="text/javascript" src="js/dat.gui.min.js"></script>
<script type="text/javascript" src="js/p5.min.js"></script>
<script type="text/javascript" src="js/p5.dom.min.js"></script>
<style type="text/css">
*{
margin:0;
Spacing:0;
}
#credits {
font-size: 12px;
position: absolute;
bottom: -25px;
right: 15px;
opacity: 0.6;
color: #ffffff;
max-width: 70%;
text-align: right;
line-height: 20px;
}
.logo {
font-size: 12px;
position: absolute;
bottom: 80px;
left: 25px;
color: #ffffff;
max-width: 70%;
line-height: 20px;
opacity: 0.7;
}
.iconlink{
bottom: 50px;
margin-right: 0px;
}
#img-path {
display: none;
}
</style>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?44f8fa2f0b239ea3093628142486b48a";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<!--
<div id="credits">
<div class = "socaial" style="margin-right:10px">Created by @Yasai</div>
<div class = "socaial" style="margin-right:10px; margin-bottom: -40px">©️All my products may be used in both personal and commercial projects </div>
<div class ="iconlink">
<span><a class="icon-weibo" href="https://weibo.com/psaiaevegas/profile?rightmod=1&wvr=6&mod=personnumber" target="_blank" data-icon="" ></a></span>
<span><a class="icon-zhihu" href="https://www.zhihu.com/people/wang-ya-sai/activities" target="_blank" data-icon=""></a></span>
<span><a class="icon-instagram" href="http://instagram.com/yasaisai" target="_blank" data-icon=""></a></span>
<span><a class="icon-twitter" href="https://twitter.com/yasai_wang" target="_blank" data-icon=""></a></span>
</div>
</div>
<div class = "logo" style="margin-left:10px; margin-bottom: -40px; "><a href = "https://wangyasai.github.io/designtools.html"><img src="logo.png" style ="width: 40px"></a></div>
-->
<script type="text/javascript">
var type;
var type_;
var options ={
Background: '#ffffff',
Color: '#ff8c00',
ColorMode: 'Flicker',
Size: 300,
Nums: 210,
noiseScale: 0.86,
Shape: 'e-motion',
Spacing:20,
Random: function () {
var size = random(50,100);
SizeControl.setValue(size);
var nums = random(50,100);
NumsControl.setValue(nums);
var noise = random(0,1);
noiseControl.setValue(noise);
var spacing = random(10,50);
SpacingControl.setValue(spacing);
var shape = random( ['Wave','Rectangle', 'Circle']);
shapeControl.setValue(shape);
var Background = random(['#580AFF','#00266b','#0a0a0a']);
bgcolorControl.setValue(Background);
var color = random(['#E632A5', '#580AFF','#005CFF','#009788']);
colorControl.setValue(color);
},
Save : function(){
saveFrames("某某热搜的情绪", "png", 1, 1);
},
}
var gui, config;
var colorControl,rControl,gControl,bControl,noiseControl,SizeControl,RandomControl,shapeControl,SpacingControl,NumsControl,bgcolorControl,RandomControl,colorModeControl;
window.onload = function() {
document.getElementById('defaultCanvas0').onmousedown = function(e) {
// 阻止默认行为并取消冒泡
if(typeof e.preventDefault === 'function') {
e.preventDefault();
e.stopPropagation();
}else {
e.returnValue = false;
e.cancelBubble = true;
}
}
gui = new dat.GUI();
//folder1
var folder1 = gui.addFolder('Controls');
shapeControl = folder1.add(options, 'Shape', ['Wave','Annulus','Rectangle', 'Circle'] );
shapeControl.onChange(draw);
bgcolorControl = folder1.addColor(options, 'Background');
bgcolorControl.onChange(draw);
colorModeControl = folder1.add(options, 'ColorMode',['Single','Flicker']);
colorModeControl.onChange(draw);
colorControl = folder1.addColor(options, 'Color');
colorControl.onChange(draw);
noiseControl = folder1.add(options, 'noiseScale',0,1);
noiseControl.onChange(draw);
SizeControl = folder1.add(options, 'Size',1,400);
SizeControl.onChange(draw);
NumsControl = folder1.add(options, 'Nums',1,280);
NumsControl.onChange(draw);
SpacingControl = folder1.add(options, 'Spacing',0,100);
SpacingControl.onChange(draw);
RandomControl = folder1.add(options, 'Random');
var SaveControl = folder1.add(options, 'Save');
folder1.open();
};
</script>
<script type="text/javascript" src="js/sketch.js"></script>
</body>
</html>