         
         let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(handlePan(recognizer:)))
         self.floatingWidget.addGestureRecognizer(panGestureRecognizer)
+        
+        self.view.backgroundColor = UIColor.clear
     }
+    
+    // MARK: - Public
+    
+    func updateSpeed(speed: Double) {
+        self.floatingWidget?.speed = speed
+    }
+    
+    // MARK: - Actions
     
     @objc private func handlePan(recognizer: UIPanGestureRecognizer) {
         let location = recognizer.location(in: self.view)

    private var collisionBehavior: UICollisionBehavior!
    private var animator: UIDynamicAnimator!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.floatingWidget = FloatingSpeedWidget(size: CGSize(width: 80, height: 80), anchorPoint: .bottomLeft)
        self.view.addSubview(self.floatingWidget)
        
        self.animator = UIDynamicAnimator(referenceView: self.view)
        
        self.collisionBehavior = UICollisionBehavior(items: [self.floatingWidget])

            self.snapBehavior.damping = 0.4
            self.animator.addBehavior(self.snapBehavior)
        }
    }
}

