Sha256: f1667396064553bcda096e2c693241eec0ca94949e82000db1ced9f7bf69c2d3
Contents?: true
Size: 1.57 KB
Versions: 1
Compression:
Stored size: 1.57 KB
Contents
<%= javascript_object %> = new Processing.Sketch (__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} }" for __const of __processing.PConstants eval "var #{__const} = __processing.PConstants.#{__const}" for __sym in ['ArrayList', 'HashMap', 'PVector', 'ObjectIterator', 'PConstants'] eval "var #{__sym} = __processing.#{__sym}" processing = __processing <%= code %> __inject = -> for callback in [ 'setup', 'draw', 'mouseClicked', 'mouseDragged', 'mouseMoved', 'mouseOut', 'mouseOver', 'mousePressed', 'mouseReleased', 'keyPressed', 'keyReleased', 'keyTyped' ] when !eval("typeof #{__sym} === 'undefined'") eval "__processing.#{callback} = #{callback}" __polling = -> interval = 100 if __processing.externals.sketch.imageCache.pending or __processing.PFont.preloading.pending(interval) window.setTimeout __polling, interval else __inject() setup() if setup? if preload? if preload.fonts? for __font in preload.fonts __processing.PFont.preloading.add __font if preload.images? for __image in preload.images __processing.externals.sketch.imageCache.add __image __processing.setup = -> __polling() __processing.draw = -> null else __inject()
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
coffee-processing-0.0.6 | lib/coffee-processing/boilerplate.coffee.erb |