Sha256: 1553c9ec4a41400edf9ed888e6c8277af50b61a29d7a22811654ce09449be55e

Contents?: true

Size: 689 Bytes

Versions: 1

Compression:

Stored size: 689 Bytes

Contents

<%= javascript_object %> = (processing) ->
  for __sym of processing when eval("typeof #{__sym} === 'undefined'")
    if typeof processing[__sym] == 'function'
      eval "var #{__sym} = function() { return processing.#{__sym}.apply(processing, arguments) }"
    else
      eval "var #{__sym} = function() { return processing.#{__sym} }"
  null

  <%= code %>

  for callback in [
    'setup',
    'draw',
    'mouseClicked',
    'mouseDragged',
    'mouseMoved',
    'mouseOut',
    'mouseOver',
    'mousePressed',
    'mouseReleased',
    'keyPressed',
    'keyReleased',
    'keyTyped'
  ] when !eval("typeof #{__sym} === 'undefined'")
    eval "processing.#{callback} = #{callback}"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coffee-processing-0.0.1 lib/coffee-processing/boilerplate.coffee.erb