Skip to content

Instantly share code, notes, and snippets.

View roberthein's full-sized avatar
👋

Robert-Hein Hooijmans roberthein

👋
View GitHub Profile
@roberthein
roberthein / ChoasLinesShader.metal
Created January 9, 2024 09:50 — forked from realvjy/ChoasLinesShader.metal
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
//
// Diagrams.swift
// DiagramsSample
//
// Created by Chris Eidhof on 16.12.19.
// Copyright © 2019 objc.io. All rights reserved.
//
import SwiftUI
@roberthein
roberthein / sample.swift
Created February 19, 2020 11:40 — forked from chriseidhof/viewmirror.swift
View Inspection
import SwiftUI
struct SizeKey: PreferenceKey {
static func reduce(value: inout CGSize?, nextValue: () -> CGSize?) {
value = value ?? nextValue()
}
}
struct ContentView: View {
@State var width: CGFloat? = nil
var body: some View {