{"id":13465360,"url":"https://github.com/VoxxxelAR/ARVoxelKit","last_synced_at":"2025-03-25T16:31:38.762Z","repository":{"id":216809655,"uuid":"104912748","full_name":"VoxxxelAR/ARVoxelKit","owner":"VoxxxelAR","description":"Voxel graphics framework using ARKit + SceneKit","archived":false,"fork":false,"pushed_at":"2017-10-15T16:28:49.000Z","size":10472,"stargazers_count":81,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-07-31T15:01:27.229Z","etag":null,"topics":["arkit","scenekit","swift","voxel"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VoxxxelAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-26T16:49:57.000Z","updated_at":"2024-06-16T05:26:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7a5fa39-9b45-4110-9423-463aaa2dc94d","html_url":"https://github.com/VoxxxelAR/ARVoxelKit","commit_stats":null,"previous_names":["voxxxelar/arvoxelkit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxxxelAR%2FARVoxelKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxxxelAR%2FARVoxelKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxxxelAR%2FARVoxelKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxxxelAR%2FARVoxelKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VoxxxelAR","download_url":"https://codeload.github.com/VoxxxelAR/ARVoxelKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222088539,"owners_count":16928976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arkit","scenekit","swift","voxel"],"created_at":"2024-07-31T15:00:28.297Z","updated_at":"2024-10-29T17:30:47.454Z","avatar_url":"https://github.com/VoxxxelAR.png","language":"Swift","funding_links":[],"categories":["Libs","Augmented Reality [🔝](#readme)","Swift"],"sub_categories":["Augmented Reality"],"readme":"# ARVoxelKit\nLightweight Framework for Voxel graphic using AR + SceneKit\n\n[![Build Status](https://travis-ci.org/VoxxxelAR/ARVoxelKit.svg?branch=master)](https://travis-ci.org/VoxxxelAR/ARVoxelKit)\n\n![](preview.gif)\n\n## Requirements\nARVoxelKit requires iOS 11 and devices, which support ARKit\n\n## Usage\n\n1. Import libraries as follows:\n\n``` swift\nimport ARVoxelKit\nimport ARKit\nimport SceneKit\n```\n\n2. Setup your ARSCNView with VKSceneManager manager in you ViewContoller:\n\n``` swift\nvar sceneManager: VKSceneManager?\n\n@IBOutlet open var sceneView: ARSCNView! {\n    didSet { sceneManager = VKSceneManager(with: sceneView) }\n}\n\noverride open func viewDidLoad() {\n    super.viewDidLoad()\n    sceneManager.delegate = self\n}\n\noverride open func viewDidAppear(_ animated: Bool) {\n    super.viewDidAppear(animated)\n    sceneManager?.launchSession()\n}\n\noverride open func viewWillDisappear(_ animated: Bool) {\n    super.viewWillDisappear(animated)\n    sceneManager?.pauseSession()\n}\n```\n3. Conform your delegate instance to VKSceneManagerDelegate:\n\n``` swift\npublic protocol VKSceneManagerDelegate: class {\n    var voxelSize: CGFloat { get }\n    \n    func vkSceneManager(_ manager: VKSceneManager, shouldResetSessionFor state: VKARSessionState) -\u003e Bool\n    func vkSceneManager(_ manager: VKSceneManager, didUpdateState state: VKARSessionState)\n    func vkSceneManager(_ manager: VKSceneManager, didFocus node: VKDisplayable, face: VKVoxelFace)\n    func vkSceneManager(_ manager: VKSceneManager, didDefocus node: VKDisplayable?)\n    func vkSceneManager(_ manager: VKSceneManager, countOfVoxelsIn scene: ARSCNView) -\u003e Int\n    func vkSceneManager(_ manager: VKSceneManager, voxelFor index: Int) -\u003e VKVoxelNode\n}\n```\n\n4. You can add/remove voxels by calling manager methods:\n``` swift\npublic func add(new voxel: VKVoxelNode)\npublic func add(new voxel: VKVoxelNode, to otherVoxel: VKVoxelNode, face: VKVoxelFace)\npublic func add(new voxel: VKVoxelNode, to tile: VKTileNode)\npublic func remove(_ voxel: VKVoxelNode)\n```\n\n5. Edit surfaces, tiles, voxels using paint command: \n``` swift\npublic enum VKPaintCommand {\n    \n    case color(content: UIColor)\n    case faceColor(content: UIColor, face: VKVoxelFace)\n    case colors(contents: [UIColor])\n    \n    case image(content: UIImage)\n    case faceImage(content: UIImage, face: VKVoxelFace)\n    case images(contents: [UIImage])\n    \n    case gradient(contents: [UIColor], start: CGPoint, end: CGPoint)\n    case faceGradient(contents: [UIColor], start: CGPoint, end: CGPoint, face: VKVoxelFace)\n    \n    case transparency(value: CGFloat)\n    case faceTransparency(value: CGFloat, face: VKVoxelFace)\n}\n```\nfor example:\n``` swift\nvoxel.apply([.color(content: VKConstants.defaultFaceColor),\n             .transparency(value: 1)], animated: true)\n```\n6. Change default setup by changing VKConstants values\n\n## Example\n\nCheck our example by running ARVoxelKitExample target\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVoxxxelAR%2FARVoxelKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVoxxxelAR%2FARVoxelKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVoxxxelAR%2FARVoxelKit/lists"}