This file contains 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
CXX= g++ | |
CXXFILES= pysmilebridge.cpp | |
CXXINTERMEDIATE= pysmilebridge.o | |
CXXOUTPUTLIBS= libpysmilebridge.so | |
CXXFLAGS= -O3 -DNDEBUG -ffast-math -Wall -fPIC | |
LIBS = -L/path/to/smile/ -lsmile | |
all: lib | |
lib: |
This file contains 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
import ARKit | |
// Example usage: | |
// let twentyCentimeters: Float = 20.cm | |
// let twoMeters: Float = 2.m | |
// let oneMillimeter: Float = 1.mm | |
// let extent: float3 = float3(20.cm, 10.cm, 1.m) | |
extension Int { | |
var mm: Float { |
This file contains 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
import UIKit | |
import PlaygroundSupport | |
import SwiftUI | |
struct ContentView: View { | |
var jumpAmount: CGFloat { | |
CGFloat(-time * time + time) | |
} | |
var scaleX: CGFloat { 1/scaleY } |
This file contains 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
import SwiftUI | |
final class SizeClassNotifier: ObservableObject { | |
@Published var currentSizeClass: UserInterfaceSizeClass = | |
.compact | |
func updateSizeClass(sizeClass: UserInterfaceSizeClass?) { | |
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { | |
self.currentSizeClass = sizeClass ?? .compact |
OlderNewer