Glorifier

预览

Glorifier 允许你为你的视图添加一些亮眼装饰,通过赋予它们闪亮的光斑效果

glorifier preview

安装

Swift Package Manager

https://github.com/no-comment/Glorifier.git 添加到你的 Package Dependencies

用法

只需像使用任何其他修饰符一样使用 .glorified() 修饰符

MyView()
    .glorified()

有五个参数可以进一步自定义效果

参数 类型 默认值 描述
duration Double 15 一个周期持续的时间,以秒为单位
rotationIntensity Double 10 3D 旋转效果的强度
shadowColor Color .gray 阴影的颜色
shadowOffset Double 15 阴影的偏移量
lightIntensity Double 0.2 光效强度 (介于 01 之间)