   @param {Number} [duration=12] How long the effect lasts
   @param {Number} [targetAlpha=0] The alpha value to fade to. By default, this is set to 0, which fades the color to transparent.
   ###
-  flash: (color = 'white', duration = 12, targetAlpha = 0) ->
+  flash: (options={}) ->
+    Object.reverseMerge(options, defaultParams)
+
+    {color, duration, targetAlpha} = options
+
     I.flashColor = Color(color) 
     I.flashTargetAlpha = targetAlpha
     I.flashCooldown = duration
     I.flashDuration = duration
 
+    self
+

  camera.flash()
  # => Sets the flash effect variables to their default state. This will cause a white flash that will turn transparent in the next 12 frames.

  camera.flash('green', 30)
  # => This flash effect will start off green and fade to transparent over 30 frames.

  camera.flash(Color(255, 0, 0, 0), 20, 1)
  # => This flash effect will start off transparent and move toward red over 20 frames 
  </pre></code>  


    flashDuration: 12
    flashCooldown: 0
    flashTargetAlpha: 0

  defaultParams =
    color: 'white'
    duration: 12
    targetAlpha: 0

  self.bind 'afterUpdate', ->
    if I.flashCooldown > 0
