A powerful and easy to use live mesh gradient renderer for iOS, living branch of archived EthanLipnik's MeshKit
This project wouldn't be possible without the awesome work from Moving Parts and their Swift Playground
MeshKit is an easy to use live mesh gradient renderer for iOS. In just a few lines of code, you can create a mesh gradient.
private let randomizer = MeshRandomizer(colorRandomizer: { _, _, _, _, _, _ in
return
})
private let colors: MeshColorGrid = MeshKit.generate(palette: Hue.purple, size: MeshSize(width: 4, height: 4))
public var grainAlpha: Float = MeshDefaults.grainAlpha
public var subdivisions: Float = Float(MeshDefaults.subdivisions)
public var colorSpace: CGColorSpace?
public var body: some View {
ZStack {
Mesh(colors: colors,
animatorConfiguration: .init(meshRandomizer: randomizer),
grainAlpha: grainAlpha,
subdivisions: Int(subdivisions),
colorSpace: colorSpace)
.edgesIgnoringSafeArea(.all)
VStack {
}<