Skip to content

Instantly share code, notes, and snippets.

View jgranick's full-sized avatar

Joshua Granick jgranick

View GitHub Profile
@jgranick
jgranick / TestNME.hx
Created September 2, 2012 20:54
Color transform bitmap
package;
import com.eclecticdesignstudio.motion.Actuate;
import nme.display.Bitmap;
import nme.display.BitmapData;
import nme.display.Sprite;
class TestNME extends Sprite {
@jgranick
jgranick / gist:3692986
Created September 10, 2012 19:00
RunnerMark scores -- July 18th, 2012

Nexus One

  • NME: 460
  • renderMode=GPU: 410
  • Starling: 500
  • Genome2D: 440
  • ND2D: 0

Galaxy Nexus

@jgranick
jgranick / TestNME.hx
Last active October 10, 2015 17:07
How to add inline C++ code (NME recipe)
import nme.display.Sprite;
#if cpp
@:headerCode ("#include <time.h>")
#end
class TestNME extends Sprite {
@jgranick
jgranick / RemoteControlExample.hx
Created October 2, 2012 21:04
How to use the "remote-control" library (NME recipe)
import nme.display.Sprite;
import nme.events.RemoteControlEvent;
import nme.ui.RemoteControl;
class RemoteControlExample extends Sprite {
public function new () {
super ();
@jgranick
jgranick / TilesheetExample.hx
Created October 2, 2012 21:46
How to use nme.display.Tilesheet (NME recipe)
import nme.display.Sprite;
import nme.display.Tilesheet;
import nme.geom.Rectangle;
import nme.Assets;
public class TilesheetExample extends Sprite {
public function new () {
@jgranick
jgranick / Project.hx
Created October 10, 2012 16:12
Draft Project File Spec
package;
class Project extends ProjectBase {
public function new (target:String) {
super (target);
<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0" id="com.mycompany.mycoolapplication">
<author>My Company</author>
<name>My Cool Application</name>
<description></description>
<content src="index.html" rim:allowInvokeParams="true"/>
</widget>
emcc hello.cpp -o bin/hello.js
@jgranick
jgranick / .htaccess
Last active June 3, 2019 14:19
SimpleGL
SetOutputFilter DEFLATE
@jgranick
jgranick / install.sh
Last active December 17, 2015 19:09
DO NOT DO THIS ANYMORE. The following script installs a 32-bit version of Neko, instead of the 64-bit version that comes with the Haxe 3 install. Your Neko install should match your OS X install, which means unless you are running an OLD system, you want the 64-bit version. OpenFL does properly support 64-bit Neko, and expects this on 64-bit sys…
#!/bin/sh
# Download Neko
curl -L http://nekovm.org/_media/neko-2.0.0-osx.tar.gz > neko-2.0.0-osx.tar.gz
# Extract and copy files to /usr/lib/neko