22 lines
554 B
Swift
22 lines
554 B
Swift
//
|
|
// View+multicolorGlow.swift
|
|
// kaomojiEmoticonKeyboard
|
|
//
|
|
// Created by Robert McGovern on 18/11/2020.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
public extension View {
|
|
func multicolorGlow() -> some View {
|
|
ForEach(0..<2) { i in
|
|
Rectangle()
|
|
.fill(AngularGradient(gradient: Gradient(colors: [.red, .yellow, .green, .blue, .purple, .red]), center: .center))
|
|
.frame(width: 50, height: 50)
|
|
.mask(self.blur(radius: 20))
|
|
.overlay(self.blur(radius: 5 - CGFloat(i * 5)))
|
|
}
|
|
}
|
|
}
|
|
|