```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(data): 添加随机颜色生成功能并重构发光滤镜默认配置

- 引入 grand 包用于生成随机数
- 将 GlowFilterDefault 常量改为 GetDef() 函数,实现动态配置
- 修改默认发光滤镜参数:Alpha从0.8改为0.1,BlurX/BlurY从10改为8,
  Quality从2改为1,Level从1改为2
- 新增 RandomRGBToUint32() 函数生成随机RGB颜色并转换为uint32格式
- 在GetDef()函数中使用随机颜色替代固定颜色值

refactor(config): 优化闪光效果服务中的矩阵生成逻辑

- 移除不必要的变量声明,直接在赋值时调用GenerateRandomOffspringMatrix
This commit is contained in:
昔念
2026-02-28 22:31:33 +08:00
parent 8bc3fd3cb7
commit 24f83c0284
2 changed files with 28 additions and 16 deletions

View File

@@ -71,10 +71,10 @@ func (s *ShinyService) RandShiny(id uint32) *data.GlowFilter {
if len(ret) == 0 {
return nil
}
r := model.GenerateRandomOffspringMatrix()
var t = data.GetDef()
t.ColorMatrixFilter = r.Get()
t.ColorMatrixFilter = model.GenerateRandomOffspringMatrix().Get()
return &t
}