LinuxDo 新帖推送
180 subscribers
250K photos
312K links
Download Telegram
标题: 过年啦,给你的网站也添加个烟花效果吧,仿百度首页效果
作者: #aulay
板块: #开发调优
编号: 1607611
帖子: https://linux.do/t/topic/1607611
时间: 2026-02-12 11:16:12
摘要:
一段js代码,点击效果可以看百度首页 https://www.baidu.com/
烟花效果默认播放5s停止。
(function() {
// 1. 设置画布与透明度
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.style.position = 'fixed';
canvas.style.left = '0';
canvas.style.top = '0';
canvas.style.width = '100%';
canvas.style.height = '100%';
canvas.style.zIndex = '9999';
canvas.style.pointerEvents = 'none';
document.body.appendChild(canvas);

let width, height;
let particles = [];
let isRunning = true; // 控制运行开关
const colors = ['#FF1744', '#D500F9', '#3D5AFE', '#00E5FF', '#00E676', '#FFEA00', '#FF3D00'];

function resize() {
width = canvas.width = window.innerWidth;
height = canvas.height = window.innerHeight;
}
window.addEventListener('resize', resize);
resize();

class Particle {
constructor(x, y, color) {
this.x = x;
this.y = y;
this.color = color;

const angle = Math.random() * Math.PI * 2;
const force = Math.pow(Math.random(), 2) * 10 + 2;

this.vx = Math.cos(angle) * force;
this.vy = Math.sin(angle) * force;

this.radius = Math.random() * 2 + 1;
this.alpha = 1;
this.decay = Math.random() * 0.015 + 0.015;
this.gravity = 0.07;
this.friction = 0.95;

// 轨迹点:用于在透明背景下模拟流光
this.history = [];
for(let i=0; i<6; i++) this.history.push({x: x, y: y});
}

update() {
this.history.shift();
this.history.push({x: this.x, y: this.y});

this.vx *= this.friction;
this.vy *= this.friction;
this.vy += this.gravity;
this.x += this.vx;
this.y += this.vy;
this.alpha -= this.decay;
}

draw() {
ctx.beginPath();
ctx.moveTo(this.history[0].x, this.history[0].y);
for(let i=1; i<this.history.length; i++) {
ctx.lineTo(this.history[i].x, this.history[i].y);
}
ctx.strokeStyle = this.color;
ctx.lineWidth = this.radius;
ctx.lineCap = 'round';
ctx.globalAlpha = this.alpha;
ctx.stroke();
}
}

function createFirework(x, y) {
if (!isRunning && particles.length > 500) return;
const color = colors[Math.floor(Math.random() * colors.length)];
for (let i = 0; i < 60; i++) {
particles.push(new Particle(x, y, color));
}
}

// 核心动画循环
function loop() {
// 使用 clearRect 保持背景透明
ctx.clearRect(0, 0, width, height);

for (let i = particles.length - 1; i >= 0; i--) {
const p = particles[i];
p.update();
if (p.alpha <= 0) {
particles.splice(i, 1);
} else {
p.draw();
}
}

// 如果停止运行且粒子已排空,则彻底停止循环节省资源
if (!isRunning && particles.length === 0) {
canvas.remove(); // 移除画布
return;
}
requestAnimationFrame(loop);
}

// 5秒后停止自动燃放
setTimeout(() => {
isRunning = false;
}, 5000);

// 自动燃放逻辑
function autoFire() {
if (isRunning) {
createFirework(Math.random() * width, Math.random() * (height * 0.5));
setTimeout(autoFire, Math.random() * 800 + 400);
}
}

// 依然保留点击手动燃放(5秒内有效)
window.addEventListener('mousedown', (e) => {
if (isRunning) createFirework(e.clientX, e.clientY);
});

loop();
autoFire();
})();
标题: 想约女生出来吃饭,但是女生不爱吃米饭,佬们给点建议
作者: #qllqll
板块: #搞七捻三
编号: 1607612
帖子: https://linux.do/t/topic/1607612
时间: 2026-02-12 11:16:20
摘要:
我想约一位女生出来吃饭,但她不太爱吃米饭。
从她的角度考虑,有没有什么既合适用餐、又方便聊天的餐厅类型?比如在菜系或环境上有没有优先推荐的选择?本人情商不太高,不太会安排这种场合,有是女生的佬们给点建议嘛?
标题: Meta 推出了 Dear Algo 用于帮助用户用自然语言定制化 Threads 推送算法
作者: #stevessr
板块: #前沿快讯
编号: 1607613
帖子: https://linux.do/t/topic/1607613
时间: 2026-02-12 11:16:21
摘要:
CNBC – 11 Feb 26





Meta launches AI algorithm personalization feature for Threads

The feature, called "Dear Algo," lets Threads users personalize what content they see by publicly posting an AI prompt.













[!quote]+
元周三,Threads 推出了一项名为“Dear Algo”的 AI 功能,允许用户个性化其内容推荐算法。
Threads 用户可以告诉 Dear Algo 工具他们想看到哪些类型的帖子,类似于人们使用书面提示与 OpenAI 的 ChatGPT 等聊天机器人互动的方式。





The Verge – 11 Feb 26





Threads’ new ‘Dear Algo’ feature lets you tell the algorithm what you want to...

The changes you ask for will stick around for three days.
标题: 新人报道,有大佬科普一下「LINUX DO Credit」积分有什么用吗
作者: #chengteh
板块: #搞七捻三
编号: 1607618
帖子: https://linux.do/t/topic/1607618
时间: 2026-02-12 11:17:09
摘要:
昨天刚注册,进入后便有佬友提醒可以去领积分,但不太清楚积分的作用和获取的渠道
标题: i5-12500H+32G+RTX3060 有啥自部署的服务可以扔这个服务器吗
作者: #木子不是木子狸
板块: #搞七捻三
编号: 1607622
帖子: https://linux.do/t/topic/1607622
时间: 2026-02-12 11:17:57
摘要:
i5-12500H+32G+RTX3060 有啥自部署的服务可以扔这个服务器吗
标题: 反重力G了,失去所有手段
作者: #dofu
板块: #搞七捻三
编号: 1607624
帖子: https://linux.do/t/topic/1607624
时间: 2026-02-12 11:18:36
摘要:
昨天薅猛了点,今天反重力就G了,登都登陆不了了,难受
标题: 点赞好像出bug了
作者: #zsy1207
板块: #运营反馈
编号: 1607628
帖子: https://linux.do/t/topic/1607628
时间: 2026-02-12 11:19:06
摘要:
随便一个帖子点赞,都显示:该回应是很久以前创建的。它不能再被修改或移除。补充一下:不是所有帖子都弹出这个
标题: Antigravity这个错误如何解决
作者: #丹坊小学徒
板块: #开发调优
编号: 1607631
帖子: https://linux.do/t/topic/1607631
时间: 2026-02-12 11:19:10
摘要:
Trajectory ID: 65baeb8d-c330-4057-868a-1bb82c7a50f9
Error: stream reading error: unexpected EOF: stream reading error: unexpected EOF
(1) tags: map[stream_receive_count:181 streaming_duration:18.4820764s]
Wraps: (2) attached stack trace
-- stack trace:
| google3/third_party/gemini_coder/framework/generator/generator.(*streamResponseHandler).processStream
| third_party/gemini_coder/framework/generator/stream_handler.go:338
| google3/third_party/gemini_coder/framework/generator/generator.(*PlannerGenerator).attemptGenerate
| third_party/gemini_coder/framework/generator/planner_generator.go:437
| google3/third_party/gemini_coder/framework/generator/generator.(*PlannerGenerator).generateWithAPIRetry
| third_party/gemini_coder/framework/generator/planner_generator.go:278
| google3/third_party/gemini_coder/framework/generator/generator.(*PlannerGenerator).generateWithModelOutputRetry
| third_party/gemini_coder/framework/generator/planner_generator.go:154
| google3/third_party/gemini_coder/framework/generator/generator.(*PlannerGenerator).Generate
| third_party/gemini_coder/framework/generator/planner_generator.go:95
| google3/third_party/gemini_coder/framework/executor/executor.(*Executor).Execute
| third_party/gemini_coder/framework/executor/executor.go:303
| google3/third_party/jetski/cortex/cortex.(*CascadeManager).executeHelper.func1
| third_party/jetski/cortex/cascade_manager.go:1558
| google3/third_party/jetski/cortex/cortex.(*CascadeManager).executeHelper.func2
| third_party/jetski/cortex/cascade_manager.go:1676
| runtime.goexit
| third_party/go/gc/src/runtime/asm_amd64.s:1771
Wraps: (3) stream reading error: unexpected EOF
Wraps: (4) stream reading error
Wraps: (5) unexpected EOF
Error types: (1) *go_utils.withTags (2) *withstack.withStack (3) *errutil.withPrefix (4) *fmt.wrapError (5) *errors.errorString

我的梯子还是挺稳定的,用codex也没有任何问题,这是什么情况?如何解决?
标题: Cursor Team/Codex中转 靠谱么
作者: #青鸟衔书
板块: #开发调优
编号: 1607635
帖子: https://linux.do/t/topic/1607635
时间: 2026-02-12 11:19:20
摘要:
两个问题:


Cursor Pro的$20几天就用爆了, 然后去鱼上买到了Cursor Team. 登录后模型的名字变了, Pro登录的时候叫 Opus 4.6, 但是Team登录后就变成 claude-opus-4.6 (GPT 5.3 Codex 也会变), 这两个有区别么? 另外换到Team后感觉他不太好用了, 有点傻, 经常改代码需要手把手教, 不知道是不是错觉.


Codex好用么? 鱼上一搜都是key+中转的形式, 想问一下佬友们这个靠谱么? 中转的原理是什么? 如何确定他中转的是正版的OpenAI而不是其他地方?
标题: deepseek新版是随机推送还是用关键词激活的?
作者: #leonardo_shen
板块: #搞七捻三
编号: 1607640
帖子: https://linux.do/t/topic/1607640
时间: 2026-02-12 11:20:13
摘要:
直接网页版问“你是什么模型”没用,要先下app,然后问“你是什么模型”,它回答1M上下文后,再回网页版问“你是什么模型”。注意,此时不开思考的话,用的还是普通的v3.2。
感觉这个“你是什么模型”、“你的上下文多少”像开关一样?是不是不是随即推送的灰度测试,而是有触发关键词的?
标题: 小白最近要做商业计划书,各位佬有什么ai工具或者提示词或者经验分享吗
作者: #时间先生
板块: #搞七捻三
编号: 1607690
帖子: https://linux.do/t/topic/1607690
时间: 2026-02-12 11:34:01
摘要:
求助求助,各位佬友
标题: 2026年了,百度地图收藏怎么导入高德地图?
作者: #kampchen2008
板块: #搞七捻三
编号: 1607696
帖子: https://linux.do/t/topic/1607696
时间: 2026-02-12 11:34:43
摘要:
几乎搜不到方案,有一个是搜到的微信小程序,放到小程序里。另一个方案是导出后导入到了高德的地图里,但是不是打开高德的地图,而是高德的小程序里的地图,和原有地图不是一个地图,也不能和高德地图里的收藏合并。2026年了,大佬们没有完美方案
标题: 为什么cli如此盛行?
作者: #zsy1207
板块: #搞七捻三
编号: 1607701
帖子: https://linux.do/t/topic/1607701
时间: 2026-02-12 11:38:20
摘要:
有些cli确实能理解,但是想Obsidian这种笔记软件都有CLI了,感觉完全没什么优势了,什么原因造成cli如此盛行?
标题: 之前一直听佬们说公益站,公益站到底是啥?
作者: #oneLineEven
板块: #搞七捻三
编号: 1607715
帖子: https://linux.do/t/topic/1607715
时间: 2026-02-12 11:41:51
摘要:
之前一直听佬们说公益站,公益站到底是啥?是固定的一个网站吗,还是一类网站的统称,我可以怎么找到这些网站啊
标题: GLM 这是涨价了?
作者: #cooljser
板块: #国产替代
编号: 1607718
帖子: https://linux.do/t/topic/1607718
时间: 2026-02-12 11:42:18
摘要:
标题: GLM-5和MiniMax 2.5已经发布!测试后发现......
作者: #辛逝纪芙音战士
板块: #国产替代
编号: 1607720
帖子: https://linux.do/t/topic/1607720
时间: 2026-02-12 11:42:48
摘要:
首先多的话,我就不说了,省流总结挺强 
这是mm2.5的官网:https://agent.minimax.io/
GLM5的官网:https://chat.z.ai/
okk,想去自己测试可以直接点击,有用的话记得点个赞哦
接下来是测试的部分:
时间原因我只测了前端
MiniMax2.5

GLM-5

以及前端大哥gemini3pro

提示词均为写一个页面精美,风格自然的网页
可以看到已经非常牛逼了,甚至我觉得单个来说GLM-5和mm2.5比gemini3pro更强,国产牛逼,希望我能用上比肩opus4.6的国产模型
ps:其实昨天晚上就写出来了,但是一直过不了审,我甚至还私信了始皇,之后测试会更新,感谢各位。