Test ARView Ready to replace BoardViewController
I will need to do a bit of thinning before TestFlight.
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 */; };
|
||||
|
|
@ -78,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>"; };
|
||||
|
|
@ -139,6 +145,9 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
D56ED485213EE255000E62F0 /* MainViewController.swift */,
|
||||
D53B29AB29E440B000F68A06 /* TestViewController.swift */,
|
||||
D53B29AD29E44FBD00F68A06 /* ARImageCollectionViewCell.swift */,
|
||||
D53B29AF29E4503E00F68A06 /* ARImageCollectionViewController.swift */,
|
||||
D583C69C215BF2DB00256EB1 /* pageThree.swift */,
|
||||
D5ABE2902146BB2A00AB8237 /* RootPageViewController.swift */,
|
||||
);
|
||||
|
|
@ -332,6 +341,7 @@
|
|||
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 */,
|
||||
|
|
@ -341,12 +351,14 @@
|
|||
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 */,
|
||||
|
|
@ -501,7 +513,7 @@
|
|||
"$(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.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
|
|
@ -523,7 +535,7 @@
|
|||
"$(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.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
|
|
|
|||
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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
// 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
|
||||
DispatchQueue.main.async {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
// set the diffuse of the material to the view of the Hosting View Controller
|
||||
material.diffuse.contents = hostingVC.view
|
||||
material.lightingModel = .constant
|
||||
// Set the material to the geometry of the node (plane geometry)
|
||||
node.geometry?.materials = [material]
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -307,8 +307,6 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -488,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 {
|
||||
|
||||
|
|
|
|||
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,7 +16,21 @@ 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!
|
||||
|
||||
@IBOutlet weak var qrModeIcon: UIButton!
|
||||
|
|
|
|||
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/PicoW.png
Normal file
|
After Width: | Height: | Size: 343 KiB |
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
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "picoBoard.png",
|
||||
"filename" : "cpb.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"width" : 0.20000000000000001
|
||||
"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,13 +80,7 @@
|
|||
"filename" : "pi400.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "pico-wRef.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "pico4.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "picoBoard.arreferenceimage"
|
||||
"filename" : "PicoW.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "portal2.arreferenceimage"
|
||||
|
|
@ -88,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 |
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "pico-wRefT14.png",
|
||||
"filename" : "PicoW.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"width" : 0.20000000000000001
|
||||
"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" : "pico5test.png",
|
||||
"filename" : "cpbtest2.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
|
|
@ -10,6 +10,6 @@
|
|||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"width" : 0.23999999999999999
|
||||
"width" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 326 KiB |
|
Before Width: | Height: | Size: 2.9 MiB |
|
Before Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 3.4 MiB |