How to Setup - mustafaatalar/uARKit GitHub Wiki
-
Create your Xcode Project
-
Move the folder uARKit into your project
- Create a ViewController and inherit it from uARView2DController
- Set custom class as uARView2D for the View in ViewController
- Add description into info.plist for camera access request
<key>NSCameraUsageDescription</key>
<string>AR needs camera access</string>
-
You will have an object instance named 'world2D' in ViewController. You can call the methods belong to uARWorld2D class described in API References page. At first you can set the global parameters:
override func viewDidLoad() { super.viewDidLoad() world2D.setCoordinateMode(mode: .compass) world2D.setLigtingFactor(factor: 1) }
-
You can call methods to augment in anywhere in ViewController. For example in a button click handler method:
@IBAction func buttonClicked(){ world2D.addImage(imageName: "https://example.com/bird.png", position: coordinate(top: 0, right: 0, front: 3)) }