ParabolaAnimationConfig
@objcMembers
@objc(GSParabolaAnimationConfig)
public class ParabolaAnimationConfig : NSObject, AnimationConfig
Parabola animation configuration class.
Allows to configure the following parameters for this animation:
- speed: animation execution speed, in meters per second. If
with(speed:)
is not customized, then the drone will apply its own default value for this parameter. - vertical distance: distance the drone will fly up to reach the top point of the parabola, in meters.
If
with(verticalDistance:)
is not customized, then the drone will apply its own default value for this parameter. - mode: animation execution mode. If
with(mode:)
is not customized, then the drone will apply its own default value for this parameter:.once
.
-
Declaration
Swift
public let type: AnimationType
-
Custom speed, in meters per second. Value is
nil
ifwith(speed:)
has never been called.Declaration
Swift
public private(set) var speed: Double? { get }
-
Custom vertical distance, in meters. Value is
nil
ifwith(verticalDistance:)
has never been called.Declaration
Swift
public private(set) var verticalDistance: Double? { get }
-
Custom execution mode. Value is
nil
ifwith(mode:)
has never been called.Declaration
Swift
public private(set) var mode: AnimationMode? { get }
-
Configures a custom animation speed.
Declaration
Swift
@discardableResult public func with(speed: Double) -> ParabolaAnimationConfig
Parameters
speed
custom animation speed, in meters per second
Return Value
self, to allow call chaining
-
Configures a custom animation vertical distance.
Declaration
Swift
@discardableResult public func with(verticalDistance: Double) -> ParabolaAnimationConfig
Parameters
verticalDistance
custom vertical distance, in meters
Return Value
self, to allow call chaining
-
Configures a custom animation execution mode.
Declaration
Swift
@discardableResult public func with(mode: AnimationMode) -> ParabolaAnimationConfig
Parameters
mode
custom execution mode
Return Value
self, to allow call chaining
-
true
whenwith(mode:)
has been called once. ObjC-only api. In Swift, usemode
.Declaration
Swift
public var modeIsCustom: Bool { get }
-
Custom mode. Value is meaningless if
modeIsCustom
isfalse
. ObjC-only api. In Swift, usemode
.Declaration
Swift
public var customMode: AnimationMode { get }