drawEyes :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()
drawEyes c@(Context c') x y w h mx my t = do
  bg <- linearGradient c x (y+h*0.5) (x+w*0.1) (y+h) (rgba 0 0 0 32) (rgba 0 0 0 16)
  beginPath c
  ellipse c (lx+3) (ly+16) ex ey
  ellipse c (rx+3) (ry+16) ex ey
  fillPaint c bg
  fill c

  bg <- linearGradient c x (y+h*0.25) (x+w*0.1) (y+h) (rgba 220 220 220 255) (rgba 128 128 128 255)
  beginPath c
  ellipse c lx ly ex ey
  ellipse c rx ry ex ey
  fillPaint c bg
  fill c
  
  let dx' = (mx - rx) / (ex * 10)
      dy' = (my - ry) / (ey * 10)
      d = sqrt (dx'*dx'+dy'*dy')
      dx'' = if d > 1 then dx'/d else dx'
      dy'' = if d > 1 then dy'/d else dy'
      dx = dx'' * ex * 0.4
      dy = dy'' * ey * 0.5
  beginPath c
  ellipse c (lx+dx) (ly+dy+ey*0.25*(1-blink)) br (br*blink)
  fillColor c (rgba 32 32 32 255)
  fill c

  let dx'' = (mx - rx) / (ex * 10)
      dy'' = (my - ry) / (ey * 10)
      d = sqrt (dx'' * dx'' + dy'' * dy'')
      dx' = if d > 1 then dx'' / d else dx''
      dy' = if d > 1 then dy'' / d else dy''
      dx = dx' * ex * 0.4
      dy = dy' * ey * 0.5
  beginPath c
  ellipse c (rx+dx) (ry+dy+ey*0.25*(1-blink)) br (br*blink)
  fillColor c (rgba 32 32 32 255)
  fill c

  gloss <- radialGradient c (lx-ex*0.25) (ly-ey*0.5) (ex*0.1) (ex*0.75) (rgba 255 255 255 128) (rgba 255 255 255 0)
  beginPath c
  ellipse c lx ly ex ey
  fillPaint c gloss
  fill c

  gloss <- radialGradient c (rx-ex*0.25) (ry-ey*0.5) (ex*0.1) (ex*0.75) (rgba 255 255 255 128) (rgba 255 255 255 0)
  beginPath c
  ellipse c rx ry ex ey
  fillPaint c gloss
  fill c
  where ex = w * 0.23
        ey = h * 0.5
        lx = x + ex
        ly = y + ey
        rx = x + w - ex
        ry = y + ey
        br = 0.5 * min ex ey
        blink = 1 - ((sin (t*0.5))**200)*0.8
drawEyes :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()
drawEyes c@(Context c') x y w h mx my t = do
  bg <- linearGradient c x (y+h*0.5) (x+w*0.1) (y+h) (rgba 0 0 0 32) (rgba 0 0 0 16)
  beginPath c
  ellipse c (lx+3) (ly+16) ex ey
  ellipse c (rx+3) (ry+16) ex ey
  fillPaint c bg
  fill c

  bg <- linearGradient c x (y+h*0.25) (x+w*0.1) (y+h) (rgba 220 220 220 255) (rgba 128 128 128 255)
  beginPath c
  ellipse c lx ly ex ey
  ellipse c rx ry ex ey
  fillPaint c bg
  fill c
  
  let dx' = (mx - rx) / (ex * 10)
      dy' = (my - ry) / (ey * 10)
      d = sqrt (dx'*dx'+dy'*dy')
      dx'' = if d > 1 then dx'/d else dx'
      dy'' = if d > 1 then dy'/d else dy'
      dx = dx'' * ex * 0.4
      dy = dy'' * ey * 0.5
  beginPath c
  ellipse c (lx+dx) (ly+dy+ey*0.25*(1-blink)) br (br*blink)
  fillColor c (rgba 32 32 32 255)
  fill c

  let dx'' = (mx - rx) / (ex * 10)
      dy'' = (my - ry) / (ey * 10)
      d = sqrt (dx'' * dx'' + dy'' * dy'')
      dx' = if d > 1 then dx'' / d else dx''
      dy' = if d > 1 then dy'' / d else dy''
      dx = dx' * ex * 0.4
      dy = dy' * ey * 0.5
  beginPath c
  ellipse c (rx+dx) (ry+dy+ey*0.25*(1-blink)) br (br*blink)
  fillColor c (rgba 32 32 32 255)
  fill c

  gloss <- radialGradient c (lx-ex*0.25) (ly-ey*0.5) (ex*0.1) (ex*0.75) (rgba 255 255 255 128) (rgba 255 255 255 0)
  beginPath c
  ellipse c lx ly ex ey
  fillPaint c gloss
  fill c

  gloss <- radialGradient c (rx-ex*0.25) (ry-ey*0.5) (ex*0.1) (ex*0.75) (rgba 255 255 255 128) (rgba 255 255 255 0)
  beginPath c
  ellipse c rx ry ex ey
  fillPaint c gloss
  fill c
  where ex = w * 0.23
        ey = h * 0.5
        lx = x + ex
        ly = y + ey
        rx = x + w - ex
        ry = y + ey
        br = 0.5 * min ex ey
        blink = 1 - ((sin (t*0.5))**200)*0.8
drawEyes c@(Context c') x y w h mx my t = do
  bg <- linearGradient c x (y+h*0.5) (x+w*0.1) (y+h) (rgba 0 0 0 32) (rgba 0 0 0 16)
  beginPath c
  ellipse c (lx+3) (ly+16) ex ey
  ellipse c (rx+3) (ry+16) ex ey
  fillPaint c bg
  fill c

  bg <- linearGradient c x (y+h*0.25) (x+w*0.1) (y+h) (rgba 220 220 220 255) (rgba 128 128 128 255)
  beginPath c
  ellipse c lx ly ex ey
  ellipse c rx ry ex ey
  fillPaint c bg
  fill c
  
  let dx' = (mx - rx) / (ex * 10)
      dy' = (my - ry) / (ey * 10)
      d = sqrt (dx'*dx'+dy'*dy')
      dx'' = if d > 1 then dx'/d else dx'
      dy'' = if d > 1 then dy'/d else dy'
      dx = dx'' * ex * 0.4
      dy = dy'' * ey * 0.5
  beginPath c
  ellipse c (lx+dx) (ly+dy+ey*0.25*(1-blink)) br (br*blink)
  fillColor c (rgba 32 32 32 255)
  fill c

  let dx'' = (mx - rx) / (ex * 10)
      dy'' = (my - ry) / (ey * 10)
      d = sqrt (dx'' * dx'' + dy'' * dy'')
      dx' = if d > 1 then dx'' / d else dx''
      dy' = if d > 1 then dy'' / d else dy''
      dx = dx' * ex * 0.4
      dy = dy' * ey * 0.5
  beginPath c
  ellipse c (rx+dx) (ry+dy+ey*0.25*(1-blink)) br (br*blink)
  fillColor c (rgba 32 32 32 255)
  fill c

  gloss <- radialGradient c (lx-ex*0.25) (ly-ey*0.5) (ex*0.1) (ex*0.75) (rgba 255 255 255 128) (rgba 255 255 255 0)
  beginPath c
  ellipse c lx ly ex ey
  fillPaint c gloss
  fill c

  gloss <- radialGradient c (rx-ex*0.25) (ry-ey*0.5) (ex*0.1) (ex*0.75) (rgba 255 255 255 128) (rgba 255 255 255 0)
  beginPath c
  ellipse c rx ry ex ey
  fillPaint c gloss
  fill c
  where ex = w * 0.23
        ey = h * 0.5
        lx = x + ex
        ly = y + ey
        rx = x + w - ex
        ry = y + ey
        br = 0.5 * min ex ey
        blink = 1 - ((sin (t*0.5))**200)*0.8