EyeTracker 0.2.0

EyeTracker 0.2.0

Maintained by iceman.



EyeTracker

Language Carthage compatible CocoaPods compatible

Track gazing position 👀 with ARKit

Usage

See EyeTrackerSample for more details.

private let eyeTracker = EyeTracker()

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)

    if EyeTracker.isSupported {
        eyeTracker.delegate = self
        eyeTracker.start()
    }
}

// MARK: - EyeTrackerDelegate

func eyeTracker(_ eyeTracker: EyeTracker, didUpdateTrackingState state: EyeTracker.TrackingState) {
    switch state {
    case let .screenIn(screenPos):
        // ...
    case let .screenOut(edge, screenPos):
        // ...
    case .notTracked:
        // ...
    case .pausing:
        // ...
    }
}

Installation

CocoaPods

You can use CocoaPods to install EyeTracker by adding it to your Podfile:

platform :ios, '11.0'
use_frameworks!
pod 'EyeTracker'

Carthage

Create a Cartfile that lists the framework and run carthage bootstrap. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/YourLibrary.framework to an iOS project.

github "sidepelican/EyeTracker"

License

MIT