Skip to content

Instantly share code, notes, and snippets.

Nathan Ostgard noonat

Block or report user

Report or block noonat

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
noonat /
Created Jun 15, 2011
AIR 2.7 Android Example Makefile
package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.utils.getTimer;
public class Game extends Sprite {
private var _ballX:Number;
private var _ballY:Number;
noonat /
Created Jun 11, 2011
Tile connectivity example
package {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageQuality;
import flash.display.StageScaleMode;
import flash.geom.Point;
import flash.geom.Rectangle;
View describeType.xml
<type name="Test_TEST_BITMAP" base="Class" isDynamic="true" isFinal="true" isStatic="true">
<extendsClass type="Class"/>
<extendsClass type="Object"/>
<accessor name="prototype" access="readonly" type="*" declaredBy="Class"/>
<factory type="Test_TEST_BITMAP">
<extendsClass type="mx.core::BitmapAsset"/>
<extendsClass type="mx.core::FlexBitmap"/>
<extendsClass type="flash.display::Bitmap"/>
<extendsClass type="flash.display::DisplayObject"/>
noonat / nape_ray.patch
Created Mar 9, 2011
Patch to add and Ray.sensor to allow rayCast filtering.
View nape_ray.patch
diff --git a/nape/cx-src/nape/dynamics/ b/nape/cx-src/nape/dynamics/
index a9159c6..713de8c 100644
--- a/nape/cx-src/nape/dynamics/
+++ b/nape/cx-src/nape/dynamics/
@@ -395,22 +395,28 @@ class RayCast {
static public inline var FAIL:Float = 10.0; //>1 for easy comparisons
static public inline function rayCircle(r:Ray,c:Circle) {
- vec_new(ac); vec_sub(r.a,c.centre.p,ac);
- var A = vec_lsq(r.v);
noonat /
Created Mar 7, 2011
Nape addCbPreBegin bug
package {
import flash.Boot;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageQuality;
import flash.display.StageScaleMode;
import nape.callbacks.Callback;
import nape.callbacks.CbType;
import nape.dynamics.Arbiter;
noonat /
Created Feb 28, 2011
Adobe's shader assembler, used by most Molehill examples.
// ================================================================================
// Copyright 2010 Adobe Systems Incorporated
// All Rights Reserved.
// NOTICE: Adobe permits you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ================================================================================
View valid_email.php
* Return true if the email address is valid.
* From
* @return bool
function isValidEmail($email) {
$isValid = true;
View triangle.html
<!DOCTYPE html>
<canvas id="canvas" width="480" height="480"></canvas>
<script type="text/javascript">
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
context.strokeStyle = '#fff';
context.fillStyle = '#000';
View proxy_object.js
// ECMAScript 5 object proxy as JS
(function(exports) {
function getPropertyDescriptor(obj, propertyName) {
print("getPropertyDescriptor", obj, propertyName);
var desc = Object.getOwnPropertyDescriptor(obj, propertyName);
if (desc !== undefined) {
return desc;
} else {
View cube.go
package main
import (
You can’t perform that action at this time.