 		let image = context.createCGImage(filter!.outputImage!, from: CGRect(x: 0, y: 0, width: size.width, height: size.height))
 		self.init(cgImage: image!)
 	}
+	
 }

import SpriteKit

public enum GradientDirection {
	case Up
	case Left
	case UpLeft
	case UpRight
}

public extension SKTexture {
	
	convenience init(size: CGSize, color1: CIColor, color2: CIColor, direction: GradientDirection = .Up) {
		
		let context = CIContext(options: nil)
		let filter = CIFilter(name: "CILinearGradient")

		filter!.setDefaults()
		
		switch direction {
			case .up:
				startVector = CIVector(x: size.width * 0.5, y: 0)
				endVector = CIVector(x: size.width * 0.5, y: size.height)
			case .left:
				startVector = CIVector(x: size.width, y: size.height * 0.5)
				endVector = CIVector(x: 0, y: size.height * 0.5)
			case .upLeft:
				startVector = CIVector(x: size.width, y: 0)
				endVector = CIVector(x: 0, y: size.height)
			case .upRight:
				startVector = CIVector(x: 0, y: 0)
				endVector = CIVector(x: size.width, y: size.height)
		}
