Compare commits
11 commits
master
...
iOS-17-Upd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd155da553 | ||
|
|
208fcfcb38 | ||
|
|
7bdce85e2d | ||
|
|
043a6d0eda | ||
|
|
f5a53feb55 | ||
|
|
5df613021f | ||
|
|
3f3cfd3882 | ||
|
|
a148916f95 | ||
|
|
6fac5e3acd | ||
|
|
9ecab5dc4c | ||
|
|
c710222af6 |
BIN
.DS_Store
vendored
|
|
@ -3,28 +3,19 @@
|
|||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 48;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
290439F02292E34200979BAD /* BoardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290439EF2292E34200979BAD /* BoardViewController.swift */; };
|
||||
2917003925858C3900E39853 /* BoardViewController+Audio.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2917003825858C3900E39853 /* BoardViewController+Audio.swift */; };
|
||||
293EC85925E8092C008EB6CA /* Teensy41BoardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */; };
|
||||
2948B61A25E6D82D0013781D /* CircleLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2948B61925E6D82D0013781D /* CircleLabel.swift */; };
|
||||
295049AC25E6996D003E7484 /* CurvedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 295049AB25E6996D003E7484 /* CurvedText.swift */; };
|
||||
295049AE25E69AB0003E7484 /* BLMBoardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */; };
|
||||
29546B5B2585B51000002715 /* BoardViewController+HostingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29546B5A2585B51000002715 /* BoardViewController+HostingController.swift */; };
|
||||
297574E025A612E4001991E7 /* SwiftUITarotCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */; };
|
||||
29897A482569E8330080F4BF /* ARScenes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29897A472569E8330080F4BF /* ARScenes.swift */; };
|
||||
29897A58256CA76F0080F4BF /* ARWorldAnchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29897A57256CA76F0080F4BF /* ARWorldAnchor.swift */; };
|
||||
298FD3F62270B4D9007E2F4C /* QRViewController+GestureRec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 298FD3F52270B4D9007E2F4C /* QRViewController+GestureRec.swift */; };
|
||||
298FD3F82270B7A5007E2F4C /* QRViewController+Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 298FD3F72270B7A5007E2F4C /* QRViewController+Video.swift */; };
|
||||
29A07E9725C0CB9F006219C9 /* PICOBoardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */; };
|
||||
29A83D2525EEC3F60018BEAB /* Pi400Overlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */; };
|
||||
29AA121D25A9717E0037003B /* ListOfTexts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AA121C25A9717E0037003B /* ListOfTexts.swift */; };
|
||||
29B109C922933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B109C822933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift */; };
|
||||
29D096292559C71D0032654B /* ClickableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29D096282559C71D0032654B /* ClickableView.swift */; };
|
||||
D515BADA21FF5826001E7079 /* Highlight SCNNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D515BAD921FF5826001E7079 /* Highlight SCNNode.swift */; };
|
||||
D53B29AC29E440B000F68A06 /* BoardScanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53B29AB29E440B000F68A06 /* BoardScanViewController.swift */; };
|
||||
D53B29AE29E44FBD00F68A06 /* ARImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53B29AD29E44FBD00F68A06 /* ARImageCollectionViewCell.swift */; };
|
||||
D53B29B029E4503E00F68A06 /* ARImageCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53B29AF29E4503E00F68A06 /* ARImageCollectionViewController.swift */; };
|
||||
D54801CE217E12E700170412 /* hallowing_eye.mov in Resources */ = {isa = PBXBuildFile; fileRef = D54801CB217E118B00170412 /* hallowing_eye.mov */; };
|
||||
D54E995B20E155DF0021A2E5 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D54E995A20E155DF0021A2E5 /* Extensions.swift */; };
|
||||
D55B075B20FF8DD40066976C /* ViewController+Gesture Recognizers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55B075A20FF8DD40066976C /* ViewController+Gesture Recognizers.swift */; };
|
||||
|
|
@ -33,11 +24,12 @@
|
|||
D55F683020BF2CA4005219D9 /* FocusSquare.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55F682E20BF2CA3005219D9 /* FocusSquare.swift */; };
|
||||
D55F683120BF2CA4005219D9 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55F682F20BF2CA4005219D9 /* Utilities.swift */; };
|
||||
D56ED486213EE255000E62F0 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56ED485213EE255000E62F0 /* MainViewController.swift */; };
|
||||
D56ED488213EEC94000E62F0 /* QRViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56ED487213EEC94000E62F0 /* QRViewController.swift */; };
|
||||
D56FFDF82A25596700EF1E3B /* ARImageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56FFDF72A25596700EF1E3B /* ARImageModel.swift */; };
|
||||
D583C69D215BF2DB00256EB1 /* pageThree.swift in Sources */ = {isa = PBXBuildFile; fileRef = D583C69C215BF2DB00256EB1 /* pageThree.swift */; };
|
||||
D58A102C20FE6C39003B0E93 /* ViewController+Nodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58A102B20FE6C39003B0E93 /* ViewController+Nodes.swift */; };
|
||||
D5ABE2912146BB2A00AB8237 /* RootPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ABE2902146BB2A00AB8237 /* RootPageViewController.swift */; };
|
||||
D5AD52C42136E617007A373F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D5AD52C32136E617007A373F /* Assets.xcassets */; };
|
||||
D5D18F402A69ADCF0037065F /* ARNodeDetailedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D18F3F2A69ADCF0037065F /* ARNodeDetailedViewController.swift */; };
|
||||
D5F2F4E2208E190D00B0790B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F2F4E1208E190D00B0790B /* AppDelegate.swift */; };
|
||||
D5F2F4E4208E190D00B0790B /* art.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = D5F2F4E3208E190D00B0790B /* art.scnassets */; };
|
||||
D5F2F4E6208E190D00B0790B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F2F4E5208E190D00B0790B /* ViewController.swift */; };
|
||||
|
|
@ -59,24 +51,15 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
290439EF2292E34200979BAD /* BoardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoardViewController.swift; sourceTree = "<group>"; };
|
||||
2917003825858C3900E39853 /* BoardViewController+Audio.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BoardViewController+Audio.swift"; sourceTree = "<group>"; };
|
||||
293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Teensy41BoardOverlay.swift; sourceTree = "<group>"; };
|
||||
2948B61925E6D82D0013781D /* CircleLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleLabel.swift; sourceTree = "<group>"; };
|
||||
295049AB25E6996D003E7484 /* CurvedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurvedText.swift; sourceTree = "<group>"; };
|
||||
295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BLMBoardOverlay.swift; sourceTree = "<group>"; };
|
||||
29546B5A2585B51000002715 /* BoardViewController+HostingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BoardViewController+HostingController.swift"; sourceTree = "<group>"; };
|
||||
297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUITarotCardView.swift; sourceTree = "<group>"; };
|
||||
29897A472569E8330080F4BF /* ARScenes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARScenes.swift; sourceTree = "<group>"; };
|
||||
29897A57256CA76F0080F4BF /* ARWorldAnchor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARWorldAnchor.swift; sourceTree = "<group>"; };
|
||||
298FD3F52270B4D9007E2F4C /* QRViewController+GestureRec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "QRViewController+GestureRec.swift"; sourceTree = "<group>"; };
|
||||
298FD3F72270B7A5007E2F4C /* QRViewController+Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "QRViewController+Video.swift"; sourceTree = "<group>"; };
|
||||
29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PICOBoardOverlay.swift; sourceTree = "<group>"; };
|
||||
29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pi400Overlay.swift; sourceTree = "<group>"; };
|
||||
29AA121C25A9717E0037003B /* ListOfTexts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOfTexts.swift; sourceTree = "<group>"; };
|
||||
29B109C822933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BoardViewController+Gesture Recognizers.swift"; sourceTree = "<group>"; };
|
||||
29D096282559C71D0032654B /* ClickableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClickableView.swift; sourceTree = "<group>"; };
|
||||
D515BAD921FF5826001E7079 /* Highlight SCNNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Highlight SCNNode.swift"; sourceTree = "<group>"; };
|
||||
D53B29AB29E440B000F68A06 /* BoardScanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoardScanViewController.swift; sourceTree = "<group>"; };
|
||||
D53B29AD29E44FBD00F68A06 /* ARImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARImageCollectionViewCell.swift; sourceTree = "<group>"; };
|
||||
D53B29AF29E4503E00F68A06 /* ARImageCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARImageCollectionViewController.swift; sourceTree = "<group>"; };
|
||||
D54801CB217E118B00170412 /* hallowing_eye.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = hallowing_eye.mov; sourceTree = "<group>"; };
|
||||
D54E995A20E155DF0021A2E5 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
|
||||
D55B075A20FF8DD40066976C /* ViewController+Gesture Recognizers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+Gesture Recognizers.swift"; sourceTree = "<group>"; };
|
||||
|
|
@ -85,11 +68,12 @@
|
|||
D55F682E20BF2CA3005219D9 /* FocusSquare.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FocusSquare.swift; sourceTree = "<group>"; };
|
||||
D55F682F20BF2CA4005219D9 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = "<group>"; };
|
||||
D56ED485213EE255000E62F0 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
|
||||
D56ED487213EEC94000E62F0 /* QRViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRViewController.swift; sourceTree = "<group>"; };
|
||||
D56FFDF72A25596700EF1E3B /* ARImageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARImageModel.swift; sourceTree = "<group>"; };
|
||||
D583C69C215BF2DB00256EB1 /* pageThree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = pageThree.swift; sourceTree = "<group>"; };
|
||||
D58A102B20FE6C39003B0E93 /* ViewController+Nodes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+Nodes.swift"; sourceTree = "<group>"; };
|
||||
D5ABE2902146BB2A00AB8237 /* RootPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootPageViewController.swift; sourceTree = "<group>"; };
|
||||
D5AD52C32136E617007A373F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
D5D18F3F2A69ADCF0037065F /* ARNodeDetailedViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARNodeDetailedViewController.swift; sourceTree = "<group>"; };
|
||||
D5F2F4DE208E190D00B0790B /* Adafruit AR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Adafruit AR.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D5F2F4E1208E190D00B0790B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
D5F2F4E3208E190D00B0790B /* art.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = art.scnassets; sourceTree = "<group>"; };
|
||||
|
|
@ -110,16 +94,6 @@
|
|||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
291E63D9227C6E0E00F77AB5 /* QR Code View Controller */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D56ED487213EEC94000E62F0 /* QRViewController.swift */,
|
||||
298FD3F52270B4D9007E2F4C /* QRViewController+GestureRec.swift */,
|
||||
298FD3F72270B7A5007E2F4C /* QRViewController+Video.swift */,
|
||||
);
|
||||
path = "QR Code View Controller";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
291E63DA227C8E9800F77AB5 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -137,30 +111,25 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
D56ED485213EE255000E62F0 /* MainViewController.swift */,
|
||||
D53B29AB29E440B000F68A06 /* BoardScanViewController.swift */,
|
||||
D53B29AF29E4503E00F68A06 /* ARImageCollectionViewController.swift */,
|
||||
D56FFDF72A25596700EF1E3B /* ARImageModel.swift */,
|
||||
D53B29AD29E44FBD00F68A06 /* ARImageCollectionViewCell.swift */,
|
||||
D5D18F3F2A69ADCF0037065F /* ARNodeDetailedViewController.swift */,
|
||||
D583C69C215BF2DB00256EB1 /* pageThree.swift */,
|
||||
D5ABE2902146BB2A00AB8237 /* RootPageViewController.swift */,
|
||||
);
|
||||
path = Pages;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29F7FDE62295B25600F15B0E /* Board Scan View Controller */ = {
|
||||
29F7FDE62295B25600F15B0E /* Board Scan */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
290439EF2292E34200979BAD /* BoardViewController.swift */,
|
||||
297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */,
|
||||
29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */,
|
||||
293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */,
|
||||
29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */,
|
||||
295049AB25E6996D003E7484 /* CurvedText.swift */,
|
||||
295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */,
|
||||
2917003825858C3900E39853 /* BoardViewController+Audio.swift */,
|
||||
2948B61925E6D82D0013781D /* CircleLabel.swift */,
|
||||
29546B5A2585B51000002715 /* BoardViewController+HostingController.swift */,
|
||||
29AA121C25A9717E0037003B /* ListOfTexts.swift */,
|
||||
29897A472569E8330080F4BF /* ARScenes.swift */,
|
||||
29B109C822933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift */,
|
||||
);
|
||||
path = "Board Scan View Controller";
|
||||
path = "Board Scan";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D53C6F1C20D2D1A70051A030 /* Frameworks */ = {
|
||||
|
|
@ -208,8 +177,7 @@
|
|||
D55B075C20FF934B0066976C /* ViewController+Audio.swift */,
|
||||
D55B075A20FF8DD40066976C /* ViewController+Gesture Recognizers.swift */,
|
||||
29D096282559C71D0032654B /* ClickableView.swift */,
|
||||
29F7FDE62295B25600F15B0E /* Board Scan View Controller */,
|
||||
291E63D9227C6E0E00F77AB5 /* QR Code View Controller */,
|
||||
29F7FDE62295B25600F15B0E /* Board Scan */,
|
||||
291E63DA227C8E9800F77AB5 /* Resources */,
|
||||
291E63DB227CA33700F77AB5 /* Pages */,
|
||||
D5F2F4E3208E190D00B0790B /* art.scnassets */,
|
||||
|
|
@ -246,12 +214,14 @@
|
|||
D5F2F4D6208E190D00B0790B /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 1010;
|
||||
LastUpgradeCheck = 1200;
|
||||
LastUpgradeCheck = 1500;
|
||||
ORGANIZATIONNAME = "Vanguard Logic LLC";
|
||||
TargetAttributes = {
|
||||
D5F2F4DD208E190D00B0790B = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
LastSwiftMigration = 1500;
|
||||
ProvisioningStyle = Automatic;
|
||||
SystemCapabilities = {
|
||||
com.apple.BackgroundModes = {
|
||||
|
|
@ -318,7 +288,7 @@
|
|||
files = (
|
||||
D54E995B20E155DF0021A2E5 /* Extensions.swift in Sources */,
|
||||
29AA121D25A9717E0037003B /* ListOfTexts.swift in Sources */,
|
||||
297574E025A612E4001991E7 /* SwiftUITarotCardView.swift in Sources */,
|
||||
D56FFDF82A25596700EF1E3B /* ARImageModel.swift in Sources */,
|
||||
D5F2F4E6208E190D00B0790B /* ViewController.swift in Sources */,
|
||||
D55F683020BF2CA4005219D9 /* FocusSquare.swift in Sources */,
|
||||
D5ABE2912146BB2A00AB8237 /* RootPageViewController.swift in Sources */,
|
||||
|
|
@ -326,27 +296,19 @@
|
|||
D55B075D20FF934B0066976C /* ViewController+Audio.swift in Sources */,
|
||||
D583C69D215BF2DB00256EB1 /* pageThree.swift in Sources */,
|
||||
D55B076120FF99230066976C /* WorldPosition.swift in Sources */,
|
||||
298FD3F62270B4D9007E2F4C /* QRViewController+GestureRec.swift in Sources */,
|
||||
29D096292559C71D0032654B /* ClickableView.swift in Sources */,
|
||||
29897A58256CA76F0080F4BF /* ARWorldAnchor.swift in Sources */,
|
||||
D53B29AC29E440B000F68A06 /* BoardScanViewController.swift in Sources */,
|
||||
D515BADA21FF5826001E7079 /* Highlight SCNNode.swift in Sources */,
|
||||
29A07E9725C0CB9F006219C9 /* PICOBoardOverlay.swift in Sources */,
|
||||
29A83D2525EEC3F60018BEAB /* Pi400Overlay.swift in Sources */,
|
||||
295049AC25E6996D003E7484 /* CurvedText.swift in Sources */,
|
||||
2948B61A25E6D82D0013781D /* CircleLabel.swift in Sources */,
|
||||
D56ED488213EEC94000E62F0 /* QRViewController.swift in Sources */,
|
||||
D55B075B20FF8DD40066976C /* ViewController+Gesture Recognizers.swift in Sources */,
|
||||
290439F02292E34200979BAD /* BoardViewController.swift in Sources */,
|
||||
29546B5B2585B51000002715 /* BoardViewController+HostingController.swift in Sources */,
|
||||
298FD3F82270B7A5007E2F4C /* QRViewController+Video.swift in Sources */,
|
||||
295049AE25E69AB0003E7484 /* BLMBoardOverlay.swift in Sources */,
|
||||
D53B29B029E4503E00F68A06 /* ARImageCollectionViewController.swift in Sources */,
|
||||
D55F683120BF2CA4005219D9 /* Utilities.swift in Sources */,
|
||||
D5D18F402A69ADCF0037065F /* ARNodeDetailedViewController.swift in Sources */,
|
||||
D5F2F4E2208E190D00B0790B /* AppDelegate.swift in Sources */,
|
||||
D58A102C20FE6C39003B0E93 /* ViewController+Nodes.swift in Sources */,
|
||||
293EC85925E8092C008EB6CA /* Teensy41BoardOverlay.swift in Sources */,
|
||||
29B109C922933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift in Sources */,
|
||||
D53B29AE29E44FBD00F68A06 /* ARImageCollectionViewCell.swift in Sources */,
|
||||
D56ED486213EE255000E62F0 /* MainViewController.swift in Sources */,
|
||||
2917003925858C3900E39853 /* BoardViewController+Audio.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -409,6 +371,7 @@
|
|||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
|
|
@ -423,7 +386,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
|
|
@ -469,6 +432,7 @@
|
|||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
|
|
@ -477,10 +441,11 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
|
|
@ -490,19 +455,22 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 0;
|
||||
DEVELOPMENT_TEAM = 2X94RM7457;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Frameworks",
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.12;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.15.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
|
|
@ -512,19 +480,22 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 0;
|
||||
DEVELOPMENT_TEAM = 2X94RM7457;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Frameworks",
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.12;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.15.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
LastUpgradeVersion = "1500"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1000"
|
||||
LastUpgradeVersion = "1500"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
@ -26,8 +26,17 @@
|
|||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
disableMainThreadChecker = "YES"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
disableMainThreadChecker = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D5F2F4DD208E190D00B0790B"
|
||||
BuildableName = "Adafruit AR.app"
|
||||
BlueprintName = "Adafruit AR"
|
||||
ReferencedContainer = "container:Adafruit AR.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
|
|
@ -40,17 +49,6 @@
|
|||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D5F2F4DD208E190D00B0790B"
|
||||
BuildableName = "Adafruit AR.app"
|
||||
BlueprintName = "Adafruit AR"
|
||||
ReferencedContainer = "container:Adafruit AR.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
|
|
@ -72,8 +70,6 @@
|
|||
ReferencedContainer = "container:Adafruit AR.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
|
|
|||
BIN
Adafruit AR/.DS_Store
vendored
|
|
@ -9,7 +9,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
var window: UIWindow?
|
||||
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
|
||||
self.window = UIWindow(frame: UIScreen.main.bounds)
|
||||
let storyboard = UIStoryboard(name: "Main", bundle: nil)
|
||||
|
|
|
|||
|
|
@ -1,267 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="TV4-si-PBW">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="TV4-si-PBW">
|
||||
<device id="ipad11_0rounded" orientation="portrait" layout="fullscreen" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--QR Mode-->
|
||||
<scene sceneID="FL3-fY-ama">
|
||||
<objects>
|
||||
<viewController id="2cU-fx-wlI" userLabel="QR Mode" customClass="QRViewController" customModule="Adafruit_AR" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="g5D-Fh-qu3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<arscnView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FWL-fP-Q4m">
|
||||
<rect key="frame" x="-44" y="0.0" width="922" height="1208"/>
|
||||
</arscnView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="QR Scanner" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pjb-dT-HnP">
|
||||
<rect key="frame" x="16" y="51" width="161" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="19"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<color key="shadowColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dxt-9f-ehL" userLabel="Flashlight Button">
|
||||
<rect key="frame" x="778" y="144" width="35" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<connections>
|
||||
<action selector="torchAction:" destination="2cU-fx-wlI" eventType="touchUpInside" id="aTK-N7-y1S"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gpe-cv-516">
|
||||
<rect key="frame" x="778" y="44" width="35" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="HomeIcon">
|
||||
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<segue destination="TV4-si-PBW" kind="presentation" modalTransitionStyle="flipHorizontal" id="lDk-c2-68K"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PJF-SR-1Br" userLabel="Info Button">
|
||||
<rect key="frame" x="778" y="94" width="35" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="?mark_icon"/>
|
||||
<connections>
|
||||
<action selector="qrInfoIcon:" destination="2cU-fx-wlI" eventType="touchUpInside" id="I31-oc-5IE"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" alpha="0.40000000000000002" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Scan Here" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HH5-el-Qp1">
|
||||
<rect key="frame" x="285" y="519" width="260" height="56"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="20"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="QeJ-sR-TtX"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="FWL-fP-Q4m" firstAttribute="bottom" secondItem="QeJ-sR-TtX" secondAttribute="bottom" constant="34" id="5vl-um-jaa"/>
|
||||
<constraint firstItem="FWL-fP-Q4m" firstAttribute="trailing" secondItem="QeJ-sR-TtX" secondAttribute="trailing" constant="44" id="eek-V2-JgP"/>
|
||||
<constraint firstItem="FWL-fP-Q4m" firstAttribute="top" secondItem="g5D-Fh-qu3" secondAttribute="top" id="tGC-DN-RTV"/>
|
||||
<constraint firstItem="FWL-fP-Q4m" firstAttribute="leading" secondItem="QeJ-sR-TtX" secondAttribute="leading" constant="-44" id="u3Q-a8-1hO"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="homeButton" destination="Gpe-cv-516" id="vL5-p0-RPJ"/>
|
||||
<outlet property="qrCodeInfoDisplay" destination="VLs-pf-QcC" id="uVa-iw-s0p"/>
|
||||
<outlet property="qrInfoDisplayButton" destination="Txl-RF-5cA" id="O67-Ol-TnY"/>
|
||||
<outlet property="qrSceneView" destination="FWL-fP-Q4m" id="LLI-tq-brm"/>
|
||||
<outlet property="scanLabel" destination="HH5-el-Qp1" id="quU-Py-8pQ"/>
|
||||
<outlet property="touchLightButton" destination="dxt-9f-ehL" id="Q48-Fu-dLK"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="J5g-Lr-jbQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<view contentMode="scaleToFill" id="VLs-pf-QcC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="255" height="269"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="QR Code Mode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TYo-m4-1ly">
|
||||
<rect key="frame" x="61" y="23" width="132" height="25"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="18"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Instructions:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B8r-62-HkN">
|
||||
<rect key="frame" x="83" y="56" width="89" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Avenir-Medium" family="Avenir" pointSize="16"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Scan your Adafruit QR Code to display one of our products in AR!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3pL-1K-uII">
|
||||
<rect key="frame" x="7" y="97" width="240" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Txl-RF-5cA">
|
||||
<rect key="frame" x="101" y="220" width="53" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="17"/>
|
||||
<state key="normal" title="Done">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="qrInfoButtonAction:" destination="2cU-fx-wlI" eventType="touchUpInside" id="RV6-8j-k0T"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Drag AR model to roate." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9hZ-rw-0XA">
|
||||
<rect key="frame" x="55" y="182" width="145" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Pinch the AR model to scale it!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6dr-y5-mrv">
|
||||
<rect key="frame" x="32" y="150" width="181" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="5sH-DW-cqF"/>
|
||||
<color key="backgroundColor" red="0.33678779006004333" green="0.66869717836380005" blue="0.90983110666275024" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1414" y="-2184"/>
|
||||
</scene>
|
||||
<!--Board Info Mode-->
|
||||
<scene sceneID="nSQ-gb-evL">
|
||||
<objects>
|
||||
<viewController id="vvW-nO-QUQ" userLabel="Board Info Mode" customClass="BoardViewController" customModule="Adafruit_AR" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="cTq-J8-T1c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<arscnView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UH8-jw-YWj">
|
||||
<rect key="frame" x="-7" y="-5" width="849" height="1203"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</arscnView>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VS0-h9-CUy" userLabel="Home Button">
|
||||
<rect key="frame" x="778" y="44" width="35" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="HomeIcon">
|
||||
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="homeButtonAction:" destination="vvW-nO-QUQ" eventType="touchUpInside" id="zJw-T5-IjF"/>
|
||||
<segue destination="TV4-si-PBW" kind="presentation" modalPresentationStyle="fullScreen" modalTransitionStyle="crossDissolve" id="u7e-oD-Y3K"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Scan Here" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zl7-iH-s6c">
|
||||
<rect key="frame" x="373" y="551" width="90" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="19"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.51961151541095896" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="M1b-X6-ClA" userLabel="Info Button">
|
||||
<rect key="frame" x="778" y="94" width="35" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="?mark_icon"/>
|
||||
<connections>
|
||||
<action selector="boardInfoAction:" destination="vvW-nO-QUQ" eventType="touchUpInside" id="xvV-c2-2p3"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Board Scanner" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="soT-Be-nk8">
|
||||
<rect key="frame" x="19" y="37" width="158" height="45"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="19"/>
|
||||
<color key="textColor" name="alternateSelectedControlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hrs-8n-nRU">
|
||||
<rect key="frame" x="-7" y="0.0" width="849" height="1198"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="Yk8-9c-YvN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="849" height="1198"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</view>
|
||||
<blurEffect style="light"/>
|
||||
</visualEffectView>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RYM-3l-bpr">
|
||||
<rect key="frame" x="281" y="259" width="292" height="382"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" lineBreakMode="tailTruncation" numberOfLines="7" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bi5-NN-nXJ">
|
||||
<rect key="frame" x="31" y="50" width="240" height="154"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<string key="text">Scan your Adafruit board to display component info in AR!
|
||||
|
||||
Works with:
|
||||
• Circuit Playground Express
|
||||
• PyPortal
|
||||
+ more to come</string>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Bold" family="Avenir Next" pointSize="15"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Board Scanner Mode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="55N-T1-Xey">
|
||||
<rect key="frame" x="31" y="8" width="240" height="34"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="20"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="j7N-r2-7EC">
|
||||
<rect key="frame" x="25" y="212" width="246" height="96"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<string key="text">Scan your Raspberry Pi Pico, Raspberry Pi 400, and Teensy 4.1 to display an overlay of its
Pinouts and Power Pins!
(Only Available for iOS 14+)
</string>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="24"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P2B-8a-P4h">
|
||||
<rect key="frame" x="123" y="325" width="46" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="18"/>
|
||||
<state key="normal" title="Done">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="dismissBoardIconPopup:" destination="vvW-nO-QUQ" eventType="touchUpInside" id="EI8-IR-QZZ"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.33678779009999998" green="0.66869717839999998" blue="0.9098311067" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="8eE-ts-kY1"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="VSu-oy-E0D"/>
|
||||
<connections>
|
||||
<outlet property="boardInfoButton" destination="M1b-X6-ClA" id="c6w-Z2-UH6"/>
|
||||
<outlet property="boardItemView" destination="RYM-3l-bpr" id="nYB-tU-rAW"/>
|
||||
<outlet property="boardSceneView" destination="UH8-jw-YWj" id="VNq-YM-bid"/>
|
||||
<outlet property="homeButton" destination="VS0-h9-CUy" id="qd4-BW-beA"/>
|
||||
<outlet property="scanLabel" destination="Zl7-iH-s6c" id="lWH-do-Abr"/>
|
||||
<outlet property="visualBoardEffectView" destination="Hrs-8n-nRU" id="afV-qX-qkQ"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="kqJ-3F-tXc" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1414" y="-363"/>
|
||||
</scene>
|
||||
<!--Onboarding p1-->
|
||||
<scene sceneID="sWd-JV-Aqa">
|
||||
<objects>
|
||||
|
|
@ -279,7 +24,7 @@ Works with:
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Adabot-Mode-icon-512px" translatesAutoresizingMaskIntoConstraints="NO" id="3Pr-7B-Svr">
|
||||
<rect key="frame" x="62" y="365" width="705" height="463"/>
|
||||
<rect key="frame" x="59" y="362" width="704" height="463"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Welcome to" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oIv-ru-hfz">
|
||||
|
|
@ -290,8 +35,8 @@ Works with:
|
|||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" contentInsetAdjustmentBehavior="never" editable="NO" text="Adafruit AR has three modes …" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pDm-P7-xWw">
|
||||
<rect key="frame" x="36" y="925" width="760" height="68"/>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" contentInsetAdjustmentBehavior="never" editable="NO" text="Adafruit AR has two modes …" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pDm-P7-xWw">
|
||||
<rect key="frame" x="32" y="923" width="761" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
@ -316,7 +61,7 @@ Works with:
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="test1" translatesAutoresizingMaskIntoConstraints="NO" id="5i7-wJ-8X2" userLabel="Adabot">
|
||||
<rect key="frame" x="80" y="231" width="667" height="441"/>
|
||||
<rect key="frame" x="79" y="228" width="667" height="441"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="adabot" translatesAutoresizingMaskIntoConstraints="NO" id="fSX-bs-tx0">
|
||||
|
|
@ -324,7 +69,7 @@ Works with:
|
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" contentInsetAdjustmentBehavior="never" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s4z-Yk-nql">
|
||||
<rect key="frame" x="36" y="665" width="760" height="447"/>
|
||||
<rect key="frame" x="35" y="663" width="759" height="447"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<string key="text">Meet Adabot, your personal robot assistant!
|
||||
|
|
@ -394,12 +139,12 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<rect key="frame" x="37" y="180" width="300" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="cpx1" translatesAutoresizingMaskIntoConstraints="NO" id="e4O-gF-k4I" userLabel="Adabot">
|
||||
<rect key="frame" x="80" y="256" width="667" height="441"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Circuit Playground Bluefruit" translatesAutoresizingMaskIntoConstraints="NO" id="e4O-gF-k4I" userLabel="Adabot">
|
||||
<rect key="frame" x="76" y="253" width="667" height="442"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" contentInsetAdjustmentBehavior="never" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iGf-jB-gh2">
|
||||
<rect key="frame" x="36" y="728" width="760" height="225"/>
|
||||
<rect key="frame" x="32" y="727" width="762" height="224"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<string key="text">In Board Info mode, view your own real Adafruit board with an AR overlay describing important details - chips, components, & more! </string>
|
||||
|
|
@ -430,7 +175,7 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hxB-7h-VYD">
|
||||
<rect key="frame" x="227" y="1031" width="378" height="62"/>
|
||||
<rect key="frame" x="224" y="1029" width="377" height="62"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
|
||||
|
|
@ -448,7 +193,7 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
</connections>
|
||||
</button>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xbb-c5-i7W">
|
||||
<rect key="frame" x="36" y="725" width="760" height="275"/>
|
||||
<rect key="frame" x="34" y="724" width="759" height="272"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<string key="text">While in QR mode, scan the Adafruit QR code on your invoice to display 3D product models, descriptions, videos, and links to helpful tutorials.</string>
|
||||
|
|
@ -457,7 +202,7 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
<imageView opaque="NO" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="QR-Mode-icon-512px" translatesAutoresizingMaskIntoConstraints="NO" id="n19-Bk-a29">
|
||||
<rect key="frame" x="105" y="246" width="620" height="411"/>
|
||||
<rect key="frame" x="102" y="245" width="619" height="410"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="QR Codes" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kdp-xp-SKl">
|
||||
|
|
@ -506,16 +251,6 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i4v-di-Acz">
|
||||
<rect key="frame" x="317.5" y="111" width="199" height="199"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="i4v-di-Acz" secondAttribute="height" multiplier="1:1" id="GOQ-tj-cVV"/>
|
||||
</constraints>
|
||||
<state key="normal" image="Adabot-Mode-icon-512px"/>
|
||||
<connections>
|
||||
<segue destination="BV1-FR-VrT" kind="presentation" identifier="" modalPresentationStyle="fullScreen" modalTransitionStyle="flipHorizontal" id="XGC-UV-bv7"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Version" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xf5-5J-Hvr" userLabel="Version Label">
|
||||
<rect key="frame" x="379.5" y="52" width="75" height="20"/>
|
||||
<constraints>
|
||||
|
|
@ -536,89 +271,61 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Board Scanner" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="69X-ph-JvD" userLabel="Board Label">
|
||||
<rect key="frame" x="327" y="585.5" width="180" height="28"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="180" id="YDO-Dj-dEZ"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="20"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Meet Adabot" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GPs-fe-Oq7" userLabel="Adabot Label">
|
||||
<rect key="frame" x="327" y="318" width="180" height="28"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="180" id="vbi-ic-tFI"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="20"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="71S-tN-o8i" userLabel="Board Icon">
|
||||
<rect key="frame" x="317.5" y="378.5" width="199" height="199"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="71S-tN-o8i" secondAttribute="height" multiplier="1:1" id="Rge-Dd-gQ4"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button" image="Circuit_Playground1-mask2"/>
|
||||
<connections>
|
||||
<segue destination="vvW-nO-QUQ" kind="presentation" identifier="" modalPresentationStyle="fullScreen" modalTransitionStyle="crossDissolve" id="Ekl-WB-CCK"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Scan QR Code" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JoM-op-FvU" userLabel="QR Label">
|
||||
<rect key="frame" x="327" y="853.5" width="180" height="27.5"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="180" id="Lkf-ET-bM9"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="20"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NU1-NZ-3YS" userLabel="QR Icon">
|
||||
<rect key="frame" x="317.5" y="646.5" width="199" height="199"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="NU1-NZ-3YS" secondAttribute="height" multiplier="1:1" id="0uH-dD-LiF"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button" image="QR-Mode-icon-512px"/>
|
||||
<connections>
|
||||
<segue destination="2cU-fx-wlI" kind="presentation" modalPresentationStyle="fullScreen" modalTransitionStyle="flipHorizontal" id="nhd-am-G0o"/>
|
||||
</connections>
|
||||
</button>
|
||||
<arscnView hidden="YES" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="n9p-8U-ZtN">
|
||||
<rect key="frame" x="0.0" y="1046" width="1" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</arscnView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="rzH-3l-atp">
|
||||
<rect key="frame" x="304.5" y="100" width="225" height="550"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i4v-di-Acz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="225" height="225"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="225" id="pNO-qL-tXF"/>
|
||||
<constraint firstAttribute="width" constant="225" id="wCF-1t-H4X"/>
|
||||
</constraints>
|
||||
<state key="normal" image="Adabot-Mode-icon-512px"/>
|
||||
<connections>
|
||||
<segue destination="BV1-FR-VrT" kind="presentation" modalPresentationStyle="fullScreen" id="nts-Q6-BCz"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Meet Adabot" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GPs-fe-Oq7" userLabel="Adabot Label">
|
||||
<rect key="frame" x="0.0" y="240" width="225" height="27.5"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="20"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="71S-tN-o8i" userLabel="Board Icon">
|
||||
<rect key="frame" x="0.0" y="282.5" width="225" height="225"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="225" id="Uwb-gh-0Ie"/>
|
||||
<constraint firstAttribute="width" constant="225" id="iAu-WF-5DK"/>
|
||||
</constraints>
|
||||
<state key="normal" image="Circuit_Playground1-mask2"/>
|
||||
<connections>
|
||||
<action selector="boardScanButtonPress:" destination="TV4-si-PBW" eventType="touchUpInside" id="nAb-l9-NKy"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="Board Scanner" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="69X-ph-JvD" userLabel="Board Label">
|
||||
<rect key="frame" x="0.0" y="522.5" width="225" height="27.5"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="20"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="AW5-us-1F3"/>
|
||||
<color key="backgroundColor" red="0.15781691670417786" green="0.67801815271377563" blue="0.93185180425643921" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="71S-tN-o8i" firstAttribute="height" secondItem="3Za-QD-T4W" secondAttribute="height" multiplier="1:6" id="0DG-FU-ADz"/>
|
||||
<constraint firstItem="JoM-op-FvU" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="1sR-BO-ACN"/>
|
||||
<constraint firstItem="NU1-NZ-3YS" firstAttribute="height" secondItem="3Za-QD-T4W" secondAttribute="height" multiplier="1:6" id="482-5d-a7R"/>
|
||||
<constraint firstItem="i4v-di-Acz" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="7aN-av-zeJ"/>
|
||||
<constraint firstItem="GPs-fe-Oq7" firstAttribute="top" secondItem="i4v-di-Acz" secondAttribute="bottom" constant="8" id="DlR-iY-hb6"/>
|
||||
<constraint firstItem="GPs-fe-Oq7" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="Dlf-qm-xTg"/>
|
||||
<constraint firstItem="i4v-di-Acz" firstAttribute="height" secondItem="3Za-QD-T4W" secondAttribute="height" multiplier="1:6" id="Eyw-lY-kPh"/>
|
||||
<constraint firstItem="Xf5-5J-Hvr" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="FTP-8B-wRs"/>
|
||||
<constraint firstItem="rzH-3l-atp" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="JPe-0j-lDY"/>
|
||||
<constraint firstItem="hrz-cZ-enL" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="KJp-Wc-5jQ"/>
|
||||
<constraint firstItem="71S-tN-o8i" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="PKS-Am-Qpf"/>
|
||||
<constraint firstItem="hrz-cZ-enL" firstAttribute="top" secondItem="AW5-us-1F3" secondAttribute="top" constant="2" id="Xol-1g-MK3"/>
|
||||
<constraint firstItem="69X-ph-JvD" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="ZLE-kE-o4R"/>
|
||||
<constraint firstItem="NU1-NZ-3YS" firstAttribute="top" secondItem="69X-ph-JvD" secondAttribute="bottom" constant="32.670000000000002" id="bVC-Fr-Ncx"/>
|
||||
<constraint firstItem="Xf5-5J-Hvr" firstAttribute="top" secondItem="hrz-cZ-enL" secondAttribute="bottom" id="h4u-CL-BuE"/>
|
||||
<constraint firstItem="NU1-NZ-3YS" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="hjr-20-NQQ"/>
|
||||
<constraint firstItem="71S-tN-o8i" firstAttribute="top" secondItem="GPs-fe-Oq7" secondAttribute="bottom" constant="32.670000000000002" id="nRR-Zn-byS"/>
|
||||
<constraint firstItem="i4v-di-Acz" firstAttribute="top" secondItem="Xf5-5J-Hvr" secondAttribute="bottom" constant="39" id="nzO-Ka-SOZ"/>
|
||||
<constraint firstItem="JoM-op-FvU" firstAttribute="top" secondItem="NU1-NZ-3YS" secondAttribute="bottom" constant="8" id="r3Y-xA-JwT"/>
|
||||
<constraint firstItem="69X-ph-JvD" firstAttribute="top" secondItem="71S-tN-o8i" secondAttribute="bottom" constant="8" id="xxi-vL-Mg6"/>
|
||||
<constraint firstItem="rzH-3l-atp" firstAttribute="top" secondItem="Xf5-5J-Hvr" secondAttribute="bottom" constant="28" id="y7g-1g-yzk"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="BHS-Qm-M7o"/>
|
||||
<connections>
|
||||
<outlet property="ARLabel" destination="GPs-fe-Oq7" id="0uu-JS-jI1"/>
|
||||
<outlet property="arModeAdabot" destination="i4v-di-Acz" id="imG-wo-zZB"/>
|
||||
<outlet property="boardView" destination="n9p-8U-ZtN" id="Es2-lW-ANW"/>
|
||||
<outlet property="qrLabel" destination="JoM-op-FvU" id="qq2-gj-fB0"/>
|
||||
<outlet property="qrModeIcon" destination="NU1-NZ-3YS" id="2Bc-I2-dkp"/>
|
||||
<outlet property="boardScanButton" destination="71S-tN-o8i" id="hzb-rF-lPa"/>
|
||||
<outlet property="versionNumberLabel" destination="Xf5-5J-Hvr" id="YkT-bR-DRp"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
|
|
@ -629,12 +336,119 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<!--Adabot Mode-->
|
||||
<scene sceneID="tXr-a1-R10">
|
||||
<objects>
|
||||
<viewController id="BV1-FR-VrT" userLabel="Adabot Mode" customClass="ViewController" customModule="Adafruit_AR" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="KUk-eV-fls">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<arscnView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MgE-aG-4qB">
|
||||
<rect key="frame" x="-4" y="-3" width="838" height="1197"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</arscnView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MOVE AROUND TO SCAN A SURFACE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cBD-LG-gQT">
|
||||
<rect key="frame" x="7" y="129" width="822" height="26"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<color key="shadowColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<size key="shadowOffset" width="1" height="1"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uLI-mV-Wox">
|
||||
<rect key="frame" x="736" y="1095" width="64" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleAction:" destination="BV1-FR-VrT" eventType="touchUpInside" id="x1v-Ne-U66"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w89-iZ-RSu">
|
||||
<rect key="frame" x="394" y="1108" width="45" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Regular" family="Avenir Next" pointSize="15"/>
|
||||
<state key="normal">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="recordToggle:" destination="BV1-FR-VrT" eventType="touchUpInside" id="t2f-nu-cGL"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n5S-6N-62f">
|
||||
<rect key="frame" x="31" y="1095" width="66" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.4488220363" blue="1" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<state key="normal" backgroundImage="button:n5S-6N-62f:backgroundImage"/>
|
||||
<connections>
|
||||
<action selector="alphButton:" destination="BV1-FR-VrT" eventType="touchUpInside" id="7F2-Un-A6y"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fZt-j6-9yz">
|
||||
<rect key="frame" x="20" y="20" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="QNg-CK-fNz"/>
|
||||
<constraint firstAttribute="height" constant="40" id="qKu-5B-e9t"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Home" image="HomeIcon"/>
|
||||
<connections>
|
||||
<segue destination="TV4-si-PBW" kind="presentation" id="bML-TM-6Ec"/>
|
||||
</connections>
|
||||
</button>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5y3-JG-2nO">
|
||||
<rect key="frame" x="-44" y="0.0" width="922" height="1194"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="vNn-B3-qK9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="922" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</view>
|
||||
<blurEffect style="light"/>
|
||||
</visualEffectView>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="498-ob-xo5">
|
||||
<rect key="frame" x="774" y="20" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="W0t-dB-szC"/>
|
||||
<constraint firstAttribute="height" constant="40" id="xQF-9b-0Qn"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Info" image="?mark_icon"/>
|
||||
<connections>
|
||||
<action selector="infoAction:" destination="BV1-FR-VrT" eventType="touchUpInside" id="OIm-1j-JoR"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="B6J-0k-EaY"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="5y3-JG-2nO" secondAttribute="bottom" id="4JL-oC-YeK"/>
|
||||
<constraint firstItem="cBD-LG-gQT" firstAttribute="top" secondItem="B6J-0k-EaY" secondAttribute="top" constant="129" id="4MJ-2d-iDB"/>
|
||||
<constraint firstItem="5y3-JG-2nO" firstAttribute="trailing" secondItem="B6J-0k-EaY" secondAttribute="trailing" constant="44" id="7h3-T8-gvp"/>
|
||||
<constraint firstItem="5y3-JG-2nO" firstAttribute="leading" secondItem="B6J-0k-EaY" secondAttribute="leading" constant="-44" id="Mp4-wN-sqU"/>
|
||||
<constraint firstItem="fZt-j6-9yz" firstAttribute="top" secondItem="B6J-0k-EaY" secondAttribute="top" constant="20" id="RwH-Nz-Z0A"/>
|
||||
<constraint firstItem="fZt-j6-9yz" firstAttribute="leading" secondItem="B6J-0k-EaY" secondAttribute="leading" constant="20" id="Y0c-nt-RCp"/>
|
||||
<constraint firstItem="498-ob-xo5" firstAttribute="top" secondItem="B6J-0k-EaY" secondAttribute="top" constant="20" id="gTv-vS-ErF"/>
|
||||
<constraint firstItem="5y3-JG-2nO" firstAttribute="top" secondItem="KUk-eV-fls" secondAttribute="top" id="gnf-nn-GdG"/>
|
||||
<constraint firstItem="cBD-LG-gQT" firstAttribute="leading" secondItem="KUk-eV-fls" secondAttribute="leading" constant="7" id="hTZ-H3-Uwo"/>
|
||||
<constraint firstAttribute="trailing" secondItem="cBD-LG-gQT" secondAttribute="trailing" constant="5" id="oop-zx-lgu"/>
|
||||
<constraint firstItem="B6J-0k-EaY" firstAttribute="trailing" secondItem="498-ob-xo5" secondAttribute="trailing" constant="20" id="uCW-W9-klt"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="x2A-hc-xQe"/>
|
||||
<connections>
|
||||
<outlet property="addedBlurEffect" destination="5y3-JG-2nO" id="dSK-7Y-dsB"/>
|
||||
<outlet property="alphButton" destination="n5S-6N-62f" id="h63-YI-oYV"/>
|
||||
<outlet property="homeButton" destination="fZt-j6-9yz" id="odf-YG-874"/>
|
||||
<outlet property="infoButton" destination="498-ob-xo5" id="oTA-Y7-bL2"/>
|
||||
<outlet property="itemView" destination="rfW-ZP-ZId" id="egF-w6-xxI"/>
|
||||
<outlet property="placementLabel" destination="cBD-LG-gQT" id="d57-9B-WQ5"/>
|
||||
<outlet property="recordButton" destination="w89-iZ-RSu" id="Bnl-tl-dIa"/>
|
||||
<outlet property="sceneView" destination="MgE-aG-4qB" id="6p4-IP-UeM"/>
|
||||
<outlet property="toggleButton" destination="uLI-mV-Wox" id="Le6-fX-Dj0"/>
|
||||
<outlet property="videoInfoView" destination="hfW-c6-dhX" id="I8N-Et-0Ag"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<view contentMode="scaleToFill" id="rfW-ZP-ZId">
|
||||
<rect key="frame" x="0.0" y="0.0" width="689" height="391"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x0S-5Z-H4u">
|
||||
<rect key="frame" x="324" y="338" width="42" height="33"/>
|
||||
<rect key="frame" x="324" y="318" width="42" height="33"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
|
||||
<state key="normal" title="Done">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
|
|
@ -698,25 +512,25 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TAP A LETTER TO PLAY A CIRCRUIT PLAYGROUND VIDEO" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qF6-4V-xFK">
|
||||
<rect key="frame" x="13" y="23" width="228" height="30.5"/>
|
||||
<rect key="frame" x="13" y="47" width="228" height="30.5"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TAP THE VIDEO TO STOP " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kPn-8Y-U3u">
|
||||
<rect key="frame" x="13" y="80" width="228" height="16.5"/>
|
||||
<rect key="frame" x="13" y="104" width="228" height="16.5"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PRESS AND HOLD EITHER THE VIDEO OR ADABOT TO EXIT A VIDEO" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rbN-i4-Sa7">
|
||||
<rect key="frame" x="13" y="117" width="229" height="33"/>
|
||||
<rect key="frame" x="13" y="141" width="229" height="33"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="12"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0JT-x0-hGz">
|
||||
<rect key="frame" x="79" y="222" width="96" height="40"/>
|
||||
<rect key="frame" x="79" y="202" width="96" height="40"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="20"/>
|
||||
<state key="normal" title="Done">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
|
|
@ -749,112 +563,17 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="SZV-WD-TEh" sceneMemberID="firstResponder"/>
|
||||
<viewController id="BV1-FR-VrT" userLabel="Adabot Mode" customClass="ViewController" customModule="Adafruit_AR" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="KUk-eV-fls">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<arscnView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MgE-aG-4qB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1193"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</arscnView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MOVE AROUND TO SCAN A SURFACE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cBD-LG-gQT">
|
||||
<rect key="frame" x="7" y="129" width="822" height="26"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<color key="shadowColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<size key="shadowOffset" width="1" height="1"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uLI-mV-Wox">
|
||||
<rect key="frame" x="737" y="1098" width="66" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleAction:" destination="BV1-FR-VrT" eventType="touchUpInside" id="x1v-Ne-U66"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w89-iZ-RSu">
|
||||
<rect key="frame" x="396" y="1109" width="44" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Regular" family="Avenir Next" pointSize="15"/>
|
||||
<state key="normal">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="recordToggle:" destination="BV1-FR-VrT" eventType="touchUpInside" id="t2f-nu-cGL"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n5S-6N-62f">
|
||||
<rect key="frame" x="31" y="1098" width="66" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.4488220363" blue="1" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<state key="normal" backgroundImage="button:n5S-6N-62f:backgroundImage"/>
|
||||
<connections>
|
||||
<action selector="alphButton:" destination="BV1-FR-VrT" eventType="touchUpInside" id="7F2-Un-A6y"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="498-ob-xo5">
|
||||
<rect key="frame" x="778" y="94" width="35" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Info" image="?mark_icon"/>
|
||||
<connections>
|
||||
<action selector="infoAction:" destination="BV1-FR-VrT" eventType="touchUpInside" id="OIm-1j-JoR"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fZt-j6-9yz">
|
||||
<rect key="frame" x="778" y="44" width="35" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Home" image="HomeIcon"/>
|
||||
<connections>
|
||||
<segue destination="TV4-si-PBW" kind="presentation" modalTransitionStyle="flipHorizontal" id="A8j-vO-tW6"/>
|
||||
</connections>
|
||||
</button>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5y3-JG-2nO">
|
||||
<rect key="frame" x="-44" y="0.0" width="922" height="1194"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="vNn-B3-qK9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="922" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</view>
|
||||
<blurEffect style="light"/>
|
||||
</visualEffectView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="B6J-0k-EaY"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="5y3-JG-2nO" secondAttribute="bottom" id="4JL-oC-YeK"/>
|
||||
<constraint firstItem="cBD-LG-gQT" firstAttribute="top" secondItem="B6J-0k-EaY" secondAttribute="top" constant="129" id="4MJ-2d-iDB"/>
|
||||
<constraint firstItem="5y3-JG-2nO" firstAttribute="trailing" secondItem="B6J-0k-EaY" secondAttribute="trailing" constant="44" id="7h3-T8-gvp"/>
|
||||
<constraint firstItem="5y3-JG-2nO" firstAttribute="leading" secondItem="B6J-0k-EaY" secondAttribute="leading" constant="-44" id="Mp4-wN-sqU"/>
|
||||
<constraint firstItem="5y3-JG-2nO" firstAttribute="top" secondItem="KUk-eV-fls" secondAttribute="top" id="gnf-nn-GdG"/>
|
||||
<constraint firstItem="cBD-LG-gQT" firstAttribute="leading" secondItem="KUk-eV-fls" secondAttribute="leading" constant="7" id="hTZ-H3-Uwo"/>
|
||||
<constraint firstAttribute="trailing" secondItem="cBD-LG-gQT" secondAttribute="trailing" constant="5" id="oop-zx-lgu"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="addedBlurEffect" destination="5y3-JG-2nO" id="dSK-7Y-dsB"/>
|
||||
<outlet property="alphButton" destination="n5S-6N-62f" id="h63-YI-oYV"/>
|
||||
<outlet property="homeButton" destination="fZt-j6-9yz" id="odf-YG-874"/>
|
||||
<outlet property="infoButton" destination="498-ob-xo5" id="oTA-Y7-bL2"/>
|
||||
<outlet property="itemView" destination="rfW-ZP-ZId" id="egF-w6-xxI"/>
|
||||
<outlet property="placementLabel" destination="cBD-LG-gQT" id="d57-9B-WQ5"/>
|
||||
<outlet property="recordButton" destination="w89-iZ-RSu" id="Bnl-tl-dIa"/>
|
||||
<outlet property="sceneView" destination="MgE-aG-4qB" id="6p4-IP-UeM"/>
|
||||
<outlet property="toggleButton" destination="uLI-mV-Wox" id="Le6-fX-Dj0"/>
|
||||
<outlet property="videoInfoView" destination="hfW-c6-dhX" id="I8N-Et-0Ag"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2168.8000000000002" y="-2183.497536945813"/>
|
||||
<point key="canvasLocation" x="2241.7266187050363" y="-1304.0201005025126"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="lDk-c2-68K"/>
|
||||
<segue reference="dpc-io-64V"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
<resources>
|
||||
<image name="?mark_icon" width="64" height="64"/>
|
||||
<image name="Adabot-Mode-icon-512px" width="512" height="512"/>
|
||||
<image name="Circuit Playground Bluefruit" width="595" height="607"/>
|
||||
<image name="Circuit_Playground1-mask2" width="512" height="512"/>
|
||||
<image name="HomeIcon" width="512" height="512"/>
|
||||
<image name="QR-Mode-icon-512px" width="512" height="512"/>
|
||||
|
|
@ -2620,7 +2339,6 @@ AAGH/wABiAQAAYgKAAGIEgABiBQAAYgWAAGIGAABiBoAAZm6AAGZvwABmcwAAZnPAAGZ3AABmeEAAZnp
|
|||
AAGZ7AABmfEAAZn5AAAAAAAABAEAAAAAAAAAaAAAAAAAAAAAAAAAAAABmfw
|
||||
</mutableData>
|
||||
</image>
|
||||
<image name="cpx1" width="1218" height="1178"/>
|
||||
<image name="imageView:wo0-AE-5XX:image" width="230" height="93">
|
||||
<mutableData key="keyedArchiveRepresentation">
|
||||
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
//
|
||||
// BLMBoardOverlay.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 2/24/21.
|
||||
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct BLMBoardOverlay: View {
|
||||
|
||||
@State private var ZAxisRotation = false
|
||||
|
||||
var foreverAnimation: Animation {
|
||||
Animation.linear(duration: 5.0)
|
||||
.repeatForever(autoreverses: false)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack{
|
||||
CircleText(radius: 100, text: " BLACK L IVES M ATTER BLACK L IVES M ATTER ", kerning: 0)
|
||||
}
|
||||
// .rotation3DEffect(Angle.degrees(ZAxisRotation ? -180 : 0), axis: (x: 0, y: 0, z: 1))
|
||||
// .animation(ZAxisRotation ? foreverAnimation : .default)
|
||||
// .onAppear(){
|
||||
// self.ZAxisRotation.toggle()
|
||||
// }
|
||||
|
||||
|
||||
// .rotationEffect(.degrees(ZAxisRotation ? 360: 0))
|
||||
// .animation(ZAxisRotation ? foreverAnimation : .default)
|
||||
// .onAppear(){
|
||||
// self.ZAxisRotation.toggle()
|
||||
// }
|
||||
|
||||
|
||||
// .rotationEffect(Angle(degrees: ZAxisRotation ? 360 : 0))
|
||||
// .animation(ZAxisRotation ? foreverAnimation : .none)
|
||||
// .onAppear(){
|
||||
// self.ZAxisRotation.toggle()
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
struct BLMBoardOverlay_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
BLMBoardOverlay()
|
||||
}
|
||||
}
|
||||
|
|
@ -1,358 +0,0 @@
|
|||
//
|
||||
// BoardViewController+Audio.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 12/12/20.
|
||||
// Copyright © 2020 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AVFoundation
|
||||
|
||||
|
||||
extension BoardViewController {
|
||||
|
||||
|
||||
func playTemperanceAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/when things are easy.wav", ofType:nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func playStarAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/today why is more.wav", ofType:nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playDeathAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/use great caution.wav", ofType:nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func playWOFAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/a good gauge.wav", ofType:nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playJudgementAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/if the spectrum is.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playHermitAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/filtering out noise.wav", ofType:nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playFourOfCoinAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/the best listeners.wav", ofType:nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
func playthmAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/footprints.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playtowerAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/misinformation.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playloversAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/just because there is.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
func playsunAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/make a megaphone.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func playmoonAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/motion is noise.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func playjusticeAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/not every container.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
func playworldAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/power to change.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playdevilAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/you've got the power.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
func playfoolAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/the process is more.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func playpriestessAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/sometimes building a mistake.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func playstrengthAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/showing up on time.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func playmagicianAudio() {
|
||||
let path = Bundle.main.path(forResource: "art.scnassets/wav/sometimes its not going.wav", ofType: nil)!
|
||||
let url = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: url)
|
||||
audioPlayer?.isMeteringEnabled = true
|
||||
guard let audioPlayer = audioPlayer else { return }
|
||||
|
||||
audioPlayer.prepareToPlay()
|
||||
audioPlayer.play()
|
||||
|
||||
} catch let error as NSError {
|
||||
print(error.description)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,620 +0,0 @@
|
|||
//
|
||||
// QRViewController+GestureRec.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor B on 4/24/19.
|
||||
// Copyright © 2019 Adafruit. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ARKit
|
||||
import SceneKit
|
||||
|
||||
|
||||
|
||||
extension BoardViewController {
|
||||
|
||||
//Gesture Recognizers & Actions
|
||||
func registerTapRecognizer() {
|
||||
|
||||
let tapGestureRecognizer = UITapGestureRecognizer (target:self ,action : #selector (tapped))
|
||||
|
||||
self.boardSceneView.addGestureRecognizer(tapGestureRecognizer)
|
||||
}
|
||||
|
||||
//Tap Gesture
|
||||
@objc func tapped(sender: UITapGestureRecognizer) {
|
||||
|
||||
let sceneView = sender.view as! ARSCNView
|
||||
|
||||
let hitResults = sceneView.hitTest(view.center, types: .existingPlaneUsingExtent)
|
||||
|
||||
_ = sender.location(in: self.boardSceneView)
|
||||
|
||||
if !hitResults.isEmpty == false {
|
||||
print("Surface Touched")
|
||||
|
||||
} else {
|
||||
|
||||
print("DID NOT LOAD NODE.")
|
||||
}
|
||||
|
||||
if sender.state == .ended {
|
||||
|
||||
let location: CGPoint = sender.location(in: sceneView)
|
||||
|
||||
let hits = self.boardSceneView.hitTest(location, options: nil)
|
||||
|
||||
if hits.count > 0 {
|
||||
|
||||
|
||||
let result = hits[0]
|
||||
|
||||
let node = result.node
|
||||
|
||||
|
||||
fadeOut = SCNAction.fadeOut(duration: 1)
|
||||
|
||||
fadeIn = SCNAction.fadeIn(duration: 0.0001)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (node.name) == "neopixel_Button" {
|
||||
|
||||
if cpxNeoPixelSwitch == false {
|
||||
|
||||
setCpxUI(Button: neoPixelButton, Display: neoPixelInfo)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
neoPixelInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.1), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
neoPixelInfo.runAction(scaleAction)
|
||||
|
||||
cpxNeoPixelSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
neoPixelButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
neoPixelInfo.removeAllActions()
|
||||
neoPixelInfo.isHidden = true
|
||||
cpxNeoPixelSwitch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (node.name) == "ATSAMD21_Micro_button" {
|
||||
|
||||
if cpxATSSwitch == false {
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
ATSInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.3), duration: 1.8)
|
||||
scaleAction.timingMode = .linear
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
setCpxUI(Button: ATSButton, Display: ATSInfo)
|
||||
ATSInfo.runAction(scaleAction)
|
||||
cpxATSSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
ATSButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
ATSInfo.removeAllActions()
|
||||
ATSInfo.isHidden = true
|
||||
cpxATSSwitch = false
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (node.name) == "Croc_Button" {
|
||||
|
||||
if cpxCrocSwitch == false {
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
crocInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.2), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
setCpxUI(Button: crocButton, Display: crocInfo)
|
||||
|
||||
crocInfo.runAction(scaleAction)
|
||||
|
||||
cpxCrocSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
crocButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
crocInfo.removeAllActions()
|
||||
crocInfo.isHidden = true
|
||||
cpxCrocSwitch = false
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if (node.name) == "temp_button" {
|
||||
|
||||
if cpxTempSwitch == false {
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
temperatureDisplay.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.1), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
setCpxUI(Button: temperatureButton, Display: temperatureDisplay)
|
||||
|
||||
temperatureDisplay.runAction(scaleAction)
|
||||
|
||||
cpxTempSwitch = true
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
temperatureButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
temperatureDisplay.removeAllActions()
|
||||
temperatureDisplay.isHidden = true
|
||||
cpxTempSwitch = false
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if (node.name) == "speaker_button" {
|
||||
|
||||
if cpxSpeakSwitch == false {
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
speakInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.1), duration: 2.2)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
speakInfo.runAction(scaleAction)
|
||||
|
||||
setCpxUI(Button: speakButton, Display: speakInfo)
|
||||
|
||||
cpxSpeakSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
speakButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
speakInfo.removeAllActions()
|
||||
speakInfo.isHidden = true
|
||||
cpxSpeakSwitch = false
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
else if (node.name) == "mic_button" {
|
||||
|
||||
if cpxMicSwitch == false {
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
micInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.2), duration: 2.2)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
setCpxUI(Button: micButton, Display: micInfo)
|
||||
|
||||
micInfo.runAction(scaleAction)
|
||||
|
||||
cpxMicSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
micButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
micInfo.removeAllActions()
|
||||
micInfo.isHidden = true
|
||||
cpxMicSwitch = false
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
else if (node.name) == "py_Sensor_Button" {
|
||||
|
||||
if pySensorSwitch == false {
|
||||
|
||||
setPy(Button: pySensorButton, Display: pySensorInfo)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
pySensorInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.1), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
pySensorButton.geometry!.firstMaterial?.transparency = 0.9
|
||||
|
||||
pySensorInfo.runAction(scaleAction)
|
||||
|
||||
pySensorSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
pySensorButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
pySensorInfo.removeAllActions()
|
||||
pySensorInfo.isHidden = true
|
||||
pySensorSwitch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (node.name) == "py_Wifi_Button" {
|
||||
|
||||
if pyWifiSwitch == false {
|
||||
|
||||
setPy(Button: pyWifiButton, Display: pyWifiInfo)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
pyWifiInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(1.1), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
pyWifiButton.geometry!.firstMaterial?.transparency = 0.9
|
||||
|
||||
pyWifiInfo.runAction(scaleAction)
|
||||
|
||||
pyWifiSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
pyWifiButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
pyWifiInfo.removeAllActions()
|
||||
pyWifiInfo.isHidden = true
|
||||
pyWifiSwitch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (node.name) == "py_ATSAMD_Button" {
|
||||
|
||||
if pyATSSwitch == false {
|
||||
|
||||
setPy(Button: pyATSButton, Display: pyATSInfo)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
pyATSInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(0.9), duration: 1.6)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
pyATSButton.geometry!.firstMaterial?.transparency = 0.9
|
||||
|
||||
pyATSInfo.runAction(scaleAction)
|
||||
|
||||
pyATSSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
pyATSButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
pyATSInfo.removeAllActions()
|
||||
pyATSInfo.isHidden = true
|
||||
pyATSSwitch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (node.name) == "py_Speaker_Button" {
|
||||
|
||||
if pySpeakerSwitch == false {
|
||||
|
||||
setPy(Button: pySpeakerButton, Display: pySpeakerInfo)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
pySpeakerInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(0.8), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
|
||||
|
||||
pySpeakerInfo.runAction(scaleAction)
|
||||
|
||||
pySpeakerSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
pySpeakerButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
pySpeakerInfo.removeAllActions()
|
||||
pySpeakerInfo.isHidden = true
|
||||
pySpeakerSwitch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (node.name) == "py_Connector_Button" {
|
||||
|
||||
if pyConnectorSwitch == false {
|
||||
|
||||
setPy(Button: pyConnectorButton, Display: pyConnectorInfo)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
pyConnectorInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(0.9), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
pyConnectorInfo.runAction(scaleAction)
|
||||
|
||||
pyConnectorSwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
pyConnectorButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
pyConnectorInfo.removeAllActions()
|
||||
pyConnectorInfo.isHidden = true
|
||||
pyConnectorSwitch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if (node.name) == "py_IC2_Button" {
|
||||
|
||||
if pyIC2Switch == false {
|
||||
|
||||
setPy(Button: pyIC2Button, Display: pyIC2Info)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
pyIC2Info.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(0.8), duration: 1.5
|
||||
)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
pyIC2Info.runAction(scaleAction)
|
||||
|
||||
pyIC2Switch = true
|
||||
|
||||
} else {
|
||||
|
||||
pyIC2Button.geometry!.firstMaterial?.transparency = 0.2
|
||||
pyIC2Info.removeAllActions()
|
||||
pyIC2Info.isHidden = true
|
||||
pyIC2Switch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if (node.name) == "py_D_A_Button" {
|
||||
|
||||
if pyDASwitch == false {
|
||||
|
||||
setPy(Button: pyDAButton, Display: pyDAInfo)
|
||||
|
||||
let scale: Float = 0.0007
|
||||
|
||||
pyDAInfo.scale = SCNVector3(x: scale, y: scale, z: scale)
|
||||
|
||||
let scaleAction = SCNAction.scale(to: CGFloat(0.9), duration: 1.8)
|
||||
|
||||
scaleAction.timingMode = .linear
|
||||
|
||||
// Use a custom timing function
|
||||
scaleAction.timingFunction = { (p: Float) in
|
||||
return self.easeOutElastic(p)
|
||||
}
|
||||
|
||||
pyDAInfo.runAction(scaleAction)
|
||||
|
||||
pyDASwitch = true
|
||||
|
||||
} else {
|
||||
|
||||
pyDAButton.geometry!.firstMaterial?.transparency = 0.2
|
||||
pyDAInfo.removeAllActions()
|
||||
pyDAInfo.isHidden = true
|
||||
pyDASwitch = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
else {
|
||||
print("Nothing Detected.")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func setCpxUI(Button: SCNNode, Display: SCNNode) {
|
||||
|
||||
print("\(Button.name ?? "") was pressed and " + "\(Display.name ?? "") was displayed")
|
||||
|
||||
Button.isHidden = false
|
||||
|
||||
Button.geometry!.firstMaterial?.transparency = 0.9
|
||||
|
||||
Display.isHidden = false
|
||||
|
||||
CPXButtons = CPXButtons.filter { $0 != Button }
|
||||
|
||||
CPXDisplays = CPXDisplays.filter { $0 != Display }
|
||||
|
||||
CPXButtons.forEach { button in
|
||||
|
||||
button.geometry!.firstMaterial?.transparency = 0.2
|
||||
}
|
||||
|
||||
CPXDisplays.forEach { display in
|
||||
|
||||
display.isHidden = true
|
||||
|
||||
}
|
||||
|
||||
CPXButtons = [ATSButton, micButton, crocButton, temperatureButton, speakButton,neoPixelButton]
|
||||
CPXDisplays = [crocInfo, speakInfo, ATSInfo, temperatureDisplay,micInfo, neoPixelInfo]
|
||||
|
||||
|
||||
// //Circuit Playground Interaction Test
|
||||
// cpxNeoPixelSwitch = false
|
||||
//
|
||||
// cpxATSSwitch = false
|
||||
//
|
||||
// cpxCrocSwitch = false
|
||||
//
|
||||
// cpxTempSwitch = false
|
||||
//
|
||||
// cpxSpeakSwitch = false
|
||||
//
|
||||
// cpxMicSwitch = false
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
func setPy(Button: SCNNode, Display: SCNNode) {
|
||||
|
||||
print("\(Button.name ?? "") was pressed and " + "\(Display.name ?? "") was displayed")
|
||||
|
||||
Button.isHidden = false
|
||||
|
||||
Button.geometry!.firstMaterial?.transparency = 0.9
|
||||
|
||||
Display.isHidden = false
|
||||
|
||||
PyButtons = PyButtons.filter { $0 != Button }
|
||||
|
||||
PyDisplays = PyDisplays.filter { $0 != Display }
|
||||
|
||||
PyButtons.forEach { button in
|
||||
|
||||
button.geometry!.firstMaterial?.transparency = 0.2
|
||||
}
|
||||
|
||||
PyDisplays.forEach { display in
|
||||
|
||||
display.isHidden = true
|
||||
|
||||
}
|
||||
|
||||
PyButtons = [pyATSButton, pySensorButton, pyDAButton, pySpeakerButton, pyWifiButton, pyIC2Button, pyConnectorButton]
|
||||
PyDisplays = [pyATSInfo, pySpeakerInfo, pyDAInfo, pyWifiInfo, pySensorInfo, pyConnectorInfo, pyIC2Info]
|
||||
|
||||
|
||||
|
||||
// pyATSSwitch = false
|
||||
//
|
||||
// pyIC2Switch = false
|
||||
//
|
||||
// pySensorSwitch = false
|
||||
//
|
||||
// pySpeakerSwitch = false
|
||||
//
|
||||
// pyDASwitch = false
|
||||
//
|
||||
// pyWifiSwitch = false
|
||||
//
|
||||
// pyConnectorSwitch = false
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,229 +0,0 @@
|
|||
//
|
||||
// BoardViewController+HostingControllers.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 12/12/20.
|
||||
// Copyright © 2020 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import ARKit
|
||||
import SwiftUI
|
||||
|
||||
|
||||
extension BoardViewController {
|
||||
|
||||
|
||||
|
||||
func arHostingController(for node: SCNNode, textForDialogue: [String]) {
|
||||
// create a hosting controller with SwiftUI view
|
||||
let arVC = UIHostingController(rootView: SwiftUITarotCardView(minervaDialogue: textForDialogue))
|
||||
|
||||
// Do this on the main thread
|
||||
DispatchQueue.main.async {
|
||||
arVC.willMove(toParent: self)
|
||||
// make the hosting VC a child to the main view controller
|
||||
self.addChildViewController(arVC)
|
||||
|
||||
// set the pixel size of the Card View
|
||||
arVC.view.frame = CGRect(x: 0, y: 0, width: 500, height: 500)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(arVC.view)
|
||||
|
||||
// render the view on the plane geometry as a material
|
||||
self.show(hostingVC: arVC, on: node)
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func show(hostingVC: UIHostingController<SwiftUITarotCardView>, on node: SCNNode) {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
// set the diffuse of the material to the view of the Hosting View Controller
|
||||
material.diffuse.contents = hostingVC.view
|
||||
material.lightingModel = .constant
|
||||
// Set the material to the geometry of the node (plane geometry)
|
||||
node.geometry?.materials = [material]
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func arPICOHostingController(for node: SCNNode) {
|
||||
// Do this on the main thread
|
||||
DispatchQueue.main.async {
|
||||
|
||||
// make the hosting VC a child to the main view controller
|
||||
// self.addChildViewController(self.arVC)
|
||||
|
||||
// set the pixel size of the Card View
|
||||
self.arVC.view.frame = CGRect(x: 0, y: 0, width: 500, height: 500)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.arVC.view)
|
||||
|
||||
// render the view on the plane geometry as a material
|
||||
self.showOverlay(hostingVC: self.arVC, on: node)
|
||||
|
||||
// self.arVC.willMove(toParent: self)
|
||||
self.arVC.didMove(toParent: self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
func showOverlay(hostingVC: UIHostingController<PICOBoardOverlay>, on node: SCNNode) {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
// set the diffuse of the material to the view of the Hosting View Controller
|
||||
material.diffuse.contents = hostingVC.view
|
||||
material.lightingModel = .constant
|
||||
// Set the material to the geometry of the node (plane geometry)
|
||||
node.geometry?.materials = [material]
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
}
|
||||
|
||||
|
||||
|
||||
func arBLMHostingController(for node: SCNNode) {
|
||||
// Do this on the main thread
|
||||
DispatchQueue.main.async {
|
||||
|
||||
// make the hosting VC a child to the main view controller
|
||||
// self.addChildViewController(self.arVC)
|
||||
|
||||
// set the pixel size of the Card View
|
||||
self.blmVC.view.frame = CGRect(x: 0, y: 0, width: 500, height: 500)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.blmVC.view)
|
||||
|
||||
// render the view on the plane geometry as a material
|
||||
self.showBLMOverlay(hostingVC: self.blmVC, on: node)
|
||||
|
||||
// self.arVC.willMove(toParent: self)
|
||||
self.blmVC.didMove(toParent: self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
func showBLMOverlay(hostingVC: UIHostingController<BLMBoardOverlay>, on node: SCNNode) {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
// set the diffuse of the material to the view of the Hosting View Controller
|
||||
material.diffuse.contents = hostingVC.view
|
||||
material.lightingModel = .constant
|
||||
// Set the material to the geometry of the node (plane geometry)
|
||||
node.geometry?.materials = [material]
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
}
|
||||
|
||||
|
||||
func arTeensy41HostingController(for node: SCNNode) {
|
||||
print(#function)
|
||||
// Do this on the main thread
|
||||
DispatchQueue.main.async {
|
||||
|
||||
// make the hosting VC a child to the main view controller
|
||||
// self.addChildViewController(self.arVC)
|
||||
|
||||
// set the pixel size of the Card View
|
||||
self.teensyVC.view.frame = CGRect(x: 0, y: 0, width: 500, height: 500)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.teensyVC.view)
|
||||
|
||||
// render the view on the plane geometry as a material
|
||||
self.showTeensyOverlay(hostingVC: self.teensyVC, on: node)
|
||||
|
||||
// self.arVC.willMove(toParent: self)
|
||||
self.teensyVC.didMove(toParent: self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
func showTeensyOverlay(hostingVC: UIHostingController<Teensy41BoardOverlay>, on node: SCNNode) {
|
||||
print(#function)
|
||||
DispatchQueue.main.async {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
// set the diffuse of the material to the view of the Hosting View Controller
|
||||
material.diffuse.contents = hostingVC.view
|
||||
material.lightingModel = .constant
|
||||
// Set the material to the geometry of the node (plane geometry)
|
||||
node.geometry?.materials = [material]
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func arpi400HostingController(for node: SCNNode) {
|
||||
// Do this on the main thread
|
||||
DispatchQueue.main.async {
|
||||
|
||||
// make the hosting VC a child to the main view controller
|
||||
// self.addChildViewController(self.arVC)
|
||||
|
||||
// set the pixel size of the Card View
|
||||
self.pi400VC.view.frame = CGRect(x: 0, y: 0, width: 1000, height: 500)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.pi400VC.view)
|
||||
|
||||
// render the view on the plane geometry as a material
|
||||
self.showpi400Overlay(hostingVC: self.pi400VC, on: node)
|
||||
|
||||
// self.arVC.willMove(toParent: self)
|
||||
self.pi400VC.didMove(toParent: self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
func showpi400Overlay(hostingVC: UIHostingController<Pi400Overlay>, on node: SCNNode) {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
// set the diffuse of the material to the view of the Hosting View Controller
|
||||
material.diffuse.contents = hostingVC.view
|
||||
material.lightingModel = .constant
|
||||
// Set the material to the geometry of the node (plane geometry)
|
||||
node.geometry?.materials = [material]
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// CurvedText.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 2/24/21.
|
||||
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct CurvedText: View {
|
||||
var body: some View {
|
||||
|
||||
RoundedRectangle(cornerRadius: 1, style: .continuous)
|
||||
.fill(Color.clear)
|
||||
.frame(width: 200, height: 200)
|
||||
.border(Color.gray, width: 2)
|
||||
.position(x: 250, y: 250)
|
||||
}
|
||||
}
|
||||
|
||||
struct CurvedText_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CurvedText()
|
||||
}
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
//
|
||||
// ListOfTexts.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 1/9/21.
|
||||
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct ListOfTexts {
|
||||
|
||||
//MARK:- Text For Update #3
|
||||
|
||||
static let foolText = ["Ah! Looks like you have a tarot card!","Ah yes. The Fool Card.","Some new beginnings also brings struggle, but just remember...","The process is more important than the end result of goals.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let priestessText = ["Hehe! Looks like you have a tarot card!","Hmmm....The Priestess Card.","Trust your instinct...even if you build mistakes.", "Sometime building a mistake...is better than not building at all.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let strengthText = ["Ah! Looks like you have a tarot card!","Ah yes. The Strength Card.","You will be called upon to show up...", "Showing up on time, is just as important as arriving prepared.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let magicianText = ["Ah! Looks like you have a tarot card!","Hmmm. The Magician Card.","This card has a way of changing your mood for the better! But...","Sometimes it's not going to change...unless you do.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let chariotText = ["Ah! Looks like you have a tarot card!","Ah yes. The Chariot Card.","Now is a time to go for what you really want.", "There may be many obstacles in your path but if you stay focused, you'll be successful!","That was fun! Do you have another?", ""]
|
||||
|
||||
static let emperorText = ["Ah! Looks like you have a tarot card!"," The Emperor Card.","This card represents a powerful leader who demands respect and authority.","You create law and order by applying principles or guidelines to a specific situation.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let empressText = ["Ah! Looks like you have a tarot card!","Ah yes. The Empress Card.","This card signifies a strong connection to your creative expressions.", "Connect with your senses through taste, touch, sound, smell and sight.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let heirophantText = ["Ah! Looks like you have a tarot card!","Ah yes. The Hierophant Card.","This card represents a necessity to follow existing conventions and rules.","Rather than breaking norms, be familiar with different traditions and beliefs.","That was fun! Do you have another?", ""]
|
||||
|
||||
|
||||
//MARK:- Text For Update #2
|
||||
|
||||
static let tHMText = ["Ah! Looks like you have a tarot card!","The card of The Hanged Man.","Only you can release the power within.", "Footprints are not always reliable...make your own!","That was fun! Do you have another?", ""]
|
||||
|
||||
static let towerText = ["Ah! Looks like you have a tarot card!","The card of the Tower.","Be very mindful of your safety.", "Misinformation...is more dangerous than no information.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let loversText = ["Ah! Looks like you have a tarot card!","The card of the Lovers!"," This card represents seeking balance behind the gates within.", "Just because there is a gate...doesn't mean it locked...","That was fun! Do you have another?", ""]
|
||||
|
||||
static let sunText = ["Ah! Looks like you have a tarot card!","Ah card of the Sun!"," You will find that people are drawn to the happy vibes and positive energy you are giving out.", "Why not make a megaphone! To whisper into.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let justiceText = ["Ah! Looks like you have a tarot card!","The card of Justice!","Think about your actions towards others. ", "Not every container is static free...","That was fun! Do you have another?", ""]
|
||||
|
||||
static let moonText = ["Ah! Looks like you have a tarot card!","The card of the Moon!","This card tells me that you should pay attention to your dreams!", "Motion is noise. Stay still when possible.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let worldText = ["Ah! Looks like you have a tarot card!","The card of the Hermit!","Looks like you will have the world at your feet!", "The power to change, is not the power to charge...","That was fun! Do you have another?", ""]
|
||||
|
||||
static let devilText = ["Ah! Looks like you have a tarot card!","Oh! The Devil Card!","You control of your own destiny and are not bound by anything.", "You've got the power!...as long as it doesn't go off the rails...","That was fun! Do you have another?", ""]
|
||||
|
||||
//MARK:- Text For Update #1
|
||||
|
||||
static let temperanceText = ["Ah! Looks like you have a tarot card!","Hoho! This is the card of Temperance.","When things are easy, prepare for the hard things...", "...be sure to keep balance in life.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let starText = ["Ah! Looks like you have a tarot card!","Hmmm...This is the Star card!", "Today, why is more important than what.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let deathText = ["Ah! Looks like you have a tarot card!","Oh! The Death Card.","Don’t fear! This card symbolizes the end of a long journey.", "Use great caution with things at their lifespan.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let WOFText = ["Ah! Looks like you have a tarot card!","This card is the Wheel Of Fortune!","A good gauge, can also be a bind.", "As the wheel of fortune turns, expect some setbacks.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let judgementText = ["Ah! Looks like you have a tarot card!","Hmmm...This is card of Judgement!","If the spectrum is crowded, move to another!", "If you find yourself at a crossroads, trust your judgement and know that you’re on the right path.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let hermitText = ["Ah! Looks like you have a tarot card!","The card of the Hermit!","At times, we filter out noise for clarity...", "...filtering out noise is the start, not the end.","That was fun! Do you have another?", ""]
|
||||
|
||||
static let fourOfCoinText = ["Ah! Looks like you have a tarot card!","Ah...The Four Of Coin.","The best listeners hear the best things...","Fortune comes to those who listen.","That was fun! Do you have another?", ""]
|
||||
|
||||
}
|
||||
|
|
@ -1,371 +0,0 @@
|
|||
//
|
||||
// PICOBoardOverlay.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 1/26/21.
|
||||
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
|
||||
|
||||
struct Data: Identifiable {
|
||||
let id = UUID()
|
||||
let value: String
|
||||
let prefix: String
|
||||
let fgColor: Color
|
||||
let bgcolor: Color
|
||||
let prefix2: String
|
||||
let bgColor2: Color
|
||||
let prefix3: String
|
||||
let bgColor3: Color
|
||||
let prefix4: String
|
||||
let bgColor4: Color
|
||||
let prefix5: String
|
||||
let bgColor5: Color
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
struct PICOBoardOverlay: View {
|
||||
|
||||
|
||||
@State private var viewY = 0
|
||||
|
||||
@State private var debugY = 0
|
||||
|
||||
var body: some View {
|
||||
|
||||
let data = [Data(value: "40",prefix:"VBUS", fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "39", prefix: "VSYS", fgColor: .white, bgcolor: .red,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "38", prefix: "GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "37", prefix: "3V3_EN", fgColor: .black, bgcolor: .gray, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "36", prefix: "3V3", fgColor: .white, bgcolor: .red, prefix2: "300 mA Max", bgColor2: .black, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "35", prefix: "ADC_VREF", fgColor: .black, bgcolor: .orange, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "34", prefix: "GP28", fgColor: .black, bgcolor: .yellow, prefix2: "PWM6A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "GP28_A2", bgColor5: .orange),
|
||||
|
||||
Data(value: "33", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "32", prefix: "GP27",fgColor: .black, bgcolor: .yellow, prefix2: "PWM5B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D01", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "GP26_A0", bgColor5: .orange),
|
||||
|
||||
Data(value: "31", prefix: "GP26", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "GP27_A0", bgColor5: .orange),
|
||||
|
||||
Data(value: "30", prefix: "RUN/RESET", fgColor: .black, bgcolor: .gray, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "29", prefix: "GP22", fgColor: .black, bgcolor: .yellow, prefix2: "PWM3A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "28", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "27", prefix: "GP21", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "26", prefix: "GP20", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "25", prefix: "GP19", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D00", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "24", prefix: "GP18", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "23", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "22", prefix: "GP17", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "21", prefix: "GP16", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1)))
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let data2 = [Data(value: "1",prefix:"GP0", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "2",prefix:"GP1", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "3", prefix: "GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "4",prefix:"GP2", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "5",prefix:"GP3", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D00", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "6",prefix:"GP4", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "7", prefix: "GP5", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "8",prefix:"GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear ,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "9",prefix:"GP6", fgColor: .black, bgcolor: .yellow, prefix2: "PWM3A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "10", prefix: "GP7", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D00", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "11", prefix: "GP8", fgColor: .black, bgcolor: .yellow, prefix2: "PWM4A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "12", prefix: "GP9", fgColor: .black, bgcolor: .yellow, prefix2: "PWM4B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "13", prefix: "GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "14", prefix: "GP10", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "15", prefix: "GP11", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "16", prefix: "GP12", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D01", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "17", prefix: "GP13", fgColor: .black, bgcolor: .yellow, prefix2: "PWM6B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "18", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "19", prefix: "GP14", fgColor: .black, bgcolor: .yellow, prefix2: "PWM7A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "20", prefix: "GP15", fgColor: .black, bgcolor: .yellow, prefix2: "PWM7B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear)
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
ZStack{
|
||||
//Border
|
||||
RoundedRectangle(cornerRadius: 1, style: .continuous)
|
||||
.fill(Color.clear)
|
||||
.frame(width: 167, height: 272)
|
||||
.border(Color.gray, width: 2)
|
||||
.position(x: 250, y: CGFloat(viewY))
|
||||
//.position(x: 250, y: 250)
|
||||
|
||||
pintOutDEBUGStruct()
|
||||
.position(x: 250, y: CGFloat(debugY))
|
||||
|
||||
|
||||
|
||||
HStack{
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
ForEach(data) { (pinout) in
|
||||
pintOutStruct(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
}
|
||||
.frame(width: 170, height: 13.5, alignment: .leading)
|
||||
}
|
||||
|
||||
.position(x: 418, y: CGFloat(viewY))
|
||||
//.offset(x: 245, y: 23.8)
|
||||
|
||||
VStack(alignment: .trailing) {
|
||||
ForEach(data2) { (pinout) in
|
||||
pintOutStruct2(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
}
|
||||
.frame(width: 150, height: 13.4, alignment: .trailing)
|
||||
|
||||
}
|
||||
.position(x: -161, y: CGFloat(viewY))
|
||||
//.offset(x: -245, y: 25)
|
||||
}
|
||||
}
|
||||
.onAppear(perform: {
|
||||
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
//iPhone
|
||||
viewY = 217
|
||||
debugY = 370
|
||||
}else {
|
||||
//iPad
|
||||
viewY = 250
|
||||
debugY = 400
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
.rotationEffect(.degrees(-180))
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct pintOutDEBUGStruct: View {
|
||||
|
||||
|
||||
var body: some View {
|
||||
|
||||
VStack(alignment: .trailing){
|
||||
Text("SWCLK")
|
||||
.font(.system(size: 7))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(.black)
|
||||
.background(Color.gray)
|
||||
.padding(0.2)
|
||||
|
||||
Text("GND")
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(Color.white)
|
||||
.background(Color.black)
|
||||
.padding(0.2)
|
||||
|
||||
|
||||
Text("SWDI0")
|
||||
.font(.system(size: 7))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(Color.black)
|
||||
.background(Color.gray)
|
||||
.padding(0.2)
|
||||
}
|
||||
|
||||
.rotationEffect(.degrees(-90))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct pintOutStruct: View {
|
||||
|
||||
let value: String
|
||||
let prefix: String
|
||||
let fgcolor: Color
|
||||
let bgcolor: Color
|
||||
let prefix2: String
|
||||
let bgColor2: Color
|
||||
let prefix3: String
|
||||
let bgColor3: Color
|
||||
let prefix4: String
|
||||
let bgColor4: Color
|
||||
let prefix5: String
|
||||
let bgColor5: Color
|
||||
|
||||
|
||||
|
||||
var body: some View {
|
||||
|
||||
HStack(spacing: 4.0){
|
||||
Text(value)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(.white)
|
||||
.multilineTextAlignment(.trailing)
|
||||
.background(Color.gray)
|
||||
|
||||
Text(prefix)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgcolor)
|
||||
// .font(.custom("Helvetica Neue", size: 10))
|
||||
|
||||
Text(prefix2)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor2)
|
||||
// .font(.custom("Helvetica Neue", size: 10))
|
||||
|
||||
Text(prefix3)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor3)
|
||||
|
||||
|
||||
Text(prefix4)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor4)
|
||||
|
||||
Text(prefix5)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor5)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct pintOutStruct2: View {
|
||||
|
||||
let value: String
|
||||
let prefix: String
|
||||
let fgcolor: Color
|
||||
let bgcolor: Color
|
||||
let prefix2: String
|
||||
let bgColor2: Color
|
||||
let prefix3: String
|
||||
let bgColor3: Color
|
||||
let prefix4: String
|
||||
let bgColor4: Color
|
||||
let prefix5: String
|
||||
let bgColor5: Color
|
||||
|
||||
|
||||
|
||||
var body: some View {
|
||||
|
||||
HStack(spacing: 4.0){
|
||||
Text(prefix5)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor5)
|
||||
|
||||
|
||||
Text(prefix4)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor4)
|
||||
.cornerRadius(25)
|
||||
|
||||
Text(prefix3)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor3)
|
||||
|
||||
Text(prefix2)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgColor2)
|
||||
|
||||
Text(prefix)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.black)
|
||||
.foregroundColor(fgcolor)
|
||||
.background(bgcolor)
|
||||
|
||||
Text(value)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(.white)
|
||||
.multilineTextAlignment(.trailing)
|
||||
.foregroundColor(.black)
|
||||
.background(Color.gray)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct PICOBoardOverlay_Previews: PreviewProvider {
|
||||
|
||||
|
||||
static var previews: some View {
|
||||
PICOBoardOverlay()
|
||||
.previewDevice(PreviewDevice(rawValue: "iPad Pro (11-inch) (2nd generation)"))
|
||||
.previewDisplayName("iPhone 11 Max")
|
||||
}
|
||||
}
|
||||
|
|
@ -1,314 +0,0 @@
|
|||
//
|
||||
// PICOBoardOverlay.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 1/26/21.
|
||||
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct pi400Data: Identifiable {
|
||||
let id = UUID()
|
||||
let pinOutLabel: String
|
||||
let pinOutBGcolor: Color
|
||||
let pinOutFGcolor: Color
|
||||
|
||||
let pinOutLabel2: String
|
||||
let pinOutBGcolor2: Color
|
||||
let pinOutFGcolor2: Color
|
||||
|
||||
let GPIONumber: String
|
||||
|
||||
let circleColor: Color
|
||||
}
|
||||
|
||||
struct Pi400Overlay: View {
|
||||
|
||||
@State private var viewY = 0
|
||||
|
||||
@State private var debugY = 0
|
||||
|
||||
var body: some View {
|
||||
|
||||
let pi400DataFirstRow = [
|
||||
|
||||
pi400Data(pinOutLabel: "5V", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
|
||||
|
||||
pi400Data(pinOutLabel: "5V", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 14", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(TXD)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "8", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 15", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(RXD)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "10", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 18", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_CLK", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "12", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 23", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "16", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 24", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "18", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 25", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "22", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 8", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(CE0)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "24", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 7", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(CE1)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "26", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 1", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(ID_SC)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "28", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 12", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(PWM0)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "32", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 16", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "36", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 20", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_DIN", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "38", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 21", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_OUT", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "40", circleColor: .yellow),
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
||||
let pi400DataSecondRow = [
|
||||
|
||||
pi400Data(pinOutLabel: "3V3", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 2", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(SDA)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "3", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 3", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(SCL)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "5", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 4", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(GPCLK0)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "7", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .black),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 17", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 27", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "13", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 22", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "15", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "3V3", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 10", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(MOSI)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "19", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 9", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(MISO)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "21", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 11", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(SCLK)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "23", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .black),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 0", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(ID_SC)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "27", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 5", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "29", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 6", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "31", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 13", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(PWM1)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "33", circleColor: .yellow),
|
||||
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 19", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_FS", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "35", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "GPIO 26", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "37", circleColor: .yellow),
|
||||
|
||||
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .black)
|
||||
|
||||
]
|
||||
|
||||
VStack{
|
||||
|
||||
HStack() {
|
||||
ForEach(pi400DataFirstRow) { (pinout) in
|
||||
pi400GPIOUpperRow(pinOutLabel: pinout.pinOutLabel, pinOutBGcolor: pinout.pinOutBGcolor, pinOutFGcolor: pinout.pinOutFGcolor, pinOutLabel2: pinout.pinOutLabel2, pinOutBGcolor2: pinout.pinOutBGcolor2, pinOutFGcolor2: pinout.pinOutFGcolor2, GPIONumber: pinout.GPIONumber, circleColor: pinout.circleColor)
|
||||
}
|
||||
.frame(width: 12, height: 40)
|
||||
}
|
||||
.position(x: 0, y: -50)
|
||||
|
||||
HStack() {
|
||||
ForEach(pi400DataSecondRow) { (pinout) in
|
||||
pi400GPIOLowerRow(pinOutLabel: pinout.pinOutLabel, pinOutBGcolor: pinout.pinOutBGcolor, pinOutFGcolor: pinout.pinOutFGcolor, pinOutLabel2: pinout.pinOutLabel2, pinOutBGcolor2: pinout.pinOutBGcolor2, pinOutFGcolor2: pinout.pinOutFGcolor2, GPIONumber: pinout.GPIONumber, circleColor: pinout.circleColor)
|
||||
}
|
||||
.frame(width: 12, height: 40)
|
||||
}
|
||||
.position(x: 0, y: 25)
|
||||
|
||||
}
|
||||
|
||||
.onAppear(perform: {
|
||||
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
//iPhone
|
||||
viewY = 220
|
||||
}else {
|
||||
//iPad
|
||||
viewY = 255
|
||||
}
|
||||
|
||||
})
|
||||
.fixedSize(horizontal: true, vertical: true)
|
||||
// .rotationEffect(.degrees(-90))
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
struct pi400GPIOUpperRow: View {
|
||||
|
||||
let pinOutLabel: String
|
||||
let pinOutBGcolor: Color
|
||||
let pinOutFGcolor: Color
|
||||
|
||||
let pinOutLabel2: String
|
||||
let pinOutBGcolor2: Color
|
||||
let pinOutFGcolor2: Color
|
||||
|
||||
let GPIONumber: String
|
||||
let circleColor: Color
|
||||
|
||||
var body: some View {
|
||||
|
||||
VStack{
|
||||
|
||||
VStack{
|
||||
|
||||
Text(pinOutLabel)
|
||||
.foregroundColor(pinOutFGcolor)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.bold)
|
||||
.frame(width: 35, height: 10)
|
||||
.background(pinOutBGcolor)
|
||||
|
||||
Text(pinOutLabel2)
|
||||
.foregroundColor(pinOutFGcolor)
|
||||
.font(.system(size: 6))
|
||||
.fontWeight(.medium)
|
||||
.frame(width: 35, height: 10)
|
||||
.background(pinOutBGcolor)
|
||||
|
||||
}
|
||||
.rotationEffect(.degrees(-90))
|
||||
|
||||
//Circle Group
|
||||
ZStack {
|
||||
//Circle
|
||||
Circle()
|
||||
.foregroundColor(circleColor)
|
||||
//Text within the circle
|
||||
Text(GPIONumber)
|
||||
.font(.system(size: 10))
|
||||
.fontWeight(.regular)
|
||||
}
|
||||
.frame(width: 15, height: 15)
|
||||
.padding(.top, 5)
|
||||
// Rectangle()
|
||||
// .frame(width: 2, height: 70)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct pi400GPIOLowerRow: View {
|
||||
|
||||
let pinOutLabel: String
|
||||
let pinOutBGcolor: Color
|
||||
let pinOutFGcolor: Color
|
||||
|
||||
let pinOutLabel2: String
|
||||
let pinOutBGcolor2: Color
|
||||
let pinOutFGcolor2: Color
|
||||
|
||||
let GPIONumber: String
|
||||
let circleColor: Color
|
||||
|
||||
var body: some View {
|
||||
|
||||
VStack{
|
||||
//Circle Group
|
||||
ZStack {
|
||||
//Circle
|
||||
Circle()
|
||||
.foregroundColor(circleColor)
|
||||
//Text within the circle
|
||||
Text(GPIONumber)
|
||||
.font(.system(size: 10))
|
||||
.fontWeight(.medium)
|
||||
}
|
||||
|
||||
.frame(width: 15, height: 15)
|
||||
.padding(.bottom, 5)
|
||||
|
||||
VStack{
|
||||
|
||||
Text(pinOutLabel)
|
||||
.foregroundColor(pinOutFGcolor)
|
||||
.font(.system(size: 8))
|
||||
.fontWeight(.bold)
|
||||
.frame(width: 35, height: 10)
|
||||
.background(pinOutBGcolor)
|
||||
|
||||
Text(pinOutLabel2)
|
||||
.foregroundColor(pinOutFGcolor)
|
||||
.font(.system(size: 6))
|
||||
.fontWeight(.medium)
|
||||
.frame(width: 35, height: 10)
|
||||
.background(pinOutBGcolor)
|
||||
|
||||
}
|
||||
.rotationEffect(.degrees(-90))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct Pi400Overlay_Previews: PreviewProvider {
|
||||
|
||||
|
||||
static var previews: some View {
|
||||
Pi400Overlay()
|
||||
.previewDevice(PreviewDevice(rawValue: "iPad Pro (11-inch) (2nd generation)"))
|
||||
.previewDisplayName("iPad Pro (11-inch) (2nd generation)")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
|
||||
|
||||
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
import AVFoundation
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
struct SwiftUITarotCardView: View {
|
||||
|
||||
|
||||
let minervaDialogue : [String]
|
||||
|
||||
@State var displayText = ""
|
||||
|
||||
@State private var introTextOpacity = 0.0
|
||||
|
||||
func minervaSpeech() {
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
||||
|
||||
self.displayText = self.minervaDialogue[0]
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
||||
|
||||
self.displayText = self.minervaDialogue[1]
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
||||
|
||||
self.displayText = self.minervaDialogue[2]
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
||||
|
||||
self.displayText = self.minervaDialogue[3]
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
||||
|
||||
self.displayText = self.minervaDialogue[4]
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
||||
|
||||
self.displayText = self.minervaDialogue[5]
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
|
||||
ZStack {
|
||||
if #available(iOS 14.0, *) {
|
||||
|
||||
Text(displayText)
|
||||
.foregroundColor(.white)
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.transition(.opacity)
|
||||
.rotationEffect(.degrees(-180))
|
||||
.offset(x: 0, y: -200)
|
||||
.onAppear(perform: {
|
||||
minervaSpeech()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct SwiftUITarotCardView_Previews: PreviewProvider {
|
||||
@available(iOS 13.0.0, *)
|
||||
static var previews: some View {
|
||||
SwiftUITarotCardView(minervaDialogue: [""])
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
//
|
||||
// PICOBoardOverlay.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 1/26/21.
|
||||
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct Teensy41BoardOverlay: View {
|
||||
|
||||
@State private var viewY = 0
|
||||
|
||||
@State private var debugY = 0
|
||||
|
||||
var body: some View {
|
||||
|
||||
let data = [
|
||||
|
||||
Data(value: "",prefix:"Vin (3.6 to 5.5 Volts)", fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "",prefix:"GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "",prefix:"3.3V (250 mA max)", fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "23", prefix: "A9", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "CRX1", bgColor2: Color(#colorLiteral(red: 1, green: 0.6997302593, blue: 0.8755037922, alpha: 1)), prefix3: "MCLK1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "22", prefix: "A8", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "CTX1", bgColor2: Color(#colorLiteral(red: 1, green: 0.6997302593, blue: 0.8755037922, alpha: 1)), prefix3: " ", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "21", prefix: "A7", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "RX5", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "BCLK1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "20", prefix: "A6", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "TX5", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "LRCLK1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "19", prefix: "A5", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "SCL", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "18", prefix: "A4", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "SDA", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "17", prefix: "A3", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "TX4", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "SDA1", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "16", prefix: "A2", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "RX4", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "SCL1", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "15", prefix: "A1", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "RX3", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "S/PDIF IN", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "14", prefix: "A0", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "TX3", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "S/PDIF OUT", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "13", prefix: "(LED)", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix2: "SCK", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: " ", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "",prefix:"GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "41",prefix:"A17", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "", bgColor2:.clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "40",prefix:"A16", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "", bgColor2:.clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "39", prefix: "A15", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "MISO1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "OUT1A", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "38", prefix: "A14", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "CS1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "IN1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "37", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "CS", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "36", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "CS", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "35", prefix: "TX8", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "34", prefix: "RX8", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "33", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "MCLK2", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)))
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let data2 = [
|
||||
Data(value: "",prefix:"GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "0",prefix:"RX1", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: "CS1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "CRX2", bgColor3: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "1",prefix:"TX1", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: "MISO1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "CTX2", bgColor3: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "2",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "3",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "LRCLK2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "4",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "BCLK2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "5",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "IN2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "6",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT1D", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "7",prefix:"RX2", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT1A", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "8",prefix:"TX2", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "IN1", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "9",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT1C", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "10",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2:.clear, prefix3: "CS", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "OUT1D", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "11",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2:.clear, prefix3: "MOSI", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "CTX1", bgColor4: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1)) ,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "12",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2:.clear, prefix3: "MISO", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "MQSL", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "",prefix:"3.3V",fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "24", prefix: "A10", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "TX6", bgColor2: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix3: "SCL2", bgColor3: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "25", prefix: "A11", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "RX6", bgColor2: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix3: "SDA2", bgColor3: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "26", prefix: "A12", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "MOSI1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9411764741, green: 0.4980392158, blue: 0.3529411852, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "27", prefix: "A13", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "SCK1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9411764741, green: 0.4980392158, blue: 0.3529411852, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
|
||||
Data(value: "28", prefix: "RX7", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "29", prefix: "TX7", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
|
||||
|
||||
Data(value: "30", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "CRX3", bgColor5: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1))),
|
||||
|
||||
Data(value: "31", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "CTX3", bgColor5: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1))),
|
||||
|
||||
Data(value: "32", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "OUT1B", bgColor5: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)))
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
ZStack{
|
||||
//Border
|
||||
RoundedRectangle(cornerRadius: 1, style: .continuous)
|
||||
.fill(Color.clear)
|
||||
.frame(width: 140, height: 282.5)
|
||||
.border(Color.gray, width: 2)
|
||||
.position(x: 250, y: CGFloat(viewY))
|
||||
|
||||
|
||||
|
||||
HStack{
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
ForEach(data) { (pinout) in
|
||||
pintOutStruct(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
}
|
||||
.frame(width: 150, height: 11.8, alignment: .leading)
|
||||
}
|
||||
|
||||
.position(x: 395, y: CGFloat(viewY))
|
||||
|
||||
VStack(alignment: .trailing) {
|
||||
ForEach(data2) { (pinout) in
|
||||
pintOutStruct2(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
}
|
||||
.frame(width: 150, height: 11.8, alignment: .trailing)
|
||||
}
|
||||
|
||||
.position(x: -148, y: CGFloat(viewY))
|
||||
|
||||
}
|
||||
}
|
||||
.onAppear(perform: {
|
||||
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
//iPhone
|
||||
viewY = 220
|
||||
}else {
|
||||
//iPad
|
||||
viewY = 255
|
||||
}
|
||||
|
||||
})
|
||||
.rotationEffect(.degrees(-180))
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct Teensy41BoardOverlay_Previews: PreviewProvider {
|
||||
|
||||
|
||||
static var previews: some View {
|
||||
Teensy41BoardOverlay()
|
||||
.previewDevice(PreviewDevice(rawValue: "iPhone 12 Pro Max"))
|
||||
.previewDisplayName("iPhone 12 Pro Max")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ struct ARScenes {
|
|||
static let minervaScene = SCNScene(named: "art.scnassets/Minerva.scn")!
|
||||
|
||||
static let circuitPlaygroundLabelScene = SCNScene(named: "art.scnassets/CPX_Displays.scn")!
|
||||
static let blmLabelScene = SCNScene(named: "art.scnassets/BLM_Display.scn")!
|
||||
static let blmLabelScene = SCNScene(named: "art.scnassets/TestPlane.scn")!
|
||||
|
||||
//MARK:- Tarot Cards
|
||||
|
||||
149
Adafruit AR/Board Scan/ListOfTexts.swift
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
//
|
||||
// ListOfTexts.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 1/9/21.
|
||||
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
struct MetroM7 {
|
||||
static func getAttributedString() -> NSAttributedString {
|
||||
let url = URL(string: "https://www.apple.com")!
|
||||
|
||||
let attributedString = NSMutableAttributedString(string: "Installing the Bootloader page")
|
||||
attributedString.addAttribute(.link, value: url, range: NSMakeRange(5, 10))
|
||||
|
||||
return attributedString
|
||||
}
|
||||
|
||||
static let overview = """
|
||||
Our fastest Metro ever - the NXP i.MX RT1011 microcontroller powers this board with a 500 MHz ARM Cortex M7 processor. There's 4 MB of execute-in-place QSPI for firmware + disk storage and 128KB of SRAM in-chip.
|
||||
|
||||
Currently there we have support for using this board with CircuitPython. There is no Arduino support at this time.
|
||||
"""
|
||||
|
||||
static let debugInterface = "If you'd like to do more advanced development, trace-debugging, or not use the bootloader, we have the SWD interface exposed. You can use any 2x5 0.05 pitch SWD interface to connect. We suggest a J-Link."
|
||||
|
||||
static let bootModeSwitches = """
|
||||
The boot mode switches (labeled BOOT SEL on the board silk) are used to get into the ROM bootloader. The switch has two individual switches: B0 and B1. The photo shows both switches in the OFF position, but for normal operation B0 should be OFF and B1 should be ON.
|
||||
|
||||
The individual switches are set to ON (or 1) when they are moved next to the ON text on the switch housing and OFF (or 0) when they are moved next to their labels on the board silk. You can find more information on entering the bootloader with these switches on the Installing the Bootloader page in this guide.
|
||||
"""
|
||||
|
||||
static let stemmaQT = """
|
||||
This JST SH 4-pin STEMMA QT connector breaks out I2C (SCL, SDA, 3.3V, GND). It allows you to connect to various breakouts and sensors with STEMMA QT connectors or to other things using assorted associated accessories. It works great with any STEMMA QT or Qwiic sensor/device. You can also use it with Grove I2C devices thanks to this handy cable.
|
||||
|
||||
In CircuitPython, this port can be accessed with board.STEMMA_I2C().
|
||||
"""
|
||||
|
||||
static let iMXRT1011Processor = """
|
||||
The Metro M7 1011 is powered by the NXP i.MX RT1011 processor. This is an ARM Cortex M7 processor running at 500 MHz. It has 128KB of SRAM in-chip, along with high speed USB.
|
||||
"""
|
||||
static let usbcport = """
|
||||
This is used for both powering and programming the board. You can power it with any USB C cable. When USB is plugged in it will charge the Lipoly battery.
|
||||
|
||||
The following pins are related to power on the Metro M7 1011:
|
||||
|
||||
3.3V - this is the output from the 3.3V regulator, it can supply 500mA peak.
|
||||
|
||||
5V - this is the output from the 5V regulator (when DC jack is used), or from USB. It can supply ~500mA peak from USB and ~800mA peak from DC.
|
||||
|
||||
GND - this is the common ground for all power and logic.
|
||||
|
||||
VIN - this is the higher of the DC jack or USB voltage. So if the DC jack is plugged in and 9V, Vin is 9V. If only USB connected, this will be 5V.
|
||||
"""
|
||||
static let esp32 = """
|
||||
The WiFi capability uses an Espressif ESP32 Wi-Fi coprocessor, aka the AirLift, with TLS/SSL support built-in. Communication is over SPI and it has CircuitPython library support ready to go for fast wireless integration with the following pins:
|
||||
|
||||
- MOSI pin (board.ESP_MOSI)
|
||||
- MISO pin (board.ESP_MISO)
|
||||
- SCK pin (board.ESP_SCK)
|
||||
- CS pin (board.ESP_CS)
|
||||
- Ready/Busy pin (board.ESP_BUSY)
|
||||
- Reset pin (board.ESP_RESET)
|
||||
- ESP RX/TX pins (board.ESP_RX and board.ESP_TX) are shared with the M7 RX/TX pins. There's a resistor between the M7's RX line and the ESP32 module so that a device connected on the RX pin will override the communication from the ESP32 module.
|
||||
- You can also connect to the ESP32 RTS pin (used in some serial contexts) on board.ESP_RTS
|
||||
- The ESP32 GPIO0 pin for bootloader enable is connected to board.ESP_GPIO0
|
||||
"""
|
||||
static let dcJack = """
|
||||
The DC Jack is a 5.5mm/2.1mm center-positive DC connector, which is the most common available. Provide about 6V-12V here to power the Metro M7 1011.
|
||||
|
||||
The following pins are related to power on the Metro M7 1011:
|
||||
|
||||
3.3V - this is the output from the 3.3V regulator, it can supply 500mA peak.
|
||||
|
||||
5V - this is the output from the 5V regulator (when DC jack is used), or from USB. It can supply ~500mA peak from USB and ~800mA peak from DC.
|
||||
|
||||
GND - this is the common ground for all power and logic.
|
||||
|
||||
VIN - this is the higher of the DC jack or USB voltage. So if the DC jack is plugged in and 9V, Vin is 9V. If only USB connected, this will be 5V.
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
struct MetroM7NXP {
|
||||
static func getAttributedString() -> NSAttributedString {
|
||||
let url = URL(string: "https://www.apple.com")!
|
||||
|
||||
let attributedString = NSMutableAttributedString(string: "Installing the Bootloader page")
|
||||
attributedString.addAttribute(.link, value: url, range: NSMakeRange(5, 10))
|
||||
|
||||
return attributedString
|
||||
}
|
||||
|
||||
static let overview = """
|
||||
Our fastest Metro ever - For this new product, DigiKey, NXP and Adafruit all contributed the stuff the stuff they know best: shipping parts fast (DigiKey), designing microcontrollers (NXP) and crafting great products with tutorials (that's us, Adafruit!)
|
||||
"""
|
||||
|
||||
static let debugInterface = "If you'd like to do more advanced development, trace-debugging, or not use the bootloader, we have the SWD interface exposed. You can use any 2x5 0.05 pitch SWD interface to connect. We suggest a J-Link."
|
||||
|
||||
static let bootModeSwitches = """
|
||||
The boot mode switches (labeled BOOT SEL on the board silk) are used to get into the ROM bootloader. The switch has two individual switches: B0 and B1. The photo shows both switches in the OFF position, but for normal operation B0 should be OFF and B1 should be ON.
|
||||
|
||||
The individual switches are set to ON (or 1) when they are moved next to the ON text on the switch housing and OFF (or 0) when they are moved next to their labels on the board silk. You can find more information on entering the bootloader with these switches on the Installing the Bootloader page in this guide.
|
||||
"""
|
||||
|
||||
static let stemmaQT = """
|
||||
This JST SH 4-pin STEMMA QT connector breaks out I2C (SCL, SDA, 3.3V, GND). It allows you to connect to various breakouts and sensors with STEMMA QT connectors or to other things using assorted associated accessories.
|
||||
|
||||
It works great with any STEMMA QT or Qwiic sensor/device. You can also use it with Grove I2C devices thanks to this handy cable.
|
||||
|
||||
In CircuitPython, this port can be accessed with board.STEMMA_I2C().
|
||||
"""
|
||||
|
||||
static let iMXRT1011Processor = """
|
||||
This Metro M7 is powered by the NXP i.MX RT1011 processor. This is an ARM Cortex M7 processor running at 500 MHz. It has 128KB of SRAM in-chip, along with high speed USB.
|
||||
"""
|
||||
static let usbcport = """
|
||||
This is used for both powering and programming the board. You can power it with any USB-C cable. When USB is plugged in it will charge the Lipoly battery.
|
||||
|
||||
The following pins are related to power on this Metro M7 with microSD:
|
||||
|
||||
3.3V - this is the output from the 3.3V regulator, it can supply 500mA peak.
|
||||
|
||||
5V - this is the output from the 5V regulator (when DC jack is used), or from USB. It can supply ~500mA peak from USB and ~800mA peak from DC.
|
||||
|
||||
GND - this is the common ground for all power and logic.
|
||||
|
||||
VIN - this is the higher of the DC jack or USB voltage. So if the DC jack is plugged in and 9V, Vin is 9V. If only USB connected, this will be 5V.
|
||||
"""
|
||||
static let microSDCardSlot = """
|
||||
For audio files, images, scripts, or data logging. Uses SPI port and a chip select pin.
|
||||
"""
|
||||
static let dcJack = """
|
||||
The DC Jack is a 5.5mm/2.1mm center-positive DC connector, which is the most common available. Provide about 6V-12V here to power this Metro M7.
|
||||
|
||||
The following pins are related to power on this Metro M7:
|
||||
|
||||
3.3V - this is the output from the 3.3V regulator, it can supply 500mA peak.
|
||||
|
||||
5V - this is the output from the 5V regulator (when DC jack is used), or from USB. It can supply ~500mA peak from USB and ~800mA peak from DC.
|
||||
|
||||
GND - this is the common ground for all power and logic.
|
||||
|
||||
VIN - this is the higher of the DC jack or USB voltage. So if the DC jack is plugged in and 9V, Vin is 9V. If only USB connected, this will be 5V.
|
||||
"""
|
||||
}
|
||||
51
Adafruit AR/Pages/ARImageCollectionViewCell.swift
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
//
|
||||
// ARImageCollectionViewCell.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 4/10/23.
|
||||
// Copyright © 2023 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CustomCollectionViewCell: UICollectionViewCell {
|
||||
|
||||
static let identifier = "CustomCollectionViewCell"
|
||||
|
||||
private let imageView: UIImageView = {
|
||||
let imageView = UIImageView()
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.clipsToBounds = true
|
||||
|
||||
return imageView
|
||||
}()
|
||||
|
||||
private let nameLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.textAlignment = .center
|
||||
label.font = UIFont(name: "AvenirNext-Regular", size: 14)
|
||||
label.textColor = .white
|
||||
return label
|
||||
}()
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
contentView.addSubview(imageView)
|
||||
contentView.addSubview(nameLabel)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
imageView.frame = CGRect(x: 0, y: 0, width: contentView.frame.size.width, height: contentView.frame.size.height - 20)
|
||||
nameLabel.frame = CGRect(x: 0, y: contentView.frame.size.height - 20, width: contentView.frame.size.width, height: 20)
|
||||
}
|
||||
|
||||
func configure(with image: UIImage, name: String) {
|
||||
imageView.image = image
|
||||
nameLabel.text = name
|
||||
}
|
||||
}
|
||||
96
Adafruit AR/Pages/ARImageCollectionViewController.swift
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
//
|
||||
// ARImageCollectionViewController.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 4/10/23.
|
||||
// Copyright © 2023 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ARImageCollectionViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
|
||||
|
||||
// Replace with your image names in the "Photos" folder.
|
||||
let images: [String] = ["Circuit Playground Express","Circuit Playground Bluefruit", "Clue", "RaspPi Pico", "RaspPi Pico W", "ESP32-S2 TFT", "ESP32-S2 Rev TFT", "Teensy 4.1", "Metro M7 NXP","Metro M7 1011 with AirLift"]
|
||||
|
||||
weak var delegate: PhotosViewControllerDelegate?
|
||||
|
||||
let appTitleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.text = "SELECT A BOARD"
|
||||
label.font = UIFont(name: "AvenirNext-DemiBold", size: 32)
|
||||
label.textColor = .white
|
||||
return label
|
||||
}()
|
||||
|
||||
lazy var collectionView: UICollectionView = {
|
||||
|
||||
let layout = UICollectionViewFlowLayout()
|
||||
layout.scrollDirection = .vertical
|
||||
layout.sectionInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
|
||||
layout.itemSize = CGSize(width: view.frame.size.width/3 - 20, height: view.frame.size.width/3)
|
||||
|
||||
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
|
||||
collectionView.register(CustomCollectionViewCell.self, forCellWithReuseIdentifier: CustomCollectionViewCell.identifier)
|
||||
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||
collectionView.dataSource = self
|
||||
collectionView.delegate = self
|
||||
|
||||
return collectionView
|
||||
}()
|
||||
|
||||
func addSubViews() {
|
||||
view.addSubview(appTitleLabel)
|
||||
view.addSubview(collectionView)
|
||||
view.backgroundColor = .backgroundColor
|
||||
collectionView.backgroundColor = .backgroundColor
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
appTitleLabel.topAnchor.constraint(equalTo: view.topAnchor, constant: 50),
|
||||
appTitleLabel.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),
|
||||
appTitleLabel.trailingAnchor.constraint(lessThanOrEqualTo: view.trailingAnchor),
|
||||
|
||||
collectionView.topAnchor.constraint(equalTo: appTitleLabel.topAnchor, constant: 50),
|
||||
collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
|
||||
])
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
addSubViews()
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
super.viewDidLayoutSubviews()
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||
collectionView.deselectItem(at: indexPath, animated: true)
|
||||
let selectedImageName = images[indexPath.row]
|
||||
delegate?.didSelectImage(imageName: selectedImageName)
|
||||
print("Did tap - \(#function)")
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return images.count
|
||||
}
|
||||
func getImageFromCollectionViewImagesFolder(named imageName: String) -> UIImage? {
|
||||
return UIImage(named: "CollectionView Images/\(imageName)")
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CustomCollectionViewCell.identifier, for: indexPath) as! CustomCollectionViewCell
|
||||
let image = UIImage(named: images[indexPath.row])
|
||||
cell.configure(with: image!, name: images[indexPath.row])
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
26
Adafruit AR/Pages/ARImageModel.swift
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
//
|
||||
// ARImageModel.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 5/29/23.
|
||||
// Copyright © 2023 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import ARKit
|
||||
|
||||
struct ARImage {
|
||||
let name: String
|
||||
var referenceImage: ARReferenceImage?
|
||||
}
|
||||
|
||||
class ARImageLoadingService {
|
||||
func loadReferenceImage(named name: String) -> ARReferenceImage? {
|
||||
guard let image = UIImage(named: name),
|
||||
let cgImage = image.cgImage else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let referenceImage = ARReferenceImage(cgImage, orientation: .up, physicalWidth: 0.1)
|
||||
return referenceImage
|
||||
}
|
||||
}
|
||||
69
Adafruit AR/Pages/ARNodeDetailedViewController.swift
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// ARNodeDetailedViewController.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 7/20/23.
|
||||
// Copyright © 2023 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ARNodeDetailedViewController: UIViewController {
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
}
|
||||
|
||||
let componentLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.font = UIFont(name: "AvenirNext-DemiBold", size: 32)
|
||||
label.textColor = .white
|
||||
return label
|
||||
}()
|
||||
|
||||
// Create the UITextView
|
||||
let textView: UITextView = {
|
||||
let textView = UITextView()
|
||||
textView.font = UIFont(name: "AvenirNext-DemiBold", size: 16)
|
||||
textView.translatesAutoresizingMaskIntoConstraints = false // Use AutoLayout
|
||||
textView.backgroundColor = .clear
|
||||
textView.textColor = .white
|
||||
textView.isEditable = false
|
||||
return textView
|
||||
}()
|
||||
|
||||
// Provide a method to set the text
|
||||
func setText(textHeader: String,textBody: String) {
|
||||
self.componentLabel.text = textHeader
|
||||
self.textView.text = textBody
|
||||
}
|
||||
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Set up the UITextView
|
||||
view.backgroundColor = .darkGray
|
||||
addSubviews()
|
||||
}
|
||||
|
||||
func addSubviews() {
|
||||
view.addSubview(componentLabel)
|
||||
view.addSubview(textView)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
componentLabel.topAnchor.constraint(equalTo: view.topAnchor, constant: 50),
|
||||
componentLabel.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 10),
|
||||
componentLabel.trailingAnchor.constraint(lessThanOrEqualTo: view.trailingAnchor),
|
||||
|
||||
textView.topAnchor.constraint(equalTo: componentLabel.bottomAnchor, constant: 10),
|
||||
textView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 10),
|
||||
textView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -10),
|
||||
textView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -10),
|
||||
])
|
||||
}
|
||||
|
||||
}
|
||||
601
Adafruit AR/Pages/BoardScanViewController.swift
Normal file
|
|
@ -0,0 +1,601 @@
|
|||
//
|
||||
// TestViewController.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 4/10/23.
|
||||
// Copyright © 2023 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ARKit
|
||||
|
||||
protocol PhotosViewControllerDelegate: AnyObject {
|
||||
func didSelectImage(imageName: String)
|
||||
}
|
||||
|
||||
|
||||
class BoardScanViewController: UIViewController, ARSCNViewDelegate {
|
||||
|
||||
private var sceneView: ARSCNView!
|
||||
let configuration = ARImageTrackingConfiguration()
|
||||
private var collectionViewIsPresented: Bool = false
|
||||
|
||||
let loadingService = ARImageLoadingService()
|
||||
|
||||
var isFrontFaced = true
|
||||
var activeArObjectTexts: [String: String] = [:]
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
sceneView = ARSCNView(frame: view.bounds)
|
||||
arViewSetup()
|
||||
initialConfigurationSetup()
|
||||
addSubViews()
|
||||
registerTapRecognizer()
|
||||
}
|
||||
|
||||
@objc func handlePinchGesture(sender: UIPinchGestureRecognizer) {
|
||||
guard let pointOfView = sceneView.pointOfView else { return }
|
||||
let cameraNode = pointOfView
|
||||
cameraNode.isHidden = true
|
||||
let originalFov = CGFloat(cameraNode.camera!.fieldOfView)
|
||||
let scale = max(min(sender.scale, 2.0), 0.5)
|
||||
cameraNode.camera?.fieldOfView = Double(originalFov * scale)
|
||||
}
|
||||
|
||||
func registerTapRecognizer() {
|
||||
let tapGestureRecognizer = UITapGestureRecognizer (target:self ,action : #selector (tapped))
|
||||
self.sceneView.addGestureRecognizer(tapGestureRecognizer)
|
||||
}
|
||||
|
||||
@objc func tapped(sender: UITapGestureRecognizer) {
|
||||
guard let sceneView = sender.view as? ARSCNView else { return }
|
||||
|
||||
// Get the location of the tap in the view.
|
||||
let tapLocation = sender.location(in: sceneView)
|
||||
|
||||
// Perform a hit test on the ARSCNView.
|
||||
guard let hitResult = performHitTest(sceneView: sceneView, at: tapLocation) else {
|
||||
print("No object detected")
|
||||
return
|
||||
}
|
||||
|
||||
// Identify the AR object.
|
||||
if let nodeName = identifyARObject(node: hitResult.node) {
|
||||
print("\(nodeName) touched")
|
||||
|
||||
// Show the UISheetPresentationController.
|
||||
presentSheetController(named: nodeName)
|
||||
}
|
||||
}
|
||||
|
||||
func performHitTest(sceneView: ARSCNView, at point: CGPoint) -> SCNHitTestResult? {
|
||||
// Perform a hit test on the ARSCNView to find any 3D objects that correspond to the 2D tap location.
|
||||
let hitTestResults = sceneView.hitTest(point, options: nil)
|
||||
return hitTestResults.first
|
||||
}
|
||||
|
||||
func identifyARObject(node: SCNNode) -> String? {
|
||||
// If the node's name is "plane" or if it's nil, return nil
|
||||
if node.name == "plane" || node.name == nil {
|
||||
return nil
|
||||
} else {
|
||||
// If the node has a name and it's not "plane", return the name
|
||||
return node.name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
let metroM7arObjectTexts: [String: String] = [
|
||||
"Metro M7 1011 with AirLift" : MetroM7.overview,
|
||||
"Debug Interface": MetroM7.debugInterface,
|
||||
"Boot Mode Switches": MetroM7.bootModeSwitches,
|
||||
"STEMMA QT" : MetroM7.stemmaQT,
|
||||
"i.MX RT1011 Processor" : MetroM7.iMXRT1011Processor,
|
||||
"USB-C port" : MetroM7.usbcport,
|
||||
"ESP32 WiFi Co-Processor" : MetroM7.esp32,
|
||||
"DC Jack" : MetroM7.dcJack,
|
||||
]
|
||||
|
||||
let metroM7NXParObjectTexts: [String: String] = [
|
||||
"Metro M7 with microSD - NXP iMX RT1011" : MetroM7NXP.overview,
|
||||
"Debug Interface": MetroM7NXP.debugInterface,
|
||||
"Boot Mode Switches": MetroM7NXP.bootModeSwitches,
|
||||
"STEMMA QT" : MetroM7NXP.stemmaQT,
|
||||
"i.MX RT1011 Processor" : MetroM7NXP.iMXRT1011Processor,
|
||||
"USB-C port" : MetroM7NXP.usbcport,
|
||||
"Micro SD Card Slot" : MetroM7NXP.microSDCardSlot,
|
||||
"DC Jack" : MetroM7NXP.dcJack
|
||||
|
||||
]
|
||||
|
||||
func presentSheetController(named name: String) {
|
||||
let sheetController = ARNodeDetailedViewController()
|
||||
sheetController.modalPresentationStyle = .pageSheet
|
||||
|
||||
let customId = UISheetPresentationController.Detent.Identifier("customDetent")
|
||||
let customDetent = UISheetPresentationController.Detent.custom(identifier: customId) { context in
|
||||
return 300
|
||||
}
|
||||
|
||||
let mediumId = UISheetPresentationController.Detent.Identifier("mediumDetent")
|
||||
let mediumDetent = UISheetPresentationController.Detent.custom(identifier: mediumId) { context in
|
||||
return 500
|
||||
}
|
||||
|
||||
sheetController.sheetPresentationController?.detents = [customDetent, mediumDetent]
|
||||
sheetController.sheetPresentationController?.prefersGrabberVisible = true
|
||||
sheetController.sheetPresentationController?.preferredCornerRadius = 30.0
|
||||
sheetController.sheetPresentationController?.prefersScrollingExpandsWhenScrolledToEdge = true
|
||||
|
||||
|
||||
|
||||
// Use the dictionary to look up the text for the AR object
|
||||
if let textBody = activeArObjectTexts[name] {
|
||||
sheetController.setText(textHeader: name, textBody: textBody)
|
||||
} else {
|
||||
sheetController.setText(textHeader: name, textBody: "No information available for this object.")
|
||||
}
|
||||
|
||||
self.present(sheetController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
presentModal(isPresented: true)
|
||||
}
|
||||
|
||||
func arViewSetup() {
|
||||
let scene = SCNScene()
|
||||
// Set the view's delegate
|
||||
sceneView.delegate = self
|
||||
sceneView.session.delegate = self as? ARSessionDelegate
|
||||
sceneView.scene = scene
|
||||
|
||||
let pinchGesture = UIPinchGestureRecognizer(target: self, action: #selector(handlePinchGesture))
|
||||
sceneView.addGestureRecognizer(pinchGesture)
|
||||
}
|
||||
|
||||
func initialConfigurationSetup() {
|
||||
let backgroundQueue = DispatchQueue(label: "com.Using_Sequence.configQueue", qos: .default, attributes: .concurrent)
|
||||
|
||||
DispatchQueue.main.async {
|
||||
|
||||
self.configuration.maximumNumberOfTrackedImages = 1
|
||||
self.configuration.isAutoFocusEnabled = true
|
||||
self.configuration.videoHDRAllowed = true
|
||||
|
||||
if let hiResFormat = ARWorldTrackingConfiguration.recommendedVideoFormatFor4KResolution {
|
||||
print("Updated Video Quality")
|
||||
self.configuration.videoFormat = hiResFormat
|
||||
}
|
||||
|
||||
self.sceneView.session.run(self.configuration, options: [.resetTracking, .removeExistingAnchors])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func updateConfiguration(withImageName imageName: String) {
|
||||
|
||||
print("Searching for... a \(imageName)")
|
||||
let backgroundQueue = DispatchQueue(label: "com.AdafruitAR.updateConfiguration", qos: .background, attributes: .concurrent)
|
||||
|
||||
backgroundQueue.async {
|
||||
|
||||
guard let trackedImages = ARReferenceImage.referenceImages(inGroupNamed: "Photos", bundle: Bundle.main) else {
|
||||
print("No images for \(imageName) available in Photos folder")
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve UIImage using the imageName
|
||||
guard let image = UIImage(named: imageName) else {
|
||||
print("Image not found: \(imageName)")
|
||||
return
|
||||
}
|
||||
|
||||
// Get the CGImage from the UIImage
|
||||
guard let imageCG = image.cgImage else {
|
||||
print("Failed to get CGImage from UIImage")
|
||||
return
|
||||
}
|
||||
|
||||
print("Caught: \(imageName)")
|
||||
|
||||
if imageName == "ref.Metro M7 NXP" {
|
||||
self.activeArObjectTexts = self.metroM7NXParObjectTexts
|
||||
}
|
||||
|
||||
if imageName == "ref.Metro M7 1011 with AirLift" {
|
||||
self.activeArObjectTexts = self.metroM7arObjectTexts
|
||||
}
|
||||
|
||||
|
||||
let referenceImage = ARReferenceImage(imageCG, orientation: CGImagePropertyOrientation.up, physicalWidth: 0.05) // Replace 0.1 with your image's physical width in meters
|
||||
referenceImage.name = imageName
|
||||
|
||||
self.configuration.trackingImages = [referenceImage]
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.sceneView.session.run(self.configuration, options: [.resetTracking, .removeExistingAnchors])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func configureForMetros(withImageName imageName: String) {
|
||||
|
||||
print("Searching for... a \(imageName)")
|
||||
let backgroundQueue = DispatchQueue(label: "com.AdafruitAR.configureForMetros", qos: .background, attributes: .concurrent)
|
||||
|
||||
backgroundQueue.async {
|
||||
|
||||
guard let trackedImages = ARReferenceImage.referenceImages(inGroupNamed: "MetroNXP", bundle: Bundle.main) else {
|
||||
print("No images for \(imageName) available in Photos folder")
|
||||
return
|
||||
}
|
||||
|
||||
var referenceImages: [ARReferenceImage] = []
|
||||
|
||||
for trackedImage in trackedImages {
|
||||
guard let image = UIImage(named: trackedImage.name ?? "") else {
|
||||
print("Image not found: \(String(describing: trackedImage.name))")
|
||||
continue
|
||||
}
|
||||
|
||||
guard let imageCG = image.cgImage else {
|
||||
print("Failed to get CGImage from UIImage")
|
||||
continue
|
||||
}
|
||||
|
||||
let referenceImage = ARReferenceImage(imageCG, orientation: CGImagePropertyOrientation.up, physicalWidth: 0.05) // Replace 0.05 with your image's actual physical width in meters
|
||||
referenceImage.name = trackedImage.name
|
||||
referenceImages.append(referenceImage)
|
||||
}
|
||||
|
||||
self.configuration.trackingImages = Set(referenceImages)
|
||||
self.configuration.maximumNumberOfTrackedImages = 2
|
||||
self.configuration.isAutoFocusEnabled = true
|
||||
|
||||
if imageName == "ref.Metro M7 NXP" {
|
||||
self.activeArObjectTexts = self.metroM7NXParObjectTexts
|
||||
}
|
||||
|
||||
if imageName == "ref.Metro M7 1011 with AirLift" {
|
||||
self.activeArObjectTexts = self.metroM7arObjectTexts
|
||||
}
|
||||
|
||||
// Run the view's session
|
||||
self.sceneView.session.run(self.configuration, options: [.resetTracking,.removeExistingAnchors])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func resetARView() {
|
||||
sceneView.session.run(configuration, options: [.resetTracking,.removeExistingAnchors])
|
||||
}
|
||||
|
||||
|
||||
func addSubViews() {
|
||||
// Create the UIActivityIndicatorView
|
||||
let activityIndicator = UIActivityIndicatorView(style: .medium)
|
||||
activityIndicator.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
// Create the UIStackView
|
||||
let stackView = UIStackView(arrangedSubviews: [spinner,appTitleLabel])
|
||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
stackView.axis = .horizontal
|
||||
stackView.alignment = .center
|
||||
stackView.spacing = 5
|
||||
|
||||
// Add subviews
|
||||
view.addSubview(sceneView)
|
||||
view.addSubview(homeButton)
|
||||
view.addSubview(modalPresentButton)
|
||||
view.addSubview(stackView)
|
||||
|
||||
// Constraints
|
||||
NSLayoutConstraint.activate([
|
||||
homeButton.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20),
|
||||
homeButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),
|
||||
homeButton.trailingAnchor.constraint(lessThanOrEqualTo: view.trailingAnchor),
|
||||
|
||||
modalPresentButton.trailingAnchor.constraint(lessThanOrEqualTo: view.trailingAnchor, constant: -20),
|
||||
modalPresentButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -20),
|
||||
|
||||
stackView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 90),
|
||||
stackView.centerXAnchor.constraint(equalTo: view.centerXAnchor), // Center the stack view horizontally
|
||||
])
|
||||
}
|
||||
|
||||
var spinner: UIActivityIndicatorView = {
|
||||
let activityIndicatorView = UIActivityIndicatorView(style: .medium)
|
||||
activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false
|
||||
activityIndicatorView.style = .medium
|
||||
activityIndicatorView.hidesWhenStopped = true
|
||||
activityIndicatorView.stopAnimating()
|
||||
return activityIndicatorView
|
||||
}()
|
||||
|
||||
var appTitleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.text = "SELECT A BOARD BELOW"
|
||||
label.font = UIFont(name: "AvenirNext-DemiBold", size: 18)
|
||||
label.textColor = .white
|
||||
label.textAlignment = .center
|
||||
|
||||
return label
|
||||
}()
|
||||
|
||||
let homeButton: UIButton = {
|
||||
|
||||
let originalImage = UIImage(systemName: "chevron.backward")
|
||||
let templateImage = originalImage?.withRenderingMode(.alwaysTemplate)
|
||||
let newImageSize = CGSize(width: 15, height: 20)
|
||||
let resizedImage = templateImage?.withTintColor(.white).resizableImage(withCapInsets: .zero, resizingMode: .stretch).withRenderingMode(.alwaysOriginal)
|
||||
let finalImage = UIGraphicsImageRenderer(size: newImageSize).image { _ in
|
||||
resizedImage!.draw(in: CGRect(origin: .zero, size: newImageSize))
|
||||
}
|
||||
|
||||
let button = UIButton(type: .custom)
|
||||
button.setImage(finalImage, for: .normal)
|
||||
button.setTitleColor(.white, for: .normal)
|
||||
button.frame.size.height = 100
|
||||
button.frame.size.width = 100
|
||||
button.setTitleColor(.white, for: .normal)
|
||||
button.translatesAutoresizingMaskIntoConstraints = false
|
||||
button.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside)
|
||||
return button
|
||||
}()
|
||||
|
||||
let modalPresentButton: UIButton = {
|
||||
let image = UIImage(systemName: "arrow.up.circle")?.withTintColor(.white, renderingMode: .alwaysOriginal)
|
||||
|
||||
let button = UIButton(type: .custom)
|
||||
button.setImage(image, for: .normal)
|
||||
button.setTitleColor(.white, for: .normal)
|
||||
button.frame.size.height = 200.0
|
||||
button.frame.size.width = 200.0
|
||||
button.imageEdgeInsets = UIEdgeInsets(top: 30, left: 30, bottom: 30, right: 30)
|
||||
button.setTitleColor(.white, for: .normal)
|
||||
button.addTarget(self, action: #selector(presentCollectionViewModal), for: .touchUpInside)
|
||||
button.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
return button
|
||||
}()
|
||||
|
||||
|
||||
|
||||
@objc func presentCollectionViewModal() {
|
||||
presentModal(isPresented: true)
|
||||
}
|
||||
|
||||
@objc func buttonTapped() {
|
||||
navigateBack()
|
||||
}
|
||||
|
||||
@objc func navigateBack() {
|
||||
self.dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
let detailViewController = ARImageCollectionViewController()
|
||||
|
||||
private func presentModal(isPresented: Bool) {
|
||||
print("\(#function) - \(isPresented)")
|
||||
print("is collectionViewIsPresented?? - \(collectionViewIsPresented)")
|
||||
|
||||
let mediumId = UISheetPresentationController.Detent.Identifier("mediumDetent")
|
||||
let mediumDetent = UISheetPresentationController.Detent.custom(identifier: mediumId) { context in
|
||||
return 300
|
||||
}
|
||||
|
||||
let smallId = UISheetPresentationController.Detent.Identifier("small")
|
||||
let smallDetent = UISheetPresentationController.Detent.custom(identifier: smallId) { context in
|
||||
return 150
|
||||
}
|
||||
|
||||
// 1
|
||||
if !collectionViewIsPresented {
|
||||
detailViewController.modalPresentationStyle = .pageSheet
|
||||
|
||||
if let sheet = detailViewController.sheetPresentationController {
|
||||
// 3
|
||||
sheet.largestUndimmedDetentIdentifier
|
||||
sheet.prefersGrabberVisible = true
|
||||
sheet.preferredCornerRadius = 30.0
|
||||
sheet.prefersScrollingExpandsWhenScrolledToEdge = false
|
||||
sheet.detents = [smallDetent,mediumDetent, .large()]
|
||||
|
||||
}
|
||||
// 4
|
||||
|
||||
detailViewController.delegate = self
|
||||
present(detailViewController, animated: true, completion: nil)
|
||||
collectionViewIsPresented = true
|
||||
} else {
|
||||
collectionViewIsPresented = false
|
||||
detailViewController.dismiss(animated: true)
|
||||
print("detailViewController Dismissed")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
func ARObjectToScene(ARObject: SCNNode, ARScene: SCNScene, planeNode: SCNNode, size: SCNVector3) {
|
||||
print("Function: \(#function),File: \(#file),Line: \( #line)")
|
||||
for child in ARScene.rootNode.childNodes {
|
||||
ARObject.addChildNode(child)
|
||||
}
|
||||
|
||||
ARObject.position = SCNVector3(planeNode.position.x, planeNode.position.y, planeNode.position.z )
|
||||
ARObject.scale = SCNVector3(x: size.x, y: size.y, z: size.z)
|
||||
|
||||
planeNode.addChildNode(ARObject)
|
||||
}
|
||||
|
||||
func ARPlaneAnchor(imageReferenceAnchor: ARImageAnchor, mainNode: SCNNode) {
|
||||
print("Function: \(#function),File: \(#file),Line: \( #line)")
|
||||
|
||||
let plane = SCNPlane(width: imageReferenceAnchor.referenceImage.physicalSize.width, height: imageReferenceAnchor.referenceImage.physicalSize.height)
|
||||
|
||||
plane.firstMaterial?.diffuse.contents = UIColor(white: 0.0, alpha: 0.0)
|
||||
|
||||
let planeNode = SCNNode(geometry: plane)
|
||||
planeNode.eulerAngles.x = -.pi / 2
|
||||
|
||||
mainNode.addChildNode(planeNode)
|
||||
}
|
||||
|
||||
func renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? {
|
||||
let node = SCNNode()
|
||||
|
||||
if let imageAnchor = anchor as? ARImageAnchor {
|
||||
let backgroundQueue = DispatchQueue(label: "com.Using_Sequence.backgroundQueue", qos: .background, attributes: .concurrent)
|
||||
|
||||
backgroundQueue.async { [self] in
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.appTitleLabel.isHidden = true
|
||||
self.spinner.stopAnimating()
|
||||
|
||||
}
|
||||
|
||||
let plane = SCNPlane(width: imageAnchor.referenceImage.physicalSize.width, height: imageAnchor.referenceImage.physicalSize.height)
|
||||
plane.firstMaterial?.diffuse.contents = UIColor(white: 0, alpha: 0)
|
||||
|
||||
let planeNode = SCNNode(geometry: plane)
|
||||
planeNode.eulerAngles.x = -.pi / 2
|
||||
node.addChildNode(planeNode)
|
||||
|
||||
// Get the reference image's name
|
||||
guard let imageName = imageAnchor.referenceImage.name else { return }
|
||||
|
||||
// Load the AR object's scene based on the image's name
|
||||
let arObjectScene: SCNScene?
|
||||
|
||||
switch imageName {
|
||||
|
||||
|
||||
case "ref.Circuit Playground Bluefruit":
|
||||
guard let scene = SCNScene(named: "art.scnassets/CircuitPlaygroundBluefruit.scn") else {
|
||||
print("Failed to load CircuitPlaygroundBluefruit scene")
|
||||
return
|
||||
}
|
||||
|
||||
arObjectScene = scene
|
||||
|
||||
case "ref.Circuit Playground Express":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/CircuitPlaygroundExpress.scn")!
|
||||
|
||||
case "ref.RaspPi Pico W":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/PiCow.scn")!
|
||||
|
||||
case "ref.RaspPi Pico":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/Pico.scn")!
|
||||
|
||||
case "ref.Clue":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/Clue.scn")!
|
||||
|
||||
case "ref.ESP32-S2 TFT":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/ESP32-S2TFT.scn")!
|
||||
|
||||
case "ref.ESP32-S2 Rev TFT":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/ESP32-S2 Rev TFT.scn")!
|
||||
|
||||
case "ref.Teensy 4.1":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/Teensy4.1.scn")!
|
||||
//Metro M7 1011 with AirLift
|
||||
|
||||
case "ref.Metro M7 1011 with AirLift":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/Metro M7 1011 with AirLift.scn")!
|
||||
|
||||
case "ref.Metro M7 1011 with AirLift 2":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/Metro M7.scn")!
|
||||
|
||||
case "ref.Metro M7 NXP":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/Metro M7 NXP.scn")!
|
||||
|
||||
case "ref.Metro M7 NXP2":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/MetroM7NXPPinouts.scn")!
|
||||
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
||||
guard let arObjectSceneUnwrapped = arObjectScene else {
|
||||
print("Failed to load AR object scene")
|
||||
return
|
||||
}
|
||||
|
||||
// Create an AR object from the loaded scene
|
||||
let arObject = SCNNode()
|
||||
let arObjectNodes = arObjectSceneUnwrapped.rootNode.childNodes
|
||||
|
||||
for childNode in arObjectNodes {
|
||||
arObject.addChildNode(childNode)
|
||||
}
|
||||
|
||||
// Set the AR object's position and scale
|
||||
arObject.position = SCNVector3Zero
|
||||
arObject.scale = SCNVector3(0.005, 0.005, 0.005) // Set the scale according to your object's size
|
||||
|
||||
// Add the AR object to the image's node
|
||||
DispatchQueue.main.async {
|
||||
node.addChildNode(arObject)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) {
|
||||
print("Function: \(#function),File: \(#file),Line: \( #line)")
|
||||
|
||||
guard let imageAnchor = anchor as? ARImageAnchor else { return }
|
||||
|
||||
// You can handle the detected images here
|
||||
let imageName = imageAnchor.referenceImage.name ?? "Unknown image"
|
||||
print("Image detected: \(imageName)")
|
||||
|
||||
// Call the ARPlaneAnchor function to create an AR plane
|
||||
ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension BoardScanViewController: PhotosViewControllerDelegate {
|
||||
|
||||
func didSelectImage(imageName: String) {
|
||||
presentModal(isPresented: false)
|
||||
|
||||
print("Set to: \(imageName)")
|
||||
|
||||
if imageName == "Metro M7 1011 with AirLift" {
|
||||
configureForMetros(withImageName: "ref.\(imageName)")
|
||||
}
|
||||
|
||||
if imageName == "Metro M7 NXP" {
|
||||
configureForMetros(withImageName: "ref.\(imageName)")
|
||||
} else {
|
||||
updateConfiguration(withImageName: "ref.\(imageName)")
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.appTitleLabel.isHidden = false
|
||||
self.appTitleLabel.text = ("Scanning for the \(imageName)")
|
||||
self.spinner.startAnimating()
|
||||
}
|
||||
|
||||
print("Selected image: \(imageName)")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -6,47 +6,35 @@
|
|||
// Copyright © 2018 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import ARKit
|
||||
import UIKit
|
||||
|
||||
|
||||
|
||||
class MainViewController: UIViewController, ARSCNViewDelegate {
|
||||
|
||||
let appVersion = Bundle.main.infoDictionary!["CFBundleShortVersionString"]
|
||||
|
||||
|
||||
|
||||
@IBOutlet weak var boardView: ARSCNView!
|
||||
|
||||
@IBOutlet weak var qrModeIcon: UIButton!
|
||||
|
||||
@IBOutlet weak var qrLabel: UILabel!
|
||||
|
||||
@IBOutlet weak var arModeAdabot: UIButton!
|
||||
|
||||
@IBOutlet weak var ARLabel: UILabel!
|
||||
|
||||
class MainViewController: UIViewController {
|
||||
|
||||
let appVersion = Bundle.main.infoDictionary!["CFBundleShortVersionString"]
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
versionString()
|
||||
}
|
||||
|
||||
// MARK: - UI Properties
|
||||
|
||||
@IBOutlet weak var arModeAdabot: UIButton!
|
||||
@IBOutlet weak var versionNumberLabel: UILabel!
|
||||
@IBOutlet weak var boardScanButton: UIButton!
|
||||
|
||||
@IBAction func boardScanButtonPress(_ sender: UIButton) {
|
||||
navigateToNextViewController()
|
||||
}
|
||||
|
||||
@objc func navigateToNextViewController() {
|
||||
let nextViewController = BoardScanViewController()
|
||||
nextViewController.modalPresentationStyle = .fullScreen // or any other presentation style you prefer
|
||||
self.present(nextViewController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
func versionString() {
|
||||
self.versionNumberLabel.text = "v.\(appVersion! as! String)"
|
||||
}
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
versionString()
|
||||
|
||||
let scene = SCNScene()
|
||||
// Set the view's delegate
|
||||
boardView.delegate = self
|
||||
|
||||
boardView.session.delegate = self as? ARSessionDelegate
|
||||
|
||||
boardView.scene = scene
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,190 +0,0 @@
|
|||
//
|
||||
// QRViewController+Video.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor B on 4/24/19.
|
||||
// Copyright © 2019 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AVFoundation
|
||||
import SpriteKit
|
||||
|
||||
extension QRViewController {
|
||||
|
||||
|
||||
// Video for HalloWing eyeball animation
|
||||
func halloWingEyeVideo() {
|
||||
//This is the video for HalloWing's Eye Ball animation
|
||||
|
||||
// flip video upside down
|
||||
playerNode.yScale = -1
|
||||
playerNode.name = "playerNode"
|
||||
|
||||
// create SKScene and set player node on it
|
||||
spriteKitScene = SKScene(size: CGSize(width: AspectRatio.width + 300, height: AspectRatio.height + 300))
|
||||
|
||||
spriteKitScene.scaleMode = .aspectFill
|
||||
|
||||
playerNode.position = CGPoint(x: spriteKitScene.size.width/2, y: spriteKitScene.size.height/2)
|
||||
|
||||
playerNode.size = spriteKitScene.size
|
||||
|
||||
spriteKitScene.addChild(playerNode)
|
||||
|
||||
|
||||
videoPlane.geometry?.firstMaterial?.diffuse.contents = spriteKitScene
|
||||
videoPlane.geometry?.firstMaterial?.isDoubleSided = true
|
||||
|
||||
playerNode.play()
|
||||
|
||||
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: player.currentItem, queue: nil)
|
||||
{ notification in
|
||||
|
||||
self.player.seek(to: kCMTimeZero)
|
||||
|
||||
self.player.play()
|
||||
|
||||
print("reset Video")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//For Promo Video Playback
|
||||
func playCrickitVideo() {
|
||||
|
||||
crickitPlayer = AVPlayer(url: crickitVideoURL!)
|
||||
crickitPlayerNode = SKVideoNode(avPlayer: crickitPlayer)
|
||||
|
||||
// flip video upside down
|
||||
crickitPlayerNode.yScale = -1
|
||||
crickitPlayerNode.name = "CrickitplayerNode"
|
||||
|
||||
// create SKScene and set player node on it
|
||||
spriteKitScene = SKScene(size: CGSize(width: AspectRatio.width + 300, height: AspectRatio.height + 300))
|
||||
|
||||
spriteKitScene.scaleMode = .aspectFill
|
||||
|
||||
crickitPlayerNode.position = CGPoint(x: spriteKitScene.size.width/2, y: spriteKitScene.size.height/2)
|
||||
|
||||
crickitPlayerNode.size = spriteKitScene.size
|
||||
|
||||
spriteKitScene.addChild(crickitPlayerNode)
|
||||
|
||||
|
||||
crickitVideo.geometry?.firstMaterial?.diffuse.contents = spriteKitScene
|
||||
crickitVideo.geometry?.firstMaterial?.isDoubleSided = true
|
||||
|
||||
crickitPlayerNode.play()
|
||||
|
||||
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: crickitPlayer.currentItem, queue: nil)
|
||||
{ notification in
|
||||
|
||||
self.crickitPlayer.seek(to: kCMTimeZero)
|
||||
self.crickitPlayer.play()
|
||||
}
|
||||
}
|
||||
|
||||
func playHallowingVideo() {
|
||||
|
||||
halloWingPlayer = AVPlayer(url: hallowingVideoURL!)
|
||||
halloWingPlayerNode = SKVideoNode(avPlayer: halloWingPlayer)
|
||||
|
||||
// flip video upside down
|
||||
halloWingPlayerNode.yScale = -1
|
||||
halloWingPlayerNode.name = "HallowingplayerNode"
|
||||
|
||||
// create SKScene and set player node on it
|
||||
spriteKitScene = SKScene(size: CGSize(width: AspectRatio.width + 300, height: AspectRatio.height + 300))
|
||||
|
||||
spriteKitScene.scaleMode = .aspectFill
|
||||
|
||||
halloWingPlayerNode.position = CGPoint(x: spriteKitScene.size.width/2, y: spriteKitScene.size.height/2)
|
||||
|
||||
halloWingPlayerNode.size = spriteKitScene.size
|
||||
|
||||
spriteKitScene.addChild(halloWingPlayerNode)
|
||||
|
||||
|
||||
halloWingVideo.geometry?.firstMaterial?.diffuse.contents = spriteKitScene
|
||||
halloWingVideo.geometry?.firstMaterial?.isDoubleSided = true
|
||||
|
||||
halloWingPlayerNode.play()
|
||||
|
||||
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: halloWingPlayer.currentItem, queue: nil)
|
||||
{ notification in
|
||||
|
||||
self.halloWingPlayer.seek(to: kCMTimeZero)
|
||||
self.halloWingPlayer.play()
|
||||
}
|
||||
}
|
||||
|
||||
func playCPXVideo() {
|
||||
|
||||
cpxPlayer = AVPlayer(url: cpxVidURL!)
|
||||
cpxPlayerNode = SKVideoNode(avPlayer: cpxPlayer)
|
||||
|
||||
// flip video upside down
|
||||
cpxPlayerNode.yScale = -1
|
||||
cpxPlayerNode.name = "CPXplayerNode"
|
||||
|
||||
// create SKScene and set player node on it
|
||||
spriteKitScene = SKScene(size: CGSize(width: AspectRatio.width + 300, height: AspectRatio.height + 300))
|
||||
|
||||
spriteKitScene.scaleMode = .aspectFill
|
||||
|
||||
cpxPlayerNode.position = CGPoint(x: spriteKitScene.size.width/2, y: spriteKitScene.size.height/2)
|
||||
|
||||
cpxPlayerNode.size = spriteKitScene.size
|
||||
|
||||
spriteKitScene.addChild(cpxPlayerNode)
|
||||
|
||||
|
||||
cpxVideo.geometry?.firstMaterial?.diffuse.contents = spriteKitScene
|
||||
cpxVideo.geometry?.firstMaterial?.isDoubleSided = true
|
||||
|
||||
cpxPlayerNode.play()
|
||||
|
||||
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: cpxPlayer.currentItem, queue: nil)
|
||||
{ notification in
|
||||
|
||||
self.cpxPlayer.seek(to: kCMTimeZero)
|
||||
self.cpxPlayer.play()
|
||||
}
|
||||
}
|
||||
|
||||
func playPyVideo() {
|
||||
|
||||
pyPlayer = AVPlayer(url: pyVidURL!)
|
||||
pyPlayerNode = SKVideoNode(avPlayer: pyPlayer)
|
||||
|
||||
// flip video upside down
|
||||
pyPlayerNode.yScale = -1
|
||||
pyPlayerNode.name = "PyplayerNode"
|
||||
|
||||
// create SKScene and set player node on it
|
||||
spriteKitScene = SKScene(size: CGSize(width: AspectRatio.width + 300, height: AspectRatio.height + 300))
|
||||
|
||||
spriteKitScene.scaleMode = .aspectFill
|
||||
|
||||
pyPlayerNode.position = CGPoint(x: spriteKitScene.size.width/2, y: spriteKitScene.size.height/2)
|
||||
|
||||
pyPlayerNode.size = spriteKitScene.size
|
||||
|
||||
spriteKitScene.addChild(pyPlayerNode)
|
||||
|
||||
|
||||
pyVideo.geometry?.firstMaterial?.diffuse.contents = spriteKitScene
|
||||
pyVideo.geometry?.firstMaterial?.isDoubleSided = true
|
||||
|
||||
pyPlayerNode.play()
|
||||
|
||||
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: pyPlayer.currentItem, queue: nil)
|
||||
{ notification in
|
||||
|
||||
self.pyPlayer.seek(to: kCMTimeZero)
|
||||
self.pyPlayer.play()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -182,7 +182,7 @@ class FocusSquare: SCNNode {
|
|||
|
||||
// Open animation
|
||||
SCNTransaction.begin()
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
|
||||
SCNTransaction.animationDuration = animationDuration / 4
|
||||
entireSquare?.opacity = 1.0
|
||||
self.segments?[0].open(direction: .left, newLength: sideLengthForOpenSquareSegments)
|
||||
|
|
@ -198,7 +198,7 @@ class FocusSquare: SCNNode {
|
|||
|
||||
// Scale/bounce animation
|
||||
SCNTransaction.begin()
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
|
||||
SCNTransaction.animationDuration = animationDuration / 4
|
||||
entireSquare?.setUniformScale(focusSquareSize)
|
||||
SCNTransaction.commit()
|
||||
|
|
@ -217,12 +217,12 @@ class FocusSquare: SCNNode {
|
|||
|
||||
// Close animation
|
||||
SCNTransaction.begin()
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
|
||||
SCNTransaction.animationDuration = self.animationDuration / 2
|
||||
entireSquare?.opacity = 0.99
|
||||
SCNTransaction.completionBlock = {
|
||||
SCNTransaction.begin()
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
|
||||
SCNTransaction.animationTimingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
|
||||
SCNTransaction.animationDuration = self.animationDuration / 4
|
||||
self.segments?[0].close(direction: .right)
|
||||
self.segments?[1].close(direction: .left)
|
||||
|
|
@ -280,9 +280,9 @@ class FocusSquare: SCNNode {
|
|||
private func scaleAnimation(for keyPath: String) -> CAKeyframeAnimation {
|
||||
let scaleAnimation = CAKeyframeAnimation(keyPath: keyPath)
|
||||
|
||||
let easeOut = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
|
||||
let easeInOut = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
|
||||
let linear = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
|
||||
let easeOut = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
|
||||
let easeInOut = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
|
||||
let linear = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear)
|
||||
|
||||
let fs = focusSquareSize
|
||||
let ts = focusSquareSize * scaleForClosedSquare
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
//Call updateTeeth for every frame of video
|
||||
let dpLink = CADisplayLink(target: self, selector: #selector(self.updateTeeth))
|
||||
|
||||
dpLink.add(to: .current, forMode: .commonModes)
|
||||
// dpLink.add(to: .current, forMode: .RunLoop.Mode.common)
|
||||
|
||||
setupFocusSquare()
|
||||
screenLocation()
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 237 KiB |
BIN
Adafruit AR/art.scnassets/.DS_Store
vendored
|
After Width: | Height: | Size: 151 KiB |
BIN
Adafruit AR/art.scnassets/CLUE pinout.png
Normal file
|
After Width: | Height: | Size: 216 KiB |
BIN
Adafruit AR/art.scnassets/CPX-Pinouts.png
Normal file
|
After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 136 KiB |
BIN
Adafruit AR/art.scnassets/CircuitPlaygroundBluefruit.scn
Normal file
BIN
Adafruit AR/art.scnassets/CircuitPlaygroundExpress.scn
Normal file
BIN
Adafruit AR/art.scnassets/Clue.scn
Normal file
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 116 KiB |
BIN
Adafruit AR/art.scnassets/ESP32-S2 Rev TFT.scn
Normal file
BIN
Adafruit AR/art.scnassets/ESP32-S2 TFT Feather Pinout.png
Normal file
|
After Width: | Height: | Size: 352 KiB |
BIN
Adafruit AR/art.scnassets/ESP32-S2TFT.scn
Normal file
BIN
Adafruit AR/art.scnassets/Metro M7 1011 with AirLift Layout.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Adafruit AR/art.scnassets/Metro M7 1011 with AirLift copy 2.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Adafruit AR/art.scnassets/Metro M7 1011 with AirLift.scn
Normal file
BIN
Adafruit AR/art.scnassets/Metro M7 NXP.scn
Normal file
BIN
Adafruit AR/art.scnassets/Metro M7 NXPComp.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Adafruit AR/art.scnassets/Metro M7.scn
Normal file
BIN
Adafruit AR/art.scnassets/MetroM7DigiKeyPinoutBBack.png
Normal file
|
After Width: | Height: | Size: 404 KiB |
BIN
Adafruit AR/art.scnassets/MetroM7NXPPinouts.scn
Normal file
BIN
Adafruit AR/art.scnassets/MetroM7_OG_pinout.png
Normal file
|
After Width: | Height: | Size: 809 KiB |
|
Before Width: | Height: | Size: 108 KiB |
BIN
Adafruit AR/art.scnassets/PiCow.scn
Normal file
BIN
Adafruit AR/art.scnassets/Pico.scn
Normal file
BIN
Adafruit AR/art.scnassets/PicoPinout.png
Normal file
|
After Width: | Height: | Size: 926 KiB |
BIN
Adafruit AR/art.scnassets/PicoW.png
Normal file
|
After Width: | Height: | Size: 343 KiB |
|
Before Width: | Height: | Size: 88 KiB |
BIN
Adafruit AR/art.scnassets/Teensy4.1.scn
Normal file
BIN
Adafruit AR/art.scnassets/TestPlane.scn
Normal file
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 84 KiB |
BIN
Adafruit AR/art.scnassets/teensy-4.1-pinout.png
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
Assets.xcassets/.DS_Store
vendored
BIN
Assets.xcassets/CollectionView Images/.DS_Store
vendored
Normal file
|
After Width: | Height: | Size: 373 KiB |
21
Assets.xcassets/CollectionView Images/Circuit Playground Bluefruit.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Adafruit Circuit Playground Bluefruit pinout copy.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 460 KiB |
21
Assets.xcassets/CollectionView Images/Circuit Playground Express.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Circuit Playground Express.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
21
Assets.xcassets/CollectionView Images/Clue.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "ref.Clue.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||