Created
May 21, 2018 18:51
-
-
Save azamsharp/9e4b604a0c6434a89973867c81f125f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBOutlet var sceneView: ARSCNView! | |
private var gSession :GARSession! | |
private var arAnchor :ARAnchor! | |
private var garAnchor :GARAnchor! | |
private var rootRef :DatabaseReference! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.rootRef = Database.database().reference() | |
self.sceneView.autoenablesDefaultLighting = true | |
// enable the arcore session | |
self.gSession = try! GARSession(apiKey: "PutYourOwnAPIKeyHere", bundleIdentifier: nil) | |
// Set the view's delegate | |
sceneView.delegate = self | |
self.gSession.delegate = self | |
self.gSession.delegateQueue = DispatchQueue.main | |
sceneView.session.delegate = self | |
// Create a new scene | |
let scene = SCNScene() | |
// Set the scene to the view | |
sceneView.scene = scene | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment