Gaze

public class Gaze : ObservableObject

The Gaze class provides a stream of gaze data directly from Skyle.

  • A reference to the current client, which represents the gRPC connection. This is automatically updated by ET when a new connection is established.

    Declaration

    Swift

    internal var client: Skyle_SkyleNIOClient?
  • Internal empty constructor

    Declaration

    Swift

    internal init()
  • Internal constructor passing a possible client

    Declaration

    Swift

    internal init(_ client: Skyle_SkyleNIOClient?)
  • The state property exposes a Publisher which indicates the state of the stream of gaze data.

    Declaration

    Swift

    @Published
    private(set) public var state: States { get set }
  • The point property exposes a Publisher which indicates the point of gaze.

    Declaration

    Swift

    @Published
    private(set) public var point: Point { get set }
  • Simple cleanup stops the gRPC call by killing it.

    Declaration

    Swift

    deinit
  • Starts a gaze stream asyncronously, updating the state and point properties.

    Declaration

    Swift

    public func start()
  • Stops a gaze stream asyncronously, updating the state property.

    Declaration

    Swift

    public func stop()