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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user