diff --git a/.htaccess b/.htaccess index 77a26fa..82f84f7 100644 --- a/.htaccess +++ b/.htaccess @@ -3,4 +3,3 @@ AddType application/vnd.ms-fontobject .eot RewriteRule (.*).php $1 RewriteRule (.*).hmtl $1 - diff --git a/db/pamela.sql b/db/pamela.sql deleted file mode 100644 index a76a9df..0000000 Binary files a/db/pamela.sql and /dev/null differ diff --git a/js/pamela-matrices.js b/js/pamela-matrices.js index bbf3011..adcc1f4 100644 --- a/js/pamela-matrices.js +++ b/js/pamela-matrices.js @@ -151,8 +151,9 @@ Matrix.prototype.translate = function(dX, dY, dZ) { Matrix.prototype.project = function(v) { var pj = this.multiplyVector(v); - pj.x /= pj.z / (width / 2); - pj.y /= pj.z / (width / 2); + var distancePerHalfScreen = (pj.z / pj.w) / (width / 2); + pj.x /= distancePerHalfScreen; + pj.y /= distancePerHalfScreen; return pj; }; diff --git a/macs.php b/macs.php index d2aaf6e..574145a 100644 --- a/macs.php +++ b/macs.php @@ -27,9 +27,21 @@ require_once("config.php"); require_once("lib/trans.php"); require_once("lib/macs.php"); +// for debug purposes, increases the numbers of macs artificially +function multiply() { + global $macs; + $c = count($macs); + for ($j = 0; $j < $c; $j++) { + for ($i = 0; $i <10; $i++) { + $macs[] = $macs[$j].$i; + } + } +} + $macs = macs_get(); $macs = known_macs_translate($macs); if (count($macs) > 0) { + //multiply(); echo '["'.implode('", "', $macs).'"]'; } else { echo '[]';