added debug multiply to macs, added eot support to .htaccess, improved projection performance by removing some unnecessary calculations
This commit is contained in:
parent
1a9cca6d0c
commit
5c42b69d20
|
@ -3,4 +3,3 @@ AddType application/vnd.ms-fontobject .eot
|
||||||
|
|
||||||
RewriteRule (.*).php $1
|
RewriteRule (.*).php $1
|
||||||
RewriteRule (.*).hmtl $1
|
RewriteRule (.*).hmtl $1
|
||||||
|
|
||||||
|
|
BIN
db/pamela.sql
BIN
db/pamela.sql
Binary file not shown.
|
@ -151,8 +151,9 @@ Matrix.prototype.translate = function(dX, dY, dZ) {
|
||||||
|
|
||||||
Matrix.prototype.project = function(v) {
|
Matrix.prototype.project = function(v) {
|
||||||
var pj = this.multiplyVector(v);
|
var pj = this.multiplyVector(v);
|
||||||
pj.x /= pj.z / (width / 2);
|
var distancePerHalfScreen = (pj.z / pj.w) / (width / 2);
|
||||||
pj.y /= pj.z / (width / 2);
|
pj.x /= distancePerHalfScreen;
|
||||||
|
pj.y /= distancePerHalfScreen;
|
||||||
return pj;
|
return pj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
12
macs.php
12
macs.php
|
@ -27,9 +27,21 @@ require_once("config.php");
|
||||||
require_once("lib/trans.php");
|
require_once("lib/trans.php");
|
||||||
require_once("lib/macs.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 = macs_get();
|
||||||
$macs = known_macs_translate($macs);
|
$macs = known_macs_translate($macs);
|
||||||
if (count($macs) > 0) {
|
if (count($macs) > 0) {
|
||||||
|
//multiply();
|
||||||
echo '["'.implode('", "', $macs).'"]';
|
echo '["'.implode('", "', $macs).'"]';
|
||||||
} else {
|
} else {
|
||||||
echo '[]';
|
echo '[]';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user