Construct an object of type Echo3D and use it to access Assets stored under your echo3D account's API Key.
Render your assets however you want.
Example Setup:
importSwiftUIimportSceneKitstructContentView:View { // Creates a SwiftUI Viewvar body: some View { // Creates a SwiftUI bodyVStack {Text("View Your Echo3D Model!") .font(.headline)SceneKitView() .frame(width:350, height:350)// Adjust the size as needed } }}structSceneKitView:UIViewRepresentable { // Creates the Scene with 3D Model using SceneKit and Echo3D Swift SDKfuncmakeUIView(context: Context) -> SCNView { // Creates a simple scenelet sceneView =SCNView() sceneView.autoenablesDefaultLighting =true sceneView.allowsCameraControl =truereturn sceneView }funcupdateUIView(_sceneView: SCNView, context: Context) { // Adds 3D Model stored under your Echo3D Accounts API Keylet e =Echo3D(); // Create an object of class Echo3D e.queryDatabase(api_key: e.api_key, completion: { (entry_list) ->()in// Queries Echo3D's database for 3d Modelslet entry = entry_list[0] entry.downloadFile(completion: { (storage_id) in// Downloads the specificed 3D model entry and loads it into the sceneiflet object =try? SCNScene(url: storage_id, options:nil) {let objectNode = object.rootNode sceneView.scene = object sceneView.scene?.rootNode.addChildNode(objectNode) } }); }); }}@mainstructSDKTest2_6App:App {var body: some Scene {WindowGroup {ContentView() } }}