@@ -19,45 +19,45 @@ struct CanvasBoxes: View {
1919 let leftWidth = UIScreen . main. bounds. width / 2
2020 let rightWidth = UIScreen . main. bounds. width / 2 + 75
2121
22- func isLeftWristIn( ) -> Bool {
23- guard let leftWrist = leftWrist else {
24- return false
25- }
26-
27- var topPadding = 0.0
28-
29- if #available( iOS 13 . 0 , * ) {
30- if let window = UIApplication . shared. windows. first {
31- topPadding = window. safeAreaInsets. top
32- }
33- }
34-
35- if ( leftWrist. x > 15 && leftWrist. x < 90 && leftWrist. y > armsHeight + topPadding && leftWrist. y < armsHeight + topPadding + 89 ) {
36- return true
37- }
38-
39- return false
40- }
22+ // func isLeftWristIn() -> Bool {
23+ // guard let leftWrist = leftWrist else {
24+ // return false
25+ // }
26+ //
27+ // var topPadding = 0.0
28+ //
29+ // if #available(iOS 13.0, *) {
30+ // if let window = UIApplication.shared.windows.first {
31+ // topPadding = window.safeAreaInsets.top
32+ // }
33+ // }
34+ //
35+ // if(leftWrist.x > 15 && leftWrist.x < 90 && leftWrist.y > armsHeight + topPadding && leftWrist.y < armsHeight + topPadding + 89){
36+ // return true
37+ // }
38+ //
39+ // return false
40+ // }
4141
42- func isRightWristIn( ) -> Bool {
43- guard let rightWrist = rightWrist else {
44- return false
45- }
46-
47- var topPadding = 0.0
48-
49- if #available( iOS 13 . 0 , * ) {
50- if let window = UIApplication . shared. windows. first {
51- topPadding = window. safeAreaInsets. top
52- }
53- }
54-
55- if ( rightWrist. x > armsRightWidth - 90 && rightWrist. x < armsRightWidth - 16 && rightWrist. y > armsHeight + topPadding && rightWrist. y < armsHeight + topPadding + 89 ) {
56- return true
57- }
58-
59- return false
60- }
42+ // func isRightWristIn() -> Bool {
43+ // guard let rightWrist = rightWrist else {
44+ // return false
45+ // }
46+ //
47+ // var topPadding = 0.0
48+ //
49+ // if #available(iOS 13.0, *) {
50+ // if let window = UIApplication.shared.windows.first {
51+ // topPadding = window.safeAreaInsets.top
52+ // }
53+ // }
54+ //
55+ // if(rightWrist.x > armsRightWidth - 90 && rightWrist.x < armsRightWidth - 16 && rightWrist.y > armsHeight + topPadding && rightWrist.y < armsHeight + topPadding + 89){
56+ // return true
57+ // }
58+ //
59+ // return false
60+ // }
6161
6262 func isLeftAnkleIn( ) -> Bool {
6363 guard let leftAnkle = leftAnkle else {
@@ -116,111 +116,111 @@ struct CanvasBoxes: View {
116116 GeometryReader { geometry in
117117 ZStack {
118118// Color(.black)
119- ZStack {
120- //Top left
121- Path { path in
122- let p1 = CGPoint ( x: 40 , y: armsHeight)
123- let p2 = CGPoint ( x: 16 , y: armsHeight + 24 )
124- let p3 = CGPoint ( x: 24 , y: armsHeight + 8 )
125- let p4 = CGPoint ( x: 40 , y: armsHeight)
126-
127- path. move ( to: p1)
128- path. addLine ( to: p4)
129- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 270 ) , endAngle: . degrees( 180 ) , clockwise: true )
130- path. addLine ( to: p2)
131- } . stroke ( isLeftWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
132-
133- Path { path in
134- let p1 = CGPoint ( x: 66 , y: armsHeight)
135- let p2 = CGPoint ( x: 90 , y: armsHeight + 24 )
136- let p3 = CGPoint ( x: 82 , y: armsHeight + 8 )
137- let p4 = CGPoint ( x: 82 , y: armsHeight)
138-
139- path. move ( to: p1)
140- path. addLine ( to: p4)
141- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 270 ) , endAngle: . degrees( 0 ) , clockwise: false )
142- path. addLine ( to: p2)
143- } . stroke ( isLeftWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
119+ // ZStack {
120+ // //Top left
121+ // Path { path in
122+ // let p1 = CGPoint(x: 40, y: armsHeight)
123+ // let p2 = CGPoint(x: 16, y: armsHeight + 24)
124+ // let p3 = CGPoint(x: 24, y: armsHeight + 8)
125+ // let p4 = CGPoint(x: 40, y: armsHeight)
126+ //
127+ // path.move(to: p1)
128+ // path.addLine(to: p4)
129+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(270), endAngle: .degrees(180), clockwise: true)
130+ // path.addLine(to: p2)
131+ // }.stroke(isLeftWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
144132
145- Path { path in
146- let p1 = CGPoint ( x: 16 , y: armsHeight + 65 )
147- let p2 = CGPoint ( x: 16 , y: armsHeight + 80 )
148- let p3 = CGPoint ( x: 24 , y: armsHeight + 80 )
149- let p4 = CGPoint ( x: 40 , y: armsHeight + 88 )
150-
151- path. move ( to: p1)
152- path. addLine ( to: p2 )
153- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 180 ) , endAngle: . degrees( 90 ) , clockwise: true )
154- path. addLine ( to: p4 )
155- } . stroke ( isLeftWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
133+ // Path { path in
134+ // let p1 = CGPoint(x: 66 , y: armsHeight)
135+ // let p2 = CGPoint(x: 90 , y: armsHeight + 24 )
136+ // let p3 = CGPoint(x: 82 , y: armsHeight + 8 )
137+ // let p4 = CGPoint(x: 82 , y: armsHeight)
138+ //
139+ // path.move(to: p1)
140+ // path.addLine(to: p4 )
141+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(270 ), endAngle: .degrees(0 ), clockwise: false )
142+ // path.addLine(to: p2 )
143+ // }.stroke(isLeftWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
156144
157- Path { path in
158- let p1 = CGPoint ( x: 90 , y: armsHeight + 65 )
159- let p2 = CGPoint ( x: 90 , y: armsHeight + 80 )
160- let p3 = CGPoint ( x: 82 , y: armsHeight + 80 )
161- let p4 = CGPoint ( x: 66 , y: armsHeight + 88 )
162-
163- path. move ( to: p1)
164- path. addLine ( to: p2)
165- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 0 ) , endAngle: . degrees( 90 ) , clockwise: false )
166- path. addLine ( to: p4)
167- } . stroke ( isLeftWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
145+ // Path { path in
146+ // let p1 = CGPoint(x: 16 , y: armsHeight + 65)
147+ // let p2 = CGPoint(x: 16 , y: armsHeight + 80)
148+ // let p3 = CGPoint(x: 24 , y: armsHeight + 80)
149+ // let p4 = CGPoint(x: 40 , y: armsHeight + 88)
150+ //
151+ // path.move(to: p1)
152+ // path.addLine(to: p2)
153+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(180 ), endAngle: .degrees(90), clockwise: true )
154+ // path.addLine(to: p4)
155+ // }.stroke(isLeftWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
168156
169- CanvasCircles ( x: 53 , y: armsHeight + 44 , size1: 50 , size2: 32 , size3: 10 , action: isLeftWristIn)
170- }
157+ // Path { path in
158+ // let p1 = CGPoint(x: 90, y: armsHeight + 65)
159+ // let p2 = CGPoint(x: 90, y: armsHeight + 80)
160+ // let p3 = CGPoint(x: 82, y: armsHeight + 80)
161+ // let p4 = CGPoint(x: 66, y: armsHeight + 88)
162+ //
163+ // path.move(to: p1)
164+ // path.addLine(to: p2)
165+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(0), endAngle: .degrees(90), clockwise: false)
166+ // path.addLine(to: p4)
167+ // }.stroke(isLeftWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
168+ //
169+ // CanvasCircles(x: 53, y: armsHeight + 44, size1: 50, size2: 32, size3: 10, action: isLeftWristIn)
170+ // }
171171
172- ZStack {
173- //Top right
174- Path { path in
175- let p1 = CGPoint ( x: armsRightWidth - 66 , y: armsHeight)
176- let p2 = CGPoint ( x: armsRightWidth - 90 , y: armsHeight + 24 )
177- let p3 = CGPoint ( x: armsRightWidth - 82 , y: armsHeight + 8 )
178- let p4 = CGPoint ( x: armsRightWidth - 66 , y: armsHeight)
179-
180- path. move ( to: p1)
181- path. addLine ( to: p4)
182- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 270 ) , endAngle: . degrees( 180 ) , clockwise: true )
183- path. addLine ( to: p2)
184- } . stroke ( isRightWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
185-
186- Path { path in
187- let p1 = CGPoint ( x: armsRightWidth - 40 , y: armsHeight)
188- let p2 = CGPoint ( x: armsRightWidth - 16 , y: armsHeight + 24 )
189- let p3 = CGPoint ( x: armsRightWidth - 24 , y: armsHeight + 8 )
190- let p4 = CGPoint ( x: armsRightWidth - 24 , y: armsHeight)
191-
192- path. move ( to: p1)
193- path. addLine ( to: p4)
194- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 270 ) , endAngle: . degrees( 0 ) , clockwise: false )
195- path. addLine ( to: p2)
196- } . stroke ( isRightWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
197-
198- Path { path in
199- let p1 = CGPoint ( x: armsRightWidth - 90 , y: armsHeight + 65 )
200- let p2 = CGPoint ( x: armsRightWidth - 90 , y: armsHeight + 80 )
201- let p3 = CGPoint ( x: armsRightWidth - 82 , y: armsHeight + 80 )
202- let p4 = CGPoint ( x: armsRightWidth - 66 , y: armsHeight + 88 )
203-
204- path. move ( to: p1)
205- path. addLine ( to: p2)
206- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 180 ) , endAngle: . degrees( 90 ) , clockwise: true )
207- path. addLine ( to: p4)
208- } . stroke ( isRightWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
209-
210- Path { path in
211- let p1 = CGPoint ( x: armsRightWidth - 16 , y: armsHeight + 65 )
212- let p2 = CGPoint ( x: armsRightWidth - 16 , y: armsHeight + 80 )
213- let p3 = CGPoint ( x: armsRightWidth - 24 , y: armsHeight + 80 )
214- let p4 = CGPoint ( x: armsRightWidth - 40 , y: armsHeight + 88 )
172+ // ZStack {
173+ // //Top right
174+ // Path { path in
175+ // let p1 = CGPoint(x: armsRightWidth - 66, y: armsHeight)
176+ // let p2 = CGPoint(x: armsRightWidth - 90, y: armsHeight + 24)
177+ // let p3 = CGPoint(x: armsRightWidth - 82, y: armsHeight + 8)
178+ // let p4 = CGPoint(x: armsRightWidth - 66, y: armsHeight)
179+ //
180+ // path.move(to: p1)
181+ // path.addLine(to: p4)
182+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(270), endAngle: .degrees(180), clockwise: true)
183+ // path.addLine(to: p2)
184+ // }.stroke(isRightWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
185+ //
186+ // Path { path in
187+ // let p1 = CGPoint(x: armsRightWidth - 40, y: armsHeight)
188+ // let p2 = CGPoint(x: armsRightWidth - 16, y: armsHeight + 24)
189+ // let p3 = CGPoint(x: armsRightWidth - 24, y: armsHeight + 8)
190+ // let p4 = CGPoint(x: armsRightWidth - 24, y: armsHeight)
191+ //
192+ // path.move(to: p1)
193+ // path.addLine(to: p4)
194+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(270), endAngle: .degrees(0), clockwise: false)
195+ // path.addLine(to: p2)
196+ // }.stroke(isRightWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
215197
216- path. move ( to: p1)
217- path. addLine ( to: p2)
218- path. addArc ( center: p3, radius: 8 , startAngle: . degrees( 0 ) , endAngle: . degrees( 90 ) , clockwise: false )
219- path. addLine ( to: p4)
220- } . stroke ( isRightWristIn ( ) ? Color . sprenUISecondaryColor : . white, style: StrokeStyle ( lineWidth: 4 , lineCap: . round, lineJoin: . round) )
221-
222- CanvasCircles ( x: armsRightWidth - 53 , y: armsHeight + 44 , size1: 50 , size2: 32 , size3: 10 , action: isRightWristIn)
223- }
198+ // Path { path in
199+ // let p1 = CGPoint(x: armsRightWidth - 90, y: armsHeight + 65)
200+ // let p2 = CGPoint(x: armsRightWidth - 90, y: armsHeight + 80)
201+ // let p3 = CGPoint(x: armsRightWidth - 82, y: armsHeight + 80)
202+ // let p4 = CGPoint(x: armsRightWidth - 66, y: armsHeight + 88)
203+ //
204+ // path.move(to: p1)
205+ // path.addLine(to: p2)
206+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(180), endAngle: .degrees(90), clockwise: true)
207+ // path.addLine(to: p4)
208+ // }.stroke(isRightWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
209+ //
210+ // Path { path in
211+ // let p1 = CGPoint(x: armsRightWidth - 16, y: armsHeight + 65)
212+ // let p2 = CGPoint(x: armsRightWidth - 16, y: armsHeight + 80)
213+ // let p3 = CGPoint(x: armsRightWidth - 24, y: armsHeight + 80)
214+ // let p4 = CGPoint(x: armsRightWidth - 40, y: armsHeight + 88)
215+ //
216+ // path.move(to: p1)
217+ // path.addLine(to: p2)
218+ // path.addArc(center: p3, radius: 8, startAngle: .degrees(0), endAngle: .degrees(90), clockwise: false)
219+ // path.addLine(to: p4)
220+ // }.stroke(isRightWristIn() ? Color.sprenUISecondaryColor : .white, style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round))
221+ //
222+ // CanvasCircles(x: armsRightWidth - 53, y: armsHeight + 44, size1: 50, size2: 32, size3: 10, action: isRightWristIn)
223+ // }
224224
225225 ZStack {
226226 //Bottom
0 commit comments