PixelKit Demos

Particle Noise Flow

pod 'PixelKit'
pod 'VertexKit'
import PixelKit
import VertexKit
view.backgroundColor = .black

PixelKit.main.bits = ._16

let res: PIX.Res = .fullscreen
let pres: PIX.Res = .square(Int(sqrt(1_000_000)))

let uv = MetalPIX._uv(res: pres)

let feed = FeedbackPIX()
feed.inPix = uv - 0.5

let noise = NoisePIX(res: pres)
noise.colored = true
noise.zPosition = .live / 10

feed.feedPix = feed
    ._displace(with: noise, distance: .touchX + 0.5)
    ._cross(with: uv - 0.5, fraction: .touchY + 0.5)

let particles = ParticlesUV3DPIX(res: res)
particles.vtxPixIn = feed
particles.color = LiveColor(lum: 1.0, a: 0.5)

let finalPix = particles
finalPix.view.frame = view.bounds
finalPix.view.checker = false
view.addSubview(finalPix.view)
Created by Hexagons