惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
博客园 - 聂微东
有赞技术团队
有赞技术团队
The Cloudflare Blog
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
T
The Blog of Author Tim Ferriss
D
Docker
L
LangChain Blog
Vercel News
Vercel News
C
Check Point Blog
博客园 - Franky
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
人人都是产品经理
人人都是产品经理

蛇年大吉

通过json生成talk-card | 蛇年大吉 通过json生成site-card | 蛇年大吉 通过json生成图片集 | 蛇年大吉 如何更新主题 | 蛇年大吉 netlify部署博客 | 蛇年大吉 增加获取图片标签 | 蛇年大吉 关于我页面写法 | 蛇年大吉 markdown样式优化 | 蛇年大吉 音乐播放器失效问题 | 蛇年大吉 新增酷炫按钮和预加载动画 | 蛇年大吉 首页github日历 | 蛇年大吉 轮播-swiper | 蛇年大吉 主题config配置项简介 | 蛇年大吉 首页添加弹幕 | 蛇年大吉 制作简历(关于我)和404页面 | 蛇年大吉 自定义live2d | 蛇年大吉 自定义css之导航和页脚高斯模糊 | 蛇年大吉 自定义css之头部图片透明 | 蛇年大吉 给bamboo添加右上角梅花 | 蛇年大吉
给bamboo添加动态背景 | 蛇年大吉
作者: YuAng · 2022-06-08 · via 蛇年大吉
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
"use strict";
window.bubbly = function (t) {
var n = t || {},
o = function () {
return Math.random();
},
r = n.canvas || document.createElement("canvas"),
e = r.width,
a = r.height;
r.className = 'bubbly-bg-canvas';
null === r.parentNode &&
(r.setAttribute(
"style",
"position:fixed;z-index:-1;left:0;top:0;min-width:100vw;min-height:100vh;"
),
(e = r.width = window.innerWidth),
(a = r.height = window.innerHeight),
document.body.appendChild(r));
var i = r.getContext("2d");
(i.shadowColor = n.shadowColor || "#fff"), (i.shadowBlur = n.blur || 4);
var l = i.createLinearGradient(0, 0, e, a);
l.addColorStop(0, n.colorStart || "#2AE"),
l.addColorStop(1, n.colorStop || "#17B");
for (
var c = n.bubbles || Math.floor(0.02 * (e + a)), u = [], d = 0;
d < c;
d++
)
u.push({
f: (
n.bubbleFunc ||
function () {
return "hsla(0, 0%, 100%, " + 0.1 * o() + ")";
}
).call(),
x: o() * e,
y: o() * a,
r: (
n.radiusFunc ||
function () {
return 4 + (o() * e) / 25;
}
).call(),
a: (
n.angleFunc ||
function () {
return o() * Math.PI * 2;
}
).call(),
v: (
n.velocityFunc ||
function () {
return 0.1 + 0.5 * o();
}
).call(),
});
!(function t() {
if (null === r.parentNode) return cancelAnimationFrame(t);
!1 !== n.animate && requestAnimationFrame(t),
(i.globalCompositeOperation = "source-over"),
(i.fillStyle = l),
i.fillRect(0, 0, e, a),
(i.globalCompositeOperation = n.compose || "lighter"),
u.forEach(function (t) {
i.beginPath(),
i.arc(t.x, t.y, t.r, 0, 2 * Math.PI),
(i.fillStyle = t.f),
i.fill(),
(t.x += Math.cos(t.a) * t.v),
(t.y += Math.sin(t.a) * t.v),
t.x - t.r > e && (t.x = -t.r),
t.x + t.r < 0 && (t.x = e + t.r),
t.y - t.r > a && (t.y = -t.r),
t.y + t.r < 0 && (t.y = a + t.r);
});
})();
};