fix for infinite hex boards
This commit is contained in:
@@ -212,6 +212,9 @@ export default class CartographerFlatXYZ extends Cartographer {
|
|||||||
&& (!this.height || (y <= (Math.floor(x / 2) * -1) && (-y - Math.floor(x / 2)) < this.height));
|
&& (!this.height || (y <= (Math.floor(x / 2) * -1) && (-y - Math.floor(x / 2)) < this.height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enforceBoundries ({tilePoint, pixelPoint}) {
|
enforceBoundries ({tilePoint, pixelPoint}) {
|
||||||
|
|||||||
@@ -214,6 +214,9 @@ export default class CartographerPointyXYZ extends Cartographer {
|
|||||||
&& (!this.height || (hex.y <= (Math.floor(hex.x / 2) * -1) && (-hex.y - Math.floor(hex.x / 2)) < this.height));
|
&& (!this.height || (hex.y <= (Math.floor(hex.x / 2) * -1) && (-hex.y - Math.floor(hex.x / 2)) < this.height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enforceBoundries ({tilePoint, pixelPoint}) {
|
enforceBoundries ({tilePoint, pixelPoint}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user