Start at Zero (#6)
This commit is contained in:
@@ -10,9 +10,15 @@ export default class CartographerFlatXY extends Cartographer {
|
||||
super(settings);
|
||||
|
||||
[
|
||||
'tileHeight',
|
||||
'tileWidth',
|
||||
|
||||
'maxWidth',
|
||||
'minWidth',
|
||||
|
||||
'horizontalOverhang',
|
||||
'verticalOverhang',
|
||||
|
||||
'horizontalDistance',
|
||||
'verticalDistance',
|
||||
|
||||
@@ -25,6 +31,14 @@ export default class CartographerFlatXY extends Cartographer {
|
||||
].map(method => this[method] = this[method].bind(this));
|
||||
}
|
||||
|
||||
tileHeight() {
|
||||
return this.minWidth();
|
||||
}
|
||||
|
||||
tileWidth() {
|
||||
return this.minWidth();
|
||||
}
|
||||
|
||||
maxWidth() {
|
||||
return this.minWidth() * sqrt2;
|
||||
}
|
||||
@@ -33,6 +47,14 @@ export default class CartographerFlatXY extends Cartographer {
|
||||
return this.scale * 2;
|
||||
}
|
||||
|
||||
horizontalOverhang() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
verticalOverhang() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
horizontalDistance() {
|
||||
return this.minWidth();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user