Skip to content

Instantly share code, notes, and snippets.

@jonongjs
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonongjs/9cb0b5601904ac373e3d to your computer and use it in GitHub Desktop.
Save jonongjs/9cb0b5601904ac373e3d to your computer and use it in GitHub Desktop.
Getting started with Heaps
<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>
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();
}
}
-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