Open turk-jk opened 7 years ago
Hi @turk-jk,
I'm really sorry for the late reply 🙇
For presenting eye (sight) indicator, use OrientationIndicatorView
in MetalScope.
First, add new OrientationIndicatorView
to your view.
let indicator = OrientationIndicatorView(frame: CGRect(x: 0, y: 0, width: 48, height: 48))
indicator.dataSource = panoramaView
view.addSubview(indicator)
Then update OrientationIndicatorView
every frame. Using SCNSceneDelegate
is the easiest way.
extension ViewController: SCNSceneRendererDelegate {
func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {
// please make sure to update the indicator on main thread
DispatchQueue.main.async { [weak self] in
self?.orientationIndicator?.updateOrientation()
}
}
}
how to show the eyeView indictor that we can see at the Top.Right of the GIF you included in the README
amazing work. thanks