feat(less-computer): 边缘发光改用 EdgeGlow 式四层模糊堆叠 + iridescent 配色#720
Open
appergb wants to merge 1 commit into
Open
feat(less-computer): 边缘发光改用 EdgeGlow 式四层模糊堆叠 + iridescent 配色#720appergb wants to merge 1 commit into
appergb wants to merge 1 commit into
Conversation
把 Less Computer 全屏彩虹边缘发光从原来「两条都带模糊的软光带」改成 EdgeGlow(github.com/vector4wang/EdgeGlow,MIT)的实现方式,让彩虹「实线」 更清晰、发光更有层次。 - 4 层模糊堆叠:最内一条 0.5px 锐利彩虹实线(对应 EdgeGlow blur=0 那层, 定义边缘),外面叠 3 层逐渐变宽、变虚的光晕(blur 3/8/15px),得到 霓虹灯管式发光。原生用 CAShapeLayer + 高斯模糊,这里用 CSS「边框遮罩环 + filter:blur」等价复刻。 - 配色移植 EdgeGlow 默认的 iridescent(Apple Intelligence 高饱和霓虹: 紫→蓝→青→绿→金→橙→红→粉),按 12 段均匀铺满 360°。 - 流光整圈 8s/圈通过 --lcg-angle 旋转(只动渐变角度不动元素形状,GPU 友好), 光晕层各带不同周期呼吸;实线用 normal 保色准,光晕用 screen 叠加增亮。 保留 issue #470 的隐藏即卸载发光层(零 GPU)逻辑、pointer-events:none、 prefers-reduced-motion 降级与 --lcg-radius 圆角变量。纯视觉、仅 macOS、单文件。
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
背景
Less Computer 的全屏彩虹边缘发光,原本是「两条都带模糊的软光带」(
blur 1.1px+blur 4.5px),缺一条清晰的彩虹实线,配色也偏淡蓝粉。参考 EdgeGlow(MIT)的做法重做,使发光更有层次、更接近 Apple Intelligence 的霓虹描边。改动(单文件:
LessComputerGlow.tsx,纯视觉,仅 macOS)移植 EdgeGlow 的「四层模糊堆叠」(原生
CAShapeLayer+ 高斯模糊 → CSS「边框遮罩环 +filter:blur」等价复刻):.lcg-line.lcg-glow-1.lcg-glow-2.lcg-glow-3iridescent(紫→蓝→青→绿→金→橙→红→粉),12 段均匀铺满 360°。--lcg-angle旋转(只动渐变角度不动元素形状,GPU 友好);光晕层各带不同周期呼吸;实线用normal保色准,光晕层用mix-blend-mode: screen叠加增亮。保留项
pointer-events:none、prefers-reduced-motion降级、--lcg-radius圆角变量全部保留。less-computer-glow:active事件契约不变,无需改 Rust。验证
tsc --noEmit通过。测试计划
PR Type
Enhancement
Description
将边缘发光从两层改为四层模糊堆叠,移植 EdgeGlow 风格
新增最内层锐利彩虹实线,定义清晰边缘
外层三层光晕逐渐变宽、变虚,模拟霓虹灯管效果
配色改为 iridescent 高饱和霓虹主题,沿环均匀铺开
Diagram Walkthrough
File Walkthrough
LessComputerGlow.tsx
四层模糊堆叠 + iridescent 配色重写发光层openless-all/app/src/pages/LessComputerGlow.tsx
.lcg-glow-3)