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
import SwiftUI | |
import RealityKit | |
struct TurkeyClonesAnimationView: View { | |
let scale: Float = 0.02 | |
let horizontalCount: Int = 4 | |
let horizontalSpacing: Float = 0.0375 | |
let verticalCount: Int = 2 | |
let verticalSpacing: Float = 0.05 |
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
// Don't forget to include this bridging header | |
#ifndef GaussianBlurParams_h | |
#define GaussianBlurParams_h | |
struct GaussianBlurParams { | |
int32_t kernelSize; | |
float intensity; | |
}; |
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
import RealityKit | |
import SwiftUI | |
struct BreathingLeavesView: View { | |
let rootEntity = Entity() | |
@State var children = [EntityPositionPair]() | |
@State private var rotationAngles: SIMD3<Float> = [0, 0, 0] | |
@State private var modulationTimer: Timer? | |
@State private var time: Double = 0.0 | |
@State private var lastRotationUpdateTime = CACurrentMediaTime() |
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
import SwiftUI | |
import RealityKit | |
struct FlamesTextAnimationView: View { | |
var textLines: [String] = ["WELCOME", "TO", "APP NAME"] | |
let commandQueue: MTLCommandQueue | |
let computePipeline: MTLComputePipelineState | |
@State private var texture: LowLevelTexture? | |
let timer = Timer.publish(every: 1.0 / 120.0, on: .main, in: .common).autoconnect() | |
@State private var time: Float = 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
import RealityKit | |
import SwiftUI | |
struct LowLevelTextureTextView: View { | |
let commandQueue: MTLCommandQueue | |
let computePipeline: MTLComputePipelineState | |
@State private var texture: LowLevelTexture? | |
let timer = Timer.publish(every: 1.0 / 120.0, on: .main, in: .common).autoconnect() | |
@State private var time: Float = 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
import GameKit | |
import SwiftUI | |
struct GameTestView: View { | |
@StateObject private var gameKitManager = GameKitManager() | |
@State private var timer: Timer? | |
var body: some View { | |
VStack { | |
Text("Score: \(gameKitManager.score)") |
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
import SwiftUI | |
import RealityKit | |
import ARKit | |
import HandVector | |
struct TargetPracticeView: View { | |
@State var jointPositions: [HandSkeleton.JointName: SIMD3<Float>] = [:] | |
@State var targets: [Target] = [] | |
@State var laserBeamEntity: ModelEntity? |
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
import SwiftUI | |
import RealityKit | |
import ARKit | |
import HandVector | |
struct HandTrackingRaycastView: View { | |
@State var jointPositions: [HandSkeleton.JointName: SIMD3<Float>] = [:] | |
@State var sphereEntity: ModelEntity? | |
@State var laserBeamEntity: ModelEntity? | |
@State var gunEntity: ModelEntity? |
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
import SwiftUI | |
import RealityKit | |
import ARKit | |
import HandVector | |
struct HandTrackingRaycastView: View { | |
@State var jointPositions: [HandSkeleton.JointName: SIMD3<Float>] = [:] | |
@State var sphereEntity: ModelEntity? | |
@State var laserBeamEntity: ModelEntity? | |
@State var gunEntity: ModelEntity? |
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
import SwiftUI | |
import RealityKit | |
import ARKit | |
struct HandTrackingRaycastView: View { | |
@State var jointPositions: [HandSkeleton.JointName: SIMD3<Float>] = [:] | |
@State var sphereEntity: ModelEntity? | |
@State var debugCylinderEntity: ModelEntity? | |
let sphereRadius: Float = 0.1 | |