Jshinted code

also tweaked BaseTexture.fromCanvas function