This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MeshGradientTest.swift | |
// | |
// Created by Daniel Kuntz on 6/10/24. | |
// | |
import SwiftUI | |
struct ContentTimerView: View { | |
@State var t: Float = 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// Airdrop Demo | |
// | |
// Created by Daniel Kuntz on 7/30/23. | |
// | |
import SwiftUI | |
struct ContentView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CDView.swift | |
// CD | |
// | |
// Created by Daniel Kuntz on 7/3/23. | |
// | |
import SwiftUI | |
struct ShapeWithHole: Shape { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIView { | |
func add3DFloatingEffect(withDepth depth: Double = 1 / 12, duration: Double = 5) { | |
let depthAngle = depth * .pi | |
let rotationAnimationY = CABasicAnimation(keyPath: "transform.rotation.y") | |
rotationAnimationY.fromValue = NSNumber(floatLiteral: -1 * depthAngle) | |
rotationAnimationY.toValue = NSNumber(floatLiteral: depthAngle) | |
rotationAnimationY.duration = duration | |
rotationAnimationY.repeatCount = Float(Int.max) | |
rotationAnimationY.autoreverses = true | |
rotationAnimationY.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) |