From 470a5f3821f8b1e4393b46cfe65c9c17aeff5470 Mon Sep 17 00:00:00 2001 From: dsc Date: Tue, 2 Nov 2010 05:35:57 -0700 Subject: [PATCH] Adds FPS sparkline. --- bin/deploy.sh | 34 ++ css/lttl.css | 3 +- index.php | 6 + lib/jquery.sparkline.js | 1050 ++++++++++++++++++++++++++++++++++++++++++ lib/jquery.sparkline.min.js | 85 ++++ src/Y/core.js | 4 +- src/Y/modules/y.event.js | 77 ++-- src/Y/y-function.js | 41 +- src/evt/evt.class.js | 202 ++++++++ src/evt/evt.js.php | 40 ++ src/portal/util/eventloop.js | 34 +- src/portal/util/fps.js | 99 ++++ src/tanks/bullet/bullet.js | 5 + src/tanks/game/map.js | 4 +- src/tanks/game/player.js | 16 +- src/tanks/ui.js | 27 +- src/tanks/unit/tank.js | 102 +---- src/tanks/unit/thing.js | 127 +++++ 18 files changed, 1768 insertions(+), 188 deletions(-) create mode 100755 bin/deploy.sh create mode 100644 lib/jquery.sparkline.js create mode 100644 lib/jquery.sparkline.min.js create mode 100644 src/evt/evt.class.js create mode 100644 src/evt/evt.js.php create mode 100644 src/portal/util/fps.js create mode 100644 src/tanks/bullet/bullet.js create mode 100644 src/tanks/unit/thing.js diff --git a/bin/deploy.sh b/bin/deploy.sh new file mode 100755 index 0000000..4a6a94f --- /dev/null +++ b/bin/deploy.sh @@ -0,0 +1,34 @@ +#! /bin/bash + +function halp () { + cat >&2 <<-HALP +The Littlest Deployer of Battletanks + +Usage: $( basename $0 ) [options] + +Deploys Simoon files. + +Options: + -h Displays this help. +HALP +} + +SHIFT=0 +function incshift () { SHIFT=$(( $SHIFT + ${1:-1} )); } +function join () { seps="$IFS"; IFS="$1"; shift; echo "$*"; IFS="$seps"; } +function fail () { echo "PREDICTABLE FAILURE. $1" >&2; exit 1; } + +for opt in $*; do + egrep -xq -e '--?h(e(lp?)?)?' && { halp; exit 0; } +done +# while getopts "b:" opt; do +# case $opt in +# b ) B=$OPTARG; incshift 2 ;; +# esac +# done +# shift $SHIFT + +rsync -Cavz --delete --exclude=tmp ./* less.ly:lessly/hacking/tanks/ + + + diff --git a/css/lttl.css b/css/lttl.css index 1d2321e..0bd2596 100644 --- a/css/lttl.css +++ b/css/lttl.css @@ -12,7 +12,8 @@ ul, ol, li { list-style: none ! important; margin:0; padding:0; } #howto { position:fixed; top:3em; right:1em; color:#BFBFBF; } #info { position:fixed; bottom:10px; right:10px; padding:0.5em; background-color:rgba(0,0,0, 0.1); color:#787878; } + #info #state { font-weight:bold; } #info label { display:block; float:left; width:3em; margin-right:0.5em; color:#787878; } #info input { border:0; background-color:transparent; min-width:5em; width:5em; color:#5c5c5c; } #info .sep { opacity:0.1; background-color:#999; margin:5px 0; height:1px; } - + #info .fps-sparkline { width:100%; height:1.5em; margin-top:0.5em; } diff --git a/index.php b/index.php index 04f9df7..e2b5d7a 100644 --- a/index.php +++ b/index.php @@ -14,6 +14,7 @@