   init: ->
     @bind 'Draw', @_drawGradient
     if @has 'WebGL'
-      @_establishShader 'Gradient',
+      @_establishShader "Gradient",
         GRADIENT_FRAGMENT_SHADER,
         GRADIENT_VERTEX_SHADER,
         GRADIENT_ATTRIBUTE_LIST

    @_setColor(@_bottomColor, arguments...)

  _setColor: (varColor, color) ->
    if arguments.length >= 3
      varColor._red = arguments[0]
      varColor._green = arguments[1]
      varColor._blue = arguments[2]
      varColor._strength = arguments[3] if typeof arguments[3] is 'number'
    else
      # First argument is color name
      Crafty.assignColor(color, varColor)
      # Second argument, if present, is strength of color
      # Note that assignColor will give a default strength of 1.0 if none exists.
      varColor._strength = arguments[1] if typeof arguments[1] is 'number'

    @trigger 'Invalidate'
    this

    pos = entityRotationMatrix * (pos - entityOrigin) + entityOrigin;
    gl_Position = viewportScale * (viewportTranslation + vec4(pos, 1.0/(1.0+exp(aLayer.x) ), 1) );

    vColor = aColor;
    vLayer = aLayer;
  }
"""

GRADIENT_FRAGMENT_SHADER = """
  precision mediump float;
  varying lowp vec4 vColor;
  varying lowp vec2 vLayer;
  void main(void) {
    gl_FragColor = vec4(vColor.rgb*vColor.a*vLayer.y, vColor.a*vLayer.y);
  }
"""

