mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
fix: issue with feature vertex being out of bound
This commit is contained in:
parent
949a486bf8
commit
84c326e347
4 changed files with 7 additions and 7 deletions
|
|
@ -8039,7 +8039,7 @@
|
||||||
<script src="utils/stringUtils.js?v=1.99.00"></script>
|
<script src="utils/stringUtils.js?v=1.99.00"></script>
|
||||||
<script src="utils/languageUtils.js?v=1.99.00"></script>
|
<script src="utils/languageUtils.js?v=1.99.00"></script>
|
||||||
<script src="utils/unitUtils.js?v=1.99.00"></script>
|
<script src="utils/unitUtils.js?v=1.99.00"></script>
|
||||||
<script src="utils/pathUtils.js?v=1.104.0"></script>
|
<script src="utils/pathUtils.js?v=1.105.6"></script>
|
||||||
<script defer src="utils/debugUtils.js?v=1.99.00"></script>
|
<script defer src="utils/debugUtils.js?v=1.99.00"></script>
|
||||||
|
|
||||||
<script src="modules/voronoi.js"></script>
|
<script src="modules/voronoi.js"></script>
|
||||||
|
|
@ -8065,7 +8065,7 @@
|
||||||
<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>
|
||||||
<script src="libs/simplify.js?v1.105.0"></script>
|
<script src="libs/simplify.js?v1.105.6"></script>
|
||||||
<script src="modules/fonts.js?v=1.99.03"></script>
|
<script src="modules/fonts.js?v=1.99.03"></script>
|
||||||
<script src="modules/ui/layers.js?v=1.101.00"></script>
|
<script src="modules/ui/layers.js?v=1.101.00"></script>
|
||||||
<script src="modules/ui/measurers.js?v=1.99.00"></script>
|
<script src="modules/ui/measurers.js?v=1.99.00"></script>
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,9 @@
|
||||||
const newPoints = [prevPoint];
|
const newPoints = [prevPoint];
|
||||||
let point;
|
let point;
|
||||||
|
|
||||||
for (let i = 1, len = points.length; i < len; i++) {
|
for (let i = 1; i < points.length; i++) {
|
||||||
point = points[i];
|
point = points[i];
|
||||||
|
if (!point) continue;
|
||||||
|
|
||||||
if (getSqDist(point, prevPoint) > sqTolerance) {
|
if (getSqDist(point, prevPoint) > sqTolerance) {
|
||||||
newPoints.push(point);
|
newPoints.push(point);
|
||||||
|
|
@ -51,8 +52,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (point && prevPoint !== point) newPoints.push(point);
|
if (prevPoint !== point) newPoints.push(point);
|
||||||
|
|
||||||
return newPoints;
|
return newPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ function connectVertices({vertices, startingVertex, ofSameType, addToChecked, cl
|
||||||
else if (v2 !== previous && c2 !== c3) next = v2;
|
else if (v2 !== previous && c2 !== c3) next = v2;
|
||||||
else if (v3 !== previous && c1 !== c3) next = v3;
|
else if (v3 !== previous && c1 !== c3) next = v3;
|
||||||
|
|
||||||
if (!vertices.c[next]) {
|
if (next >= vertices.c.length) {
|
||||||
ERROR && console.error("ConnectVertices: next vertex is out of bounds");
|
ERROR && console.error("ConnectVertices: next vertex is out of bounds");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,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.105.5";
|
const VERSION = "1.105.6";
|
||||||
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