Skip to content

Instantly share code, notes, and snippets.

View uvolchyk's full-sized avatar
🪄
Crafting

Uladzislau Volchyk uvolchyk

🪄
Crafting
View GitHub Profile
import UIKit
public final class SpatialContainerView: UIVisualEffectView {
private lazy var borderLayer: CAShapeLayer = {
let layer = CAShapeLayer()
layer.strokeColor = UIColor.white.withAlphaComponent(0.2).cgColor
layer.fillColor = UIColor.clear.cgColor
layer.lineWidth = borderWidth
return layer
}()
import SwiftUI
struct HarmonicButton: View {
var body: some View {
Button(
action: {},
label: {}
)
.frame(width: 240.0, height: 70.0)
.buttonStyle(HarmonicStyle())
import ModelIO
import MetalKit
public struct ObjectParser {
// mesh contains all the vertices, unordered
public let mesh: MTKMesh
// submesh takes the vertices and with indicies places them in order
public let submeshes: [MTKSubmesh]
public var textures: [MTLTexture]
import SwiftUI
struct InteractiveTiles: View {
let rows = 6
let columns = 8
let tileSize: CGFloat = 48
let spacing: CGFloat = 2
var gridSize: CGSize {
CGSize(