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 Dog (name, age) { | |
this._f = {}; | |
this._prop("name", name); | |
this._prop("age", age); | |
} | |
Dog.prototype = { | |
_prop: function (prop, initialValue) { | |
var self = this; | |
Object.defineProperty(this, prop, { |
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 bindSomething (cb) { | |
anyEventSystem.on("something", function (e) { | |
if (cb.length === 0) { | |
cb(); | |
} | |
else { | |
var computation = takesALotOfCPU(); | |
cb(computation); | |
} | |
}); |
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
Bugs: | |
- Fix the path finding bug: the game lag crazily/freeze and gets unplayable after a long play and especially with a lot of spaces (bad perf of the path solver) | |
- Fix UI buttons which gets unclickable when over the ground | |
- Fix the queen die sprite (AFAIR the queen seems to not die visually) | |
- Fix the "tab away" bug (all ants die if tab leaved for a few seconds): elapsedTime cannot be trusted if > THRESHOLD because it basically means the game is not focused and have very small FPS < 1 ( <-- can the game be paused? ) | |
Enhancement: | |
- Support Fullscreen API | |
- Make a ant forget his task when assigned to a new job | |
- Add keyboard shortcut for keyboard-only play |
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
GIT_REPO=$HOME/repo | |
TMP_GIT_CLONE=$HOME/tmp/myrepo | |
PUBLIC_WWW=/var/www/repo | |
if [ ! -d "$TMP_GIT_CLONE" ] ; then | |
rm -rf $TMP_GIT_CLONE | |
git clone $GIT_REPO $TMP_GIT_CLONE | |
else | |
cd $TMP_GIT_CLONE | |
git pull |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
// General parameters | |
uniform sampler2D from; | |
uniform sampler2D to; | |
uniform float progress; | |
uniform vec2 resolution; | |
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
{"size":0.2} |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
// General parameters | |
uniform sampler2D from; | |
uniform sampler2D to; | |
uniform float progress; | |
uniform vec2 resolution; | |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
// General parameters | |
uniform sampler2D from; | |
uniform sampler2D to; | |
uniform float progress; | |
uniform vec2 resolution; | |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
// General parameters | |
uniform sampler2D from; | |
uniform sampler2D to; | |
uniform float progress; | |
uniform vec2 resolution; | |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
// General parameters | |
uniform sampler2D from; | |
uniform sampler2D to; | |
uniform float progress; | |
uniform vec2 resolution; | |
OlderNewer