ARVoxelKit
Voxel graphics framework using ARKit + SceneKit
Install / Use
/learn @VoxxxelAR/ARVoxelKitREADME
ARVoxelKit
Lightweight Framework for Voxel graphic using AR + SceneKit

Requirements
ARVoxelKit requires iOS 11 and devices, which support ARKit
Usage
- Import libraries as follows:
import ARVoxelKit
import ARKit
import SceneKit
- Setup your ARSCNView with VKSceneManager manager in you ViewContoller:
var sceneManager: VKSceneManager?
@IBOutlet open var sceneView: ARSCNView! {
didSet { sceneManager = VKSceneManager(with: sceneView) }
}
override open func viewDidLoad() {
super.viewDidLoad()
sceneManager.delegate = self
}
override open func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
sceneManager?.launchSession()
}
override open func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
sceneManager?.pauseSession()
}
- Conform your delegate instance to VKSceneManagerDelegate:
public protocol VKSceneManagerDelegate: class {
var voxelSize: CGFloat { get }
func vkSceneManager(_ manager: VKSceneManager, shouldResetSessionFor state: VKARSessionState) -> Bool
func vkSceneManager(_ manager: VKSceneManager, didUpdateState state: VKARSessionState)
func vkSceneManager(_ manager: VKSceneManager, didFocus node: VKDisplayable, face: VKVoxelFace)
func vkSceneManager(_ manager: VKSceneManager, didDefocus node: VKDisplayable?)
func vkSceneManager(_ manager: VKSceneManager, countOfVoxelsIn scene: ARSCNView) -> Int
func vkSceneManager(_ manager: VKSceneManager, voxelFor index: Int) -> VKVoxelNode
}
- You can add/remove voxels by calling manager methods:
public func add(new voxel: VKVoxelNode)
public func add(new voxel: VKVoxelNode, to otherVoxel: VKVoxelNode, face: VKVoxelFace)
public func add(new voxel: VKVoxelNode, to tile: VKTileNode)
public func remove(_ voxel: VKVoxelNode)
- Edit surfaces, tiles, voxels using paint command:
public enum VKPaintCommand {
case color(content: UIColor)
case faceColor(content: UIColor, face: VKVoxelFace)
case colors(contents: [UIColor])
case image(content: UIImage)
case faceImage(content: UIImage, face: VKVoxelFace)
case images(contents: [UIImage])
case gradient(contents: [UIColor], start: CGPoint, end: CGPoint)
case faceGradient(contents: [UIColor], start: CGPoint, end: CGPoint, face: VKVoxelFace)
case transparency(value: CGFloat)
case faceTransparency(value: CGFloat, face: VKVoxelFace)
}
for example:
voxel.apply([.color(content: VKConstants.defaultFaceColor),
.transparency(value: 1)], animated: true)
- Change default setup by changing VKConstants values
Example
Check our example by running ARVoxelKitExample target
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
