mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41:23 +01:00
feat: Implement HeightmapGenerator and Voronoi module
- Added HeightmapGenerator class for generating heightmaps with various tools (Hill, Pit, Range, Trough, Strait, etc.). - Introduced Voronoi class for creating Voronoi diagrams using Delaunator. - Updated index.html to include new modules. - Created index.ts to manage module imports. - Enhanced arrayUtils and graphUtils with type definitions and improved functionality. - Added utility functions for generating grids and calculating Voronoi cells.
This commit is contained in:
parent
fa493989b6
commit
4b5e9bfeea
8 changed files with 748 additions and 601 deletions
|
|
@ -143,4 +143,94 @@ window.drawCellsValue = (data:any[]) => drawCellsValue(data, (window as any).pac
|
|||
window.drawPolygons = (data: any[]) => drawPolygons(data, (window as any).terrs, (window as any).grid);
|
||||
window.drawRouteConnections = () => drawRouteConnections((window as any).packedGraph);
|
||||
window.drawPoint = drawPoint;
|
||||
window.drawPath = drawPath;
|
||||
window.drawPath = drawPath;
|
||||
|
||||
|
||||
export {
|
||||
rn,
|
||||
lim,
|
||||
minmax,
|
||||
normalize,
|
||||
lerp,
|
||||
isVowel,
|
||||
trimVowels,
|
||||
getAdjective,
|
||||
nth,
|
||||
abbreviate,
|
||||
list,
|
||||
last,
|
||||
unique,
|
||||
deepCopy,
|
||||
getTypedArray,
|
||||
createTypedArray,
|
||||
TYPED_ARRAY_MAX_VALUES,
|
||||
rand,
|
||||
P,
|
||||
each,
|
||||
gauss,
|
||||
Pint,
|
||||
biased,
|
||||
generateSeed,
|
||||
getNumberInRange,
|
||||
ra,
|
||||
rw,
|
||||
convertTemperature,
|
||||
si,
|
||||
getIntegerFromSI,
|
||||
toHEX,
|
||||
getColors,
|
||||
getRandomColor,
|
||||
getMixedColor,
|
||||
C_12,
|
||||
getComposedPath,
|
||||
getNextId,
|
||||
rollups,
|
||||
distanceSquared,
|
||||
getIsolines,
|
||||
getPolesOfInaccessibility,
|
||||
connectVertices,
|
||||
findPath,
|
||||
getVertexPath,
|
||||
round,
|
||||
capitalize,
|
||||
splitInTwo,
|
||||
parseTransform,
|
||||
isValidJSON,
|
||||
safeParseJSON,
|
||||
sanitizeId,
|
||||
byId,
|
||||
shouldRegenerateGrid,
|
||||
generateGrid,
|
||||
findGridAll,
|
||||
findGridCell,
|
||||
findClosestCell,
|
||||
calculateVoronoi,
|
||||
findAllCellsInRadius,
|
||||
getPackPolygon,
|
||||
getGridPolygon,
|
||||
poissonDiscSampler,
|
||||
isLand,
|
||||
isWater,
|
||||
findAllInQuadtree,
|
||||
drawHeights,
|
||||
clipPoly,
|
||||
getSegmentId,
|
||||
debounce,
|
||||
throttle,
|
||||
parseError,
|
||||
getBase64,
|
||||
openURL,
|
||||
wiki,
|
||||
link,
|
||||
isCtrlClick,
|
||||
generateDate,
|
||||
getLongitude,
|
||||
getLatitude,
|
||||
getCoordinates,
|
||||
initializePrompt,
|
||||
drawCellsValue,
|
||||
drawPolygons,
|
||||
drawRouteConnections,
|
||||
drawPoint,
|
||||
drawPath
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue