Skip to content
dhg-applabPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

FTKit

A package to enable face tracking by using Apple's ARKit.

This package exposes the blendShapes, lookAtPoint, lightEstimate, depthmap, and distanceToScreen

Starting the face tracking can be done either by using the UIKit/SwiftUI view and run FTKit.shared.start() or hidden on a host view (most top view controller) by running FTKit.shared.start(hiddenOnView:).

Setup

NSCameraUsageDescription needs to be set in the the host app

TopViewController Extension

extension UIApplication {
    func topMostViewController() -> UIViewController? {
        let keyWindow = UIApplication.shared.windows.filter {$0.isKeyWindow}.first
        
        if var topController = keyWindow?.rootViewController {
            while let presentedViewController = topController.presentedViewController {
                topController = presentedViewController
            }
            return topController
        }
        return nil
    }
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages