                 ani.fillMode = kCAFillModeBoth
                 loopLayer.add(ani, forKey: "transform")
             case "wiggle":
-                let delta = valueFrom(animation, key: "delta", defaultValue: 15) * CGFloat(M_PI / 180.0)
+                let delta = value(from: animation, key: "delta", defaultValue: 15) * CGFloat(M_PI / 180.0)
                 let ani = CAKeyframeAnimation(keyPath: "transform")
                 ani.values = [NSValue(caTransform3D:loopLayer.transform),
                               NSValue(caTransform3D:CATransform3DConcat(CATransform3DMakeRotation(delta, 0.0, 0.0, 1.0), loopLayer.transform)),

                ani.fillMode = kCAFillModeBoth
                loopLayer.add(ani, forKey: "opacity")
            case "spin":
                let fClockwise = booleanValueFrom(animation, key: "clockwise", defaultValue: true)
                let degree = (fClockwise ? 120 : -120) * CGFloat(M_PI / 180.0)
                let ani = CAKeyframeAnimation(keyPath: "transform")
                ani.values = [NSValue(caTransform3D:loopLayer.transform),

                start = 1e-10
                duration = 1.0
            }
            let repeatCount = Float(value(from: animation, key: "count", defaultValue: 1))
        
            switch(style) {
            case "vibrate":
                let delta = value(from: animation, key: "delta", defaultValue: 10.0)
                let ani = CAKeyframeAnimation(keyPath: "transform")
                ani.values = [NSValue(caTransform3D:loopLayer.transform),
                              NSValue(caTransform3D:CATransform3DConcat(CATransform3DMakeTranslation(delta, 0.0, 0.0), loopLayer.transform)),
