Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e36a3a99ff |
@@ -0,0 +1,73 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright 2026 giteaone
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,446 +1,3 @@
|
||||
# 荧光渐变互动壁纸
|
||||
# MyWallpaper
|
||||
|
||||
一个零依赖、零构建的单页互动壁纸。纯黑舞台上放置 `assets/svgs` 中的单色矢量图形(默认是 `input.svg` 的单线 M 字形),右侧圆形 `PREV` / `NEXT` 按钮可在图库中前后轮换;点击实心笔画、或将鼠标停在笔画上片刻,霓虹渐变沿原始轮廓流动、粒子向上飘散,3 秒后恢复。点击镂空与背景不产生任何响应;停留触发每次停留只点亮一次,移开再回来才会重新武装。
|
||||
|
||||
本文记录实现思路、关键取舍与验证结果,便于评估。
|
||||
|
||||
---
|
||||
|
||||
## 1. 需求拆解
|
||||
|
||||
最核心的矛盾有三个:
|
||||
|
||||
1. **命中必须精确**。图形是约 10 单位宽的细线轮廓,内部有大面积镂空。如果用整块矩形或包围盒做点击区域,空心也会点亮,直接违背需求。
|
||||
2. **渐变必须贴着原轮廓**。不能先把图形栅格化成像素块再上色,否则丢失原 SVG 的平滑边缘。
|
||||
3. **离线与可配置同时成立**。零依赖、零构建、零服务端,但行为又要由 `properties.js` 控制,并且直接双击打开也必须生效。
|
||||
|
||||
对应的技术选择:
|
||||
|
||||
| 问题 | 方案 |
|
||||
|---|---|
|
||||
| 精确命中 | 内联 SVG 几何 + 透明 `hitPad` 指针命中;像素模式用 alpha 栅格判定 |
|
||||
| 贴轮廓上色 | `clipPath` 裁出原始几何,在裁剪区域里绘制渐变矩形 |
|
||||
| 从点击点漫开 | `mask` + 扩张的模糊圆,用遮罩揭示渐变层 |
|
||||
| 每次渐变不同 | 调色板旋转 + 渐变角度/相位/流向随机,并为旋转提供“必定改变”的保证 |
|
||||
| 离线可用 | SVG 内联;字体、噪点全部本地文件;无任何 CDN 请求 |
|
||||
| 配置驱动 | 经典 `<script>` 加载 `properties.js` 全局对象,与内置默认值深合并(`file://` 下同样生效) |
|
||||
|
||||
界面刻意保持极简:屏幕上只有图形本身、左侧垂直居中的 `VECTOR / PIXEL` 渲染切换、右侧垂直居中、上下排列的圆形 `PREV` / `NEXT` 图形轮换按钮,以及图形四角的细线限位符。没有品牌名、文件名、状态读数或说明性文字;点亮后的荧光渐变与粒子是唯一的视觉反馈。
|
||||
|
||||
---
|
||||
|
||||
## 2. 文件结构
|
||||
|
||||
```text
|
||||
MyWallpaper/
|
||||
├─ index.html 页面、内联 SVG、样式与全部逻辑
|
||||
├─ properties.js 行为配置入口(经典脚本,暴露全局对象)
|
||||
├─ gallery.js 图库数据(由 tools/build-gallery.py 生成)
|
||||
├─ input.svg 原始图形资产(保留)
|
||||
├─ tools/
|
||||
│ └─ build-gallery.py 扫描 assets/svgs 生成 gallery.js
|
||||
└─ assets/
|
||||
├─ fonts/
|
||||
│ ├─ space-grotesk.woff2
|
||||
│ └─ jetbrains-mono.woff2
|
||||
├─ svgs/
|
||||
│ ├─ input.svg
|
||||
│ ├─ 狸花猫.svg
|
||||
│ └─ … 品牌图标等,新增后重新生成 gallery.js
|
||||
└─ grain.png 128×128 透明银盐颗粒
|
||||
```
|
||||
|
||||
`index.html`、`properties.js` 与 `gallery.js` 是运行所需的完整交付物,不需要安装依赖或打包。`input.svg` 作为源资产保留;为了让页面在 `file://` 下也能精确命中且零请求,图形几何在加载时由 `gallery.js` 注入为内联 SVG。
|
||||
|
||||
---
|
||||
|
||||
## 3. 矢量模式渲染架构
|
||||
|
||||
单层 SVG,`viewBox="0 0 1500 1200"`,图层自下而上:
|
||||
|
||||
```text
|
||||
glowGroup 两份模糊的图形副本,负责外发光
|
||||
restArt 静置图形(颜色与透明度由 artwork.color / artwork.opacity 控制)
|
||||
restSheen 裁剪在轮廓内的缓慢扫光(透明度随 artwork.opacity 同步缩放)
|
||||
neonWrap clipPath + floodMask 内的霓虹渐变与白色高光
|
||||
hitPad 透明命中层(仅用于指针事件)
|
||||
```
|
||||
|
||||
### 3.1 为什么内联 SVG
|
||||
|
||||
- `file://` 下无需请求即可显示;
|
||||
- 可以直接对填充路径做指针命中,不需要坐标换算后再用第三方库判断;
|
||||
- 裁剪、遮罩、渐变、滤镜都在同一 SVG 坐标系内,缩放一致。
|
||||
|
||||
### 3.2 用 clipPath 锁住原轮廓
|
||||
|
||||
霓虹层不是重复画一遍路径,而是在一个覆盖全图的大矩形上填渐变,再用 `clipPath` 裁成原始形状:
|
||||
|
||||
```html
|
||||
<g id="neonWrap">
|
||||
<g clip-path="url(#glyphClip)">
|
||||
<g mask="url(#floodMask)">
|
||||
<rect ... fill="url(#neonGrad)"/>
|
||||
<rect ... fill="url(#glintGrad)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
```
|
||||
|
||||
这样无论渐变如何移动、滤镜如何模糊,颜色都严格停留在笔画内部,边缘保持矢量平滑。
|
||||
|
||||
**一个实测到的兼容性坑**:最初 `clipPath` 里写的是 `<use href="#glyphShapes"/>`,而 `#glyphShapes` 是一个包含多条路径的 `<g>`。Chrome 下这个裁剪结果为空,导致霓虹层完全不可见;外层的 `<use>` 显示却正常。后续验证发现 `clipPath` 内直接放 `<g>` 同样会被裁空,因此修复方式是只放形状元素。现在由 `tools/build-gallery.py` 把每幅图形展平、把归一化变换写到每个形状上,并同时写入可见层与裁剪层;像素模板在运行时从可见层生成,两份几何由同一份源数据保证一致。
|
||||
|
||||
### 3.3 从落点漫开的 flood mask
|
||||
|
||||
```html
|
||||
<mask id="floodMask" maskUnits="userSpaceOnUse" x="-1200" y="-1200" width="3900" height="3600">
|
||||
<circle id="floodCircle" ... filter="url(#floodBlur)"/>
|
||||
</mask>
|
||||
```
|
||||
|
||||
- 点击时把圆心设为点击位置;
|
||||
- `frame()` 用 `easeOutCubic` 把半径从 0 扩到 `floodMax`(最远角距离 + 80);
|
||||
- 圆用 `feGaussianBlur stdDeviation="11"` 软化边缘,形成“光从落点漫过图形”的观感;
|
||||
- `maskUnits="userSpaceOnUse"` 让遮罩区域与图形坐标系一致,避免缩放时错位。
|
||||
|
||||
### 3.4 流动渐变
|
||||
|
||||
主渐变是 `gradientUnits="userSpaceOnUse"` 的 7 段线性渐变,色标由调色板旋转后依次填充,基准位置为:
|
||||
|
||||
```text
|
||||
0, 0.16, 0.33, 0.5, 0.66, 0.84, 1
|
||||
```
|
||||
|
||||
中间色标会做 ±0.022 的抖动,避免每次都像同一张预设色卡。渐变线长度固定 1680,中心在图形中心,方向由随机角度决定:
|
||||
|
||||
```js
|
||||
setGradientLine(neonGrad, p.angle, 1680);
|
||||
```
|
||||
|
||||
流动不是改变色标位置,而是持续平移 `gradientTransform`:
|
||||
|
||||
```js
|
||||
off = mod(phase + dir * flowSpeed * elapsed, 1680);
|
||||
neonGrad.setAttribute('gradientTransform', `translate(${cos * off} ${sin * off})`);
|
||||
```
|
||||
|
||||
配合 `spreadMethod="reflect"`,颜色会周期性循环经过笔画,且方向可正可负。
|
||||
|
||||
另有一条窄白高光渐变 `glintGrad`,以独立速度和相位沿同一方向扫过,`mix-blend-mode: screen` 叠在霓虹之上,制造“玻璃反光”式的高光带。
|
||||
|
||||
### 3.5 发光与环境色
|
||||
|
||||
- `glowGroup`:两份 `<use>` 副本,分别使用近距模糊(stdDeviation 6)与远距模糊(stdDeviation 23),填充色取自当前调色板;
|
||||
- 页面级 `.ambient` 三团 CSS 径向光,颜色通过 `--a1-rgb / --a2-rgb / --a3-rgb` 注入,只在 `html.is-lit` 时显形;
|
||||
- 静置状态保留配置色的极淡外发光与 12 秒一次的轮廓扫光,避免画面死黑;两者的强度都跟随 `artwork.opacity`。
|
||||
|
||||
---
|
||||
|
||||
## 4. 每次点击都不同
|
||||
|
||||
`makeParams()` 每次生成一组完整参数:
|
||||
|
||||
- **调色板旋转**:`rot` 在上一轮基础上至少前进 1 位(模 n),因此相邻两次的色序一定不同;
|
||||
- **渐变角度**:0–360° 随机;
|
||||
- **流动方向**:正向或反向;
|
||||
- **色带起点**:`phase` 随机 0–1600;
|
||||
- **高光相位**:`glintPhase` 随机 0–1;
|
||||
- **流速**:主渐变 110–230,高光 520–800;
|
||||
- **颜色查找表**:64 级 LUT,由旋转后的调色板插值生成,供像素模式使用;另生成一份 72% 亮度的暗色 LUT 做闪烁。
|
||||
|
||||
旋转后的颜色同时驱动:主渐变、glint 所在叠层、两团轮廓辉光与三团环境光。点击时这些元素一次性切换,形成整体联动;静置图形的颜色不会被点击参数改写,始终由配置决定。
|
||||
|
||||
随机性之外,`rot` 的“必定前进”保证了连续点击不会出现完全相同的配色顺序,而角度、方向和相位继续提供空间上的差异。
|
||||
|
||||
---
|
||||
|
||||
## 5. 命中测试
|
||||
|
||||
### 5.1 矢量模式
|
||||
|
||||
页面使用一层透明的 `hitPad`:
|
||||
|
||||
```html
|
||||
<use id="hitPad" data-hit href="#glyphShapes"
|
||||
fill="transparent" stroke="transparent"
|
||||
pointer-events="all" stroke-width="26"/>
|
||||
```
|
||||
|
||||
- `fill="transparent"` + `pointer-events="all"`:只有路径填充区域会捕获事件;
|
||||
- `stroke-width="26"`:给细线增加一圈命中余量,解决 10 单位宽线条在屏幕上只有约 5px 时难以点中的问题;触控设备提高到 44;
|
||||
- 点击事件委托在 `<svg>` 上,通过 `e.target.closest('[data-hit]')` 判断是否命中实心层;
|
||||
- 镂空区域点中的是 `<svg>` 本身,背景点中的是页面其他元素,两者都不满足条件,因此完全无响应。
|
||||
|
||||
这是一处有意识的取舍:命中余量向镂空一侧延伸了几个像素,以换取可用性;所有大面积镂空仍然严格拒绝。
|
||||
|
||||
### 5.2 像素模式
|
||||
|
||||
像素模式需要更精确的 alpha 判定,流程是:
|
||||
|
||||
1. 用同一份路径拼出一个白色 SVG 字符串;
|
||||
2. 转成 `data:image/svg+xml` URL 画进离屏 canvas(180×144,可配置);
|
||||
3. `getImageData` 读取 alpha,逐格记录覆盖率大于阈值的单元格;
|
||||
4. 点击时把客户端坐标映射到单元格,直接查 alpha 缓冲。
|
||||
|
||||
因为图像来自同文档的 data URL,canvas 不会被污染,`getImageData` 在 `file://` 下同样可用。阈值默认 0.18,兼顾抗锯齿边缘与空心误判。
|
||||
|
||||
---
|
||||
|
||||
## 6. 像素块模式
|
||||
|
||||
像素模式不是简单地把矢量图 `image-rendering: pixelated` 放大,而是逐格重绘:
|
||||
|
||||
- **静置**:把实心单元格绘制到一张 180×144 的离屏 canvas,基色取自 `artwork.color`,随 y 轴轻微压暗,alpha 由覆盖率强化并乘以 `artwork.opacity`;
|
||||
- **点亮**:每个单元格根据其在渐变方向上的投影、颜色 LUT 和流动相位取色;
|
||||
- **漫开**:`computePixelDelays()` 按单元格到点击点的距离计算延迟,形成径向扩散;
|
||||
- **闪烁**:用单元格内置 hash 让少量格子周期性变暗;
|
||||
- **起始白闪**:单元格点亮后的前 90ms 强制白色,模拟被光击中的瞬间。
|
||||
|
||||
主 canvas 以 180×144 原生分辨率绘制,CSS 放大后天然形成像素块;`image-rendering: pixelated` 保证浏览器不插值。渲染被限制在约 30fps,避免与粒子层抢帧。
|
||||
|
||||
模式切换:
|
||||
|
||||
- 左侧垂直居中的 `VECTOR / PIXEL` 按钮,带 `aria-pressed`;
|
||||
- 键盘 `V` 切换;
|
||||
- 若像素栅格化失败,PIXEL 按钮自动禁用并给出标题提示,页面保持矢量模式;
|
||||
- 配置项 `artwork.render_mode` 决定初始模式。
|
||||
|
||||
图库轮换:
|
||||
|
||||
- 右侧垂直居中、上下排列的圆形 `PREV` / `NEXT` 按钮,字号 9px,与 `VECTOR / PIXEL` 一致;
|
||||
- 两者复用同一个 `setArtwork(index)`:`PREV` 传 `index - 1`,`NEXT` 传 `index + 1`,按图库长度取模,因此首尾循环;
|
||||
- 每次切换同时替换可见层与裁剪层,并重建像素栅格与键盘落点;
|
||||
- 切换会立即结束当前点亮、清空粒子与涟漪,避免两幅图形的坐标混用;
|
||||
- 图库只有一幅图形时两个按钮整体隐藏。
|
||||
|
||||
---
|
||||
|
||||
## 7. 粒子系统
|
||||
|
||||
粒子画在一张覆盖视口的独立 canvas 上,`devicePixelRatio` 上限取 2,避免 4K 屏下过度绘制。
|
||||
|
||||
### 7.1 发射位置
|
||||
|
||||
- 优先从点击点附近 `spawn_radius` 内的实心单元格采样;
|
||||
- 26% 的粒子从整幅图形的实心区域采样,让远处也有零星光点;
|
||||
- 若像素栅格尚未建立,退化为点击点周围随机散布。
|
||||
|
||||
粒子从“图形的实心部分”升起,而不是从空心处凭空出现,这强化了“点击的是笔画”的因果感。
|
||||
|
||||
### 7.2 运动与外观
|
||||
|
||||
- 向上初速度 50–170 px/s,带水平散开与正弦摆动;
|
||||
- 轻微重力(11 px/s²)让上升逐渐减速;
|
||||
- 生命周期 900–2400ms,前 7.5% 淡入,后 38% 平滑淡出;
|
||||
- 7 种形状:正方形、长方形、三角形、四角星、五角星、圆形、椭圆,均用 Canvas path 绘制;
|
||||
- 以 `globalCompositeOperation = 'lighter'` 叠加,粒子与光晕相互提亮;
|
||||
- 辉光精灵按颜色缓存为 64×64 径向渐变贴图,避免每帧创建渐变;
|
||||
- 粒子总数上限 900;`prefers-reduced-motion` 时数量降为 35%。
|
||||
|
||||
形状开关、数量、尺寸、寿命、上升速度、散开度、摆动、采样半径、辉光均在 `properties.js` 中逐项控制。
|
||||
|
||||
---
|
||||
|
||||
## 8. 时间线与状态机
|
||||
|
||||
### 8.1 点亮与恢复
|
||||
|
||||
一次点亮的状态变化:
|
||||
|
||||
```text
|
||||
REST
|
||||
│ click / Enter / Space / 停留满 hover_delay_ms
|
||||
▼
|
||||
LIT ── flood 半径扩张、渐变流动、粒子生成
|
||||
│ restore_ms - fade_out_ms(默认 2.28s)
|
||||
▼
|
||||
FADING ── neonWrap / glowGroup 透明度渐隐
|
||||
│ restore_ms(默认 3.0s)
|
||||
▼
|
||||
REST
|
||||
```
|
||||
|
||||
- 点击发生在 LIT 或 FADING 期间时,直接以新参数重新 `ignite()`,重置计时并换一套渐变;
|
||||
- `html.is-lit` 类同步控制角标颜色、环境光与状态样式;
|
||||
- `frame()` 是唯一的主循环,仅在有点亮、粒子、涟漪或停留计时存在时继续调度,静置时归零,不常驻空转;
|
||||
- 页面不显示倒计时或状态文本,恢复过程完全通过光的渐隐表达。
|
||||
|
||||
### 8.2 停留触发(hover dwell)
|
||||
|
||||
把鼠标停在实心笔画上一段时间(默认 620ms)会自动点亮一次,落点就是指针当前位置,效果与点击完全一致。它复用第 5 节的实心判定:矢量模式走 `hitPad` 的 `data-hit`,像素模式走 alpha 栅格,因此停在镂空或背景上永远不会计时、不会点亮。
|
||||
|
||||
停留本身是一个独立的小状态机,与点亮状态机解耦:
|
||||
|
||||
```text
|
||||
armed(可触发)
|
||||
│ pointermove 命中实心 + 允许 hover + 设备可悬停
|
||||
▼
|
||||
charging(计时中)── 每帧推进 progress = (now - startedAt) / hover_delay_ms
|
||||
│ progress ≥ 1
|
||||
▼
|
||||
fireHover() → ignite() → armed = false(本次停留机会用掉)
|
||||
│ 指针移开实心 / 失焦 / 切换图形或模式 / 窗口隐藏
|
||||
▼
|
||||
armed = true(重新武装,等待下一次停留)
|
||||
```
|
||||
|
||||
关键取舍:
|
||||
|
||||
- **每次停留只触发一次**。`fireHover()` 与 `ignite()` 都会把 `armed` 置为 `false`;只要指针不离开实心区域,无论停留多久都不会再次点亮。必须移开到镂空/背景(或离开图形)再回来,`hoverCancel()` 才把 `armed` 复位。点击、键盘点亮同样消耗这次停留机会,避免“点一下又自动补一下”的重复触发。
|
||||
- **抖动容差**。计时锚点 `ax/ay` 记录开始停留的位置,指针移动超过 `hover_move_px`(默认 7px)视为重新停留,计时归零;容差之内的微小抖动不打断计时,兼顾手抖与“真正停住”的判定。
|
||||
- **进度环**。停留时在指针处用粒子 canvas 以加色方式画一枚细进度环(轨道圆 + 进度弧 + 中心点 + 缓存辉光精灵),颜色取当前强调色 `state.accent`,半径随进度轻微收缩。它是纯装饰反馈,`hover_ring: false` 可关闭而不影响触发;移开后进度环按 `dt * 4.2` 平滑淡出,不残留。
|
||||
- **设备与时机门槛**。仅在 `(hover: hover) and (pointer: fine)` 的设备上启用,且只响应 `mouse` / `pen` 指针;触摸(`touch`)被排除,避免滑动误触。`pointerleave`、`pointerdown`、窗口 `blur`、`document` 的 `mouseleave`、页面隐藏、切换图形/模式、resize 都会 `hoverCancel()`,防止计时跨状态泄漏。
|
||||
- **不新增常驻循环**。`charging` 或进度环未淡尽时才让 `frame()` 继续调度;静止且无停留时主循环照旧归零,保持第 10 节的静置零 RAF 承诺。
|
||||
|
||||
---
|
||||
|
||||
## 9. 配置系统
|
||||
|
||||
`properties.js` 是唯一行为入口。它是一段经典脚本,向 `window.WALLPAPER_CONFIG` 赋一个与页面默认值同结构的普通对象;`index.html` 在主脚本之前用 `<script src="properties.js">` 加载它。加载流程:
|
||||
|
||||
1. 读取 `window.WALLPAPER_CONFIG`;文件缺失或未定义时回退到 `DEFAULTS`;
|
||||
2. 与 `DEFAULTS` 深合并;
|
||||
3. 做类型与范围收敛:分辨率 32–420、阈值 0.02–0.9、不透明度 0–1、恢复时间 300–60000ms、停留延时 120–6000ms、停留抖动 0–120px、粒子数 0–400、色板 3–12 色等;非法颜色回退到默认值,非法数值回退到默认值,布尔项按真值收敛;
|
||||
4. 应用 CSS 变量与类:图形尺寸、静置颜色/透明度、外发光强度、颗粒强度、环境光开关、静置扫光开关;
|
||||
5. 像素栅格在初始化时按配置分辨率与静置颜色生成一次。
|
||||
|
||||
关键配置项:
|
||||
|
||||
| 区域 | 作用 |
|
||||
|---|---|
|
||||
| `artwork.render_mode` | 初始模式:`vector` / `pixel` |
|
||||
| `artwork.size` | 中央图形尺寸,任意 CSS 长度 |
|
||||
| `artwork.color` | 静置图形的颜色(十六进制,两种模式均生效) |
|
||||
| `artwork.opacity` | 静置图形的不透明度 0–1(点击后的荧光效果不受影响) |
|
||||
| `artwork.pixel_resolution` | 像素模式横向块数 |
|
||||
| `artwork.pixel_threshold` | 像素命中的最小覆盖率 |
|
||||
| `artwork.hover_scale` | 鼠标悬停图形时的放大系数(1 = 不放大,默认 1.04) |
|
||||
| `effect.restore_ms` | 点亮后多久完全恢复 |
|
||||
| `effect.fade_out_ms` | 渐隐时长 |
|
||||
| `effect.flood_ms` | 光从落点漫过图形的时间 |
|
||||
| `effect.ambient_glow` / `rest_sheen` / `grain_opacity` | 环境光、静置扫光、颗粒 |
|
||||
| `effect.hover_trigger` | 是否启用停留触发(默认 `true`;关闭后点击/键盘照常) |
|
||||
| `effect.hover_delay_ms` | 停留多久才点亮,120–6000ms(默认 620) |
|
||||
| `effect.hover_move_px` | 停留期间允许的抖动像素,0–120(默认 7,超出重新计时) |
|
||||
| `effect.hover_ring` | 停留时是否绘制指针进度环(默认 `true`,关闭不影响触发) |
|
||||
| `palette` | 任意 3–12 个十六进制颜色 |
|
||||
| `particles.*` | 数量、七种形状开关、尺寸、寿命、速度、散开、摆动、采样半径、辉光 |
|
||||
|
||||
**为什么不需要静态服务器**:`file://` 下浏览器会把 `fetch` 本地文件视为跨源请求(`Origin: null`)而拒绝,但经典 `<script src>` 不受这条限制;`type="module"` 仍受跨源限制。因此配置改为普通脚本后:
|
||||
|
||||
- 直接双击 `index.html`,`properties.js` 的参数照常生效,修改后刷新即可;
|
||||
- 仍可用任意静态服务器打开(例如 `python -m http.server 8137`),行为一致;
|
||||
- 页面在控制台会提示当前是“加载了 properties.js”还是“使用内置默认值”。
|
||||
|
||||
注意:配置中不要使用 `export` / `import`,也不要把标签改成 `type="module"`,否则在 `file://` 下会整体失效。
|
||||
|
||||
**图库**:`file://` 下无法在运行时枚举 `assets/svgs`,因此图库是一份预生成清单。运行 `python tools/build-gallery.py` 会扫描该目录,按文件名排序,把每幅 SVG 的形状归一化到 1500×1200 画布(保持宽高比、居中),解析 `<use>` 引用,并展平组与变换(`clipPath` 不支持 `<g>`),生成 `window.WALLPAPER_GALLERY`。新增或删除 SVG 后重新运行脚本并刷新页面即可;排序后的第一幅是初始图形。
|
||||
|
||||
---
|
||||
|
||||
## 10. 性能取舍
|
||||
|
||||
- 静置时没有持续 RAF;只剩 CSS 扫光与环境渐变,几乎不占 CPU;
|
||||
- 粒子 canvas 的 DPR 上限为 2,且使用缓存精灵而非逐帧渐变;
|
||||
- 粒子数组上限 900,寿命结束或越界即移除;
|
||||
- 像素模式 30fps 节流,且只在点亮或模式可见时绘制;
|
||||
- 像素栅格、命中表、静置马赛克只在初始化时生成一次;
|
||||
- 发光层只有两份模糊 `<use>`,没有为每帧重建 SVG 滤镜;
|
||||
- 渐变动画通过修改 `gradientTransform` 完成,不重排 DOM。
|
||||
|
||||
---
|
||||
|
||||
## 11. 可访问性与响应式
|
||||
|
||||
- SVG 具有 `role="button"`、`tabindex="0"` 和说明性的 `aria-label`;
|
||||
- `Enter` / `Space` 在矢量模式下从已知实心点 (750, 834) 点亮;
|
||||
- 键盘聚焦时有虚线焦点框,偏移 20px,与角标语言一致;
|
||||
- 模式按钮维护 `aria-pressed`,并提供中文 `title` 提示;
|
||||
- 纯装饰的角标、颗粒、粒子画布均标记 `aria-hidden`;
|
||||
- `prefers-reduced-motion` 下 CSS 动画被压缩到 0.001ms,粒子数量降至 35%;
|
||||
- `(pointer: coarse)` 下扩大命中描边与按钮触控高度;
|
||||
- 停留触发仅在 `(hover: hover) and (pointer: fine)` 设备启用,且只认 `mouse` / `pen`,触摸滑动不会误触;`prefers-reduced-motion` 下停留照常触发,进度环作为轻量反馈保留;
|
||||
- 760px 断点收紧图形尺寸与控制组边距;390×844 实测无横向溢出。
|
||||
|
||||
---
|
||||
|
||||
## 12. 验证记录
|
||||
|
||||
使用无头 Chromium + CDP 做了真实事件级验证,测试脚本为临时文件,已清理:
|
||||
|
||||
| 用例 | 结果 |
|
||||
|---|---|
|
||||
| 点击实心笔画点亮 | 通过 |
|
||||
| 点击图形内部镂空 | 无响应 |
|
||||
| 点击画布外黑色背景 | 无响应 |
|
||||
| 默认 3 秒后恢复 | 通过(2.28s 开始渐隐,3.0s 完成) |
|
||||
| 点亮中途再次点击 | 重新点亮、替换渐变、计时重置 |
|
||||
| 连续两次点击渐变不同 | 通过(色序、渐变角度、色带位置均不同) |
|
||||
| 像素模式渲染与命中 | 通过(空心格拒绝) |
|
||||
| 模式切换 / `V` 快捷键 | 通过 |
|
||||
| `Enter` 键盘点亮 | 通过(落点取图形中心附近的实心格) |
|
||||
| 右侧 `PREV` / `NEXT` 轮换图形 | 通过(首尾循环:`1/7 → PREV → 7/7 → NEXT → 1/7`;可见层、裁剪层、像素栅格与提示文案同步切换) |
|
||||
| 1024×1024 图形归一化 | 通过(`狸花猫.svg` 居中缩放后,霓虹裁剪与粒子沿轮廓生效) |
|
||||
| 全部 7 幅图库图形渲染 | 通过(含 `<use>` 引用的苹果图标;品牌图标的镂空、轮廓与粒子均正常) |
|
||||
| 极简界面文本 | 通过(可见文本仅 `VECTOR / PIXEL` 与 `PREV / NEXT`,四角限位符保留) |
|
||||
| `artwork.color` 自定义 | 通过(矢量与像素静置层均使用指定颜色) |
|
||||
| `artwork.opacity` 自定义 | 通过(0.45 时静置层变淡;点击后的荧光与粒子保持原强度) |
|
||||
| 1440×900 与 390×844 布局 | 通过(390 视口 `scrollWidth = 390`,无横向溢出) |
|
||||
| `file://` 直接打开 | 通过(`properties.js` 自定义参数生效,字体与像素采样正常) |
|
||||
| 自定义 `properties.js` | 通过(模式、色板、尺寸、静置颜色/透明度、恢复时间、粒子形状、颗粒强度均生效) |
|
||||
| 停留满 620ms 自动点亮 | 通过(140/360/450ms 时未触发,约 620ms 触发一次,落点为指针处) |
|
||||
| 停在实心不移动 | 通过(3.4s+ 只点亮一次,不重复触发) |
|
||||
| 移开再回来重新武装 | 通过(离开实心后返回可再次停留触发) |
|
||||
| 抖动超过 7px 重新计时 | 通过(7 次 14.4px 移动期间不触发,停稳后触发) |
|
||||
| 停在镂空 / 背景 | 无响应(不计时、不点亮) |
|
||||
| 触摸指针(`touch`) | 不触发停留(仅 `mouse` / `pen`) |
|
||||
| 停留进度环 | 通过(环墨迹随进度增长 928→2226 设备像素,移开后淡出归零) |
|
||||
| 点击 / `Enter` 与停留互斥 | 通过(计时中点击只产生 1 次点亮,机会被消耗) |
|
||||
| 像素模式停留触发 | 通过(371 个实心格上色;空心格停留不触发) |
|
||||
| 切换图形打断停留 | 通过(计时中切换会取消,新图形停留正常) |
|
||||
| `hover_delay_ms` / `hover_ring` / `hover_trigger` | 通过(1500ms 延时生效;关环仍触发;关触发后点击/键盘照常) |
|
||||
| 停留配置非法值收敛 | 通过(`'abc'`→620、`-3`→0、`'yes'`/`1` 按真值处理) |
|
||||
| `file://` 下停留触发 | 通过(含像素栅格命中) |
|
||||
| 停留后静置零 RAF | 通过(5×(停留+点击)=10 次点亮后,fx 墨迹 0、霓虹/辉光透明度 0、1s 内 RAF 增量 0) |
|
||||
| 失焦 / 鼠标离开窗口取消 | 通过(`blur` / `mouseleave` 复位计时) |
|
||||
|
||||
停留触发部分的验证方式与上表早期用例不同:本轮应用内浏览器页面处于隐藏态(`visibilityState = hidden`),原生截图与 `click` / `hover` 工具不可用,且隐藏页会暂停 `requestAnimationFrame`、节流定时器。因此改用 `evaluate_script` 注入测试桩完成真实事件级验证——用 `MessageChannel` 节律驱动 RAF 与 `__sleep`(隐藏页下 `MessageChannel` 任务仍自由运行),用 `MutationObserver` 监听 `#floodCircle` 的 `cx` 变化精确计数点亮,用 `SVGGeometryElement.isPointInFill` + 逐路径 `getScreenCTM().inverse()` 做几何命中校验,用 `document.elementFromPoint` 核对实心→`hitPad`、镂空→`mark` 的事件路由,并按 `devicePixelRatio`(实测 1.5)换算 canvas 读回坐标统计进度环墨迹。进度环外观另用页内合成(序列化 `#mark` SVG + `#particles` canvas 为 240×240 预览)确认:细琥珀色进度弧 + 柔和加色辉光,精确居中于笔画上的指针,与既有涟漪/强调色视觉语言一致。全程控制台零报错,`scrollWidth == clientWidth` 无横向溢出。未能取得真实浏览器截图,外观结论来自页内合成预览而非原生截屏。
|
||||
|
||||
验证过程中修复的关键问题:
|
||||
|
||||
1. `hitPad` 缺少 `data-hit`,导致所有点击被判定为未命中;
|
||||
2. `clipPath` 内 `<use>` 引用组导致裁剪为空,霓虹层不可见;
|
||||
3. `clipPath` 内直接放 `<g>` 同样会被 Chrome 裁成空,因此图库生成器把组展平,把变换写到每个形状上;
|
||||
4. 像素模式未保存 alpha 缓冲,空心格仍可命中;
|
||||
5. 像素漫开延迟函数未在点亮时调用;
|
||||
6. 极简化界面后,清除了脚本对已删除读数/状态节点的引用,避免初始化空引用。
|
||||
|
||||
未在 Firefox / Safari 上做逐项实测;实现使用标准 SVG/CSS/Canvas 能力,但 `clipPath` 已改为展平的形状元素以避开已知兼容差异。
|
||||
|
||||
---
|
||||
|
||||
## 13. 已知限制
|
||||
|
||||
- **配置必须是经典脚本**。`properties.js` 通过 `<script src>` 加载才能在 `file://` 下工作,不能改成 ES module,也不能恢复为 `fetch` 读取的外部 YAML;语法错误或文件缺失时页面会静默回退到 `DEFAULTS`。
|
||||
- **新增图形后需要重新生成图库**。`file://` 无法枚举目录,`gallery.js` 是预生成清单;新增或删除 `assets/svgs/*.svg` 后运行 `python tools/build-gallery.py`。图库只提取矢量形状(`path` / `circle` / `rect` / `ellipse` / `line` / `polyline` / `polygon`)以及通过 `<use>` 引用的形状;文字、位图、`foreignObject` 和 `<symbol>` 会被忽略。所有图形统一归一化到 1500×1200 画布,保持宽高比并居中。
|
||||
- **图形几何在 DOM 中有两份副本**:可见层与 `clipPath` 裁剪层;两者由 `gallery.js` 同源生成、切换时一起替换,不再需要手工同步。像素光栅化模板在运行时由可见层生成。
|
||||
- **命中余量向镂空延伸数像素**。细线在移动端只有约 2.3px,完全零容差会让点击几乎不可用;大面积镂空仍然不会被误触。
|
||||
- **像素分辨率在初始化时固定**。修改 `pixel_resolution` 后需要刷新页面。
|
||||
- **`artwork.color` / `artwork.opacity` 只作用于静置层**。点击后的霓虹渐变、辉光与粒子仍使用调色板与满强度,这是为保证“点击效果维持原设计”而做的边界划分。
|
||||
- **键盘点亮目前只在矢量模式**。落点取离画面中心最近的实心格,切换图形后随像素栅格一起更新;像素模式仍需用指针点亮。
|
||||
- **停留触发每次停留只点亮一次,且仅限可悬停设备**。指针停在实心区域不动不会反复触发,必须移开再回来才重新武装;触摸设备与 `touch` 指针不启用停留(避免滑动误触),仍需点击。进度环是纯装饰反馈,关闭 `hover_ring` 不影响触发逻辑。
|
||||
- 内置默认值与 `properties.js` 是两份数据:后者覆盖前者;若只改内置默认值而不提供 `properties.js`,则仅作为文件缺失时的兜底。
|
||||
|
||||
---
|
||||
|
||||
## 14. 小结
|
||||
|
||||
这个实现的核心不是“加一点霓虹效果”,而是把三个容易互相冲突的目标同时落地:
|
||||
|
||||
- 用 SVG 几何而不是包围盒解决“实心/镂空”的精确性;
|
||||
- 用裁剪 + 遮罩而不是整块叠色,让渐变真正长在原轮廓上;
|
||||
- 用旋转保证与多参数随机,让每次交互都有可感知的差异;
|
||||
- 用经典脚本加载的独立配置、预生成图库与内置兜底默认值,在零构建、零服务和可配置之间取得平衡。
|
||||
|
||||
如果需要继续演进,最有价值的方向是:让图库生成器覆盖更多 SVG 特性(文字转轮廓、位图描摹);给像素模式补上键盘落点;以及把配置读取扩展为可选的 `?config=` 参数,方便做多套视觉预设的对比。
|
||||
我的壁纸
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 8.8 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 24 24"><path fill="currentColor" d="M13.262 13.576a.07.07 0 0 0 .074 0a27.5 27.5 0 0 0 5.453-3.406a2.7 2.7 0 0 0 .911-1.81a4.5 4.5 0 0 0-1.46-2.98a41.2 41.2 0 0 0-4.994 8.106s-.025.058.016.09m7.574-3.603s-4.7 2.522-7.132 4.168a.1.1 0 0 0-.033.082s.025.041.058.041c.868 0 4.168 0 4.249-.008a3.2 3.2 0 0 0 .95-.221a3.28 3.28 0 0 0 1.785-1.7a3.37 3.37 0 0 0 .123-2.362m-1.474 4.889l-5.535-.2v.009a.08.08 0 0 0-.066.04a.08.08 0 0 0 .025.074a14.2 14.2 0 0 0 2.907 1.72s1.433.486 2.669-1.643m-6.853-1.744l.008.016c.049.025.082-.033.082-.033c.532-.769 2.915-4.315 3.406-6.477a3.64 3.64 0 0 0 0-1.76a2.57 2.57 0 0 0-1.826-1.712s-.418-.106-.868-.172c0 0-1.638 2.113-.843 10.08a.055.055 0 0 0 .041.058m-1.109 0c.033.041.065.024.065.024a.06.06 0 0 0 .05-.065C12.3 5.109 10.674 3 10.674 3l.009-.008c-.238.024-.893.172-.893.172a2.56 2.56 0 0 0-1.81 1.708a3.4 3.4 0 0 0 0 1.76c.492 2.168 2.891 5.741 3.42 6.486m-6.351.909a3.2 3.2 0 0 0 1.056.229c.082.016 3.292 0 4.152 0c.032 0 .057-.041.057-.041v.008c.025-.041-.016-.082-.016-.082C7.866 12.5 3.157 9.982 3.157 9.982a3.275 3.275 0 0 0 1.892 4.045m5.11.647l-5.528.188c.6 1.073 1.613 1.9 2.662 1.646a14 14 0 0 0 2.915-1.72c.041-.041.024-.074.024-.074v.009a.08.08 0 0 0-.073-.049M5.2 10.17a27.6 27.6 0 0 0 5.47 3.414c.009 0 .05.017.074-.016v.008a.054.054 0 0 0 .016-.065A41 41 0 0 0 5.753 5.38S4.181 6.87 4.3 8.368a2.64 2.64 0 0 0 .9 1.802m15.112 7.918H21v2.899h-.688ZM17.16 19.6a1.32 1.32 0 0 0 .483 1.138a1.45 1.45 0 0 0 .974.254h1.114v-.508H18.65c-.516 0-.745-.188-.745-.712h1.826v-.508h-1.815v.017l-.008-.017h.011a.637.637 0 0 1 .734-.655h1.081V18.1h-1.1c-1.008 0-1.474.479-1.474 1.5m.753-.316v-.017h-.011zm-2.244 1.031l-.704-2.227h-.778l-.614 2.227l-.721-2.227h-.712l1.048 2.899h.803l.581-2.162l.672 2.162h.802l.974-2.899h-.679zm-4.407-2.204h-.7l-1.327 2.9h.7l.279-.688h1.359l.287.688h.736zm-.835 1.7l.458-1.114l.475 1.114zm-2.027.013c0 .516-.164.729-.7.729s-.7-.221-.7-.729v-1.736h-.666v1.752a1.1 1.1 0 0 0 .181.778a1.46 1.46 0 0 0 1.179.4a1.46 1.46 0 0 0 1.179-.4a1.16 1.16 0 0 0 .188-.778v-1.752H8.4Zm-3.261-.557H3.665v-1.179h-.663v2.899h.663v-1.212h1.474v1.212h.655v-2.899h-.655Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 24 24"><path fill="currentColor" d="M21.39 5.583c-1.346.012-3.433.196-5.937.977c-1.602.498-3.916 2.742-8.224 6.908c-.57.32-2.67-.891-3.881-1.46c0 0 1.993 3.169 2.705 4.095c1.068 1.46 3.027 2.314 3.027 2.314c-.178-.178-1.53-1.603-1.922-2.422c-.25-.391.034-.962 1.957-2.386c1.745-1.282 7.942-6.515 13.924-7.94c0 0-.6-.095-1.648-.086M24 7.771c-2.065.213-4.06.819-5.947 1.709c-3.775 1.78-10.149 6.338-10.149 6.338c.285.178.57.355.856.498c3.062 1.353 7.585 2.171 8.44 1.886c2.385-.783 5.055-5.802 5.874-8.117c0 0-2.493.997-5.021 2.172c-2.101.997-4.414 2.137-4.414 2.137l5.875-1.781s-1.568 3.703-3.633 4.13s-5.697-1.033-5.697-1.033c.285-.249 4.13-3.063 13.103-6.73c.392-.285.642-.746.713-1.21M0 11.294c.356.962.82 1.853 1.354 2.707c.64.82 3.274 1.496 3.63 1.567C3.346 14.428 0 11.294 0 11.294"/></svg>
|
||||
|
Before Width: | Height: | Size: 873 B |
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1500 1200">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #fff;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path class="cls-1" d="M0,379.23v820.77h300v-520.77L0,379.23ZM290,1190H10.01V403.38l280,280v506.62Z"/>
|
||||
<path class="cls-1" d="M1242.9,0l-492.86,492.86L257.18,0H0v167.08h0v.02l300,300v-.02l141.07,141.07h0s231.01,231.01,231.01,231.01h155.91l134.17-134.17h0s237.83-237.83,237.83-237.83v.02l300-300v-.02h0V0h-257.1ZM1490,163.04l-280,280-17.07,17.05-369.07,369.07h-147.63l-386.22-386.22v.02L10,162.96V10h243.04l497,497L1247.04,10h242.96v153.04Z"/>
|
||||
<path class="cls-1" d="M1200,679.31v520.69h300V379.32l-300,300ZM1489.99,1190h-280v-506.54l280-280v786.54Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 791 B |
@@ -1,47 +0,0 @@
|
||||
/* ─────────────────────────────────────────────────────────────
|
||||
效果配置文件 · 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 // 全页颗粒噪点强度
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,51 +0,0 @@
|
||||
/* ─────────────────────────────────────────────────────────────
|
||||
效果配置文件 · GraduallyBounces(渐亮弹跳)
|
||||
点击 / 停留点亮实心笔画:荧光渐变从落点漫过整幅图形,
|
||||
粒子升起、涟漪扩散,随后渐隐恢复静置。
|
||||
共用部分(图形、渲染模式、色板、PREV/NEXT 轮换)见 properties.js。
|
||||
以经典 <script> 加载,file:// 直接打开同样生效;修改后刷新即可。
|
||||
───────────────────────────────────────────────────────────── */
|
||||
|
||||
window.WALLPAPER_EFFECTS = window.WALLPAPER_EFFECTS || {};
|
||||
|
||||
window.WALLPAPER_EFFECTS['GraduallyBounces'] = {
|
||||
label: 'BOUNCE', // 切换按钮上的短标签
|
||||
config: {
|
||||
effect: {
|
||||
restore_ms: 3000, // 点亮后停留多久开始恢复(毫秒)
|
||||
fade_out_ms: 720, // 渐隐时长(毫秒)
|
||||
flood_ms: 640, // 光从落点漫过整幅图形的时间
|
||||
ambient_glow: true, // 点亮时图形背后的环境辉光
|
||||
rest_sheen: true, // 静置时缓慢扫过图形的微光
|
||||
grain_opacity: 0.045, // 全页颗粒噪点强度
|
||||
hover_trigger: true, // 鼠标停在实心笔画上一段时间后自动点亮一次
|
||||
hover_delay_ms: 620, // 需要停留多久才触发(毫秒)
|
||||
hover_move_px: 7, // 停留期间允许的抖动像素,超出则重新计时
|
||||
hover_ring: true // 停留时在指针处绘制进度环
|
||||
},
|
||||
|
||||
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 // 粒子的加色辉光
|
||||
}
|
||||
}
|
||||
};
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
/* 由 tools/build-gallery.py 生成,请勿手工编辑。
|
||||
新增/删除 assets/svgs 中的 SVG 后运行: python tools/build-gallery.py */
|
||||
window.WALLPAPER_GALLERY = [
|
||||
{
|
||||
"name": "default",
|
||||
"viewBox": "0 0 1500 1200",
|
||||
"markup": "<path d=\"M0,379.23v820.77h300v-520.77L0,379.23ZM290,1190H10.01V403.38l280,280v506.62Z\"/><path d=\"M1242.9,0l-492.86,492.86L257.18,0H0v167.08h0v.02l300,300v-.02l141.07,141.07h0s231.01,231.01,231.01,231.01h155.91l134.17-134.17h0s237.83-237.83,237.83-237.83v.02l300-300v-.02h0V0h-257.1ZM1490,163.04l-280,280-17.07,17.05-369.07,369.07h-147.63l-386.22-386.22v.02L10,162.96V10h243.04l497,497L1247.04,10h242.96v153.04Z\"/><path d=\"M1200,679.31v520.69h300V379.32l-300,300ZM1489.99,1190h-280v-506.54l280-280v786.54Z\"/>"
|
||||
},
|
||||
{
|
||||
"name": "HUAWEI",
|
||||
"viewBox": "0 0 24 24",
|
||||
"markup": "<path d=\"M13.262 13.576a.07.07 0 0 0 .074 0a27.5 27.5 0 0 0 5.453-3.406a2.7 2.7 0 0 0 .911-1.81a4.5 4.5 0 0 0-1.46-2.98a41.2 41.2 0 0 0-4.994 8.106s-.025.058.016.09m7.574-3.603s-4.7 2.522-7.132 4.168a.1.1 0 0 0-.033.082s.025.041.058.041c.868 0 4.168 0 4.249-.008a3.2 3.2 0 0 0 .95-.221a3.28 3.28 0 0 0 1.785-1.7a3.37 3.37 0 0 0 .123-2.362m-1.474 4.889l-5.535-.2v.009a.08.08 0 0 0-.066.04a.08.08 0 0 0 .025.074a14.2 14.2 0 0 0 2.907 1.72s1.433.486 2.669-1.643m-6.853-1.744l.008.016c.049.025.082-.033.082-.033c.532-.769 2.915-4.315 3.406-6.477a3.64 3.64 0 0 0 0-1.76a2.57 2.57 0 0 0-1.826-1.712s-.418-.106-.868-.172c0 0-1.638 2.113-.843 10.08a.055.055 0 0 0 .041.058m-1.109 0c.033.041.065.024.065.024a.06.06 0 0 0 .05-.065C12.3 5.109 10.674 3 10.674 3l.009-.008c-.238.024-.893.172-.893.172a2.56 2.56 0 0 0-1.81 1.708a3.4 3.4 0 0 0 0 1.76c.492 2.168 2.891 5.741 3.42 6.486m-6.351.909a3.2 3.2 0 0 0 1.056.229c.082.016 3.292 0 4.152 0c.032 0 .057-.041.057-.041v.008c.025-.041-.016-.082-.016-.082C7.866 12.5 3.157 9.982 3.157 9.982a3.275 3.275 0 0 0 1.892 4.045m5.11.647l-5.528.188c.6 1.073 1.613 1.9 2.662 1.646a14 14 0 0 0 2.915-1.72c.041-.041.024-.074.024-.074v.009a.08.08 0 0 0-.073-.049M5.2 10.17a27.6 27.6 0 0 0 5.47 3.414c.009 0 .05.017.074-.016v.008a.054.054 0 0 0 .016-.065A41 41 0 0 0 5.753 5.38S4.181 6.87 4.3 8.368a2.64 2.64 0 0 0 .9 1.802m15.112 7.918H21v2.899h-.688ZM17.16 19.6a1.32 1.32 0 0 0 .483 1.138a1.45 1.45 0 0 0 .974.254h1.114v-.508H18.65c-.516 0-.745-.188-.745-.712h1.826v-.508h-1.815v.017l-.008-.017h.011a.637.637 0 0 1 .734-.655h1.081V18.1h-1.1c-1.008 0-1.474.479-1.474 1.5m.753-.316v-.017h-.011zm-2.244 1.031l-.704-2.227h-.778l-.614 2.227l-.721-2.227h-.712l1.048 2.899h.803l.581-2.162l.672 2.162h.802l.974-2.899h-.679zm-4.407-2.204h-.7l-1.327 2.9h.7l.279-.688h1.359l.287.688h.736zm-.835 1.7l.458-1.114l.475 1.114zm-2.027.013c0 .516-.164.729-.7.729s-.7-.221-.7-.729v-1.736h-.666v1.752a1.1 1.1 0 0 0 .181.778a1.46 1.46 0 0 0 1.179.4a1.46 1.46 0 0 0 1.179-.4a1.16 1.16 0 0 0 .188-.778v-1.752H8.4Zm-3.261-.557H3.665v-1.179h-.663v2.899h.663v-1.212h1.474v1.212h.655v-2.899h-.655Z\" transform=\"translate(150 0) scale(50)\"/>"
|
||||
},
|
||||
{
|
||||
"name": "ROG",
|
||||
"viewBox": "0 0 24 24",
|
||||
"markup": "<path d=\"M21.39 5.583c-1.346.012-3.433.196-5.937.977c-1.602.498-3.916 2.742-8.224 6.908c-.57.32-2.67-.891-3.881-1.46c0 0 1.993 3.169 2.705 4.095c1.068 1.46 3.027 2.314 3.027 2.314c-.178-.178-1.53-1.603-1.922-2.422c-.25-.391.034-.962 1.957-2.386c1.745-1.282 7.942-6.515 13.924-7.94c0 0-.6-.095-1.648-.086M24 7.771c-2.065.213-4.06.819-5.947 1.709c-3.775 1.78-10.149 6.338-10.149 6.338c.285.178.57.355.856.498c3.062 1.353 7.585 2.171 8.44 1.886c2.385-.783 5.055-5.802 5.874-8.117c0 0-2.493.997-5.021 2.172c-2.101.997-4.414 2.137-4.414 2.137l5.875-1.781s-1.568 3.703-3.633 4.13s-5.697-1.033-5.697-1.033c.285-.249 4.13-3.063 13.103-6.73c.392-.285.642-.746.713-1.21M0 11.294c.356.962.82 1.853 1.354 2.707c.64.82 3.274 1.496 3.63 1.567C3.346 14.428 0 11.294 0 11.294\" transform=\"translate(150 0) scale(50)\"/>"
|
||||
}
|
||||
];
|
||||
-2291
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
/* ─────────────────────────────────────────────────────────────
|
||||
荧光渐变互动壁纸 — 共用配置
|
||||
这里只放所有效果共享的部分:
|
||||
· artwork —— 图形本身(vector / pixel 渲染、尺寸、颜色…)
|
||||
· palette —— 共用荧光色板(点亮渐变 / 3D 高光 / 粒子都从这里取色)
|
||||
· default_effect —— 页面打开时默认启用的效果
|
||||
各效果自己的参数在 effects/ 目录下的独立配置文件里:
|
||||
· effects/GraduallyBounces.js —— 渐亮弹跳(点击/停留点亮)
|
||||
· effects/3Deffects.js —— 3D 跟随(鼠标方向与速度驱动倾斜)
|
||||
以经典 <script> 加载(见 index.html),因此 file:// 直接打开
|
||||
与静态服务器两种方式都会生效;修改后刷新页面即可。
|
||||
请勿改成 <script type="module">:模块脚本在 file:// 下会被
|
||||
浏览器的跨源策略拦截。
|
||||
───────────────────────────────────────────────────────────── */
|
||||
|
||||
window.WALLPAPER_CONFIG = {
|
||||
default_effect: 'GraduallyBounces', // 默认效果:'GraduallyBounces' 或 '3Deffects'
|
||||
|
||||
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)
|
||||
},
|
||||
|
||||
/* 共用色板:所有效果从这里取色(至少 3 个,最多 12 个) */
|
||||
palette: [
|
||||
'#d9ff3f',
|
||||
'#39ffc2',
|
||||
'#3aa0ff',
|
||||
'#b06bff',
|
||||
'#ff4f9a',
|
||||
'#ffb63f'
|
||||
]
|
||||
};
|
||||
@@ -1,177 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""从 assets/svgs 生成 gallery.js。
|
||||
|
||||
用法(新增或删除 SVG 后运行一次):
|
||||
python tools/build-gallery.py
|
||||
|
||||
每个图形都会被归一化到页面使用的 1500×1200 坐标画布:保持宽高比、居中。
|
||||
`clipPath` 不支持 <g>,因此这里会把组展平,并把归一化变换写到每个形状上。
|
||||
仅支持矢量形状(path / circle / rect / ellipse / line / polyline / polygon);
|
||||
文字、位图、foreignObject 会被忽略。
|
||||
"""
|
||||
from pathlib import Path
|
||||
import json
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
SRC_DIR = ROOT / "assets" / "svgs"
|
||||
OUT = ROOT / "gallery.js"
|
||||
CANVAS_W, CANVAS_H = 1500, 1200
|
||||
NS = "{http://www.w3.org/2000/svg}"
|
||||
|
||||
SHAPE_ATTRS = {
|
||||
"path": ("d", "fill-rule", "clip-rule"),
|
||||
"circle": ("cx", "cy", "r"),
|
||||
"rect": ("x", "y", "width", "height", "rx", "ry"),
|
||||
"ellipse": ("cx", "cy", "rx", "ry"),
|
||||
"line": ("x1", "y1", "x2", "y2"),
|
||||
"polyline": ("points",),
|
||||
"polygon": ("points",),
|
||||
}
|
||||
CONTAINERS = {"g", "a", "switch"}
|
||||
SKIP = {
|
||||
"defs", "style", "metadata", "title", "desc", "clippath", "mask", "filter",
|
||||
"lineargradient", "radialgradient", "pattern", "symbol", "marker", "image",
|
||||
"text", "tspan", "textpath", "foreignobject", "script",
|
||||
}
|
||||
|
||||
|
||||
def fmt(n):
|
||||
if abs(n) < 1e-9:
|
||||
return "0"
|
||||
return f"{n:.6f}".rstrip("0").rstrip(".")
|
||||
|
||||
|
||||
def read_view_box(root):
|
||||
vb = root.get("viewBox")
|
||||
if vb:
|
||||
parts = [p for p in vb.replace(",", " ").split() if p]
|
||||
if len(parts) == 4:
|
||||
x, y, w, h = (float(p) for p in parts)
|
||||
if w > 0 and h > 0:
|
||||
return x, y, w, h
|
||||
w = float(str(root.get("width", "")).rstrip("px") or 0)
|
||||
h = float(str(root.get("height", "")).rstrip("px") or 0)
|
||||
if w > 0 and h > 0:
|
||||
return 0.0, 0.0, w, h
|
||||
raise ValueError("缺少有效的 viewBox / width / height")
|
||||
|
||||
|
||||
def normalize_transform(x, y, w, h):
|
||||
scale = min(CANVAS_W / w, CANVAS_H / h)
|
||||
tx = (CANVAS_W - w * scale) / 2
|
||||
ty = (CANVAS_H - h * scale) / 2
|
||||
parts = []
|
||||
if abs(tx) > 1e-9 or abs(ty) > 1e-9:
|
||||
parts.append(f"translate({fmt(tx)} {fmt(ty)})")
|
||||
if abs(scale - 1) > 1e-9:
|
||||
parts.append(f"scale({fmt(scale)})")
|
||||
if abs(x) > 1e-9 or abs(y) > 1e-9:
|
||||
parts.append(f"translate({fmt(-x)} {fmt(-y)})")
|
||||
return " ".join(parts)
|
||||
|
||||
|
||||
def esc(value):
|
||||
return (str(value).replace("&", "&").replace("<", "<")
|
||||
.replace(">", ">").replace('"', """))
|
||||
|
||||
|
||||
def collect_ids(root):
|
||||
ids = {}
|
||||
for el in root.iter():
|
||||
eid = el.get("id")
|
||||
if eid:
|
||||
ids[eid] = el
|
||||
return ids
|
||||
|
||||
|
||||
def walk(node, inherited, out, ids, stack):
|
||||
tag = node.tag.replace(NS, "").lower()
|
||||
own = (node.get("transform") or "").strip()
|
||||
|
||||
if tag == "use":
|
||||
href = node.get("href") or node.get("{http://www.w3.org/1999/xlink}href") or ""
|
||||
if not href.startswith("#"):
|
||||
return
|
||||
ref = ids.get(href[1:])
|
||||
if ref is None or id(ref) in stack:
|
||||
return
|
||||
x = float(node.get("x") or 0)
|
||||
y = float(node.get("y") or 0)
|
||||
chain = " ".join(p for p in (inherited, own) if p)
|
||||
if x or y:
|
||||
chain = " ".join(p for p in (chain, f"translate({fmt(x)} {fmt(y)})") if p)
|
||||
walk(ref, chain, out, ids, stack | {id(ref)})
|
||||
return
|
||||
|
||||
if tag in SKIP:
|
||||
return
|
||||
chain = " ".join(p for p in (inherited, own) if p)
|
||||
|
||||
if tag in CONTAINERS:
|
||||
for child in node:
|
||||
walk(child, chain, out, ids, stack)
|
||||
return
|
||||
|
||||
if tag not in SHAPE_ATTRS:
|
||||
return
|
||||
|
||||
attrs = []
|
||||
for name in SHAPE_ATTRS[tag]:
|
||||
val = node.get(name)
|
||||
if val not in (None, ""):
|
||||
attrs.append(f'{name}="{esc(val)}"')
|
||||
if not attrs:
|
||||
return
|
||||
if chain:
|
||||
attrs.append(f'transform="{esc(chain)}"')
|
||||
out.append(f"<{tag} {' '.join(attrs)}/>")
|
||||
|
||||
|
||||
def build_entry(path):
|
||||
root = ET.parse(path).getroot()
|
||||
vx, vy, vw, vh = read_view_box(root)
|
||||
shapes = []
|
||||
norm = normalize_transform(vx, vy, vw, vh)
|
||||
ids = collect_ids(root)
|
||||
for child in root:
|
||||
walk(child, norm, shapes, ids, set())
|
||||
if not shapes:
|
||||
raise ValueError("没有可用的矢量形状")
|
||||
return {
|
||||
"name": path.stem,
|
||||
"viewBox": f"{fmt(vx)} {fmt(vy)} {fmt(vw)} {fmt(vh)}",
|
||||
"markup": "".join(shapes),
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
except AttributeError:
|
||||
pass
|
||||
if not SRC_DIR.is_dir():
|
||||
sys.exit(f"目录不存在: {SRC_DIR}")
|
||||
files = sorted(SRC_DIR.glob("*.svg"), key=lambda p: p.name.lower())
|
||||
entries = []
|
||||
for path in files:
|
||||
try:
|
||||
entries.append(build_entry(path))
|
||||
except Exception as exc: # noqa: BLE001 - report and continue
|
||||
print(f"[skip] {path.name}: {exc}")
|
||||
|
||||
body = json.dumps(entries, ensure_ascii=False, indent=2)
|
||||
OUT.write_text(
|
||||
"/* 由 tools/build-gallery.py 生成,请勿手工编辑。\n"
|
||||
" 新增/删除 assets/svgs 中的 SVG 后运行: python tools/build-gallery.py */\n"
|
||||
"window.WALLPAPER_GALLERY = " + body + ";\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
print(f"已写入 {OUT.name}: {len(entries)} 个图形")
|
||||
for entry in entries:
|
||||
print(f" - {entry['name']} ({entry['viewBox']})")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user