This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Impact Plugin | |
* NotificationManager | |
* Written by Abraham Walters | |
* July 2011 | |
* Jxyzzy Dev Company | |
* jxyzzy.com | |
* | |
* This plugin extends the Font class and allows you to pop-up a | |
* text Notification (spawnNote()), move it (this.pos) and have |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vertex shader | |
attribute float a_alpha; | |
attribute vec2 a_position; | |
attribute vec2 a_texCoord; | |
uniform vec2 u_resolution; | |
varying vec2 v_texCoord; | |
void main () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (this.standing && ig.input.pressed('jump')) { | |
this.vel.y = -this.jumpVel; | |
} else if (this.vel.y < 0 && ig.input.state('jump')) { | |
this.vel.y -= this.smallJumpBoost; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="2d-vertex-shader" type="x-shader/x-vertex"> | |
precision lowp float; | |
attribute vec2 a_texCoord; | |
uniform vec2 u_resolution; | |
uniform float u_angle; | |
uniform vec2 u_pivot; | |
uniform vec2 u_scale; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="2d-fragment-shader" type="x-shader/x-fragment"> | |
precision mediump float; | |
uniform sampler2D u_image; | |
uniform float u_alpha; | |
uniform vec4 u_frame; // x, y, width, height | |
varying vec2 v_texCoord; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var preserveAspectRatio = true; | |
function fillBrowser (canvas) { | |
if (preserveAspectRatio) { | |
var dWidth = window.innerWidth / canvas.width; | |
var dHeight = window.innerHeight / canvas.height; | |
var newWidth; | |
var newHeight; | |
if (dWidth < dHeight) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function css (css) { | |
var browser = window.navigator.userAgent.toLowerCase().match(/chrome|firefox|opera|msie|safari/)[0]; | |
var attribute = browser === 'chrome' || browser === 'opera' || browser === 'safari' ? '-webkit-' + css : | |
browser === 'firefox' ? '-moz-' + css : | |
browser === 'msie' ? '-ms-' + css : | |
css; | |
var styles = document.documentElement.style; | |
if (typeof styles[attribute] !== 'undefined') { | |
return attribute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
while :; do | |
# grab process id for given arg | |
PID=$(ps aux | grep $1 | grep -v grep | grep -v cpu.sh | awk '{print $2}') | |
# grab cpu usage | |
USED=$(ps -p $PID -o %cpu) | |
# grab arg string length + 9 | |
LEN=$(expr $(echo $1 | awk '{print length}') + 9) | |
# hack! print backspace mulitple times to erase previous input | |
for (( i=1 ; i<=$LEN ; i++ )); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.extends = function (parent) { | |
var ctor = function () {}, | |
proto = this.prototype; | |
ctor.prototype = parent.prototype; | |
this.prototype = new ctor; | |
this.prototype.constructor = this; | |
for (var key in proto) { | |
this.prototype[key] = proto[key]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"id": "jslog", | |
"caption": "Javascript Log", | |
"command": "js_log" | |
}] |
OlderNewer