Skip to content

Instantly share code, notes, and snippets.

@heestand-xyz
Created February 26, 2019 08:32
Show Gist options
  • Save heestand-xyz/583bf809c52abf771d5c3c953417edbf to your computer and use it in GitHub Desktop.
Save heestand-xyz/583bf809c52abf771d5c3c953417edbf to your computer and use it in GitHub Desktop.
Pixels - Rays
let rampPix = GradientPIX(res: .fullscreen)
rampPix.style = .angle
rampPix.colorSteps[1].color = .black
rampPix.colorSteps.append(ColorStep(.liveWave(for: 24.0), .white))
let anglePix = rampPix._quantize(by: 1 / 8)._edge(100)
let flipXPix = anglePix + anglePix._flipX()
let flipYPix = flipXPix + flipXPix._flipY()
let rampExtraPix = GradientPIX(res: .fullscreen)
rampExtraPix.style = .radial
let blurPix = flipYPix._lumaBlur(with: rampExtraPix, radius: 0.1)
let finalPix = blurPix
finalPix.view.frame = view.bounds
view.addSubview(finalPix.view)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment