mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-22 15:17:23 +01:00
Merge branch 'master' into refactor/migrate-resample-module
This commit is contained in:
commit
54ba228fb6
11 changed files with 175 additions and 237 deletions
131
.github/copilot-instructions.md
vendored
131
.github/copilot-instructions.md
vendored
|
|
@ -1,118 +1,65 @@
|
|||
# Fantasy Map Generator
|
||||
|
||||
Azgaar's Fantasy Map Generator is a web application for creating fantasy maps. It generates detailed fantasy worlds with countries, cities, rivers, biomes, and cultural elements.
|
||||
Azgaar's Fantasy Map Generator is a client-only web application for creating fantasy maps. It generates detailed fantasy worlds with countries, cities, rivers, biomes, and cultural elements.
|
||||
|
||||
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
|
||||
Always reference these instructions first.
|
||||
|
||||
## Working Effectively
|
||||
# Architecture
|
||||
|
||||
- The project uses NPM, Vite, and TypeScript for development and building.
|
||||
- **Setup**: Run `npm install` to install dependencies (requires Node.js >= 24.0.0)
|
||||
- **Development**: Run `npm run dev` to start the Vite development server
|
||||
- Access at: `http://localhost:5173` (Vite's default port)
|
||||
- Hot module replacement (HMR) enabled - changes are reflected immediately
|
||||
- **Building**: Run `npm run build` to compile TypeScript and build for production
|
||||
- TypeScript compilation runs first (`tsc`)
|
||||
- Vite builds the application to `dist/` directory
|
||||
- **Preview**: Run `npm run preview` to preview the production build locally
|
||||
The codebase is gradually transitioning from **vanilla JavaScript to TypeScript** while maintaining compatibility with the existing generation pipeline and legacy `.map` user files.
|
||||
|
||||
## Validation
|
||||
The expected **future architecture** is based on a separation between **world data**, **procedural generation**, **interactive editing**, and **rendering**.
|
||||
|
||||
- Always manually validate any changes by:
|
||||
1. Run `npm run dev` to start the development server (wait for "ready" message)
|
||||
2. Navigate to the application in browser (typically `http://localhost:5173`)
|
||||
3. Click the "►" button to open the menu and generate a new map
|
||||
4. **CRITICAL VALIDATION**: Verify the map generates with countries, cities, roads, and geographic features
|
||||
5. Test UI interaction: click "Layers" button, verify layer controls work
|
||||
6. Test regeneration: click "New Map!" button, verify new map generates correctly
|
||||
- **Known Issues**: Google Analytics and font loading errors are normal (blocked external resources)
|
||||
- For production build validation: run `npm run build` followed by `npm run preview`
|
||||
The application is conceptually divided into four main layers:
|
||||
|
||||
## Repository Structure
|
||||
- **State** — world data and style configuration, the single source of truth
|
||||
- **Generators** — procedural world simulation (model)
|
||||
- **Editors** — user-driven mutations of the world state (controllers)
|
||||
- **Renderer** — map visualization (view)
|
||||
|
||||
### Core Files
|
||||
Flow:
|
||||
settings → generators → world data → renderer
|
||||
UI → editors → world data → renderer
|
||||
|
||||
- `package.json` - NPM package configuration with scripts and dependencies
|
||||
- `vite.config.ts` - Vite build configuration
|
||||
- `tsconfig.json` - TypeScript compiler configuration
|
||||
### Layer responsibilities
|
||||
|
||||
### Source Directories
|
||||
**State (world data)**
|
||||
Stores all map data and style configuration.
|
||||
The data layer must contain **no logic and no rendering code**.
|
||||
|
||||
- `src/` - Source code directory (build input)
|
||||
- `src/index.html` - Main application entry point
|
||||
- `src/utils/` - TypeScript utility modules (migrated from JS)
|
||||
- `public/` - Static assets (copied to build output)
|
||||
- `public/main.js` - Core application logic
|
||||
- `public/versioning.js` - Version management and update handling
|
||||
- `public/modules/` - Core functionality modules:
|
||||
- `modules/ui/` - UI components (editors, tools, style management)
|
||||
- `modules/dynamic/` - runtime modules (export, installation)
|
||||
- `modules/renderers/` - drawing and rendering logic
|
||||
- `public/styles/` - Visual style presets (JSON files)
|
||||
- `public/libs/` - Third-party libraries (D3.js, TinyMCE, etc.)
|
||||
- `public/images/` - Backgrounds, UI elements
|
||||
- `public/charges/` - Heraldic symbols and coat of arms elements
|
||||
- `public/config/` - Heightmap templates and configurations
|
||||
- `public/heightmaps/` - Terrain generation data
|
||||
- `dist/` - Production build output (generated by `npm run build`)
|
||||
**Generators**
|
||||
Implement the procedural world simulation and populate or update world data based on generation settings.
|
||||
|
||||
## Common Tasks
|
||||
**Editors**
|
||||
Implement interactive editing tools used by the user.
|
||||
Editors perform controlled mutations of the world state and can be viewed as **interactive generators**.
|
||||
|
||||
### Making Code Changes
|
||||
**Renderer**
|
||||
Converts the world state into **SVG or WebGL graphics**.
|
||||
Rendering must be a **pure visualization step** and must **not modify world data**.
|
||||
|
||||
1. **TypeScript files** (`src/utils/*.ts`):
|
||||
- Edit TypeScript files in the `src/utils/` directory
|
||||
- Changes are automatically recompiled and hot-reloaded in dev mode
|
||||
- Run `npm run build` to verify TypeScript compilation succeeds
|
||||
2. **JavaScript files** (`public/*.js`, `public/modules/*.js`):
|
||||
- Edit JavaScript files directly in the `public/` directory
|
||||
- Changes are automatically reflected in dev mode via HMR
|
||||
- **Note**: Core application logic is still in JavaScript and gradually being migrated
|
||||
3. **Always test map generation** after making changes
|
||||
4. Update version in `public/versioning.js` for all changes
|
||||
5. For production builds, update file hashes in `src/index.html` if needed (format: `file.js?v=1.108.1`)
|
||||
# Working Effectively
|
||||
|
||||
### Debugging Map Generation
|
||||
The project uses **NPM**, **Vite**, and **TypeScript** for development and building.
|
||||
|
||||
- Open browser developer tools console
|
||||
- Look for timing logs, e.g. "TOTAL: ~0.76s"
|
||||
- Map generation logs show each step (heightmap, rivers, states, etc.)
|
||||
- Error messages will indicate specific generation failures
|
||||
## Setup
|
||||
|
||||
### Testing Different Map Types
|
||||
Install dependencies: `npm install`
|
||||
|
||||
- Use "New Map!" button for quick regeneration
|
||||
- Access "Layers" menu to change map visualization
|
||||
- Available presets: Political, Cultural, Religions, Biomes, Heightmap, Physical, Military
|
||||
Requirements: Node.js **>= 24.0.0**
|
||||
|
||||
## Troubleshooting
|
||||
## Development
|
||||
|
||||
### Application Won't Load
|
||||
Start the development server: `npm run dev`
|
||||
|
||||
- Run `npm install` to ensure dependencies are installed
|
||||
- Run `npm run dev` to start the development server
|
||||
- Check console for JavaScript/TypeScript errors
|
||||
- Verify all files are present in repository
|
||||
- Ensure Node.js version >= 24.0.0 (`node --version`)
|
||||
Access the application at: http://localhost:5173
|
||||
|
||||
### Build Failures
|
||||
## Build
|
||||
|
||||
- Check TypeScript compilation errors (`tsc` output)
|
||||
- Verify all dependencies are installed (`npm install`)
|
||||
- Check `tsconfig.json` for configuration issues
|
||||
- Look for import/module resolution errors
|
||||
Create a production build: `npm run build`
|
||||
|
||||
### Map Generation Fails
|
||||
Build steps:
|
||||
|
||||
- Check browser console for error messages
|
||||
- Look for specific module failures in generation logs
|
||||
- Try refreshing page and generating new map
|
||||
- Verify build completed successfully if using production build
|
||||
|
||||
### Performance Issues
|
||||
|
||||
- Map generation should complete in ~1 second for standard configurations
|
||||
- If slower, check browser console for errors
|
||||
- Development mode may be slower due to HMR overhead
|
||||
|
||||
Remember: This is a sophisticated application that generates complete fantasy worlds with political systems, geography, cultures, and detailed cartographic elements. The project is gradually migrating from vanilla JavaScript to TypeScript. Always validate that your changes preserve the core map generation functionality.
|
||||
1. TypeScript compilation (`tsc`)
|
||||
2. Vite build
|
||||
3. Output written to `dist/`
|
||||
|
|
|
|||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -5,4 +5,8 @@
|
|||
/dist
|
||||
/coverage
|
||||
/playwright-report
|
||||
/test-results
|
||||
/test-results
|
||||
/_bmad
|
||||
/_bmad-output
|
||||
.github/agents/bmad-*
|
||||
.github/prompts/bmad-*
|
||||
16
README.md
16
README.md
|
|
@ -16,8 +16,6 @@ Join our [Discord server](https://discordapp.com/invite/X7E84HU) and [Reddit com
|
|||
|
||||
Contact me via [email](mailto:azgaar.fmg@yandex.com) if you have non-public suggestions. For bug reports please use [GitHub issues](https://github.com/Azgaar/Fantasy-Map-Generator/issues) or _#fmg-bugs_ channel on Discord. If you are facing performance issues, please read [the tips](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Tips#performance-tips).
|
||||
|
||||
Pull requests are highly welcomed. The codebase is messy and requires re-design. I will appreciate if you start with minor changes. Check out the [data model](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Data-model) before contributing.
|
||||
|
||||
You can support the project on [Patreon](https://www.patreon.com/azgaar).
|
||||
|
||||
_Inspiration:_
|
||||
|
|
@ -27,3 +25,17 @@ _Inspiration:_
|
|||
- Amit Patel's [_Polygonal Map Generation for Games_](http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation)
|
||||
|
||||
- Scott Turner's [_Here Dragons Abound_](https://heredragonsabound.blogspot.com)
|
||||
|
||||
## Contribution
|
||||
|
||||
Pull requests are highly welcomed. The codebase is messy and I will appreciate if you start with minor changes. Check out the [data model](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Data-model) before contributing.
|
||||
|
||||
The codebase is gradually transitioning from **vanilla JavaScript to TypeScript** while maintaining compatibility with the existing generation pipeline and old `.map` user files.
|
||||
|
||||
The expected **future** architecture is based on a separation between **world data**, **procedural generation**, **interactive editing**, and **rendering**. The application is conceptually divided into four main layers: world data and styles (state), generators (model), editors (controllers), renderers (view).
|
||||
|
||||
Flow:
|
||||
settings → generators → world data → renderer
|
||||
UI → editors → world data → renderer.
|
||||
|
||||
The data layer must contain no logic and no rendering code. Generators implement the procedural world simulation. Editors implement interactive editing tools used by the user. They perform controlled mutations of the world state. Editors can be viewed as interactive generators. The renderer converts the world state into SVG or WebGl graphics. Renderer must be pure visualization step and not modify world data.
|
||||
|
|
|
|||
|
|
@ -1141,7 +1141,6 @@ function reGraph() {
|
|||
pack.cells = packCells;
|
||||
pack.cells.p = newCells.p;
|
||||
pack.cells.g = createTypedArray({maxValue: grid.points.length, from: newCells.g});
|
||||
pack.cells.q = d3.quadtree(newCells.p.map(([x, y], i) => [x, y, i]));
|
||||
pack.cells.h = createTypedArray({maxValue: 100, from: newCells.h});
|
||||
pack.cells.area = createTypedArray({maxValue: UINT16_MAX, length: packCells.i.length}).map((_, cellId) => {
|
||||
const area = Math.abs(d3.polygonArea(getPackPolygon(cellId)));
|
||||
|
|
@ -1234,7 +1233,7 @@ function showStatistics() {
|
|||
INFO && console.info(stats);
|
||||
|
||||
// Dispatch event for test automation and external integrations
|
||||
window.dispatchEvent(new CustomEvent('map:generated', { detail: { seed, mapId } }));
|
||||
window.dispatchEvent(new CustomEvent("map:generated", {detail: {seed, mapId}}));
|
||||
}
|
||||
|
||||
const regenerateMap = debounce(async function (options) {
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ function getName(id) {
|
|||
}
|
||||
|
||||
function getGraph(currentGraph) {
|
||||
const newGraph = shouldRegenerateGrid(currentGraph, seed) ? generateGrid() : deepCopy(currentGraph);
|
||||
const newGraph = shouldRegenerateGrid(currentGraph, seed) ? generateGrid() : structuredClone(currentGraph);
|
||||
delete newGraph.cells.h;
|
||||
return newGraph;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* For the changes that may be interesting to end users, update the `latestPublicChanges` array below (new changes on top).
|
||||
*/
|
||||
|
||||
const VERSION = "1.113.5";
|
||||
const VERSION = "1.113.6";
|
||||
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { mean, quadtree } from "d3";
|
|||
import { clipPolyline } from "lineclip";
|
||||
import type { PackedGraph } from "../types/PackedGraph";
|
||||
import {
|
||||
deepCopy,
|
||||
findAllCellsInRadius,
|
||||
findClosestCell,
|
||||
generateGrid,
|
||||
|
|
@ -60,9 +59,10 @@ class Resampler {
|
|||
grid.cells.temp = new Int8Array(grid.points.length);
|
||||
grid.cells.prec = new Uint8Array(grid.points.length);
|
||||
|
||||
const parentPackQ = quadtree(parentMap.pack.cells.p.map(([x, y], i) => [x, y, i]));
|
||||
grid.points.forEach(([x, y]: [number, number], newGridCell: number) => {
|
||||
const [parentX, parentY] = inverse(x, y);
|
||||
const parentPackCell = parentMap.pack.cells.q.find(
|
||||
const parentPackCell = parentPackQ.find(
|
||||
parentX,
|
||||
parentY,
|
||||
Infinity,
|
||||
|
|
@ -441,11 +441,12 @@ class Resampler {
|
|||
parentMap: ParentMapDefinition,
|
||||
inverse: (x: number, y: number) => [number, number],
|
||||
) {
|
||||
const parentPackQ = quadtree(parentMap.pack.cells.p.map(([x, y], i) => [x, y, i]));
|
||||
pack.features.forEach((feature) => {
|
||||
if (!feature) return;
|
||||
const [x, y] = pack.cells.p[feature.firstCell];
|
||||
const [parentX, parentY] = inverse(x, y);
|
||||
const parentCell = parentMap.pack.cells.q.find(
|
||||
const parentCell = parentPackQ.find(
|
||||
parentX,
|
||||
parentY,
|
||||
Infinity,
|
||||
|
|
@ -498,9 +499,9 @@ class Resampler {
|
|||
process(options: ResamplerProcessOptions): void {
|
||||
const { projection, inverse, scale } = options;
|
||||
const parentMap = {
|
||||
grid: deepCopy(grid),
|
||||
pack: deepCopy(pack),
|
||||
notes: deepCopy(notes),
|
||||
grid: structuredClone(grid),
|
||||
pack: structuredClone(pack),
|
||||
notes: structuredClone(notes),
|
||||
};
|
||||
const riversData = this.saveRiversData(pack.rivers);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,46 +16,6 @@ export const unique = <T>(array: T[]): T[] => {
|
|||
return [...new Set(array)];
|
||||
};
|
||||
|
||||
/**
|
||||
* Deep copy an object or array
|
||||
* @param {Object|Array} obj - The object or array to deep copy
|
||||
* @returns A deep copy of the object or array
|
||||
*/
|
||||
export const deepCopy = <T>(obj: T): T => {
|
||||
const id = (x: T): T => x;
|
||||
const dcTArray = (a: T[]): T[] => a.map(id);
|
||||
const dcObject = (x: object): object =>
|
||||
Object.fromEntries(Object.entries(x).map(([k, d]) => [k, dcAny(d)]));
|
||||
const dcAny = (x: any): any =>
|
||||
x instanceof Object ? (cf.get(x.constructor) || id)(x) : x;
|
||||
// don't map keys, probably this is what we would expect
|
||||
const dcMapCore = (m: Map<any, any>): [any, any][] =>
|
||||
[...m.entries()].map(([k, v]) => [k, dcAny(v)]);
|
||||
|
||||
const cf: Map<any, (x: any) => any> = new Map<any, (x: any) => any>([
|
||||
[Int8Array, dcTArray],
|
||||
[Uint8Array, dcTArray],
|
||||
[Uint8ClampedArray, dcTArray],
|
||||
[Int16Array, dcTArray],
|
||||
[Uint16Array, dcTArray],
|
||||
[Int32Array, dcTArray],
|
||||
[Uint32Array, dcTArray],
|
||||
[Float32Array, dcTArray],
|
||||
[Float64Array, dcTArray],
|
||||
[BigInt64Array, dcTArray],
|
||||
[BigUint64Array, dcTArray],
|
||||
[Map, (m) => new Map(dcMapCore(m))],
|
||||
[WeakMap, (m) => new WeakMap(dcMapCore(m))],
|
||||
[Array, (a) => a.map(dcAny)],
|
||||
[Set, (s) => [...s.values()].map(dcAny)],
|
||||
[Date, (d) => new Date(d.getTime())],
|
||||
[Object, dcObject],
|
||||
// ... extend here to implement their custom deep copy
|
||||
]);
|
||||
|
||||
return dcAny(obj);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the appropriate typed array constructor based on the maximum value
|
||||
* @param {number} maxValue - The maximum value that will be stored in the array
|
||||
|
|
@ -109,7 +69,6 @@ declare global {
|
|||
interface Window {
|
||||
last: typeof last;
|
||||
unique: typeof unique;
|
||||
deepCopy: typeof deepCopy;
|
||||
getTypedArray: typeof getTypedArray;
|
||||
createTypedArray: typeof createTypedArray;
|
||||
INT8_MAX: number;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export const getSegmentId = (
|
|||
};
|
||||
|
||||
/**
|
||||
* Creates a debounced function that delays invoking func until after ms milliseconds have elapsed
|
||||
* Creates a debounced function that delays next func call until after ms milliseconds
|
||||
* @param func - The function to debounce
|
||||
* @param ms - The number of milliseconds to delay
|
||||
* @returns The debounced function
|
||||
|
|
@ -212,11 +212,14 @@ export const isCtrlClick = (event: MouseEvent | KeyboardEvent): boolean => {
|
|||
* @returns Formatted date string
|
||||
*/
|
||||
export const generateDate = (from: number = 100, to: number = 1000): string => {
|
||||
return new Date(rand(from, to), rand(12), rand(31)).toLocaleDateString("en", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
});
|
||||
return new Date(rand(from, to), rand(11), rand(1, 28)).toLocaleDateString(
|
||||
"en",
|
||||
{
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Alea from "alea";
|
||||
import { color } from "d3";
|
||||
import { color, quadtree } from "d3";
|
||||
import Delaunator from "delaunator";
|
||||
import {
|
||||
type Cells,
|
||||
|
|
@ -267,6 +267,11 @@ export const findGridAll = (
|
|||
return found;
|
||||
};
|
||||
|
||||
const quadtreeCache = new WeakMap<
|
||||
object,
|
||||
ReturnType<typeof quadtree<[number, number, number]>>
|
||||
>();
|
||||
|
||||
/**
|
||||
* Returns the index of the packed cell containing the given x and y coordinates
|
||||
* @param {number} x - The x coordinate
|
||||
|
|
@ -278,10 +283,16 @@ export const findClosestCell = (
|
|||
x: number,
|
||||
y: number,
|
||||
radius = Infinity,
|
||||
packedGraph: any,
|
||||
pack: { cells: { p: [number, number][] } },
|
||||
): number | undefined => {
|
||||
if (!packedGraph.cells?.q) return;
|
||||
const found = packedGraph.cells.q.find(x, y, radius);
|
||||
if (!pack.cells?.p) throw new Error("Pack cells not found");
|
||||
let qTree = quadtreeCache.get(pack.cells.p);
|
||||
if (!qTree) {
|
||||
qTree = quadtree(pack.cells.p.map(([px, py], i) => [px, py, i]));
|
||||
if (!qTree) throw new Error("Failed to create quadtree");
|
||||
quadtreeCache.set(pack.cells.p, qTree);
|
||||
}
|
||||
const found = qTree.find(x, y, radius);
|
||||
return found ? found[2] : undefined;
|
||||
};
|
||||
|
||||
|
|
@ -415,8 +426,13 @@ export const findAllCellsInRadius = (
|
|||
radius: number,
|
||||
packedGraph: any,
|
||||
): number[] => {
|
||||
// Use findAllInQuadtree directly instead of relying on prototype extension
|
||||
const found = findAllInQuadtree(x, y, radius, packedGraph.cells.q);
|
||||
const q = quadtree<[number, number, number]>(
|
||||
packedGraph.cells.p.map(
|
||||
([px, py]: [number, number], i: number) =>
|
||||
[px, py, i] as [number, number, number],
|
||||
),
|
||||
);
|
||||
const found = findAllInQuadtree(x, y, radius, q);
|
||||
return found.map((r: any) => r[2]);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ window.list = list;
|
|||
|
||||
import {
|
||||
createTypedArray,
|
||||
deepCopy,
|
||||
getTypedArray,
|
||||
last,
|
||||
TYPED_ARRAY_MAX_VALUES,
|
||||
|
|
@ -35,7 +34,6 @@ import {
|
|||
|
||||
window.last = last;
|
||||
window.unique = unique;
|
||||
window.deepCopy = deepCopy;
|
||||
window.getTypedArray = getTypedArray;
|
||||
window.createTypedArray = createTypedArray;
|
||||
window.INT8_MAX = TYPED_ARRAY_MAX_VALUES.INT8_MAX;
|
||||
|
|
@ -274,90 +272,89 @@ window.drawPoint = drawPoint;
|
|||
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,
|
||||
C_12,
|
||||
calculateVoronoi,
|
||||
findAllCellsInRadius,
|
||||
getPackPolygon,
|
||||
getGridPolygon,
|
||||
poissonDiscSampler,
|
||||
isLand,
|
||||
isWater,
|
||||
findAllInQuadtree,
|
||||
drawHeights,
|
||||
capitalize,
|
||||
clipPoly,
|
||||
getSegmentId,
|
||||
connectVertices,
|
||||
convertTemperature,
|
||||
createTypedArray,
|
||||
debounce,
|
||||
throttle,
|
||||
parseError,
|
||||
getBase64,
|
||||
openURL,
|
||||
wiki,
|
||||
link,
|
||||
isCtrlClick,
|
||||
generateDate,
|
||||
getLongitude,
|
||||
getLatitude,
|
||||
getCoordinates,
|
||||
initializePrompt,
|
||||
distanceSquared,
|
||||
drawCellsValue,
|
||||
drawHeights,
|
||||
drawPath,
|
||||
drawPoint,
|
||||
drawPolygons,
|
||||
drawRouteConnections,
|
||||
drawPoint,
|
||||
drawPath,
|
||||
each,
|
||||
findAllCellsInRadius,
|
||||
findAllInQuadtree,
|
||||
findClosestCell,
|
||||
findGridAll,
|
||||
findGridCell,
|
||||
findPath,
|
||||
gauss,
|
||||
generateDate,
|
||||
generateGrid,
|
||||
generateSeed,
|
||||
getAdjective,
|
||||
getBase64,
|
||||
getColors,
|
||||
getComposedPath,
|
||||
getCoordinates,
|
||||
getGridPolygon,
|
||||
getIntegerFromSI,
|
||||
getIsolines,
|
||||
getLatitude,
|
||||
getLongitude,
|
||||
getMixedColor,
|
||||
getNextId,
|
||||
getNumberInRange,
|
||||
getPackPolygon,
|
||||
getPolesOfInaccessibility,
|
||||
getRandomColor,
|
||||
getSegmentId,
|
||||
getTypedArray,
|
||||
getVertexPath,
|
||||
initializePrompt,
|
||||
isCtrlClick,
|
||||
isLand,
|
||||
isValidJSON,
|
||||
isVowel,
|
||||
isWater,
|
||||
last,
|
||||
lerp,
|
||||
lim,
|
||||
link,
|
||||
list,
|
||||
minmax,
|
||||
normalize,
|
||||
nth,
|
||||
openURL,
|
||||
P,
|
||||
parseError,
|
||||
parseTransform,
|
||||
Pint,
|
||||
poissonDiscSampler,
|
||||
ra,
|
||||
rand,
|
||||
rn,
|
||||
rollups,
|
||||
round,
|
||||
rw,
|
||||
safeParseJSON,
|
||||
sanitizeId,
|
||||
shouldRegenerateGrid,
|
||||
si,
|
||||
splitInTwo,
|
||||
throttle,
|
||||
toHEX,
|
||||
trimVowels,
|
||||
TYPED_ARRAY_MAX_VALUES,
|
||||
unique,
|
||||
wiki,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue