Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ProbableTrain/MapGenerator
/ functions
Functions
327 in github.com/ProbableTrain/MapGenerator
⨍
Functions
327
◇
Types & classes
78
↓ 90 callers
Method
add
(tensor: Tensor, smooth: boolean)
src/ts/impl/tensor.ts:40
↓ 72 callers
Method
clone
()
src/ts/vector.ts:53
↓ 25 callers
Method
multiplyScalar
(s: number)
src/ts/vector.ts:118
↓ 24 callers
Method
sub
(v: Vector)
src/ts/vector.ts:173
↓ 19 callers
Method
drawPolyline
(line: Vector[])
src/ts/ui/canvas_wrapper.ts:309
↓ 18 callers
Method
add
(v: Vector)
src/ts/vector.ts:40
↓ 15 callers
Method
setStrokeStyle
(colour: string)
src/ts/ui/canvas_wrapper.ts:204
↓ 14 callers
Method
worldToScreen
* Edits vector
src/ts/ui/domain_controller.ts:184
↓ 13 callers
Method
drawPolygon
(polygon: Vector[])
src/ts/ui/canvas_wrapper.ts:290
↓ 12 callers
Method
setLineWidth
(width: number)
src/ts/ui/canvas_wrapper.ts:197
↓ 11 callers
Method
setFillStyle
(colour: string)
src/ts/ui/canvas_wrapper.ts:105
↓ 11 callers
Method
setOptions
(options: RoughOptions)
src/ts/ui/canvas_wrapper.ts:262
↓ 10 callers
Method
distanceToSquared
(v: Vector)
src/ts/vector.ts:71
↓ 9 callers
Method
grid
(major: boolean)
src/ts/impl/streamlines.ts:350
↓ 9 callers
Method
zeroVector
()
src/ts/vector.ts:6
↓ 8 callers
Method
divideScalar
(s: number)
src/ts/vector.ts:88
↓ 8 callers
Method
getInstance
()
src/ts/ui/domain_controller.ts:69
↓ 8 callers
Method
insidePolygon
(point: Vector, polygon: Vector[])
src/ts/impl/polygon_util.ts:164
↓ 8 callers
Method
polygonToMesh
* Extrude a polygon into a THREE.js mesh
src/ts/model_generator.ts:176
↓ 8 callers
Method
setState
(s: ModelGeneratorStates)
src/ts/model_generator.ts:60
↓ 7 callers
Method
dot
(v: Vector)
src/ts/vector.ts:96
↓ 7 callers
Method
drawRectangle
(x: number, y: number, width: number, height: number)
src/ts/ui/canvas_wrapper.ts:134
↓ 7 callers
Method
length
()
src/ts/vector.ts:104
↓ 7 callers
Method
resizeGeometry
* Shrink or expand polygon
src/ts/impl/polygon_util.ts:141
↓ 7 callers
Method
threeToBlender
* Rotate and scale mesh so up is in the right direction
src/ts/model_generator.ts:168
↓ 6 callers
Method
clearStreamlines
()
src/ts/ui/road_gui.ts:91
↓ 6 callers
Method
streamlines
(major: boolean)
src/ts/impl/streamlines.ts:346
↓ 5 callers
Method
addGridAtLocation
(location: Vector)
src/ts/ui/tensor_field_gui.ts:64
↓ 5 callers
Method
addPolyline
(line: Vector[])
src/ts/impl/grid_storage.ts:43
↓ 5 callers
Method
candidateSeeds
(major: boolean)
src/ts/impl/streamlines.ts:342
↓ 5 callers
Method
clamp_css_byte
(i: number)
src/ts/util.ts:142
↓ 5 callers
Method
draw
()
src/main.ts:285
↓ 5 callers
Method
findPolygons
()
src/ts/impl/polygon_finder.ts:150
↓ 5 callers
Method
generateRoads
(animate=false)
src/ts/ui/road_gui.ts:95
↓ 5 callers
Method
randomRange
(max: number, min=0)
src/ts/util.ts:35
↓ 5 callers
Method
redraw
()
src/ts/ui/main_gui.ts:98
↓ 5 callers
Method
reset
()
src/ts/ui/buildings.ts:138
↓ 5 callers
Method
setPreGenerateCallback
(callback: () => any)
src/ts/ui/road_gui.ts:83
↓ 5 callers
Method
simplifyStreamline
(streamline: Vector[])
src/ts/impl/streamlines.ts:249
↓ 5 callers
Method
vectorOffScreen
(v: Vector)
src/ts/impl/water_generator.ts:238
↓ 4 callers
Method
addSample
* Does not enforce separation * Does not clone
src/ts/impl/grid_storage.ts:53
↓ 4 callers
Method
addSegment
(segment: Segment)
src/ts/impl/graph.ts:33
↓ 4 callers
Method
changeColourScheme
* @param {string} scheme Matches a scheme name in colour_schemes.json
src/main.ts:145
↓ 4 callers
Method
equals
(v: Vector)
src/ts/vector.ts:100
↓ 4 callers
Method
initFolder
()
src/ts/ui/road_gui.ts:38
↓ 4 callers
Method
onLand
(point: Vector)
src/ts/impl/tensor_field.ts:119
↓ 4 callers
Method
parse_css_float
(str: string)
src/ts/util.ts:157
↓ 4 callers
Method
vectorsToSegment
(v1: Vector, v2: Vector)
src/ts/impl/graph.ts:228
↓ 3 callers
Method
addAll
* Add all samples from another grid to this one
src/ts/impl/grid_storage.ts:33
↓ 3 callers
Method
addParks
()
src/ts/ui/main_gui.ts:189
↓ 3 callers
Method
calcPolygonArea
(polygon: Vector[])
src/ts/impl/polygon_util.ts:61
↓ 3 callers
Method
clearCanvas
()
src/ts/ui/canvas_wrapper.ts:269
↓ 3 callers
Method
complexifyStreamline
* Insert samples in streamline until separated by dstep
src/ts/impl/water_generator.ts:203
↓ 3 callers
Method
createCanvasWrapper
(c: HTMLCanvasElement, scale=1, resizeToWindow=true)
src/ts/ui/style.ts:254
↓ 3 callers
Method
css_hue_to_rgb
(m1: number, m2: number, h: number)
src/ts/util.ts:163
↓ 3 callers
Method
drawRectangle
(x: number, y: number, width: number, height: number)
src/ts/ui/canvas_wrapper.ts:280
↓ 3 callers
Method
getSampleCoords
* @return {Vector} Cell coords corresponding to vector * Performance important - called at every integration step
src/ts/impl/grid_storage.ts:146
↓ 3 callers
Method
getSeed
* Tries this.candidateSeeds first, then samples using this.samplePoint
src/ts/impl/streamlines.ts:309
↓ 3 callers
Method
integrate
(point: Vector, major: boolean)
src/ts/impl/integrator.ts:36
↓ 3 callers
Method
integrateStreamline
* By simultaneously integrating in both directions we reduce the impact of circles not joining * up as the error matches at the join
src/ts/impl/streamlines.ts:450
↓ 3 callers
Method
isValidSample
(major: boolean, point: Vector, dSq: number, bothGrids=false)
src/ts/impl/streamlines.ts:333
↓ 3 callers
Method
lengthSq
()
src/ts/vector.ts:108
↓ 3 callers
Method
multiply
(v: Vector)
src/ts/vector.ts:112
↓ 3 callers
Method
pan
* @param {Vector} delta in world space
src/ts/ui/domain_controller.ts:79
↓ 3 callers
Method
parse_css_int
(str: string)
src/ts/util.ts:151
↓ 3 callers
Method
pointInBounds
(v: Vector)
src/ts/impl/streamlines.ts:354
↓ 3 callers
Method
setExistingStreamlines
(existingStreamlines: RoadGUI[])
src/ts/ui/road_gui.ts:79
↓ 3 callers
Method
setLength
(length: number)
src/ts/vector.ts:169
↓ 3 callers
Method
setPostGenerateCallback
(callback: () => any)
src/ts/ui/road_gui.ts:87
↓ 3 callers
Method
setRecommended
* 4 Grids, one radial
src/ts/ui/tensor_field_gui.ts:40
↓ 3 callers
Method
showTensorField
()
src/main.ts:281
↓ 3 callers
Method
updateGui
(gui: dat.GUI)
src/ts/util.ts:16
↓ 3 callers
Method
vectorOutOfBounds
(gridV: Vector, bounds: Vector)
src/ts/impl/grid_storage.ts:137
↓ 2 callers
Method
addField
(field: BasisField)
src/ts/impl/tensor_field.ts:59
↓ 2 callers
Method
addNeighbor
(node: Node)
src/ts/impl/graph.ts:37
↓ 2 callers
Method
addRadialRandom
()
src/ts/ui/tensor_field_gui.ts:53
↓ 2 callers
Method
angle
* Angle in radians to positive x-axis between -pi and pi
src/ts/vector.ts:49
↓ 2 callers
Method
calculateTheta
()
src/ts/impl/tensor.ts:97
↓ 2 callers
Method
changeCanvasScale
* Scale up canvas resolution for hiDPI displays
src/main.ts:162
↓ 2 callers
Method
clamp_css_float
(f: number)
src/ts/util.ts:147
↓ 2 callers
Method
copy
(v: Vector)
src/ts/vector.ts:57
↓ 2 callers
Method
createSVG
(svgElement: any)
src/ts/ui/canvas_wrapper.ts:100
↓ 2 callers
Method
createStreamline
* Finds seed and creates a streamline from that point * Pushes new candidate seeds to queue * @return {Vector[]} returns false if seed isn't
src/ts/impl/streamlines.ts:262
↓ 2 callers
Method
disableGlobalNoise
()
src/ts/impl/tensor_field.ts:45
↓ 2 callers
Method
distanceTo
(v: Vector)
src/ts/vector.ts:67
↓ 2 callers
Method
dotProductToSegment
(node: Node, start: Vector, differenceVector: Vector)
src/ts/impl/graph.ts:200
↓ 2 callers
Method
downloadPng
* Downloads image of map * Draws onto hidden canvas at requested resolution
src/main.ts:210
↓ 2 callers
Method
enableGlobalNoise
* Used when integrating coastline and river
src/ts/impl/tensor_field.ts:39
↓ 2 callers
Method
extendStreamline
* Mutates streamline
src/ts/impl/water_generator.ts:226
↓ 2 callers
Method
fromScalar
(s: number)
src/ts/vector.ts:10
↓ 2 callers
Method
fuzzyAddToQuadtree
(quadtree: d3.Quadtree<Node>, node: Node, radius: number)
src/ts/impl/graph.ts:205
↓ 2 callers
Method
generate
* Finds blocks, shrinks and divides them to create building lots
src/ts/ui/buildings.ts:150
↓ 2 callers
Method
getBestNextPoint
* Gets next best point to join streamline * returns null if there are no good candidates
src/ts/impl/streamlines.ts:159
↓ 2 callers
Method
getCameraPosition
()
src/ts/ui/domain_controller.ts:147
↓ 2 callers
Method
getMajor
()
src/ts/impl/tensor.ts:80
↓ 2 callers
Method
getMinor
()
src/ts/impl/tensor.ts:88
↓ 2 callers
Method
getNearbyPoints
* Returns points in cells surrounding v * Results include v, if it exists in the grid * @param {number} returns samples (kind of) closer tha
src/ts/impl/grid_storage.ts:111
↓ 2 callers
Method
getRotationalNoise
* Noise Angle is in degrees
src/ts/impl/tensor_field.ts:115
↓ 2 callers
Method
getSeaPolygon
* Might reverse input array
src/ts/impl/water_generator.ts:172
↓ 2 callers
Method
getTensorLine
(point: Vector, tensorV: Vector)
src/ts/ui/tensor_field_gui.ts:102
next →
1–100 of 327, ranked by callers