Compare commits
4 commits
master
...
Board-scan
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a148916f95 | ||
|
|
6fac5e3acd | ||
|
|
9ecab5dc4c | ||
|
|
c710222af6 |
BIN
.DS_Store
vendored
|
|
@ -25,6 +25,9 @@
|
|||
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 /* TestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53B29AB29E440B000F68A06 /* TestViewController.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 */; };
|
||||
|
|
@ -38,6 +41,7 @@
|
|||
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 */; };
|
||||
D5B022B3287D0CBF00598D5E /* PicoWOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B022B2287D0CBF00598D5E /* PicoWOverlay.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 */; };
|
||||
|
|
@ -77,6 +81,9 @@
|
|||
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 /* TestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestViewController.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>"; };
|
||||
|
|
@ -90,6 +97,7 @@
|
|||
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>"; };
|
||||
D5B022B2287D0CBF00598D5E /* PicoWOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PicoWOverlay.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>"; };
|
||||
|
|
@ -137,6 +145,9 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
D56ED485213EE255000E62F0 /* MainViewController.swift */,
|
||||
D53B29AB29E440B000F68A06 /* TestViewController.swift */,
|
||||
D53B29AD29E44FBD00F68A06 /* ARImageCollectionViewCell.swift */,
|
||||
D53B29AF29E4503E00F68A06 /* ARImageCollectionViewController.swift */,
|
||||
D583C69C215BF2DB00256EB1 /* pageThree.swift */,
|
||||
D5ABE2902146BB2A00AB8237 /* RootPageViewController.swift */,
|
||||
);
|
||||
|
|
@ -150,6 +161,7 @@
|
|||
297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */,
|
||||
29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */,
|
||||
293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */,
|
||||
D5B022B2287D0CBF00598D5E /* PicoWOverlay.swift */,
|
||||
29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */,
|
||||
295049AB25E6996D003E7484 /* CurvedText.swift */,
|
||||
295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */,
|
||||
|
|
@ -329,20 +341,24 @@
|
|||
298FD3F62270B4D9007E2F4C /* QRViewController+GestureRec.swift in Sources */,
|
||||
29D096292559C71D0032654B /* ClickableView.swift in Sources */,
|
||||
29897A58256CA76F0080F4BF /* ARWorldAnchor.swift in Sources */,
|
||||
D53B29AC29E440B000F68A06 /* TestViewController.swift in Sources */,
|
||||
D515BADA21FF5826001E7079 /* Highlight SCNNode.swift in Sources */,
|
||||
29A07E9725C0CB9F006219C9 /* PICOBoardOverlay.swift in Sources */,
|
||||
29A83D2525EEC3F60018BEAB /* Pi400Overlay.swift in Sources */,
|
||||
295049AC25E6996D003E7484 /* CurvedText.swift in Sources */,
|
||||
D5B022B3287D0CBF00598D5E /* PicoWOverlay.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 */,
|
||||
D53B29B029E4503E00F68A06 /* ARImageCollectionViewController.swift in Sources */,
|
||||
29546B5B2585B51000002715 /* BoardViewController+HostingController.swift in Sources */,
|
||||
298FD3F82270B7A5007E2F4C /* QRViewController+Video.swift in Sources */,
|
||||
295049AE25E69AB0003E7484 /* BLMBoardOverlay.swift in Sources */,
|
||||
D55F683120BF2CA4005219D9 /* Utilities.swift in Sources */,
|
||||
D5F2F4E2208E190D00B0790B /* AppDelegate.swift in Sources */,
|
||||
D58A102C20FE6C39003B0E93 /* ViewController+Nodes.swift in Sources */,
|
||||
D53B29AE29E44FBD00F68A06 /* ARImageCollectionViewCell.swift in Sources */,
|
||||
293EC85925E8092C008EB6CA /* Teensy41BoardOverlay.swift in Sources */,
|
||||
29B109C922933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift in Sources */,
|
||||
D56ED486213EE255000E62F0 /* MainViewController.swift in Sources */,
|
||||
|
|
@ -490,16 +506,16 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 2X94RM7457;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Frameworks",
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.12;
|
||||
MARKETING_VERSION = 1.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
|
|
@ -512,16 +528,16 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 2X94RM7457;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Frameworks",
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.12;
|
||||
MARKETING_VERSION = 1.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
|
|
|
|||
BIN
Adafruit AR/.DS_Store
vendored
|
|
@ -1,9 +1,10 @@
|
|||
<?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="21507" 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="21505"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -27,14 +28,14 @@
|
|||
<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"/>
|
||||
<rect key="frame" x="775" y="144" width="36" 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"/>
|
||||
<rect key="frame" x="775" y="44" width="36" 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"/>
|
||||
|
|
@ -44,7 +45,7 @@
|
|||
</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"/>
|
||||
<rect key="frame" x="775" y="94" width="36" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="?mark_icon"/>
|
||||
<connections>
|
||||
|
|
@ -52,7 +53,7 @@
|
|||
</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"/>
|
||||
<rect key="frame" x="280" y="516" width="263" 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"/>
|
||||
|
|
@ -148,11 +149,11 @@
|
|||
<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"/>
|
||||
<rect key="frame" x="-8" y="-9" width="847" height="1206"/>
|
||||
<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"/>
|
||||
<rect key="frame" x="775" y="44" width="36" 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"/>
|
||||
|
|
@ -163,14 +164,14 @@
|
|||
</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"/>
|
||||
<rect key="frame" x="368" y="547" width="94" height="27"/>
|
||||
<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"/>
|
||||
<rect key="frame" x="775" y="94" width="36" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="?mark_icon"/>
|
||||
<connections>
|
||||
|
|
@ -178,23 +179,23 @@
|
|||
</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"/>
|
||||
<rect key="frame" x="15" y="33" width="159" height="44"/>
|
||||
<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"/>
|
||||
<rect key="frame" x="-8" y="-4" width="847" height="1201"/>
|
||||
<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"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="847" height="1201"/>
|
||||
<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"/>
|
||||
<rect key="frame" x="278" y="256" width="295" 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">
|
||||
|
|
@ -279,7 +280,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">
|
||||
|
|
@ -291,7 +292,7 @@ Works with:
|
|||
<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"/>
|
||||
<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 +317,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 +325,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!
|
||||
|
|
@ -395,11 +396,11 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<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"/>
|
||||
<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 +431,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 +449,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 +458,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">
|
||||
|
|
@ -536,7 +537,7 @@ 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">
|
||||
<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="327" y="585.5" width="180" height="28"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="180" id="YDO-Dj-dEZ"/>
|
||||
|
|
@ -584,9 +585,25 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
</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"/>
|
||||
<rect key="frame" x="0.0" y="1042" width="1" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</arscnView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gve-Vh-pLf">
|
||||
<rect key="frame" x="380" y="901" width="75" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="75" id="0oK-Ct-CUd"/>
|
||||
<constraint firstAttribute="height" constant="35" id="bSF-hJ-6kO"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button"/>
|
||||
<buttonConfiguration key="configuration" style="plain" title="Button">
|
||||
<backgroundConfiguration key="background">
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</backgroundConfiguration>
|
||||
</buttonConfiguration>
|
||||
<connections>
|
||||
<action selector="testButtonAction:" destination="TV4-si-PBW" eventType="touchUpInside" id="VNr-aF-Mb5"/>
|
||||
</connections>
|
||||
</button>
|
||||
</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"/>
|
||||
|
|
@ -608,7 +625,9 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<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="Gve-Vh-pLf" firstAttribute="centerX" secondItem="3Za-QD-T4W" secondAttribute="centerX" id="qdR-W3-58e"/>
|
||||
<constraint firstItem="JoM-op-FvU" firstAttribute="top" secondItem="NU1-NZ-3YS" secondAttribute="bottom" constant="8" id="r3Y-xA-JwT"/>
|
||||
<constraint firstItem="Gve-Vh-pLf" firstAttribute="top" secondItem="JoM-op-FvU" secondAttribute="bottom" constant="20" id="xwg-7W-iNJ"/>
|
||||
<constraint firstItem="69X-ph-JvD" firstAttribute="top" secondItem="71S-tN-o8i" secondAttribute="bottom" constant="8" id="xxi-vL-Mg6"/>
|
||||
</constraints>
|
||||
</view>
|
||||
|
|
@ -619,6 +638,7 @@ Hit the Letters icon to reveal letters that will play videos from Circuit Playgr
|
|||
<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="testButtonRef" destination="Gve-Vh-pLf" id="x9Z-Ud-qHb"/>
|
||||
<outlet property="versionNumberLabel" destination="Xf5-5J-Hvr" id="YkT-bR-DRp"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
|
|
@ -629,6 +649,102 @@ 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="835" height="1195"/>
|
||||
<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" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="498-ob-xo5">
|
||||
<rect key="frame" x="777" y="94" width="34" 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="777" y="44" width="34" 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>
|
||||
<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"/>
|
||||
|
|
@ -698,19 +814,19 @@ 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"/>
|
||||
|
|
@ -749,102 +865,6 @@ 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"/>
|
||||
</scene>
|
||||
|
|
@ -22855,5 +22875,8 @@ EoNLABKDUAASg1gAAAAAAAAEAQAAAAAAAABoAAAAAAAAAAAAAAAAABKDWw
|
|||
</mutableData>
|
||||
</image>
|
||||
<image name="test1" width="1050" height="1050"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ 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))
|
||||
|
|
@ -39,19 +37,22 @@ extension BoardViewController {
|
|||
}
|
||||
|
||||
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
|
||||
DispatchQueue.main.async {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// 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]
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
// 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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -66,7 +67,7 @@ extension BoardViewController {
|
|||
// 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)
|
||||
self.arVC.view.frame = CGRect(x: 0, y: -13, width: 510, height: 500)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.arVC.view)
|
||||
|
|
@ -99,6 +100,45 @@ extension BoardViewController {
|
|||
|
||||
|
||||
|
||||
func arPICOWHostingController(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.picoWVC.view.frame = CGRect(x: 0, y: -20, width: 510, height: 510)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.picoWVC.view)
|
||||
|
||||
// render the view on the plane geometry as a material
|
||||
self.showPicoWOverlay(hostingVC: self.picoWVC, on: node)
|
||||
|
||||
self.picoWVC.didMove(toParent: self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
func showPicoWOverlay(hostingVC: UIHostingController<PicoWOverlay>, 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 {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
let blmVC = UIHostingController(rootView: BLMBoardOverlay())
|
||||
let teensyVC = UIHostingController(rootView: Teensy41BoardOverlay())
|
||||
let pi400VC = UIHostingController(rootView: Pi400Overlay())
|
||||
let picoWVC = UIHostingController(rootView: PicoWOverlay())
|
||||
|
||||
|
||||
func removeContentController(content: UIViewController) {
|
||||
|
|
@ -54,6 +55,9 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
var minervaPartsLoaded = false
|
||||
|
||||
|
||||
// Test
|
||||
var picoPinout = SCNNode()
|
||||
|
||||
//MARK:- Tarot Cards
|
||||
|
||||
var starCard = SCNNode()
|
||||
|
|
@ -303,8 +307,6 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -484,7 +486,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
}
|
||||
|
||||
//Create AR Object
|
||||
func ARObjectToScene(ARObject: SCNNode, ARScene: SCNScene, planeNode: SCNNode, size: SCNVector3){
|
||||
func ARObjectToScene(ARObject: SCNNode, ARScene: SCNScene, planeNode: SCNNode, size: SCNVector3) {
|
||||
|
||||
for child in ARScene.rootNode.childNodes {
|
||||
|
||||
|
|
@ -494,7 +496,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
ARObject.position = SCNVector3(planeNode.position.x, planeNode.position.y, planeNode.position.z )
|
||||
ARObject.scale = SCNVector3(x: size.x, y: size.y, z: size.z)
|
||||
ARObject.eulerAngles.x = -.pi / 2
|
||||
// ARObject.eulerAngles.x = -.pi / 2
|
||||
|
||||
planeNode.addChildNode(ARObject)
|
||||
|
||||
|
|
@ -529,7 +531,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
print("Function: \(#function),File: \(#file),Line: \( #line)")
|
||||
_ = SCNMaterial()
|
||||
|
||||
let plane = SCNPlane(width: imageReferenceAnchor.referenceImage.physicalSize.width + 0.5, height: imageReferenceAnchor.referenceImage.physicalSize.height + 0.5)
|
||||
let plane = SCNPlane(width: imageReferenceAnchor.referenceImage.physicalSize.width + 1, height: imageReferenceAnchor.referenceImage.physicalSize.height + 1)
|
||||
|
||||
plane.firstMaterial?.diffuse.contents = UIColor(white: 0, alpha: 0)
|
||||
|
||||
|
|
@ -601,7 +603,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
let planeNode = SCNNode(geometry: plane)
|
||||
planeNode.eulerAngles.x = -.pi / 2
|
||||
|
||||
//planeNode.position = SCNVector3(x: 0, y: 0, z: 0)
|
||||
node.addChildNode(planeNode)
|
||||
|
||||
switch (imageAnchor.referenceImage.name) {
|
||||
|
|
@ -1771,7 +1773,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
arHostingController(for: planeNode, textForDialogue: ListOfTexts.heirophantText)
|
||||
|
||||
//MARK:- PICO
|
||||
//MARK: - PICO
|
||||
case "pico4":
|
||||
DispatchQueue.main.async {
|
||||
print("Recognized PICO Board.")
|
||||
|
|
@ -1782,6 +1784,19 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
self.arPICOHostingController(for: planeNode)
|
||||
}
|
||||
|
||||
//MARK: PICO-W
|
||||
case "pico-wRef":
|
||||
DispatchQueue.main.async {
|
||||
print("Recognized PICO Board.")
|
||||
|
||||
self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.SwiftUIARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.arPICOWHostingController(for: planeNode)
|
||||
}
|
||||
|
||||
//MARK:- Teensy
|
||||
case "teensy":
|
||||
DispatchQueue.main.async {
|
||||
|
|
@ -1824,14 +1839,25 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
//removeContentController(content: blmVC)
|
||||
|
||||
|
||||
|
||||
|
||||
DispatchQueue.main.async {
|
||||
print("Recognized BLM Board.")
|
||||
// self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
//
|
||||
// self.ARObjectToScene(ARObject: self.picoPinout, ARScene: ARScenes.blmLabelScene, planeNode: node, size: SCNVector3(0.5,0.5,0.5))
|
||||
//
|
||||
|
||||
self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
// picoPinout
|
||||
|
||||
|
||||
self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.SwiftUIARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.arBLMHostingController(for: planeNode)
|
||||
|
||||
self.SwiftUIARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.arBLMHostingController(for: planeNode)
|
||||
|
||||
}
|
||||
case "cpx":
|
||||
|
|
|
|||
|
|
@ -39,92 +39,6 @@ struct PICOBoardOverlay: View {
|
|||
|
||||
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)
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
|
@ -134,36 +48,45 @@ struct PICOBoardOverlay: View {
|
|||
RoundedRectangle(cornerRadius: 1, style: .continuous)
|
||||
.fill(Color.clear)
|
||||
.frame(width: 167, height: 272)
|
||||
.border(Color.gray, width: 2)
|
||||
.border(Color.clear, width: 2)
|
||||
.position(x: 250, y: CGFloat(viewY))
|
||||
//.position(x: 250, y: 250)
|
||||
|
||||
pintOutDEBUGStruct()
|
||||
.position(x: 250, y: CGFloat(debugY))
|
||||
// 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)
|
||||
VStack {
|
||||
Image("PicoPinoutFinal")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 600, height: 395, alignment: .center)
|
||||
|
||||
}
|
||||
.position(x: -161, y: CGFloat(viewY))
|
||||
//.offset(x: -245, y: 25)
|
||||
|
||||
|
||||
// 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: 1, alignment: .trailing)
|
||||
//
|
||||
// }
|
||||
// .position(x: -161, y: CGFloat(viewY))
|
||||
// //.offset(x: -245, y: 25)
|
||||
}
|
||||
}
|
||||
.onAppear(perform: {
|
||||
|
|
|
|||
28
Adafruit AR/Board Scan View Controller/PicoWOverlay.swift
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// PicoWOverlay.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 7/11/22.
|
||||
// Copyright © 2022 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct PicoWOverlay: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image("PicoWPinout1")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 600, height: 360, alignment: .center)
|
||||
|
||||
}
|
||||
.rotationEffect(.degrees(-180))
|
||||
}
|
||||
}
|
||||
|
||||
struct PicoWOverlay_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
PicoWOverlay()
|
||||
}
|
||||
}
|
||||
49
Adafruit AR/Pages/ARImageCollectionViewCell.swift
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
//
|
||||
// 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.systemFont(ofSize: 14)
|
||||
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
|
||||
}
|
||||
}
|
||||
121
Adafruit AR/Pages/ARImageCollectionViewController.swift
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
//
|
||||
// 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 {
|
||||
|
||||
private var collectionView: UICollectionView?
|
||||
// Replace with your image names in the "Photos" folder.
|
||||
let images: [String] = ["Circuit Playground Bluefruit", "RaspPi PicoW"]
|
||||
|
||||
weak var delegate: PhotosViewControllerDelegate?
|
||||
|
||||
let appTitleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.text = "Werdd"
|
||||
label.font = UIFont(name: "Arial", size: 32)
|
||||
|
||||
// label.font = UIFont(name: "GothicA1-Thin", size: 32)
|
||||
return label
|
||||
}()
|
||||
|
||||
func addSubViews() {
|
||||
view.addSubview(appTitleLabel)
|
||||
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
|
||||
appTitleLabel.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20),
|
||||
appTitleLabel.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),
|
||||
appTitleLabel.trailingAnchor.constraint(lessThanOrEqualTo: view.trailingAnchor),
|
||||
|
||||
])
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
addSubViews()
|
||||
setupCollectionView()
|
||||
}
|
||||
|
||||
func setupCollectionView() {
|
||||
|
||||
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)
|
||||
|
||||
collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
|
||||
collectionView?.register(CustomCollectionViewCell.self, forCellWithReuseIdentifier: CustomCollectionViewCell.identifier)
|
||||
collectionView?.dataSource = self
|
||||
collectionView?.delegate = self
|
||||
|
||||
|
||||
if let collectionView = collectionView {
|
||||
view.addSubview(collectionView)
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
super.viewDidLayoutSubviews()
|
||||
collectionView?.frame = view.bounds
|
||||
}
|
||||
|
||||
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 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
|
||||
}
|
||||
}
|
||||
|
||||
class CustomHeaderView: UICollectionReusableView {
|
||||
static let identifier = "CustomHeaderView"
|
||||
|
||||
private let titleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.text = "Header Title"
|
||||
label.font = UIFont.systemFont(ofSize: 24, weight: .bold)
|
||||
return label
|
||||
}()
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
addSubview(titleLabel)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
titleLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 20),
|
||||
titleLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -20),
|
||||
titleLabel.centerYAnchor.constraint(equalTo: centerYAnchor)
|
||||
])
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
}
|
||||
|
|
@ -16,6 +16,20 @@ class MainViewController: UIViewController, ARSCNViewDelegate {
|
|||
let appVersion = Bundle.main.infoDictionary!["CFBundleShortVersionString"]
|
||||
|
||||
|
||||
@IBOutlet weak var testButtonRef: UIButton!
|
||||
|
||||
@IBAction func testButtonAction(_ sender: UIButton) {
|
||||
print("Button Pressed")
|
||||
navigateToNextViewController()
|
||||
}
|
||||
|
||||
@objc func navigateToNextViewController() {
|
||||
let nextViewController = ARViewController()
|
||||
nextViewController.modalPresentationStyle = .fullScreen // or any other presentation style you prefer
|
||||
self.present(nextViewController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@IBOutlet weak var boardView: ARSCNView!
|
||||
|
||||
|
|
|
|||
298
Adafruit AR/Pages/TestViewController.swift
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
//
|
||||
// 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 ARViewController: UIViewController, ARSCNViewDelegate {
|
||||
|
||||
private var sceneView: ARSCNView!
|
||||
let configuration = ARImageTrackingConfiguration()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
sceneView = ARSCNView(frame: view.bounds)
|
||||
arViewSetup()
|
||||
config()
|
||||
addSubViews()
|
||||
//presentModal(isPresented: true)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
func config() {
|
||||
let backgroundQueue = DispatchQueue(label: "com.Using_Sequence.configQueue", qos: .default, attributes: .concurrent)
|
||||
|
||||
DispatchQueue.main.async {
|
||||
guard let trackedImages = ARReferenceImage.referenceImages(inGroupNamed: "Photos", bundle: Bundle.main) else {
|
||||
print("No images available")
|
||||
return
|
||||
}
|
||||
|
||||
// self.configuration.trackingImages = trackedImages
|
||||
self.configuration.maximumNumberOfTrackedImages = 1
|
||||
self.configuration.isAutoFocusEnabled = true
|
||||
|
||||
|
||||
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 imageAsset = UIImage(named: imageName, in: Bundle.main, compatibleWith: nil),
|
||||
let imageCG = imageAsset.cgImage else {
|
||||
print("Image not available")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let referenceImage = ARReferenceImage(imageCG, orientation: CGImagePropertyOrientation.up, physicalWidth: 0.1) // Replace 0.1 with your image's physical width in meters
|
||||
referenceImage.name = imageName
|
||||
|
||||
self.configuration.trackingImages = [referenceImage]
|
||||
self.configuration.maximumNumberOfTrackedImages = 1
|
||||
self.configuration.isAutoFocusEnabled = true
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.sceneView.session.run(self.configuration, options: [.resetTracking, .removeExistingAnchors])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func resetARView() {
|
||||
sceneView.session.run(configuration, options: [.resetTracking,.removeExistingAnchors])
|
||||
}
|
||||
|
||||
|
||||
func addSubViews() {
|
||||
view.addSubview(sceneView)
|
||||
// view.addSubview(appTitleLabel)
|
||||
view.addSubview(homeButton)
|
||||
view.addSubview(modalPresentButton)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
])
|
||||
}
|
||||
|
||||
let appTitleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.text = "AR - Test View"
|
||||
label.font = UIFont(name: "Arial", size: 24)
|
||||
return label
|
||||
}()
|
||||
|
||||
let homeButton: UIButton = {
|
||||
let image = UIImage(systemName: "house")?.withTintColor(.white, renderingMode: .alwaysOriginal)
|
||||
let button = UIButton(type: .custom)
|
||||
button.setImage(image, for: .normal)
|
||||
button.setTitleColor(.white, for: .normal)
|
||||
button.frame.size.height = 100.0
|
||||
button.frame.size.width = 200.0
|
||||
button.imageEdgeInsets = UIEdgeInsets(top: 30, left: 30, bottom: 30, right: 30)
|
||||
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()
|
||||
// Perform any actions you want when the button is tapped
|
||||
}
|
||||
|
||||
@objc func navigateBack() {
|
||||
self.dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
private func presentModal(isPresented: Bool) {
|
||||
print("\(isPresented)")
|
||||
let detailViewController = ARImageCollectionViewController()
|
||||
|
||||
let smallId = UISheetPresentationController.Detent.Identifier("small")
|
||||
let smallDetent = UISheetPresentationController.Detent.custom(identifier: smallId) { context in
|
||||
return 150
|
||||
}
|
||||
|
||||
// 1
|
||||
detailViewController.modalPresentationStyle = .pageSheet
|
||||
|
||||
if let sheet = detailViewController.sheetPresentationController {
|
||||
// 3
|
||||
sheet.prefersGrabberVisible = true
|
||||
sheet.preferredCornerRadius = 30.0
|
||||
sheet.prefersScrollingExpandsWhenScrolledToEdge = false
|
||||
sheet.detents = [smallDetent,.medium(), .large()]
|
||||
|
||||
|
||||
}
|
||||
// 4
|
||||
detailViewController.delegate = self
|
||||
present(detailViewController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
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 {
|
||||
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 "fist":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/fistObject.scn")! // Replace with your AR object's scene
|
||||
case "Circuit Playground Bluefruit":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/CircuitPlaygroundBluefruit.scn")! // Replace with your AR object's scene
|
||||
// Add more cases for other images
|
||||
case "RaspPi PicoW":
|
||||
arObjectScene = SCNScene(named: "art.scnassets/PiCow.scn")! // Replace with your AR object's scene
|
||||
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
||||
// Create an AR object from the loaded scene
|
||||
let arObject = SCNNode()
|
||||
let arObjectNodes = arObjectScene.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 ARViewController: PhotosViewControllerDelegate {
|
||||
|
||||
func didSelectImage(imageName: String) {
|
||||
presentModal(isPresented: false)
|
||||
updateConfiguration(withImageName: imageName)
|
||||
print("Selected image: \(imageName)")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
Adafruit AR/art.scnassets/.DS_Store
vendored
BIN
Adafruit AR/art.scnassets/Cards1.10/.DS_Store
vendored
Normal file
BIN
Adafruit AR/art.scnassets/CircuitPlaygroundBluefruit.scn
Normal file
BIN
Adafruit AR/art.scnassets/Cpb Pin.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
Adafruit AR/art.scnassets/PiCow.scn
Normal file
BIN
Adafruit AR/art.scnassets/PicoPinout2020.png
Normal file
|
After Width: | Height: | Size: 858 KiB |
BIN
Adafruit AR/art.scnassets/PicoPinout20201.png
Normal file
|
After Width: | Height: | Size: 926 KiB |
BIN
Adafruit AR/art.scnassets/PicoW.png
Normal file
|
After Width: | Height: | Size: 343 KiB |
BIN
Adafruit AR/art.scnassets/TestPlane.scn
Normal file
BIN
Adafruit AR/art.scnassets/cpbtest2.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
Assets.xcassets/.DS_Store
vendored
BIN
Assets.xcassets/Photos.arresourcegroup/.DS_Store
vendored
Normal file
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "pico5test.png",
|
||||
"filename" : "cpb.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"width" : 0.23999999999999999
|
||||
"unit" : "inches",
|
||||
"width" : 2
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.4 MiB |
|
|
@ -10,6 +10,15 @@
|
|||
{
|
||||
"filename" : "ChariotCard.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "Circuit Playground Bluefruit.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "Cpb.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "cpbtest2.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "CPX-QRCode_v2.arreferenceimage"
|
||||
},
|
||||
|
|
@ -71,10 +80,7 @@
|
|||
"filename" : "pi400.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "pico4.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "picoBoard.arreferenceimage"
|
||||
"filename" : "PicoW.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "portal2.arreferenceimage"
|
||||
|
|
@ -85,6 +91,9 @@
|
|||
{
|
||||
"filename" : "pyportal.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "RaspPi PicoW.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "StarCard.arreferenceimage"
|
||||
},
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 184 KiB |
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoW.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"unit" : "inches",
|
||||
"width" : 2
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 343 KiB |
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "IMG_2117.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"unit" : "inches",
|
||||
"width" : 2
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 868 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "picoBoard.png",
|
||||
"filename" : "cpbtest2.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
|
|
@ -10,6 +10,6 @@
|
|||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"width" : 0.20000000000000001
|
||||
"width" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 326 KiB |
|
Before Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 3.4 MiB |
21
Assets.xcassets/PicoPinout20201.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoPinout20201.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Assets.xcassets/PicoPinout20201.imageset/PicoPinout20201.png
vendored
Normal file
|
After Width: | Height: | Size: 926 KiB |
21
Assets.xcassets/PicoPinoutFinal.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoPinoutFinal.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Assets.xcassets/PicoPinoutFinal.imageset/PicoPinoutFinal.png
vendored
Normal file
|
After Width: | Height: | Size: 926 KiB |
21
Assets.xcassets/PicoWPinout.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoWPinout.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Assets.xcassets/PicoWPinout.imageset/PicoWPinout.png
vendored
Normal file
|
After Width: | Height: | Size: 906 KiB |
21
Assets.xcassets/PicoWPinout1.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoWPinout1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Assets.xcassets/PicoWPinout1.imageset/PicoWPinout1.png
vendored
Normal file
|
After Width: | Height: | Size: 924 KiB |