Shaders are often more efficient, but for simple purposes this may do the trick. It also means it supports GLES10.
The three textures can be downloaded here.
| /// | |
| /// Simple pooling for Unity. | |
| /// Author: Martin "quill18" Glaude (quill18@quill18.com) | |
| /// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
| /// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
| /// UPDATES: | |
| /// 2015-04-16: Changed Pool to use a Stack generic. | |
| /// | |
| /// Usage: | |
| /// |
| package ; | |
| import haxe.ds.StringMap; | |
| import haxe.macro.Context; | |
| import haxe.macro.Expr; | |
| import haxe.macro.Printer; | |
| import haxe.macro.Type.ClassType; | |
| import neko.Lib; | |
| using haxe.macro.ExprTools; |
| #!/usr/bin/env python3 | |
| # Get your files that Gmail block. Warning message: | |
| # "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled." | |
| # Based on: http://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/ | |
| # Go to your emails, click the arrow button in the top right, "Show original", save to the same directory as this script. | |
| import email | |
| import sys | |
| import os |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>App Redirection</title> | |
| </head> | |
| <body> | |
| <!-- iframe used for attempting to load a custom protocol --> | |
| <iframe style="display:none" height="0" width="0" id="loader"></iframe> |
| var vx:Number = 0; | |
| var vy:Number = 0; | |
| var targetX:Number; | |
| var targetY:Number; | |
| var spring:Number = .5; | |
| var friction:Number = .9; | |
| this.addEventListener(Event.ENTER_FRAME, loop); | |
| function loop(e:Event):void |
| import com.eclecticdesignstudio.motion.Actuate; | |
| import cpp.vm.Thread; | |
| import nme.display.Sprite; | |
| import nme.events.Event; | |
| import nme.Lib; | |
| class ThreadingExample extends Sprite { | |
| package; | |
| import flash.Lib; | |
| import openfl.utils.JNI; | |
| class SystemPath { | |
| class Main extends Sprite | |
| { | |
| private var doneFrame:Bool; | |
| public function new() | |
| { | |
| super(); | |
| doneFrame = false; | |
| graphics.beginFill(0xff5555); |
Shaders are often more efficient, but for simple purposes this may do the trick. It also means it supports GLES10.
The three textures can be downloaded here.
| /* | |
| * "stackblur" | |
| * originally, Mario Klingemann, mario@quasimondo.com | |
| * this implementation, Benjamin Yates (benjamin@rqdq.com) | |
| * http://incubator.quasimondo.com/processing/stackblur.pde | |
| * | |
| * this blur routine seems to be quite popular. | |
| * | |
| * unfortunately, mario didn't comment anything. | |
| * but, it's easy to see it's just a flavor of a two-pass |