Skip to content

Instantly share code, notes, and snippets.

View mikecann's full-sized avatar
🏠
Working from home

Mike Cann mikecann

🏠
Working from home
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="onCreationComplete(event)">
<fx:Script>
<![CDATA[
import mx.controls.List;
import mx.events.FlexEvent;
package
{
import flash.utils.Dictionary;
public class SimpleDispatcher
{
protected var _listeners : Dictionary;
public function SimpleDispatcher(useWeak:Boolean)
{
@mikecann
mikecann / DoubleBufferedRT.hx
Created August 21, 2011 14:33
Trying to get double buffered rendering working in Three.JS HaXe
package threeUtils;
import js.Lib;
import three.Camera;
import three.Matrix4;
import three.Mesh;
import three.MeshShaderMaterial;
import three.PlaneGeometry;
import three.Scene;
import three.ShaderUtils;
import three.Texture;
import nme.display.Sprite;
import org.aswing.border.EmptyBorder;
import org.aswing.FlowLayout;
import org.aswing.Insets;
import org.aswing.JButton;
import org.aswing.JFrame;
import org.aswing.JLabel;
import org.aswing.JPanel;
class Main extends Sprite
@mikecann
mikecann / Main.hx
Created November 30, 2011 19:31
Main
class Main
{
static function main()
{
Firebug.redirectTraces();
Lib.current.stage.alpha = 0.5;
Lib.current.stage.addEventListener(Event.RESIZE, onResize);
}
@mikecann
mikecann / gist:1471467
Created December 13, 2011 09:57
FP11 Performance Analytics
package
{
import com.google.analytics.GATracker;
import flash.display.Sprite;
import flash.display.Stage3D;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display3D.Context3D;
import flash.display3D.Context3DRenderMode;
package base;
import js.Dom;
import js.JQuery;
import robothaxe.core.IViewContainer;
/**
* ...
* @author
*/
package content.views.main;
import base.BaseView;
import content.views.common.DivView;
import content.views.foreground.ForegroundView;
import js.JQuery;
import js.Lib;
import js.Dom;
import hsl.haxe.Signaler;
import hsl.haxe.DirectSignaler;
@mikecann
mikecann / BaseMediator.cs
Last active August 29, 2015 14:00
Typesafe Automatic Listener Removal in Strange IoC
public class BaseMediator<TView> : Mediator
{
[Inject]
public TView View { get; set; }
protected List<SignalBinding> signalBindings = new List<SignalBinding>();
override public void OnRegister()
{
}
@mikecann
mikecann / gist:98f13390b62466e161a5
Created September 3, 2014 06:16
Copy over border infos
#if UNITY_4_6
// Import extisting border
foreach(var existing in importer.spritesheet)
if(existing.name==smd.name)
smd.border = existing.border;
#endif