Files
MyWallpaper/properties.js
T
giteaone d40b07ddbb first commit
初次提交
2026-11-10 18:09:04 +08:00

62 lines
2.8 KiB
JavaScript
Raw 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.
/* ─────────────────────────────────────────────────────────────
荧光渐变互动壁纸 — 行为配置
以经典 <script> 加载(见 index.html),因此 file:// 直接打开
与静态服务器两种方式都会生效;修改后刷新页面即可。
请勿改成 <script type="module">:模块脚本在 file:// 下会被
浏览器的跨源策略拦截。
───────────────────────────────────────────────────────────── */
window.WALLPAPER_CONFIG = {
artwork: {
render_mode: 'vector', // vector = 直接沿 SVG 轮廓染渐变;pixel = 像素块模式
size: 'min(88vw, 88vh)', // 中央图形的宽度(任意 CSS 长度)
color: '#ffffff', // SVG 图形静置时的颜色(十六进制;两种渲染模式均生效)
opacity: 0.25, // SVG 图形静置时的不透明度 0–1(点击后的荧光效果不受影响)
pixel_resolution: 180, // 像素模式横向块数(越大越细腻)
pixel_threshold: 0.18, // 像素块的最小有效覆盖率,低于此值不点亮
hover_scale: 1.01 // 鼠标悬停时图形的放大系数(1 = 不放大,建议 1.02–1.08)
},
effect: {
restore_ms: 3000, // 点亮后停留多久开始恢复(毫秒)
fade_out_ms: 720, // 渐隐时长(毫秒)
flood_ms: 640, // 光从落点漫过整幅图形的时间
ambient_glow: true, // 图形背后的环境辉光
rest_sheen: true, // 静置时缓慢扫过图形的微光
grain_opacity: 0.045 // 全页颗粒噪点强度
},
palette: [
'#d9ff3f',
'#39ffc2',
'#3aa0ff',
'#b06bff',
'#ff4f9a',
'#ffb63f'
],
particles: {
enabled: true,
count: 160, // 单次点击生成的粒子数
shapes: { // 逐项开关粒子形状
square: true, // 正方形
rectangle: true, // 长方形
triangle: true, // 三角形
star4: true, // 四角星
star5: true, // 五角星
circle: true, // 圆形
ellipse: true // 椭圆形
},
size_min: 2,
size_max: 7,
life_ms_min: 900,
life_ms_max: 2400,
rise_speed_min: 50, // px / s
rise_speed_max: 170,
spread: 0.65, // 水平散开程度
wobble: 32, // 上升时的横向摆动
spawn_radius: 120, // 粒子优先从落点附近的实心区域升起
glow: true // 粒子的加色辉光
}
};