CandleAnimationConfig

@objcMembers
@objc(GSCandleAnimationConfig)
public class CandleAnimationConfig : NSObject, AnimationConfig

Candle 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 after having flown towards its target, 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 if with(speed:) has never been called.

    Declaration

    Swift

    public private(set) var speed: Double? {
      get
      }
  • Custom vertical distance, in meters. Value is nil if with(verticalDistance:) has never been called.

    Declaration

    Swift

    public private(set) var verticalDistance: Double? {
      get
      }
  • Custom execution mode. Value is nil if with(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) -> CandleAnimationConfig

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

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

    Parameters

    mode

    custom execution mode

    Return Value

    self, to allow call chaining