Source Code for TimeForCube sample

Hello!

There was demonstrated TimeForCube sample in WWDC2023 session "Meet ARKit for spatial computing". It's great video-session to start, nevertheless there is no full source code and some important details have been left behind the scene. For example there is no code for createFingertip() method and so on...

Where we can get full TimeForCube XCode project?

Thanks!

Replies

I'd be happy to get access to that source code, as well.

Having said that, it won't be of great use unless you also have access to a device, since most parts of ARKit are currently unavailable in the visionOS simulator.

.createFingertip() is just creating a sphere like this:

import Foundation
import RealityKit
extension ModelEntity {
    class func createFingertip() -> ModelEntity {
        let entity = ModelEntity(mesh: .generateSphere(radius: 0.005), materials: [UnlitMaterial(color: .random())], collisionShape: .generateSphere(radius: 0.005), mass: 0.0)
       // entity.components.set(PhysicsBodyComponent(mode: .kinematic))
        return entity
    }
}

Here's my version. Still not testable on the Simulator: https://github.com/timmitra/TimeForCube