Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Added move types #33

Closed
wants to merge 1 commit into from
Closed

Added move types #33

wants to merge 1 commit into from

Conversation

Allui
Copy link

@Allui Allui commented Sep 28, 2017

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:)

@junpluse
Copy link
Collaborator

junpluse commented Oct 1, 2017

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 }

@Allui
Copy link
Author

Allui commented Oct 6, 2017

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
 }

@mintrocket mintrocket closed this by deleting the head repository Jul 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants