CK3DCamera
public final class CK3DCamera
CK3DCamera manages the cameras in CKScene and the user point of view.
-
Change the current point of view for another camera.
Attention
Fire an alert if no data was found for given camera name.
Declaration
Swift
public func change(to: String)Parameters
toThe new point of view camera name. (ex:
main
) -
Reset the user point of view to current camera default data.
Declaration
Swift
public func reset() -
Move the camera by given user screen pan velocity.
Declaration
Swift
public func move(velocity: CGPoint) -
Translate the camera by given user screen pan velocity.
Declaration
Swift
public func translate(location: CGPoint) -
Zoom the camera by given user screen pinch velocity.
Declaration
Swift
public func zoom(velocity: CGFloat)
-
Enable an action on the current camera pivot node.
Declaration
Swift
public func startAction(_ action: SCNAction, _ name: String = "current")Parameters
actionThe SCNAction to start on camera node.
nameThe SCNAction name to attach with.
-
Disable an action on the current camera pivot node
Declaration
Swift
public func stopAction(_ name: String = "current")Parameters
nameThe SCNAction name to disable.
-
Start an repeated idle action. (rotate around y axis)
Declaration
Swift
public func startIdleAnimation(_ duration: TimeInterval = 60)Parameters
durationThe complete revolution time of the revolution.
-
Stop the idle action. (rotate around y axis)
Declaration
Swift
public func stopIdleAnimation()
CK3DCamera Class Reference