diff --git a/.gitignore b/.gitignore index ba1ff08..72baa45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore +.DS_Store ## User settings xcuserdata/ @@ -87,4 +88,4 @@ fastlane/test_output # After new code Injection tools there's a generated folder /iOSInjectionProject # https://github.com/johnno1962/injectionforxcode -iOSInjectionProject/ \ No newline at end of file +iOSInjectionProject/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..5b71701 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# SarsooAR + +Playing with ARKit and Reality Composer + +![Reality Composer View](docs/GoldAndWord.png) diff --git a/SarsooAR.xcodeproj/project.pbxproj b/SarsooAR.xcodeproj/project.pbxproj index 90a8bf1..e0a6942 100644 --- a/SarsooAR.xcodeproj/project.pbxproj +++ b/SarsooAR.xcodeproj/project.pbxproj @@ -49,6 +49,7 @@ E906F82224154B2A004E1E31 /* SarsooARUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SarsooARUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; E906F82624154B2A004E1E31 /* SarsooARUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SarsooARUITests.swift; sourceTree = ""; }; E906F82824154B2A004E1E31 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E906F834241554A2004E1E31 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -79,6 +80,7 @@ E906F7F824154B21004E1E31 = { isa = PBXGroup; children = ( + E906F834241554A2004E1E31 /* README.md */, E906F80324154B21004E1E31 /* SarsooAR */, E906F81A24154B2A004E1E31 /* SarsooARTests */, E906F82524154B2A004E1E31 /* SarsooARUITests */, diff --git a/SarsooAR/ContentView.swift b/SarsooAR/ContentView.swift index a4c5311..a4e76eb 100644 --- a/SarsooAR/ContentView.swift +++ b/SarsooAR/ContentView.swift @@ -10,8 +10,29 @@ import SwiftUI import RealityKit struct ContentView : View { + + @State var showingSession = false + var body: some View { - return ARViewContainer().edgesIgnoringSafeArea(.all) + TabView { + NavigationView { + List { + Button(action: { self.showingSession = true }) { + Text("Launch Session") + }.sheet(isPresented: $showingSession) { + ARViewContainer().edgesIgnoringSafeArea(.all) + } + } + .listStyle(GroupedListStyle()) + .navigationBarTitle("SarsooAR") + } + .tabItem { + VStack { + Image(systemName: "camera") + Text("AR") + } + } + } } } diff --git a/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/square b/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/square index 8ccf2e6..08e052c 100644 Binary files a/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/square and b/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/square differ diff --git a/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/wide b/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/wide index 16b8ed4..faf11e0 100644 Binary files a/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/wide and b/SarsooAR/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/wide differ diff --git a/SarsooAR/Experience.rcproject/com.apple.RCFoundation.Project b/SarsooAR/Experience.rcproject/com.apple.RCFoundation.Project index 27f0b2b..57f52c1 100644 --- a/SarsooAR/Experience.rcproject/com.apple.RCFoundation.Project +++ b/SarsooAR/Experience.rcproject/com.apple.RCFoundation.Project @@ -23,12 +23,13 @@ { "configurationBox" : { "configuration" : { - "animationStyle" : "basic", + "animationStyle" : "wild", "duration" : 1.7699999809265137, - "emphasisAnimationType" : "float", + "emphasisAnimationType" : "spin", "iterations" : 1, "target" : [ - "3788A5B5-0388-488A-8304-7B90FEBA6FAC" + "3788A5B5-0388-488A-8304-7B90FEBA6FAC", + "05ACEBFF-4612-4E58-97C3-33A01C840AF2" ] }, "name" : { @@ -66,7 +67,7 @@ { "configurationBox" : { "configuration" : { - "distance" : 0.2793009877204895, + "distance" : 0.562347412109375, "target" : [ "3788A5B5-0388-488A-8304-7B90FEBA6FAC" ], @@ -84,6 +85,79 @@ } ], "__version" : 2 + }, + { + "__content" : [ + { + "actionGroups" : [ + { + "__content" : [ + { + "configurations" : [ + { + "__content" : [ + { + "configurationBox" : { + "configuration" : { + "animationStyle" : "basic", + "duration" : 1, + "emphasisAnimationType" : "bounce", + "iterations" : 1, + "target" : [ + "A2ED9927-7A82-4815-9DBB-E427A0CC634B" + ] + }, + "name" : { + "type" : "emphasis" + } + }, + "identifier" : "5AD02865-21EF-4780-B8C0-D1D42605A017", + "isEnabled" : true + } + ], + "__version" : 1 + } + ], + "identifier" : "E7D59FF6-9477-4791-AABF-1090FB1BB078", + "isEnabled" : true + } + ], + "__version" : 1 + } + ], + "color" : [ + 0.21568627655506134, + 0.72549021244049072, + 0.80000001192092896, + 1 + ], + "identifier" : "A6D597F4-AD02-4CBE-B644-F00CF29C4FAE", + "isEnabled" : true, + "isLooping" : false, + "isModal" : false, + "name" : "Behaviour 1", + "triggers" : [ + { + "__content" : [ + { + "configurationBox" : { + "configuration" : { + "target" : [ + "A2ED9927-7A82-4815-9DBB-E427A0CC634B" + ] + }, + "name" : "tapTarget" + }, + "identifier" : "8352DD77-E6DB-4DD1-B5FD-3E5AE33F13A4", + "isEnabled" : true + } + ], + "__version" : 1 + } + ] + } + ], + "__version" : 2 } ], "gravity" : [ @@ -397,21 +471,21 @@ "title" : "Box", "viewTransform" : { "cameraTransform" : [ - 0.97084146738052368, - -5.587935802964239e-08, - -0.23972232639789581, + 0.99868166446685791, + -5.029141902923584e-08, + -0.051330983638763428, 0, - -0.092462286353111267, - 0.92262160778045654, - -0.37445956468582153, + -0.016422633081674576, + 0.94743841886520386, + -0.31951621174812317, 0, - 0.22117307782173157, - 0.38570621609687805, - 0.89571928977966309, + 0.048632964491844177, + 0.31993809342384338, + 0.94618934392929077, 0, - 0.37851834297180176, - 0.54469352960586548, - 0.99601411819458008, + 0.18197430670261383, + 0.47035521268844604, + 1.0450206995010376, 1 ], "sceneTransform" : [ diff --git a/SarsooAR/Info.plist b/SarsooAR/Info.plist index 3c072de..ac26c15 100644 --- a/SarsooAR/Info.plist +++ b/SarsooAR/Info.plist @@ -34,8 +34,6 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad diff --git a/docs/GoldAndWord.png b/docs/GoldAndWord.png new file mode 100644 index 0000000..98a521a Binary files /dev/null and b/docs/GoldAndWord.png differ