Last active
August 29, 2015 14:26
-
-
Save jonongjs/9cb0b5601904ac373e3d to your computer and use it in GitHub Desktop.
Getting started with Heaps
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
<html> | |
<head><meta charset="utf-8"/><title>Getting started with Heaps</title></head> | |
<body style="margin:0;padding:0;background-color:black"> | |
<canvas id="webgl" style="width:640px;height:480px"></canvas> | |
<script type="text/javascript" src="main.js"></script> | |
</body> | |
</html> |
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
class Main extends hxd.App { | |
var bmp : h2d.Bitmap; | |
override function init() { | |
var tile = h2d.Tile.fromColor(0xFF0000, 100, 100); | |
bmp = new h2d.Bitmap(tile, s2d); | |
bmp.x = s2d.width * 0.5; | |
bmp.y = s2d.height * 0.5; | |
} | |
override function update(dt:Float) { | |
bmp.rotation += 0.1; | |
} | |
static function main() { | |
new Main(); | |
} | |
} |
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
-js main.js | |
-main Main | |
-lib heaps | |
-dce full | |
--next | |
-swf main.swf | |
-swf-header 640:480:60:FFFFFF | |
--flash-strict | |
-swf-version 11.8 | |
-main Main | |
-lib heaps | |
-dce full |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment