Skip to content

Instantly share code, notes, and snippets.

View RayHughes's full-sized avatar

Ray Hughes RayHughes

View GitHub Profile
@RayHughes
RayHughes / SKTexture gradient extension
Last active October 6, 2016 20:42 — forked from craiggrummitt/SKTexture gradient extension
SKTexture gradient extension
/**
Extensions.swift
- Create a linear gradient texture for a SKShapeNode and SKSpriteNode
- UIColor from hex value
- Get (n)th character of a string
- Convert string to float
Based on Extensions.swift by Craig Grummit (https://gist.github.com/craiggrummitt/ad855e358004b5480960)
Swift 2 Compatability by Ray Hughes (https://gist.github.com/RayHughes/3162fcbda6439893b539)