Last active
March 16, 2016 17:44
-
-
Save johnnycrich/38551e5d6ec311f225eb to your computer and use it in GitHub Desktop.
This file contains 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 $asm00 = JSIL.GetAssembly("48eadcc1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); | |
var $asm01 = JSIL.GetAssembly("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); | |
var $sig = new JSIL.MethodSignatureCache(); | |
/* Generated by JSIL v0.5.1 build 27572. See http://jsil.org/ for more information. */ | |
var $asm00 = JSIL.DeclareAssembly("48eadcc1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); | |
JSIL.MakeStaticClass("Program", true, [], function ($) { | |
$.Method({Static:true , Public:true }, "Main", | |
$sig.make(31929, null, [], []), | |
function Program_Main () { | |
var $lMain$gc__AnonStorey = new $asm00.Program_$lMain$gc__AnonStorey0(); | |
var document = JSIL.GlobalNamespace.document; | |
var window = JSIL.GlobalNamespace.window; | |
var canvas = document.createElement("canvas"); | |
var arg_E4_0 = $lMain$gc__AnonStorey; | |
arg_E4_0.ctx = canvas.getContext("2d"); | |
var body = document.getElementsByTagName("body")[0]; | |
$asm01.System.Console.WriteLine("Hello JSIL World!"); | |
body.appendChild(canvas); | |
window.setInterval(function () { | |
$asm00.Program.Redraw(this.ctx); | |
}.bind($lMain$gc__AnonStorey), 60); | |
} | |
); | |
$.Method({Static:true , Public:true }, "Redraw", | |
$sig.make(31930, null, [$.Object], []), | |
function Program_Redraw (ctx) { | |
$asm00.Program.x *= 2; | |
ctx.clearRect(0, 0, 300, 300); | |
ctx.fillStyle = "blue"; | |
ctx.fillRect($asm00.Program.x, $asm00.Program.y, 20, 20); | |
} | |
); | |
$.Field({Static:true , Public:true }, "x", $.Int32, 10); | |
$.Field({Static:true , Public:true }, "y", $.Int32, 20); | |
$.Method({Static:true , Public:false}, ".cctor", | |
$sig.make(31928, null, [], []), | |
function Program__cctor () { | |
$asm00.Program.x = 10; | |
$asm00.Program.y = 20; | |
} | |
); | |
}); | |
JSIL.MakeClass($asm01.TypeRef("System.Object"), "Program/<Main>c__AnonStorey0", false, [], function ($) { | |
$.Method({Static:false, Public:true }, ".ctor", | |
$sig.make(38658, null, [], []), | |
function $lMain$gc__AnonStorey0__ctor () { | |
} | |
); | |
$.Method({Static:false, Public:false}, "$l$gm__0", | |
$sig.make(38659, null, [], []), | |
function $lMain$gc__AnonStorey0_$l$gm__0 () { | |
$asm00.Program.Redraw(this.ctx); | |
} | |
); | |
$.Field({Static:false, Public:false}, "ctx", $.Object); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment