Higher FPS! (#19)

This commit is contained in:
gavin
2018-10-05 20:22:11 -04:00
committed by Gitea
parent 0e2b7ea69d
commit 52017e8e30
7 changed files with 160 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
import Cartographer from './cartographer.js';
import {rangeInclusive, sqrt2} from './utils.js';
import {rangeInclusive, invSqrt2, sqrt2} from './utils.js';
import Square from './square.js';
import Point from './point.js';
@@ -40,11 +40,11 @@ export default class CartographerPointyXY extends Cartographer {
}
maxWidth() {
return this.minWidth() * sqrt2;
return this.scale * 2;
}
minWidth() {
return this.scale * 2;
return this.maxWidth() * invSqrt2;
}
horizontalOverhang() {