Skip to content

Instantly share code, notes, and snippets.

View Codelaby's full-sized avatar

Codelaby Codelaby

View GitHub Profile
import SwiftUI
import MetalKit
struct Particle {
let color: SIMD4<Float>
let radius: Float
let lifespan: Float
let position: SIMD2<Float>
let velocity: SIMD2<Float>
}
@Codelaby
Codelaby / ContentView.swift
Created October 22, 2024 21:56 — forked from Lofionic/ContentView.swift
Shader fun
import SwiftUI
struct ContentView: View {
@State private var start = Date.now
var body: some View {
VStack {
TimelineView(.animation) { timeline in
let time = start.distance(to: timeline.date)
Rectangle()