mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-12 05:46:15 +00:00
shaders only show if 17+ blurReplace transitions are opacity with a white shadow for a short time
36 lines
567 B
Swift
36 lines
567 B
Swift
//
|
|
// CRTView.swift
|
|
// ShhShell
|
|
//
|
|
// Created by neon443 on 25/08/2025.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct CRTView: View {
|
|
@State var startTime: Date = .now
|
|
|
|
var body: some View {
|
|
TimelineView(.animation) { tl in
|
|
let time = tl.date.distance(to: startTime)
|
|
if #available(iOS 17, *) {
|
|
Rectangle()
|
|
.foregroundStyle(.black.opacity(1))
|
|
.visualEffect { content, proxy in
|
|
content
|
|
.colorEffect(
|
|
ShaderLibrary.crt(
|
|
.float2(proxy.size),
|
|
.float(time)
|
|
)
|
|
)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
CRTView()
|
|
}
|