Skip to content

Commit 271fe38

Browse files
Comments
1 parent d83e545 commit 271fe38

File tree

9 files changed

+11
-15
lines changed

9 files changed

+11
-15
lines changed

FitForm.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
5988B2F828B19E0500B0DA4E /* WorkoutController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5988B2F728B19E0500B0DA4E /* WorkoutController.swift */; };
2020
5988B2FE28B1D03300B0DA4E /* ding-sound-effect_2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 5988B2FD28B1D03300B0DA4E /* ding-sound-effect_2.mp3 */; };
2121
5988B30028B1F1D500B0DA4E /* StatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5988B2FF28B1F1D500B0DA4E /* StatView.swift */; };
22-
5988B30228B1FA8F00B0DA4E /* chart.png in Resources */ = {isa = PBXBuildFile; fileRef = 5988B30128B1FA8F00B0DA4E /* chart.png */; };
2322
5988B30428B203B100B0DA4E /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5988B30328B203B100B0DA4E /* SplashView.swift */; };
2423
835C286B28B09460002662F8 /* BodySkeleton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 835C286A28B09460002662F8 /* BodySkeleton.swift */; };
2524
835C286F28B0B3D7002662F8 /* APIConstruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 835C286E28B0B3D7002662F8 /* APIConstruct.swift */; };
@@ -43,7 +42,6 @@
4342
5988B2F728B19E0500B0DA4E /* WorkoutController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkoutController.swift; sourceTree = "<group>"; };
4443
5988B2FD28B1D03300B0DA4E /* ding-sound-effect_2.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "ding-sound-effect_2.mp3"; sourceTree = "<group>"; };
4544
5988B2FF28B1F1D500B0DA4E /* StatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatView.swift; sourceTree = "<group>"; };
46-
5988B30128B1FA8F00B0DA4E /* chart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = chart.png; sourceTree = "<group>"; };
4745
5988B30328B203B100B0DA4E /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = "<group>"; };
4846
835C286A28B09460002662F8 /* BodySkeleton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BodySkeleton.swift; sourceTree = "<group>"; };
4947
835C286E28B0B3D7002662F8 /* APIConstruct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIConstruct.swift; sourceTree = "<group>"; };
@@ -88,7 +86,6 @@
8886
5988B2D628B077A500B0DA4E /* FitFormApp.swift */,
8987
5988B30528B2526100B0DA4E /* Views */,
9088
5988B2FD28B1D03300B0DA4E /* ding-sound-effect_2.mp3 */,
91-
5988B30128B1FA8F00B0DA4E /* chart.png */,
9289
5988B2DA28B077A600B0DA4E /* Assets.xcassets */,
9390
5988B2F728B19E0500B0DA4E /* WorkoutController.swift */,
9491
5988B2DC28B077A600B0DA4E /* Preview Content */,
@@ -191,7 +188,6 @@
191188
files = (
192189
5988B2DE28B077A600B0DA4E /* Preview Assets.xcassets in Resources */,
193190
5988B2FE28B1D03300B0DA4E /* ding-sound-effect_2.mp3 in Resources */,
194-
5988B30228B1FA8F00B0DA4E /* chart.png in Resources */,
195191
5988B2DB28B077A600B0DA4E /* Assets.xcassets in Resources */,
196192
);
197193
runOnlyForDeploymentPostprocessing = 0;

FitForm/APIConstruct.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import AVFAudio
99
import Network
1010
import UIKit
1111

12+
// API singleton that makes all calls to backend including UDP connections
1213
class APIConstruct {
1314
var connection: NWConnection?
1415
var hostUDP: NWEndpoint.Host = "192.168.2.100"
@@ -322,7 +323,6 @@ class APIConstruct {
322323
}
323324
}
324325

325-
var construct = APIConstruct()
326326
class APIData: Codable {}
327327

328328
class WithSession: APIData {
@@ -344,3 +344,5 @@ class SignInfo: Encodable {
344344
var email = ""
345345
var password = ""
346346
}
347+
348+
var construct = APIConstruct()

FitForm/AREntities/ARViewContainer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import SwiftUI
1111

1212
private var bodySkeleton: BodySkeleton?
1313
private let bodySkeletonAnchor = AnchorEntity()
14-
14+
// View Container that displays the AR bone
1515
struct ARViewContainer: UIViewRepresentable {
1616
typealias UIViewType = ARView
1717

FitForm/AREntities/BodySkeleton.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import ARKit
99
import Foundation
1010
import RealityKit
11-
11+
// The BodySkeleton which is shown through the AR Video
12+
// The update is used for the udp functionality and sending the data every frame
1213
class BodySkeleton: Entity {
1314
var joints: [String: Entity] = [:]
1415
var bones: [String: Entity] = [:]

FitForm/FitFormApp.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ struct FitFormApp: App {
1212
var body: some Scene {
1313
WindowGroup {
1414
SplashView()
15-
/* LoginView() */
16-
/* SelectWorkoutView() */
17-
// ZStack{
18-
//
19-
// ARViewContainer().edgesIgnoringSafeArea(.all)
20-
// Text("SUCK DICK")
21-
// }
2215
}
2316
}
2417
}

FitForm/Views/SplashView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
import SwiftUI
9-
9+
// Splash Screen that displays logo
1010
struct SplashView: View {
1111
@State var isActive: Bool = false
1212

FitForm/Views/WorkoutView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import AVKit
99
import SwiftUI
10+
// View Container holding the ARView
1011
struct WorkoutView: View {
1112
@State var redirect = false
1213

FitForm/WorkoutController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
import AVKit
99
import Foundation
10+
11+
// Controls the Sound functionalities of the rep counter
12+
// update is called in BodySkeleton update
1013
class WorkoutController {
1114
var audioPlayer: AVAudioPlayer!
1215
let dingSound = Bundle.main.path(forResource: "ding-sound-effect_2", ofType: "mp3")

FitForm/chart.png

-10.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)