This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e2d = require('e2d'); | |
var r = e2d.Renderer.create(400, 400); | |
r.ready(); | |
r.on('frame', function() { | |
return r.render( | |
e2d.clearRect(400, 400), | |
e2d.fillRect(0, 0, 400, 400) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e2d = require('e2d'); | |
var r = e2d.Renderer.create(800, 600); | |
var dk = new e2d.Img(); | |
dk.src = 'http://archive.kontek.net/smashbros.planets.gamespy.com/images2/ssbmdonkeykong6.jpg'; | |
dk.on('load', function() { r.ready() }); | |
var frame = -1, | |
clickFrame = 0, | |
lastMouseState = 'up'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import ast | |
def _args_from_usage_string_ast(s): | |
tree = ast.parse(s) | |
ast_args = tree.body[0].value.args | |
args = [s[arg.col_offset:arg.end_col_offset] for arg in ast_args] | |
return args | |