format: Poly3DFormat.obj) let polyApi = PolyAPI(apiKey: "Poly API Key is HERE!!!") polyApi.assets(with: query) { (result) in switch result { case .success(let assets): self.dataSource.assets = assets.assets ?? [] case .failure(_): self.showFetchFailedAlert() } } 21
asset: PolyAsset = ... // Download obj and mtl files from Poly asset.downloadObj { (result) in switch result { case .success(let localUrl): let mdlAsset = MDLAsset(url: localUrl) mdlAsset.loadTextures() let node = SCNNode(mdlObject: mdlAsset.object(at: 0)) // do something with node case .failure(let error): debugPrint(#function, "error", error) } } 22