mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
fix: sumap - clip routes by bbox
This commit is contained in:
parent
488f51a0f4
commit
6d4c9f6b18
3 changed files with 6 additions and 4 deletions
|
|
@ -8082,7 +8082,7 @@
|
||||||
<script src="modules/markers-generator.js?v=1.104.0"></script>
|
<script src="modules/markers-generator.js?v=1.104.0"></script>
|
||||||
<script src="modules/zones-generator.js?v=1.106.0"></script>
|
<script src="modules/zones-generator.js?v=1.106.0"></script>
|
||||||
<script src="modules/coa-generator.js?v=1.99.00"></script>
|
<script src="modules/coa-generator.js?v=1.99.00"></script>
|
||||||
<script src="modules/resample.js?v=1.105.13"></script>
|
<script src="modules/resample.js?v=1.106.4"></script>
|
||||||
<script src="libs/alea.min.js?v1.105.0"></script>
|
<script src="libs/alea.min.js?v1.105.0"></script>
|
||||||
<script src="libs/polylabel.min.js?v1.105.0"></script>
|
<script src="libs/polylabel.min.js?v1.105.0"></script>
|
||||||
<script src="libs/lineclip.min.js?v1.105.0"></script>
|
<script src="libs/lineclip.min.js?v1.105.0"></script>
|
||||||
|
|
|
||||||
|
|
@ -254,9 +254,11 @@ window.Resample = (function () {
|
||||||
});
|
});
|
||||||
if (points.length < 2) return null;
|
if (points.length < 2) return null;
|
||||||
|
|
||||||
const firstCell = points[0][2];
|
const bbox = [0, 0, graphWidth, graphHeight];
|
||||||
|
const clipped = lineclip(points, bbox)[0].map(([x, y]) => [rn(x, 2), rn(y, 2), findCell(x, y)]);
|
||||||
|
const firstCell = clipped[0][2];
|
||||||
const feature = pack.cells.f[firstCell];
|
const feature = pack.cells.f[firstCell];
|
||||||
return {...route, feature, points};
|
return {...route, feature, points: clipped};
|
||||||
})
|
})
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const VERSION = "1.106.3";
|
const VERSION = "1.106.4";
|
||||||
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue