Skip to content

Instantly share code, notes, and snippets.

View waynedahlberg's full-sized avatar
💭

Wayne Dahlberg waynedahlberg

💭
View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / V3DViewContainer.swift
Created February 2, 2024 17:14
UIKit proxy for visionOS 3D transforms and effects
//
// V3DViewContainer.swift
// Vision3DUIKit
//
// Created by Steven Troughton-Smith on 02/02/2024.
//
import UIKit
import SwiftUI
@drewolbrich
drewolbrich / MeshEntity+GenerateSolidInteriorModel.swift
Last active March 6, 2024 15:46
A RealityKit ModelEntity extension that replaces its model with a new model with reversed triangle indices
//
// MeshEntity+GenerateSolidInteriorModel.swift
//
// Created by Drew Olbrich on 12/16/23.
// Copyright © 2023 Lunar Skydiving LLC. All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@Priva28
Priva28 / CRTEffect.metal
Last active May 24, 2024 03:25
SwiftUI CRT effect using metal shaders.
#include <metal_stdlib>
#include <SwiftUI/SwiftUI.h>
using namespace metal;
float2 distort(float2 uv, float strength) {
float2 dist = 0.5 - uv;
uv.x = (uv.x - dist.y * dist.y * dist.x * strength);
uv.y = (uv.y - dist.x * dist.x * dist.y * strength);
return uv;
}
"use client";
import {
Dialog,
DialogContent,
DialogTitle,
DialogTrigger
} from "@/components/ui/dialog";
import useDragDrop from "@/hooks/useDragDrop";
import { cn, formatBytes } from "@/lib/utils";
@phenomen
phenomen / shadcn-flexoki.css
Created October 8, 2023 06:30
Flexoki theme for shadcn/ui and shadcn-svelte
@layer base {
:root {
--flexoki-bg: 48 100% 97%;
--flexoki-bg-2: 51 33% 92%;
--flexoki-ui: 51 21% 88%;
--flexoki-ui-2: 50 14% 83%;
--flexoki-ui-3: 55 10% 79%;
--flexoki-tx: 0 3% 6%;
@dkun7944
dkun7944 / ContentView.swift
Created July 31, 2023 03:36
AirDrop iOS 17 Swift.Shader Animation
//
// ContentView.swift
// Airdrop Demo
//
// Created by Daniel Kuntz on 7/30/23.
//
import SwiftUI
struct ContentView: View {
@dkun7944
dkun7944 / CDView.swift
Last active January 14, 2024 23:45
SwiftUI + Swift.Shader CD
//
// CDView.swift
// CD
//
// Created by Daniel Kuntz on 7/3/23.
//
import SwiftUI
struct ShapeWithHole: Shape {
@jasdev
jasdev / ScrimLoader.swift
Last active April 19, 2024 03:47
Rough sketch of Arc’s scrim loading view.
import SwiftUI
/**
### Exercises for the viewer
- Phase interrupt handling.
- Use Swift concurrency.
- Color scheme awareness.
- Rework animations to be more spring-like à la what shipped in `0.90.0`.
@heestand-xyz
heestand-xyz / SplineDemo.swift
Last active August 27, 2022 17:20
Spline Demo in SwiftUI
//
// ContentView.swift
// Spline Demo
//
// Created by Anton Heestand on 2022-08-27.
//
import SwiftUI
struct ContentView: View {
@ryanlintott
ryanlintott / FlippableView.swift
Created July 11, 2022 19:30
A view that flips with a drag gesture.
//
// FlippableView.swift
// FrameUpExample
//
// Created by Ryan Lintott on 2022-07-11.
//
import SwiftUI
struct FlippableView: View {