MetalScope icon indicating copy to clipboard operation
MetalScope copied to clipboard

Added move types

Open Allui opened this issue 7 years ago • 2 comments

Added feature: Three movement mode of panorama

touch motion all (touch and motion) Example "MonoImage" changed for demonstrate new feature.

(I accidentally broke the old pull request while doing the rebase, so I made a new one. D:)

Allui avatar Sep 28 '17 04:09 Allui

Hi @Allui,

Thanks for your PR!

We are also considering features like movement mode for PanoramaView.

In your code, you defined enum PanoramaMoveType as a single value to toggle rotation methods. However, if specify them all at once, every associated parts are updated every time, which is slightly inconvenient for thread-safe implementation.

How about implementing this feature as separated variables like this? (#34)

// PanoramaView.swift

public var isDeviceMotionEnabled: Bool { get set }

public var isPanGestureEnabled: Bool { get set }

junpluse avatar Oct 01 '17 15:10 junpluse

Hi @junpluse,

This (#34) solution is better, but how to reset camera position to zero, when changing movement mode on the fly?

For this i made:

// OrientationNode.swift

public func fullyResetRotation() {
         userRotationNode.transform = SCNMatrix4Identity
         referenceRotationNode.transform = SCNMatrix4Identity
         deviceOrientationNode.transform = SCNMatrix4Identity
 }

Allui avatar Oct 06 '17 05:10 Allui