Skip to content

Instantly share code, notes, and snippets.

View jgranick's full-sized avatar

Joshua Granick jgranick

View GitHub Profile
<?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>
@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);
@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 / 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 / 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 / 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
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 / TestNME.hx
Created September 2, 2012 20:43
Color transform
package;
import com.eclecticdesignstudio.motion.Actuate;
import nme.display.Sprite;
class TestNME extends Sprite {
@jgranick
jgranick / ThreadingSample.hx
Created August 24, 2012 19:05
How to make a background worker thread (NME recipe)
import com.eclecticdesignstudio.motion.Actuate;
import cpp.vm.Thread;
import nme.display.Sprite;
import nme.events.Event;
import nme.Lib;
class ThreadingExample extends Sprite {
@jgranick
jgranick / ThreadingSample.hx
Created August 24, 2012 17:32
How to set and retrieve the same value between threads (NME recipe)
import cpp.vm.Mutex;
import cpp.vm.Thread;
import nme.display.Sprite;
import nme.Lib;
class ThreadingExample extends Sprite {
public function new () {