Files
giteaone 6cb65df45f effects
更新不同效果
2026-11-18 11:31:07 +08:00

47 lines
2.9 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ─────────────────────────────────────────────────────────────
效果配置文件 · 3Deffects(3D 跟随)
鼠标进入四角限位框定的区域后,SVG 图标朝指针方向做 3D 倾斜;
转动速度跟随鼠标速度:指针越快,倾斜跟进越急;指针放慢,
转动也随之放缓;移出区域后缓缓回正并轻微呼吸摆动。
点击 / 触摸图形会产生一次脉冲(涟漪 + 角度冲击 + 下压回弹)。
共用部分(图形、渲染模式、色板、PREV/NEXT 轮换)见 properties.js。
以经典 <script> 加载,file:// 直接打开同样生效;修改后刷新即可。
───────────────────────────────────────────────────────────── */
window.WALLPAPER_EFFECTS = window.WALLPAPER_EFFECTS || {};
window.WALLPAPER_EFFECTS['3Deffects'] = {
label: '3D', // 切换按钮上的短标签
config: {
tilt: {
max_tilt_deg: 26, // 指针到达限位框边缘时的最大倾斜角(度)
perspective_px: 1200, // 3D 透视距离(越小透视越夸张)
/* ── 速度耦合:转动速度随鼠标速度一致 ──
跟随速率 λ 在 min_response 与 max_response 之间,
按鼠标瞬时速度(相对 speed_ref_px_s)插值:
鼠标快 → λ 大 → 角度几乎即时跟上指针;
鼠标慢 → λ 小 → 转动缓慢柔和。 */
min_response: 3.5, // 鼠标近乎静止时的基础跟随速率(1/秒)
max_response: 30, // 鼠标达到参考速度时的跟随速率(1/秒)
speed_ref_px_s: 1500, // 视为“快速”的鼠标速度参考值(像素/秒)
return_response: 6, // 移出区域后回正 / 呼吸摆动的跟随速率
lift_px: 26, // 指针在区域内时图形向屏幕外浮起的距离
press_depth_px: 20, // 按住图形时向屏幕内压下的深度
click_impulse_deg: 5, // 点击脉冲给角度附加的随机冲击(度)
glare: true, // 随指针移动的镜面高光(只落在实心图形上)
glare_opacity: 0.20, // 高光最大不透明度
floor_glow: true, // 图形下方随倾斜偏移的荧光投影
floor_glow_opacity: 0.30, // 投影最大不透明度
idle_sway: true, // 指针不在区域内时的呼吸摆动
sway_deg: 2.2, // 呼吸摆动幅度(度)
sway_period_ms: 9000, // 呼吸摆动周期(毫秒)
ambient_glow: true, // 背景环境辉光(低强度常亮)
grain_opacity: 0.045 // 全页颗粒噪点强度
}
}
};