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
| // | |
| // ContentView.swift | |
| // Emitter | |
| // | |
| // Created by localuser on 18.04.23. | |
| // | |
| import SwiftUI | |
| import Combine | |
| import Algorithms |
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
| // | |
| // ContentViewA.swift | |
| // Emitter | |
| // | |
| // Created by localuser on 18.04.23. | |
| // | |
| import Foundation | |
| import SwiftUI |
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
| class GameScene: SKScene, SKPhysicsContactDelegate { | |
| var ball:SKSpriteNode! | |
| var paddle:SKSpriteNode! | |
| var begin = true | |
| let points = Position.shared | |
| override init() { | |
| super.init() | |
| } |
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 SceneKit | |
| import ARKit | |
| import Combine | |
| let actionPublisher = PassthroughSubject<Int,Never>() | |
| var actionSubscriber:AnyCancellable! | |
| var setSquare = PassthroughSubject<Int,Never>() | |
| let tts = AVSpeechSynthesizer() |
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 ARKit | |
| struct Fonts { | |
| static func avenirNextCondensedBold (size: CGFloat) -> Font { | |
| return Font.custom("AvenirNextCondensed-Bold", size: size) | |
| } | |
| static func neutonRegular (size: CGFloat) -> Font { | |
| return Font.custom("Neuton-Regular", size: size) | |
| } |
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 ARKit | |
| struct Fonts { | |
| static func avenirNextCondensedBold (size: CGFloat) -> Font { | |
| return Font.custom("AvenirNextCondensed-Bold", size: size) | |
| } | |
| static func neutonRegular (size: CGFloat) -> Font { | |
| return Font.custom("Neuton-Regular", size: size) | |
| } |
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
| // | |
| // ContentView.swift | |
| // ARKit3 | |
| // | |
| // Created by localuser on 25.12.22. | |
| // | |
| import SwiftUI | |
| import ARKit | |
| import Combine |
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
| if angle < 8 { | |
| looked.outOfRange = false | |
| switch looked.gazeX { | |
| case "eyesLeft": | |
| talk.speaker(words: ["right"]) | |
| sphereNode.simdPosition = SIMD3(x: 1, y: height, z: -6) | |
| sphereNode.geometry?.firstMaterial?.diffuse.contents = UIColor.blue.withAlphaComponent(1) | |
| //looked.paused = true | |
| case "eyesRight": |
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
| do { | |
| let model = try | |
| eyesClassifier1(configuration: config) | |
| let prediction = try model.prediction(eyeLookIn_L: eyeLookIn_L!, eyeLookOut_L: eyeLookOut_L!, eyeLookIn_R: eyeLookIn_R!, eyeLookOut_R: eyeLookOut_R!, eyeLookDown_L: eyeLookDown_L!, eyeLookDown_R: eyeLookDown_R!, eyeLookUp_L: eyeLookUp_L!, eyeLookUp_L_1: eyeLookUp_L!, faceX: 0, faceY: 0) | |
| looked.gazeX = prediction.direction | |
| } catch { | |
| print("model error") | |
| } |
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 Foundation | |
| import AVFoundation | |
| import Combine | |
| var nextPage = PassthroughSubject<Void,Never>() | |
| var reporter = PassthroughSubject<String, Never>() | |
| class speaking: NSObject, AVSpeechSynthesizerDelegate { | |
| var synth:AVSpeechSynthesizer! | |
| var lastWords = "" |
NewerOlder