Drawing gradients in SpriteKit

I was working on an upcoming game in SpriteKit only to discover that adding a simple gradient is not so straight-forward as one would expect. Therefore I created an extension to SKTexture. https://gist.github.com/laevandus/c38a8b9e958ef68c6730025f6b4cc7f4 This extension adds support for creating linear and radial gradients. Linear gradient can be drawn with an angle (in radians) although in …