-
Notifications
You must be signed in to change notification settings - Fork 2
/
script.js
executable file
·2656 lines (2406 loc) · 186 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Variables
var counter = 0, countPause = 1, runTimer, unsupportedBrowser,
now, time, today, workoutStatus = "waiting", exerciseHTML,
audioElement = document.createElement("audio"),
mainInfoMsg1 = "Do eye workout without glasses or contact lenses. The face is motionless, and just the eyes are working. Avoid sudden movements with the eyes.<br><br>",
mainInfoMsg2 = "If you had eye surgery less than 6 months ago the training not recommended, and you should wait for complete healing (6-7 months after surgery)<br><br>",
mainInfoMsg3 = "When retinal detachment occurs, the exercises not recommended! If you have gone through an operation due to \"the sticking\" of the retina, you need to wait for 6 months after surgery. In the future, you can start exercises gently, without straining your eyes.",
mainInfoMsg = mainInfoMsg1 + mainInfoMsg2 + mainInfoMsg3,
detectOrien = function() {
if ( window.innerWidth > window.innerHeight ) {
hOrintation.src = "svgs/eyeworkout.svg";
} else if ( window.innerWidth < window.innerHeight ) {
hOrintation.src = "svgs/eyeworkout-p.svg";
}
},
comingSoon = function() {
alertify.log('coming soon...');
},
readyExercise = function(exerHTML) {
// Hide redo/next exercise button
redoEx.classList.add("hide");
nextEx.classList.add("hide");
// Set exercise HTML
palmingoutput.innerHTML = exerHTML;
// Are You Ready?
exHeader.textContent = "Are You Ready?";
audioElement.setAttribute("src", "media/areyouready.mp3");
audioElement.play();
// Get Set?
setTimeout(function() {
exHeader.textContent = "Get Set!";
audioElement.setAttribute("src", "media/getset.mp3");
audioElement.play();
}, 1000);
},
blinkingExercise = function(nextFunc) {
exHeader.textContent = "Blink quickly";
audioElement.setAttribute("src", "media/blinkquickly.mp3");
audioElement.play();
palmingoutput.innerHTML = '<p> </p><svg class="blinkquickly" xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; width:100%;" viewBox="0 0 501 202" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6"><rect width="501" height="202" /></clipPath></defs><g clip-path="url(#_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6)"><g><g><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000013" r="101.00000000000011" fill="rgb(136,204,0)" /><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="89.15388224255213" fill="rgb(84,145,16)" /><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)" /><clipPath id="_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)" /></clipPath><g clip-path="url(#_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd)"><radialGradient id="_rgradient_0" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,217.672,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)" /><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)" /></radialGradient><circle vector-effect="non-scaling-stroke" cx="370.6045623594781" cy="69.86306401443477" r="152.93265981654383" fill="url(#_rgradient_0)" /><g><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000011" r="39.9884753726767" fill="rgb(130,195,0)" /><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="99.41490065862888" r="25.13518144317777" fill="rgb(77,124,32)" /><circle vector-effect="non-scaling-stroke" cx="408.89966211351896" cy="89.2249589490973" r="8.410743607787879" fill="rgb(255,255,255)" /><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="80.8142153413092" r="3.364297443115163" fill="rgb(255,255,255)" /><circle vector-effect="non-scaling-stroke" cx="392.81723446251874" cy="80.8142153413092" r="1.6821487215576099" fill="rgb(255,255,255)" /></g></g><clipPath id="_clipPath_RQ8VXRAh2Vvq3L3BYfmXzpFdvjiKeK3R"><circle vector-effect="non-scaling-stroke" cx="400" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)" /></clipPath><g clip-path="url(#_clipPath_RQ8VXRAh2Vvq3L3BYfmXzpFdvjiKeK3R)" class="eyelids"><path d=" M 312.5 13.5 L 487.5 13.5 L 487.5 102.516 C 427.833 122.272 369.51 122.282 312.5 102.516 L 312.5 13.5 Z " fill="rgb(66,113,13)" class="toplid" /><path d=" M 312.5 102.516 C 367.722 110.717 426.066 110.727 487.5 102.516 L 487.5 191.532 L 312.5 191.532 L 312.5 102.516 Z " fill="rgb(66,113,13)" class="bottomlid" /></g></g><g><circle vector-effect="non-scaling-stroke" cx="101.00000000000013" cy="101.00000000000018" r="101.00000000000011" fill="rgb(136,204,0)" /><circle vector-effect="non-scaling-stroke" cx="101.0000000000001" cy="101.00000000000027" r="89.15388224255213" fill="rgb(84,145,16)" /><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)" /><clipPath id="_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)" /></clipPath><g clip-path="url(#_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN)"><radialGradient id="_rgradient_1" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,-81.328,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)" /><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)" /></radialGradient><circle vector-effect="non-scaling-stroke" cx="71.60456235947805" cy="69.86306401443471" r="152.93265981654383" fill="url(#_rgradient_1)" /><g><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000006" r="39.988475372676675" fill="rgb(130,195,0)" /><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="99.41490065862882" r="25.135181443177785" fill="rgb(77,124,32)" /><circle vector-effect="non-scaling-stroke" cx="109.89966211351884" cy="89.22495894909724" r="8.410743607787907" fill="rgb(255,255,255)" /><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="80.81421534130914" r="3.364297443115177" fill="rgb(255,255,255)" /><circle vector-effect="non-scaling-stroke" cx="93.81723446251874" cy="80.81421534130914" r="1.6821487215575956" fill="rgb(255,255,255)" /></g></g><clipPath id="_clipPath_ljJqvodtt6AXKjmoE1LJLIsUeoCvgB8i"><circle vector-effect="non-scaling-stroke" cx="101.00000000000011" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)" /></clipPath><g clip-path="url(#_clipPath_ljJqvodtt6AXKjmoE1LJLIsUeoCvgB8i)" class="eyelids"><path d=" M 13.5 13.5 L 188.5 13.5 L 188.5 102.516 C 128.833 122.272 70.51 122.282 13.5 102.516 L 13.5 13.5 Z " fill="rgb(66,113,13)" class="toplid" /><path d=" M 13.5 102.516 C 68.722 110.717 127.066 110.727 188.5 102.516 L 188.5 191.532 L 13.5 191.532 L 13.5 102.516 Z " fill="rgb(66,113,13)" class="bottomlid" /></g></g></g></g></svg><p> </p>';
// Initialize blinking onload
TweenMax.to(".blinkquickly .toplid", 0.15, {
y: -105,
x: 0,
force3D: true,
yoyo: false,
repeat: -1,
repeatDelay: 0,
ease: Power1.easeOut
});
TweenMax.to(".blinkquickly .bottomlid", 0.15, {
y: 100,
x: 0,
force3D: true,
yoyo: false,
repeat: -1,
repeatDelay: 0,
ease: Power1.easeOut
});
// Stop Blinking
setTimeout(function() {
exHeader.textContent = "Exercise completed";
audioElement.setAttribute("src", "media/exercisecompleted.mp3");
audioElement.play();
TweenMax.to(".blinkquickly .toplid", 0.15, {
y: -105,
x: 0,
force3D: true,
yoyo: false,
repeat: 0,
repeatDelay: 0,
ease: Power1.easeOut
});
TweenMax.to(".blinkquickly .bottomlid", 0.15, {
y: 100,
x: 0,
force3D: true,
yoyo: false,
repeat: 0,
repeatDelay: 0,
ease: Power1.easeOut
});
// Display redo/next exercise button
redoEx.classList.remove("hide");
nextEx.classList.remove("hide");
// Initialize next exercise
nextEx.onclick = function() {
nextFunc();
return false;
};
}, 5000);
},
palmingInstr = function() {
var msg1 = "The palming exercise helps with relaxing the eye muscles, and soothing the optic nerves. Even if you're not trying to improve your eyesight with eye exercises, Palming is still beneficial for eye relaxation, for instance: relieving stress after a long day's work at the computer or reading. \"Palming\" must be performed without glasses or contact lenses.<br><br>",
msg2 = "This exercise should be performed in a sitting position, with elbows on a steady surface like a table. If you don't have a table close by, you can also use your lap. Remember that your posture plays a significant role. Take a few moments to rub your hands together until they feel warm. Interlock your fingers tightly with your palms facing each other, and cover your eyes with your hands. The bottom of your palms should be covering your nose, but your hands should not be touching your eyes, just blocking the light.<br><br>",
msg3 = "Once again, it is crucial to remember that you should not be pressing on your eyes or cheekbones and the light should not be able to show through your fingers. Open your eyes for a moment to make sure that your fingers are closed tightly, and that the light does not pass through.<br><br>",
msg4 = "Close your eyes and allow your eyes to relax. You can practice palming for as long as you wish. The longer your palming session, the more beneficial it is to your eyesight.<br><br>",
msg5 = "The author of this methodology is a famous American scientist named William Bates. He spent a lot of time not only researching the field of ophthalmic diseases but also made many improvements to the field. Many of his techniques originate from Native Americans, who were known for their falcon-like eyesight.";
Swal.fire({
title: "Palming",
html: "<p class=\"tc\" style=\"font-size: 1em; margin: 0 0 1em 0; text-decoration: underline;\">Instructions for this exercise</p><p class=\"tl\">" + msg1 + msg2 + msg3 + msg4 + msg5 + "</p>",
type: "info"
}).then((result) => {
if (result.value) {
// Ready your exercise
exerciseHTML = '<p> </p>' + '<svg xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; width:100%; max-width: 300px;" viewBox="0 0 300 300" preserveAspectRatio="xMidYMin meet"><g><g class="lefthand"><path d=" M 44.123 251 L 72.979 251 C 75.635 251 77.788 248.847 77.788 246.191 L 77.788 164.434 C 77.788 161.778 75.635 159.625 72.979 159.625 L 44.123 159.625 C 41.467 159.625 39.314 161.778 39.314 164.434 L 39.314 246.191 C 39.314 248.847 41.467 251 44.123 251 Z " fill="rgb(77,124,32)" /><path d=" M 104.844 164.347 L 121.071 135.579 L 134.277 60.733 C 134.864 57.419 137.311 54.548 140.625 53.952 C 142.92 53.521 145.288 54.135 147.086 55.626 C 148.884 57.117 149.925 59.33 149.926 61.666 L 149.926 145.197 L 140.409 199.142 C 137.569 215.229 123.589 226.955 107.254 226.954 L 72.979 226.954 L 72.979 169.243 L 96.467 169.243 C 99.939 169.243 103.142 167.372 104.844 164.347 Z " fill="rgb(136,204,0)" /><path d=" M 107.258 231.779 L 107.258 231.779 L 68.151 231.779 L 68.151 164.421 L 96.474 164.421 C 96.474 164.421 96.474 164.421 96.474 164.421 C 98.202 164.421 99.8 163.485 100.635 161.988 C 100.635 161.973 100.649 161.973 100.649 161.973 L 116.459 133.925 L 129.519 59.9 C 129.965 57.366 131.117 55.004 132.845 53.104 C 134.645 51.088 137.064 49.72 139.728 49.216 C 140.505 49.072 141.283 49 142.075 49 C 145.027 49 147.892 50.022 150.167 51.909 C 153.061 54.313 154.746 57.898 154.746 61.657 C 154.746 61.657 154.746 61.671 154.746 61.671 L 154.746 145.616 L 145.156 199.986 C 145.156 199.986 145.156 199.986 145.156 199.986 C 143.587 208.885 138.921 216.963 131.996 222.78 C 125.07 228.583 116.301 231.779 107.258 231.779 C 107.258 231.779 107.258 231.779 107.258 231.779 Z M 109.044 166.711 L 125.675 137.236 L 139.022 61.57 C 139.022 61.57 139.022 61.556 139.022 61.556 C 139.166 60.807 139.497 60.116 140.016 59.554 C 140.405 59.108 140.937 58.806 141.513 58.69 C 141.7 58.662 141.888 58.647 142.075 58.647 C 142.78 58.647 143.457 58.892 144.004 59.338 C 144.695 59.914 145.099 60.764 145.099 61.671 L 145.099 144.781 L 135.653 198.302 C 134.487 204.983 130.988 211.03 125.79 215.379 C 120.606 219.742 114.04 222.132 107.258 222.132 L 107.258 222.132 L 77.798 222.132 L 77.798 174.069 L 96.459 174.069 C 101.672 174.069 106.495 171.246 109.044 166.711 Z " fill-rule="evenodd" fill="rgb(77,124,32)" /></g><g class="righthand"><path d=" M 255.877 251 L 227.022 251 C 224.366 251 222.213 248.847 222.213 246.191 L 222.213 164.434 C 222.213 161.778 224.366 159.625 227.022 159.625 L 255.877 159.625 C 258.533 159.625 260.686 161.778 260.686 164.434 L 260.686 246.191 C 260.686 248.847 258.533 251 255.877 251 Z " fill="rgb(77,124,32)" /><path d=" M 195.156 164.347 L 178.93 135.579 L 165.723 60.733 C 165.137 57.419 162.689 54.548 159.375 53.952 C 157.08 53.521 154.712 54.135 152.914 55.626 C 151.117 57.117 150.076 59.33 150.074 61.666 L 150.074 145.197 L 159.592 199.142 C 162.432 215.229 176.411 226.955 192.746 226.954 L 227.022 226.954 L 227.022 169.243 L 203.534 169.243 C 200.061 169.243 196.858 167.372 195.156 164.347 Z " fill="rgb(136,204,0)" /><path d=" M 192.742 231.779 L 192.742 231.779 L 231.849 231.779 L 231.849 164.421 L 203.527 164.421 C 203.527 164.421 203.527 164.421 203.527 164.421 C 201.799 164.421 200.201 163.485 199.365 161.988 C 199.365 161.973 199.351 161.973 199.351 161.973 L 183.541 133.925 L 170.481 59.9 C 170.035 57.366 168.883 55.004 167.155 53.104 C 165.355 51.088 162.936 49.72 160.272 49.216 C 159.495 49.072 158.717 49 157.925 49 C 154.974 49 152.108 50.022 149.833 51.909 C 146.939 54.313 145.254 57.898 145.254 61.657 C 145.254 61.657 145.254 61.671 145.254 61.671 L 145.254 145.616 L 154.844 199.986 C 154.844 199.986 154.844 199.986 154.844 199.986 C 156.414 208.885 161.079 216.963 168.005 222.78 C 174.93 228.583 183.699 231.779 192.742 231.779 C 192.742 231.779 192.742 231.779 192.742 231.779 Z M 190.956 166.711 L 174.326 137.236 L 160.978 61.57 C 160.978 61.57 160.978 61.556 160.978 61.556 C 160.834 60.807 160.503 60.116 159.984 59.554 C 159.596 59.108 159.063 58.806 158.487 58.69 C 158.3 58.662 158.113 58.647 157.925 58.647 C 157.22 58.647 156.543 58.892 155.996 59.338 C 155.305 59.914 154.902 60.764 154.902 61.671 L 154.902 144.781 L 164.347 198.302 C 165.514 204.983 169.013 211.03 174.211 215.379 C 179.394 219.742 185.96 222.132 192.742 222.132 L 192.742 222.132 L 222.202 222.132 L 222.202 174.069 L 203.541 174.069 C 198.329 174.069 193.505 171.246 190.956 166.711 Z " fill-rule="evenodd" fill="rgb(77,124,32)" /></g></g></svg>' + '<p> </p>';
readyExercise(exerciseHTML);
// Start audio for audio exercise
runTimer = setTimeout(function() {
exHeader.textContent = "Rub your palms together"
audioElement.setAttribute("src", "media/rubyourpalmstogether.mp3");
audioElement.play();
// Initialize rubbing hands together
TweenMax.to(".lefthand", 0.1, {
y: -25,
x: 0,
yoyo: true,
repeat: -1,
ease: Power2.easeInOut
});
TweenMax.to(".righthand", 0.1, {
y: 25,
x: 0,
yoyo: true,
repeat: -1,
ease: Power2.easeInOut
});
// Then cover your eyes
runTimer = setTimeout(function() {
exHeader.textContent = "Cover your open eyes with your hands";
audioElement.setAttribute("src", "media/coveryoureyeswithhands.mp3");
audioElement.play();
setTimeout(function() {
exHeader.textContent = "Stare at your warm palms for 15 seconds";
audioElement.setAttribute("src", "media/stareatpalms15sec.mp3");
audioElement.play();
}, 4000);
palmingoutput.innerHTML = '<p> </p>' + '<svg class="palmsovereyes" xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; max-width: 100%;" viewBox="0 0 666.68 389.6" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="_clipPath_gY99cXwOD1OxI9QZgkC9Bmaw2hoWqSpd"><rect width="666.68" height="389.6"/></clipPath></defs><g clip-path="url(#_clipPath_gY99cXwOD1OxI9QZgkC9Bmaw2hoWqSpd)"><g><g><circle vector-effect="non-scaling-stroke" cx="482.8400125639156" cy="273.6748198742788" r="101.00000000000011" fill="rgb(136,204,0)"/><circle vector-effect="non-scaling-stroke" cx="482.8400125639156" cy="273.6748198742788" r="89.15388224255216" fill="rgb(84,145,16)"/><circle vector-effect="non-scaling-stroke" cx="482.8400125639156" cy="273.6748198742788" r="86.55577268884767" fill="rgb(255,255,255)"/><clipPath id="_clipPath_WeLDxzBn8ZBAYdhhFBGUsrlm7gMp0kft"><circle vector-effect="non-scaling-stroke" cx="482.8400125639156" cy="273.6748198742788" r="86.55577268884767" fill="rgb(255,255,255)"/></clipPath><g clip-path="url(#_clipPath_WeLDxzBn8ZBAYdhhFBGUsrlm7gMp0kft)"><g><radialGradient id="_rgradient_2" fx="0.49999979612112244" fy="0.4999981560039713" cx="0.49999979612112244" cy="0.4999981560039713" r="1" gradientTransform="matrix(305.865,0,0,305.865,300.512,89.605)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"/><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"/></radialGradient><circle vector-effect="non-scaling-stroke" cx="453.4445749233938" cy="242.53788388871325" r="152.93265981654383" fill="url(#_rgradient_2)"/><g><circle vector-effect="non-scaling-stroke" cx="482.8400125639156" cy="273.67481987427857" r="39.9884753726767" fill="rgb(130,195,0)"/><circle vector-effect="non-scaling-stroke" cx="482.659516644722" cy="272.08972053290756" r="25.13518144317777" fill="rgb(77,124,32)"/><circle vector-effect="non-scaling-stroke" cx="491.73967467743444" cy="261.89977882337587" r="8.410743607787879" fill="rgb(255,255,255)"/><circle vector-effect="non-scaling-stroke" cx="482.659516644722" cy="253.48903521558765" r="3.364297443115163" fill="rgb(255,255,255)"/><circle vector-effect="non-scaling-stroke" cx="475.6572470264342" cy="253.48903521558768" r="1.6821487215576099" fill="rgb(255,255,255)"/></g></g></g></g><g><circle vector-effect="non-scaling-stroke" cx="183.84001256391576" cy="273.6748198742788" r="101.00000000000009" fill="rgb(136,204,0)"/><circle vector-effect="non-scaling-stroke" cx="183.8400125639156" cy="273.6748198742788" r="89.15388224255213" fill="rgb(84,145,16)"/><circle vector-effect="non-scaling-stroke" cx="183.8400125639153" cy="273.67481987427857" r="86.55577268884763" fill="rgb(255,255,255)"/><clipPath id="_clipPath_loG8tvCJZNTM2sVdhDao1JgmUI6lSEgZ"><circle vector-effect="non-scaling-stroke" cx="183.8400125639153" cy="273.67481987427857" r="86.55577268884763" fill="rgb(255,255,255)"/></clipPath><g clip-path="url(#_clipPath_loG8tvCJZNTM2sVdhDao1JgmUI6lSEgZ)"><g><radialGradient id="_rgradient_3" fx="0.49999979612112255" fy="0.49999815600397146" cx="0.49999979612112255" cy="0.49999815600397146" r="1" gradientTransform="matrix(305.865,0,0,305.865,1.512,89.605)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"/><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"/></radialGradient><circle vector-effect="non-scaling-stroke" cx="154.44457492339356" cy="242.53788388871325" r="152.93265981654383" fill="url(#_rgradient_3)"/><g><circle vector-effect="non-scaling-stroke" cx="183.84001256391534" cy="273.67481987427857" r="39.988475372676675" fill="rgb(130,195,0)"/><circle vector-effect="non-scaling-stroke" cx="183.65951664472195" cy="272.08972053290734" r="25.1351814431778" fill="rgb(77,124,32)"/><circle vector-effect="non-scaling-stroke" cx="192.7396746774344" cy="261.89977882337587" r="8.410743607787907" fill="rgb(255,255,255)"/><circle vector-effect="non-scaling-stroke" cx="183.65951664472195" cy="253.48903521558768" r="3.3642974431151913" fill="rgb(255,255,255)"/><circle vector-effect="non-scaling-stroke" cx="176.6572470264342" cy="253.48903521558768" r="1.6821487215575814" fill="rgb(255,255,255)"/></g></g></g></g></g><g><g class="lefthand" data-svg-origin="-0.00001256391351489583 0" transform="matrix(1,0,0,1,-300,0)"><path d=" M 305.085 102.407 C 320.772 102.708 333.396 115.518 333.395 131.277 L 333.395 239.817 C 333.395 250.505 332.158 261.157 329.71 271.561 L 310.575 352.886 C 306.892 368.538 292.925 379.6 276.847 379.6 L 134.212 379.6 C 123.127 379.6 112.71 374.296 106.19 365.33 L 15.523 240.66 C 6.143 227.762 8.995 209.704 21.891 200.324 C 34.789 190.944 52.848 193.796 62.227 206.693 L 85.073 238.108 L 85.073 67.752 C 85.073 51.993 97.697 39.183 113.384 38.883 C 129.571 38.573 142.822 52.131 142.822 68.323 L 142.822 194.801 L 148.597 194.801 L 148.597 38.878 C 148.597 23.119 161.221 10.308 176.908 10.008 C 193.096 9.698 206.347 23.256 206.347 39.448 L 206.347 194.801 L 212.122 194.801 L 212.122 67.031 C 212.122 51.271 224.746 38.461 240.433 38.161 C 256.62 37.851 269.871 51.409 269.871 67.601 L 269.871 194.801 L 275.646 194.801 L 275.646 131.847 C 275.646 115.656 288.897 102.098 305.085 102.407 L 305.085 102.407 Z M 279.87 101.43 C 282.72 99.05 285.89 97.08 289.29 95.59 C 294.1 93.49 299.29 92.4 304.54 92.4 C 304.57 92.4 304.6 92.4 304.64 92.4 L 305.18 92.41 C 305.21 92.41 305.25 92.41 305.28 92.41 C 315.45 92.61 325.15 96.79 332.28 104.06 C 339.4 111.32 343.4 121.1 343.39 131.28 L 343.39 131.28 L 343.39 239.82 C 343.39 239.82 343.39 239.82 343.39 239.82 C 343.39 251.28 342.07 262.7 339.44 273.85 C 339.44 273.85 339.44 273.85 339.44 273.85 L 320.31 355.18 C 320.31 355.18 320.31 355.18 320.31 355.18 C 318 364.97 312.46 373.7 304.57 379.95 C 296.68 386.2 286.91 389.6 276.85 389.6 C 276.85 389.6 276.85 389.6 276.85 389.6 L 134.21 389.6 C 134.21 389.6 134.21 389.6 134.21 389.6 C 119.94 389.6 106.5 382.76 98.1 371.21 C 98.1 371.21 98.1 371.21 98.1 371.21 L 7.44 246.54 C 2.61 239.91 0 231.91 0 223.7 C -0.01 211.27 5.95 199.56 16.01 192.24 C 22.64 187.41 30.64 184.8 38.85 184.8 C 51.28 184.79 62.99 190.75 70.31 200.81 C 70.31 200.81 70.31 200.81 70.31 200.81 L 75.07 207.35 L 75.07 67.75 C 75.07 57.58 79.07 47.8 86.19 40.53 C 93.32 33.27 103.02 29.08 113.19 28.88 C 113.22 28.88 113.26 28.88 113.29 28.88 L 113.83 28.88 C 113.86 28.88 113.9 28.88 113.93 28.88 C 119.18 28.88 124.37 29.96 129.18 32.07 C 132.58 33.56 135.76 35.53 138.61 37.92 C 138.85 27.91 142.96 18.38 150.05 11.32 C 157.15 4.26 166.71 0.2 176.71 0.01 C 176.75 0.01 176.78 0.01 176.81 0.01 L 177.36 0 C 177.39 0 177.42 0 177.45 0 C 182.7 0 187.89 1.09 192.7 3.19 C 197.33 5.22 201.51 8.12 205.03 11.74 C 211.69 18.55 215.68 27.53 216.27 37.03 C 223.03 31.46 231.48 28.33 240.24 28.16 C 240.27 28.16 240.3 28.16 240.34 28.16 L 240.88 28.16 C 240.91 28.16 240.95 28.16 240.98 28.16 C 246.23 28.16 251.42 29.24 256.23 31.34 C 260.85 33.37 265.04 36.27 268.56 39.89 C 275.8 47.29 279.86 57.24 279.87 67.59 C 279.87 67.59 279.87 67.6 279.87 67.6 L 279.87 101.43 Z " fill-rule="evenodd" fill="rgb(77,124,32)"/><path d=" M 305.085 102.407 C 288.897 102.098 275.646 115.656 275.646 131.847 L 275.646 194.801 L 269.871 194.801 L 269.871 67.601 C 269.871 51.409 256.62 37.851 240.433 38.161 C 224.746 38.461 212.122 51.271 212.122 67.031 L 212.122 194.801 L 206.347 194.801 L 206.347 39.448 C 206.347 23.256 193.096 9.698 176.908 10.008 C 161.221 10.308 148.597 23.119 148.597 38.878 L 148.597 194.801 L 142.822 194.801 L 142.822 68.323 C 142.822 52.131 129.571 38.573 113.384 38.883 C 97.697 39.183 85.073 51.993 85.073 67.752 L 85.073 238.108 L 62.227 206.693 C 52.848 193.796 34.789 190.944 21.891 200.324 C 8.995 209.704 6.143 227.762 15.523 240.66 L 106.19 365.33 C 112.71 374.296 123.127 379.6 134.212 379.6 L 276.847 379.6 C 292.925 379.6 306.892 368.538 310.575 352.886 L 329.71 271.561 C 332.158 261.157 333.395 250.505 333.395 239.817 L 333.395 131.277 C 333.396 115.518 320.772 102.708 305.085 102.407 L 305.085 102.407 Z " fill="rgb(136,204,0)"/></g><g class="righthand" data-svg-origin="323.28997802734375 0" transform="matrix(1,0,0,1,300,0)"><path d=" M 361.597 102.407 C 377.785 102.098 391.035 115.656 391.035 131.847 L 391.035 194.801 L 396.81 194.801 L 396.81 67.601 C 396.81 51.409 410.061 37.851 426.249 38.161 C 441.936 38.461 454.56 51.271 454.56 67.031 L 454.56 194.801 L 460.335 194.801 L 460.335 39.448 C 460.335 23.256 473.586 9.698 489.773 10.008 C 505.46 10.308 518.084 23.119 518.084 38.878 L 518.084 194.801 L 523.859 194.801 L 523.859 68.323 C 523.859 52.131 537.11 38.573 553.298 38.883 C 568.985 39.183 581.609 51.993 581.609 67.752 L 581.609 238.108 L 604.455 206.693 C 613.834 193.796 631.892 190.944 644.791 200.324 C 657.687 209.704 660.538 227.762 651.159 240.66 L 560.491 365.33 C 553.971 374.296 543.555 379.6 532.469 379.6 L 389.835 379.6 C 373.756 379.6 359.789 368.538 356.106 352.886 L 336.971 271.561 C 334.523 261.157 333.287 250.505 333.287 239.817 L 333.287 131.277 C 333.286 115.518 345.91 102.708 361.597 102.407 L 361.597 102.407 Z M 528.07 37.92 C 530.92 35.53 534.1 33.56 537.5 32.07 C 542.31 29.96 547.5 28.88 552.75 28.88 C 552.79 28.88 552.82 28.88 552.85 28.88 L 553.39 28.88 C 553.43 28.88 553.46 28.88 553.49 28.88 C 563.67 29.08 573.37 33.27 580.49 40.53 C 587.62 47.8 591.61 57.58 591.61 67.75 L 591.61 207.35 L 596.37 200.81 C 596.37 200.81 596.37 200.81 596.37 200.81 C 603.69 190.75 615.4 184.79 627.83 184.8 C 636.04 184.8 644.04 187.41 650.68 192.24 C 660.73 199.56 666.69 211.27 666.68 223.7 C 666.68 231.91 664.07 239.91 659.24 246.54 L 568.58 371.21 C 568.58 371.21 568.58 371.21 568.58 371.21 C 560.18 382.76 546.74 389.6 532.47 389.6 C 532.47 389.6 532.47 389.6 532.47 389.6 L 389.83 389.6 C 389.83 389.6 389.83 389.6 389.83 389.6 C 379.77 389.6 370 386.2 362.11 379.95 C 354.23 373.7 348.68 364.97 346.37 355.18 C 346.37 355.18 346.37 355.18 346.37 355.18 L 327.24 273.85 C 327.24 273.85 327.24 273.85 327.24 273.85 C 324.61 262.7 323.29 251.28 323.29 239.82 C 323.29 239.82 323.29 239.82 323.29 239.82 L 323.29 131.28 L 323.29 131.28 C 323.28 121.1 327.28 111.32 334.4 104.06 C 341.53 96.79 351.23 92.61 361.4 92.41 C 361.44 92.41 361.47 92.41 361.5 92.41 L 362.04 92.4 C 362.08 92.4 362.11 92.4 362.14 92.4 C 367.39 92.4 372.58 93.49 377.39 95.59 C 380.79 97.08 383.96 99.05 386.81 101.43 L 386.81 67.6 C 386.81 67.6 386.81 67.59 386.81 67.59 C 386.82 57.24 390.89 47.29 398.12 39.89 C 401.64 36.27 405.83 33.37 410.45 31.34 C 415.26 29.24 420.46 28.16 425.7 28.16 C 425.74 28.16 425.77 28.16 425.8 28.16 L 426.34 28.16 C 426.38 28.16 426.41 28.16 426.44 28.16 C 435.2 28.33 443.65 31.46 450.41 37.03 C 451 27.53 454.99 18.55 461.65 11.74 C 465.17 8.12 469.36 5.22 473.98 3.19 C 478.79 1.09 483.98 0 489.23 0 C 489.26 0 489.29 0 489.33 0 L 489.87 0.01 C 489.9 0.01 489.93 0.01 489.97 0.01 C 499.98 0.2 509.53 4.26 516.63 11.32 C 523.73 18.38 527.83 27.91 528.07 37.92 Z " fill-rule="evenodd" fill="rgb(77,124,32)"/><path d=" M 361.597 102.407 C 377.785 102.098 391.035 115.656 391.035 131.847 L 391.035 194.801 L 396.81 194.801 L 396.81 67.601 C 396.81 51.409 410.061 37.851 426.249 38.161 C 441.936 38.461 454.56 51.271 454.56 67.031 L 454.56 194.801 L 460.335 194.801 L 460.335 39.448 C 460.335 23.256 473.586 9.698 489.773 10.008 C 505.46 10.308 518.084 23.119 518.084 38.878 L 518.084 194.801 L 523.859 194.801 L 523.859 68.323 C 523.859 52.131 537.11 38.573 553.298 38.883 C 568.985 39.183 581.609 51.993 581.609 67.752 L 581.609 238.108 L 604.455 206.693 C 613.834 193.796 631.892 190.944 644.791 200.324 C 657.687 209.704 660.538 227.762 651.159 240.66 L 560.491 365.33 C 553.971 374.296 543.555 379.6 532.469 379.6 L 389.835 379.6 C 373.756 379.6 359.789 368.538 356.106 352.886 L 336.971 271.561 C 334.523 261.157 333.287 250.505 333.287 239.817 L 333.287 131.277 C 333.286 115.518 345.91 102.708 361.597 102.407 L 361.597 102.407 Z " fill="rgb(136,204,0)"/></g></g></g></svg>' + '<p> </p>';
// Move hands over eyes
TweenMax.to(".palmsovereyes .lefthand", 0.5, {
y: 0,
x: 0,
yoyo: true,
repeat: 0,
ease: Power1.easeInOut
});
TweenMax.to(".palmsovereyes .righthand", 0.5, {
y: 0,
x: 0,
yoyo: true,
repeat: 0,
ease: Power1.easeInOut
});
// Blink quickly
setTimeout(function() {
blinkingExercise(UpandDownInstr);
// Redo exercise
redoEx.onclick = function() {
palmingInstr();
return false;
};
}, 19000);
}, 6000);
}, 3000);
}
});
},
UpandDownInstr = function() {
var msg1 = "Keep your head motionless. Only allow your eyes to do the work.<br><br>",
msg2 = "Look down. Slowly lift your eyes in a straight line up as high as they will go, without stopping to close your eyes or blink. This should take about 10 seconds from start to finish.<br><br>",
msg3 = "(Repeat 3 times for 10 seconds)";
Swal.fire({
title: "Up and Down",
html: "<p class=\"tc\" style=\"font-size: 1em; margin: 0 0 1em 0; text-decoration: underline;\">Instructions for this exercise</p><p class=\"tl\">" + msg1 + msg2 + msg3 + "</p>",
type: "info"
}).then((result) => {
if (result.value) {
// Ready your exercise
exerciseHTML = '<p> </p>' + '<svg class="updownexer" xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; width:100%;" viewBox="0 0 501 202" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6"><rect width="501" height="202"></rect></clipPath></defs><g clip-path="url(#_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6)"><g><g><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000013" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd)"><radialGradient id="_rgradient_0" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,217.672,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="370.6045623594781" cy="69.86306401443477" r="152.93265981654383" fill="url(#_rgradient_0)"></circle><g class="rightiris"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000011" r="39.9884753726767" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="99.41490065862888" r="25.13518144317777" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="408.89966211351896" cy="89.2249589490973" r="8.410743607787879" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="80.8142153413092" r="3.364297443115163" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="392.81723446251874" cy="80.8142153413092" r="1.6821487215576099" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_RQ8VXRAh2Vvq3L3BYfmXzpFdvjiKeK3R"><circle vector-effect="non-scaling-stroke" cx="400" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g><g><circle vector-effect="non-scaling-stroke" cx="101.00000000000013" cy="101.00000000000018" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="101.0000000000001" cy="101.00000000000027" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN)"><radialGradient id="_rgradient_1" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,-81.328,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="71.60456235947805" cy="69.86306401443471" r="152.93265981654383" fill="url(#_rgradient_1)"></circle><g class="leftiris"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000006" r="39.988475372676675" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="99.41490065862882" r="25.135181443177785" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="109.89966211351884" cy="89.22495894909724" r="8.410743607787907" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="80.81421534130914" r="3.364297443115177" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="93.81723446251874" cy="80.81421534130914" r="1.6821487215575956" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_ljJqvodtt6AXKjmoE1LJLIsUeoCvgB8i"><circle vector-effect="non-scaling-stroke" cx="101.00000000000011" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g></g></g></svg>' + '<p> </p>';
readyExercise(exerciseHTML);
// Start audio for audio exercise
runTimer = setTimeout(function() {
exHeader.textContent = "Look up"
audioElement.setAttribute("src", "media/lookup.mp3");
audioElement.play();
// Look up
TweenMax.to(".updownexer .leftiris", 0.1, {
y: -90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".updownexer .rightiris", 0.1, {
y: -90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
// Look down
runTimer = setTimeout(function() {
exHeader.textContent = "Look down"
audioElement.setAttribute("src", "media/lookdown.mp3");
audioElement.play();
TweenMax.to(".updownexer .leftiris", 0.1, {
y: 90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".updownexer .rightiris", 0.1, {
y: 90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 3000);
// Look up
runTimer = setTimeout(function() {
exHeader.textContent = "Look up"
audioElement.setAttribute("src", "media/up.mp3");
audioElement.play();
TweenMax.to(".updownexer .leftiris", 0.1, {
y: -90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".updownexer .rightiris", 0.1, {
y: -90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 6000);
// Look down
runTimer = setTimeout(function() {
exHeader.textContent = "Look down"
audioElement.setAttribute("src", "media/down.mp3");
audioElement.play();
TweenMax.to(".updownexer .leftiris", 0.1, {
y: 90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".updownexer .rightiris", 0.1, {
y: 90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 9000);
// Look up
runTimer = setTimeout(function() {
exHeader.textContent = "Look up"
audioElement.setAttribute("src", "media/up.mp3");
audioElement.play();
TweenMax.to(".updownexer .leftiris", 0.1, {
y: -90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".updownexer .rightiris", 0.1, {
y: -90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 12000);
// Look down
runTimer = setTimeout(function() {
exHeader.textContent = "Look down"
audioElement.setAttribute("src", "media/down.mp3");
audioElement.play();
TweenMax.to(".updownexer .leftiris", 0.1, {
y: 90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".updownexer .rightiris", 0.1, {
y: 90,
x: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 15000);
// Blink quickly
runTimer = setTimeout(function() {
blinkingExercise(LeftRightInstr);
// Redo exercise
redoEx.onclick = function() {
UpandDownInstr();
return false;
};
}, 18000);
}, 3000);
}
});
},
LeftRightInstr = function() {
var msg1 = "Keep your head motionless. Only allow your eyes to do the work.<br><br>",
msg2 = "Slowly move your eyes from as far to the left as you can see to as far to the right as you can see in a straight line, without stopping to close your eyes or blink. This should take about 10 seconds to finish. You will gradually strengthen your eye muscles if you practice this exercise.<br><br>",
msg3 = "As you know, the majority of vision problems are caused by a disability or overstrain of the eye muscles.<br><br>",
msg4 = "The movements should be smooth and do not cause any discomfort.<br><br>",
msg5 = "(Repeat 3 times for 10 seconds).";
Swal.fire({
title: "Left-Right",
html: "<p class=\"tc\" style=\"font-size: 1em; margin: 0 0 1em 0; text-decoration: underline;\">Instructions for this exercise</p><p class=\"tl\">" + msg1 + msg2 + msg3 + msg4 + msg5 + "</p>",
type: "info"
}).then((result) => {
if (result.value) {
// Ready your exercise
exerciseHTML = '<p> </p>' + '<svg class="leftrightexer" xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; width:100%;" viewBox="0 0 501 202" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6"><rect width="501" height="202"></rect></clipPath></defs><g clip-path="url(#_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6)"><g><g><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000013" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd)"><radialGradient id="_rgradient_0" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,217.672,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="370.6045623594781" cy="69.86306401443477" r="152.93265981654383" fill="url(#_rgradient_0)"></circle><g class="rightiris"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000011" r="39.9884753726767" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="99.41490065862888" r="25.13518144317777" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="408.89966211351896" cy="89.2249589490973" r="8.410743607787879" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="80.8142153413092" r="3.364297443115163" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="392.81723446251874" cy="80.8142153413092" r="1.6821487215576099" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_RQ8VXRAh2Vvq3L3BYfmXzpFdvjiKeK3R"><circle vector-effect="non-scaling-stroke" cx="400" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g><g><circle vector-effect="non-scaling-stroke" cx="101.00000000000013" cy="101.00000000000018" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="101.0000000000001" cy="101.00000000000027" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN)"><radialGradient id="_rgradient_1" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,-81.328,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="71.60456235947805" cy="69.86306401443471" r="152.93265981654383" fill="url(#_rgradient_1)"></circle><g class="leftiris"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000006" r="39.988475372676675" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="99.41490065862882" r="25.135181443177785" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="109.89966211351884" cy="89.22495894909724" r="8.410743607787907" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="80.81421534130914" r="3.364297443115177" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="93.81723446251874" cy="80.81421534130914" r="1.6821487215575956" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_ljJqvodtt6AXKjmoE1LJLIsUeoCvgB8i"><circle vector-effect="non-scaling-stroke" cx="101.00000000000011" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g></g></g></svg>' + '<p> </p>';
readyExercise(exerciseHTML);
// Start audio for audio exercise
runTimer = setTimeout(function() {
exHeader.textContent = "Look left"
audioElement.setAttribute("src", "media/lookleft.mp3");
audioElement.play();
// Look left
TweenMax.to(".leftrightexer .leftiris", 0.1, {
x: -90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".leftrightexer .rightiris", 0.1, {
x: -90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
// Look right
runTimer = setTimeout(function() {
exHeader.textContent = "Look right"
audioElement.setAttribute("src", "media/lookright.mp3");
audioElement.play();
TweenMax.to(".leftrightexer .leftiris", 0.1, {
x: 90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".leftrightexer .rightiris", 0.1, {
x: 90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 3000);
// Look left
runTimer = setTimeout(function() {
exHeader.textContent = "Look left"
audioElement.setAttribute("src", "media/left.mp3");
audioElement.play();
TweenMax.to(".leftrightexer .leftiris", 0.1, {
x: -90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".leftrightexer .rightiris", 0.1, {
x: -90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 6000);
// Look right
runTimer = setTimeout(function() {
exHeader.textContent = "Look right"
audioElement.setAttribute("src", "media/right.mp3");
audioElement.play();
TweenMax.to(".leftrightexer .leftiris", 0.1, {
x: 90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".leftrightexer .rightiris", 0.1, {
x: 90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 9000);
// Look left
runTimer = setTimeout(function() {
exHeader.textContent = "Look left"
audioElement.setAttribute("src", "media/left.mp3");
audioElement.play();
TweenMax.to(".leftrightexer .leftiris", 0.1, {
x: -90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".leftrightexer .rightiris", 0.1, {
x: -90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 12000);
// Look right
runTimer = setTimeout(function() {
exHeader.textContent = "Look right"
audioElement.setAttribute("src", "media/right.mp3");
audioElement.play();
TweenMax.to(".leftrightexer .leftiris", 0.1, {
x: 90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".leftrightexer .rightiris", 0.1, {
x: 90,
y: 0,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 15000);
// Blink quickly
runTimer = setTimeout(function() {
blinkingExercise(diagonallyInstr);
// Redo exercise
redoEx.onclick = function() {
LeftRightInstr();
return false;
};
}, 18000);
}, 3000);
}
});
},
diagonallyInstr = function() {
var msg1 = "Keep your head motionless. Only allow your eyes to do the work.<br><br>",
msg2 = "Imagine a diagonal line from the upper-left corner of your vision to lower-right corner, and lead your eyes along the diagonal, without stopping to close your eyes or blink. This should take about 10 seconds from start to finish.<br><br>",
msg3 = "As you know, the majority of vision problems are caused by a disability or overstrain of the eye muscles.<br><br>",
msg4 = "The movements should be smooth and do not cause any discomfort.<br><br>",
msg5 = "(Repeat 3 times for 10 seconds).";
Swal.fire({
title: "Diagonally",
html: "<p class=\"tc\" style=\"font-size: 1em; margin: 0 0 1em 0; text-decoration: underline;\">Instructions for this exercise</p><p class=\"tl\">" + msg1 + msg2 + msg3 + msg4 + msg5 + "</p>",
type: "info"
}).then((result) => {
if (result.value) {
// Ready your exercise
exerciseHTML = '<p> </p>' + '<svg class="diagexer" xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; width:100%;" viewBox="0 0 501 202" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6"><rect width="501" height="202"></rect></clipPath></defs><g clip-path="url(#_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6)"><g><g><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000013" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd)"><radialGradient id="_rgradient_0" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,217.672,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="370.6045623594781" cy="69.86306401443477" r="152.93265981654383" fill="url(#_rgradient_0)"></circle><g class="rightiris"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000011" r="39.9884753726767" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="99.41490065862888" r="25.13518144317777" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="408.89966211351896" cy="89.2249589490973" r="8.410743607787879" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="80.8142153413092" r="3.364297443115163" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="392.81723446251874" cy="80.8142153413092" r="1.6821487215576099" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_RQ8VXRAh2Vvq3L3BYfmXzpFdvjiKeK3R"><circle vector-effect="non-scaling-stroke" cx="400" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g><g><circle vector-effect="non-scaling-stroke" cx="101.00000000000013" cy="101.00000000000018" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="101.0000000000001" cy="101.00000000000027" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN)"><radialGradient id="_rgradient_1" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,-81.328,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="71.60456235947805" cy="69.86306401443471" r="152.93265981654383" fill="url(#_rgradient_1)"></circle><g class="leftiris"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000006" r="39.988475372676675" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="99.41490065862882" r="25.135181443177785" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="109.89966211351884" cy="89.22495894909724" r="8.410743607787907" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="80.81421534130914" r="3.364297443115177" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="93.81723446251874" cy="80.81421534130914" r="1.6821487215575956" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_ljJqvodtt6AXKjmoE1LJLIsUeoCvgB8i"><circle vector-effect="non-scaling-stroke" cx="101.00000000000011" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g></g></g></svg>' + '<p> </p>';
readyExercise(exerciseHTML);
// Start audio for audio exercise
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-left"
audioElement.setAttribute("src", "media/looktopleft.mp3");
audioElement.play();
// Look top-left
TweenMax.to(".diagexer .leftiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagexer .rightiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
// Look bottom-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-right"
audioElement.setAttribute("src", "media/bottomright.mp3");
audioElement.play();
TweenMax.to(".diagexer .leftiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagexer .rightiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 3000);
// Look top-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-left"
audioElement.setAttribute("src", "media/topleft.mp3");
audioElement.play();
TweenMax.to(".diagexer .leftiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagexer .rightiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 6000);
// Look bottom-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-right"
audioElement.setAttribute("src", "media/bottomright.mp3");
audioElement.play();
TweenMax.to(".diagexer .leftiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagexer .rightiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 9000);
// Look top-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-left"
audioElement.setAttribute("src", "media/topleft.mp3");
audioElement.play();
TweenMax.to(".diagexer .leftiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagexer .rightiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 12000);
// Look bottom-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-right"
audioElement.setAttribute("src", "media/bottomright.mp3");
audioElement.play();
TweenMax.to(".diagexer .leftiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagexer .rightiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 15000);
// Blink quickly
runTimer = setTimeout(function() {
blinkingExercise(diagonallyInstrR);
// Redo exercise
redoEx.onclick = function() {
diagonallyInstr();
return false;
};
}, 18000);
}, 3000);
}
});
},
diagonallyInstrR = function() {
var msg1 = "And now, vice versa!<br>Repeat the previous exercise, but this time, begin with the upper-right corner down to the lower-left.<br><br>",
msg2 = "(Repeat 3 times for 10 seconds).";
Swal.fire({
title: "Diagonally Reverse",
html: "<p class=\"tc\" style=\"font-size: 1em; margin: 0 0 1em 0; text-decoration: underline;\">Instructions for this exercise</p><p class=\"tl\">" + msg1 + msg2 + "</p>",
type: "info"
}).then((result) => {
if (result.value) {
// Ready your exercise
exerciseHTML = '<p> </p>' + '<svg class="diagrexer" xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; width:100%;" viewBox="0 0 501 202" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6"><rect width="501" height="202"></rect></clipPath></defs><g clip-path="url(#_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6)"><g><g><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000013" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd)"><radialGradient id="_rgradient_0" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,217.672,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="370.6045623594781" cy="69.86306401443477" r="152.93265981654383" fill="url(#_rgradient_0)"></circle><g class="rightiris"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000011" r="39.9884753726767" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="99.41490065862888" r="25.13518144317777" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="408.89966211351896" cy="89.2249589490973" r="8.410743607787879" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="80.8142153413092" r="3.364297443115163" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="392.81723446251874" cy="80.8142153413092" r="1.6821487215576099" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_RQ8VXRAh2Vvq3L3BYfmXzpFdvjiKeK3R"><circle vector-effect="non-scaling-stroke" cx="400" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g><g><circle vector-effect="non-scaling-stroke" cx="101.00000000000013" cy="101.00000000000018" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="101.0000000000001" cy="101.00000000000027" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN)"><radialGradient id="_rgradient_1" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,-81.328,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="71.60456235947805" cy="69.86306401443471" r="152.93265981654383" fill="url(#_rgradient_1)"></circle><g class="leftiris"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000006" r="39.988475372676675" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="99.41490065862882" r="25.135181443177785" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="109.89966211351884" cy="89.22495894909724" r="8.410743607787907" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="80.81421534130914" r="3.364297443115177" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="93.81723446251874" cy="80.81421534130914" r="1.6821487215575956" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_ljJqvodtt6AXKjmoE1LJLIsUeoCvgB8i"><circle vector-effect="non-scaling-stroke" cx="101.00000000000011" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g></g></g></svg>' + '<p> </p>';
readyExercise(exerciseHTML);
// Start audio for audio exercise
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-right"
audioElement.setAttribute("src", "media/looktopright.mp3");
audioElement.play();
// Look top-right
TweenMax.to(".diagrexer .leftiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagrexer .rightiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
// Look bottom-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-left"
audioElement.setAttribute("src", "media/bottomleft.mp3");
audioElement.play();
TweenMax.to(".diagrexer .leftiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagrexer .rightiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 3000);
// Look top-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-right"
audioElement.setAttribute("src", "media/looktopright.mp3");
audioElement.play();
TweenMax.to(".diagrexer .leftiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagrexer .rightiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 6000);
// Look bottom-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-left"
audioElement.setAttribute("src", "media/bottomleft.mp3");
audioElement.play();
TweenMax.to(".diagrexer .leftiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagrexer .rightiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 9000);
// Look top-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-right"
audioElement.setAttribute("src", "media/looktopright.mp3");
audioElement.play();
TweenMax.to(".diagrexer .leftiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagrexer .rightiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 12000);
// Look bottom-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-left"
audioElement.setAttribute("src", "media/bottomleft.mp3");
audioElement.play();
TweenMax.to(".diagrexer .leftiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".diagrexer .rightiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 15000);
// Blink quickly
runTimer = setTimeout(function() {
blinkingExercise(rectangleInstr);
// Redo exercise
redoEx.onclick = function() {
diagonallyInstrR();
return false;
};
}, 18000);
}, 3000);
}
});
},
rectangleInstr = function() {
var msg1 = "Keep your head motionless. Only allow your eyes to do the work.<br><br>",
msg2 = "\"Drawing\" a rectangle with your eyes.<br>Imagine that you are \"drawing\" a rectangle in the air. Bring your gave to the lower-left corner and lift your eyes to the upper-left corner. Bring your gaze across a straight line to the upper-right corner, then down to the lower-right corner. Then, across a straight line, thus returning your gaze to the starting point.<br><br>",
msg3 = "As you know, the majority of vision problems are caused by a disability or overstrain of the eye muscles.<br><br>",
msg4 = "The movements should be smooth and do not cause any discomfort.<br><br>",
msg5 = "(Repeat 2 times for 10 seconds).";
Swal.fire({
title: "Rectangle",
html: "<p class=\"tc\" style=\"font-size: 1em; margin: 0 0 1em 0; text-decoration: underline;\">Instructions for this exercise</p><p class=\"tl\">" + msg1 + msg2 + msg3 + msg4 + msg5 + "</p>",
type: "info"
}).then((result) => {
if (result.value) {
// Ready your exercise
exerciseHTML = '<p> </p>' + '<svg class="rectexer" xmlns="http:https://www.w3.org/2000/svg" xmlns:xlink="http:https://www.w3.org/1999/xlink" style="isolation:isolate; width:100%;" viewBox="0 0 501 202" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6"><rect width="501" height="202"></rect></clipPath></defs><g clip-path="url(#_clipPath_pWFUjqryexT3w1Xyz9Ir1RCexbenTqY6)"><g><g><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000013" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000017" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_nXnWzWQZVJf3WgZlx2PUH7ezR2SPcbhd)"><radialGradient id="_rgradient_0" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,217.672,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="370.6045623594781" cy="69.86306401443477" r="152.93265981654383" fill="url(#_rgradient_0)"></circle><g class="rightiris"><circle vector-effect="non-scaling-stroke" cx="399.9999999999999" cy="101.00000000000011" r="39.9884753726767" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="99.41490065862888" r="25.13518144317777" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="408.89966211351896" cy="89.2249589490973" r="8.410743607787879" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="399.81950408080627" cy="80.8142153413092" r="3.364297443115163" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="392.81723446251874" cy="80.8142153413092" r="1.6821487215576099" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_RQ8VXRAh2Vvq3L3BYfmXzpFdvjiKeK3R"><circle vector-effect="non-scaling-stroke" cx="400" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g><g><circle vector-effect="non-scaling-stroke" cx="101.00000000000013" cy="101.00000000000018" r="101.00000000000011" fill="rgb(136,204,0)"></circle><circle vector-effect="non-scaling-stroke" cx="101.0000000000001" cy="101.00000000000027" r="89.15388224255213" fill="rgb(84,145,16)"></circle><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle><clipPath id="_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000011" r="86.55577268884764" fill="rgb(255,255,255)"></circle></clipPath><g clip-path="url(#_clipPath_OpWKe2KrnuaLnmXneJruEQiTSQ0mj1tN)"><radialGradient id="_rgradient_1" fx="0.5" fy="0.5" cx="0.5" cy="0.5" r="0.5" gradientTransform="matrix(305.865,0,0,305.865,-81.328,-83.07)" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-opacity="1" style="stop-color:rgb(255,255,255)"></stop><stop offset="100%" stop-opacity="1" style="stop-color:rgb(214,237,178)"></stop></radialGradient><circle vector-effect="non-scaling-stroke" cx="71.60456235947805" cy="69.86306401443471" r="152.93265981654383" fill="url(#_rgradient_1)"></circle><g class="leftiris"><circle vector-effect="non-scaling-stroke" cx="100.99999999999983" cy="101.00000000000006" r="39.988475372676675" fill="rgb(130,195,0)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="99.41490065862882" r="25.135181443177785" fill="rgb(77,124,32)"></circle><circle vector-effect="non-scaling-stroke" cx="109.89966211351884" cy="89.22495894909724" r="8.410743607787907" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="100.81950408080627" cy="80.81421534130914" r="3.364297443115177" fill="rgb(255,255,255)"></circle><circle vector-effect="non-scaling-stroke" cx="93.81723446251874" cy="80.81421534130914" r="1.6821487215575956" fill="rgb(255,255,255)"></circle></g></g><clipPath id="_clipPath_ljJqvodtt6AXKjmoE1LJLIsUeoCvgB8i"><circle vector-effect="non-scaling-stroke" cx="101.00000000000011" cy="100.99999999999994" r="87.5" fill="rgb(255,255,255)"></circle></clipPath></g></g></g></svg>' + '<p> </p>';
readyExercise(exerciseHTML);
// Start audio for audio exercise
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-left"
audioElement.setAttribute("src", "media/lookbottomleft.mp3");
audioElement.play();
// Look bottom-left
TweenMax.to(".rectexer .leftiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".rectexer .rightiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
// Look top-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-left"
audioElement.setAttribute("src", "media/topleft.mp3");
audioElement.play();
TweenMax.to(".rectexer .leftiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".rectexer .rightiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 2000);
// Look top-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-right"
audioElement.setAttribute("src", "media/topright.mp3");
audioElement.play();
TweenMax.to(".rectexer .leftiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".rectexer .rightiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 4000);
// Look bottom-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-right"
audioElement.setAttribute("src", "media/bottomright.mp3");
audioElement.play();
TweenMax.to(".rectexer .leftiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".rectexer .rightiris", 0.1, {
y: 60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 6000);
// Look bottom-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look bottom-left"
audioElement.setAttribute("src", "media/bottomleft.mp3");
audioElement.play();
TweenMax.to(".rectexer .leftiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".rectexer .rightiris", 0.1, {
y: 60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 8000);
// Look top-left
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-left"
audioElement.setAttribute("src", "media/topleft.mp3");
audioElement.play();
TweenMax.to(".rectexer .leftiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".rectexer .rightiris", 0.1, {
y: -60,
x: -60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 10000);
// Look top-right
runTimer = setTimeout(function() {
exHeader.textContent = "Look top-right"
audioElement.setAttribute("src", "media/topright.mp3");
audioElement.play();
TweenMax.to(".rectexer .leftiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
TweenMax.to(".rectexer .rightiris", 0.1, {
y: -60,
x: 60,
yoyo: true,
repeat: 0,
ease: Power2.easeInOut
});
}, 12000);