Skip to content

Instantly share code, notes, and snippets.

Joshua Granick jgranick

Block or report user

Report or block jgranick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jgranick
jgranick / install-haxe.sh
Last active Apr 17, 2019
Install Haxe using a development release for 64-bit Linux
View install-haxe.sh
#!/bin/sh
# Install Haxe using a development release for 64-bit Linux
HAXE_VERSION=haxe_2019-04-01_development_bbfe5ac
NEKO_VERSION=2.2.0
if [ "$1" = "y" -o "$1" = "-y" ]; then
echo "Do you want to install Haxe $HAXE_VERSION and Neko $NEKO_VERSION? (y/n) y"
@jgranick
jgranick / flashplayerdebugger.sh
Created Mar 2, 2019
Flash Player install script for Linux
View flashplayerdebugger.sh
#!/bin/sh
echo ""
echo "-----------------------------------"
echo " Installing Flash Debugger"
echo "-----------------------------------"
sudo echo ""
View gist:d5e43dd7e74d20b9d123be75d8c91f63
git clone https://github.com/openfl/starling
cd starling
git reset --hard 0306c8625df7bb4b183ca5ca104b33091f814436
cd samples/demo_npm/as3
npm install
npm start
View DisplayObject.hx
package openfl.display;
import lime.graphics.cairo.Cairo;
import lime.graphics.utils.ImageCanvasUtil;
import lime.ui.MouseCursor;
import lime.utils.ObjectPool;
import openfl._internal.renderer.cairo.CairoBitmap;
import openfl._internal.renderer.cairo.CairoDisplayObject;
import openfl._internal.renderer.cairo.CairoGraphics;
@jgranick
jgranick / Main.hx
Created Jan 31, 2018
Lime SimpleImage, using GL framebuffer
View Main.hx
package;
import lime.app.Application;
import lime.graphics.cairo.*;
import lime.graphics.opengl.*;
import lime.graphics.Image;
import lime.graphics.Renderer;
import lime.math.Matrix4;
import lime.utils.Float32Array;
@jgranick
jgranick / Main.hx
Created May 10, 2017
Native Render (Simple)
View Main.hx
package;
import lime.graphics.cairo.*;
import lime.graphics.opengl.*;
import openfl.display.Bitmap;
import openfl.display.BitmapData;
import openfl.display.NativeSprite;
import openfl.display.Sprite;
import openfl.events.NativeRenderEvent;
@jgranick
jgranick / Main.hx
Last active May 10, 2017
Native Render
View Main.hx
package;
import lime.app.Application;
import lime.graphics.cairo.*;
import lime.graphics.opengl.*;
import lime.graphics.Image;
import lime.graphics.Renderer;
import lime.math.Matrix4;
import lime.utils.Float32Array;
View gist:568bcadee92ffb6e1c44cfa421a9aeae
var bitmapData = Assets.getBitmapData ("tiles.png");
var tileData = new TileData (bitmapData, new Rectangle (0, 0, 100, 100));
var tilemap = new Tilemap (800, 600);
var tile = new Tile (tileData);
tilemap.addTile (tile);
addChild (tilemap);
View gist:b39c6fd2248bc738ced115c5309b1e04
var bitmapData = Assets.getBitmapData ("tiles.png");
var tileset = new Tileset (bitmapData);
tileset.addTileRect (new Rectangle (0, 0, 100, 100));
var tilemap = new Tilemap (800, 600);
var tile = new Tile (tileset, 0);
tilemap.addTile (tile);
View gist:83e59c621241f2c7a3a5f57252e2f0fa
var bitmapData = Assets.getBitmapData ("tiles.png");
var tileset = new Tileset (bitmapData);
tileset.addTileRect (new Rectangle (0, 0, 100, 100));
var tilemap = new Tilemap (800, 600);
var tilemapLayer = new TilemapLayer (tileset);
var tile = new Tile (0);
You can’t perform that action at this time.