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
↓ 2 callers
Method
joinDanglingStreamlines
* Edits streamlines
src/ts/impl/streamlines.ts:95
↓ 2 callers
Method
lineToJts
(line: Vector[])
src/ts/impl/polygon_util.ts:189
↓ 2 callers
Method
negate
()
src/ts/vector.ts:124
↓ 2 callers
Method
normalize
()
src/ts/vector.ts:128
↓ 2 callers
Method
parseCSSColor
(css_str: string)
src/ts/util.ts:173
↓ 2 callers
Method
pointsBetween
* Returns array of points from v1 to v2 such that they are separated by at most dsep * not including v1
src/ts/impl/streamlines.ts:133
↓ 2 callers
Method
polygonArrayToPolygon
* [ v.x, v.y, v.x, v.y ]...
src/ts/impl/polygon_util.ts:215
↓ 2 callers
Method
polygonToJts
(polygon: Vector[])
src/ts/impl/polygon_util.ts:194
↓ 2 callers
Method
randomLocation
* World-space random location for tensor field spawn * Sampled from middle of screen (shrunk rectangle)
src/ts/ui/tensor_field_gui.ts:76
↓ 2 callers
Method
reachesEdges
(streamline: Vector[])
src/ts/impl/water_generator.ts:234
↓ 2 callers
Method
reset
()
src/ts/ui/tensor_field_gui.ts:159
↓ 2 callers
Method
rotate
(theta: number)
src/ts/impl/tensor.ts:61
↓ 2 callers
Method
samplePoint
(point: Vector)
src/ts/impl/tensor_field.ts:85
↓ 2 callers
Method
samplePoint
()
src/ts/impl/streamlines.ts:298
↓ 2 callers
Method
setCameraDirection
* Change camera position for pseudo3D buildings
src/main.ts:171
↓ 2 callers
Method
setDragDisabled
(disable: boolean)
src/ts/ui/drag_controller.ts:37
↓ 2 callers
Method
setPathIterations
* Sets path iterations so that a road can cover the screen
src/ts/ui/road_gui.ts:135
↓ 2 callers
Method
setScreenDimensions
()
src/ts/ui/domain_controller.ts:63
↓ 2 callers
Method
shrink
* Properly shrink polygon so the edges are all the same distance from the road
src/ts/impl/polygon_finder.ts:73
↓ 2 callers
Method
stepDivide
(polygon: Vector[])
src/ts/impl/polygon_finder.ts:135
↓ 2 callers
Method
stepShrink
(polygon: Vector[])
src/ts/impl/polygon_finder.ts:97
↓ 2 callers
Method
streamlineIntegrationStep
* // TODO this doesn't work well - consider something disallowing one direction (F/B) to turn more than 180 deg * One step of the streamline inte
src/ts/impl/streamlines.ts:409
↓ 2 callers
Method
zoomToWorld
* Edits vector
src/ts/ui/domain_controller.ts:163
↓ 1 callers
Method
addDevParamsToFolder
(params: StreamlineParams, folder: dat.GUI)
src/ts/ui/water_gui.ts:101
↓ 1 callers
Method
addDevParamsToFolder
(params: StreamlineParams, folder: dat.GUI)
src/ts/ui/road_gui.ts:121
↓ 1 callers
Method
addExistingStreamlines
* Assumes s has already generated
src/ts/impl/streamlines.ts:206
↓ 1 callers
Method
addGrid
(centre: Vector, size: number, decay: number, theta: number)
src/ts/impl/tensor_field.ts:49
↓ 1 callers
Method
addGridRandom
()
src/ts/ui/tensor_field_gui.ts:60
↓ 1 callers
Method
addRadial
(centre: Vector, size: number, decay: number)
src/ts/impl/tensor_field.ts:54
↓ 1 callers
Method
angleBetween
* -pi to pi
src/ts/vector.ts:17
↓ 1 callers
Method
averagePoint
(polygon: Vector[])
src/ts/impl/polygon_util.ts:155
↓ 1 callers
Method
complexifyStreamlineRecursive
(v1: Vector, v2: Vector)
src/ts/impl/water_generator.ts:211
↓ 1 callers
Method
createAllStreamlines
* All at once - will freeze if dsep small
src/ts/impl/streamlines.ts:235
↓ 1 callers
Method
createCanvasWrapper
(c: HTMLCanvasElement, scale=1, resizeToWindow=true)
src/ts/ui/style.ts:131
↓ 1 callers
Method
createCoast
()
src/ts/impl/water_generator.ts:57
↓ 1 callers
Method
createRiver
()
src/ts/impl/water_generator.ts:91
↓ 1 callers
Method
createSVG
(svgElement: any)
src/ts/ui/canvas_wrapper.ts:253
↓ 1 callers
Method
deleteDanglingNodes
* Remove dangling edges from graph to facilitate polygon finding
src/ts/impl/graph.ts:113
↓ 1 callers
Method
divide
(animate=false)
src/ts/impl/polygon_finder.ts:106
↓ 1 callers
Method
downloadFile
(filename: string, file: any)
src/main.ts:202
↓ 1 callers
Method
downloadHeightmap
* Same as downloadPng but uses Heightmap style
src/main.ts:230
↓ 1 callers
Method
downloadSTL
()
src/main.ts:175
↓ 1 callers
Method
downloadSVG
* Downloads svg of map * Draws onto hidden svg at requested resolution
src/main.ts:241
↓ 1 callers
Method
drawCircle
(centre: Vector, radius: number)
src/ts/ui/canvas_wrapper.ts:186
↓ 1 callers
Method
drawFrame
(left: number, right: number, up: number, down: number)
src/ts/ui/canvas_wrapper.ts:258
↓ 1 callers
Method
drawSquare
(centre: Vector, radius: number)
src/ts/ui/canvas_wrapper.ts:302
↓ 1 callers
Method
filterPolygonsByWater
(polygons: Vector[][])
src/ts/impl/polygon_finder.ts:177
↓ 1 callers
Method
fuzzySegmentsEqual
(s1: Segment, s2: Segment, tolerance=0.0001)
src/ts/impl/graph.ts:177
↓ 1 callers
Method
generateEverything
()
src/ts/ui/main_gui.ts:238
↓ 1 callers
Method
generateRoads
()
src/ts/ui/water_gui.ts:55
↓ 1 callers
Method
getBasisFields
()
src/ts/impl/tensor_field.ts:81
↓ 1 callers
Method
getBlocks
()
src/ts/ui/main_gui.ts:311
↓ 1 callers
Method
getBuildingSides
* Get sides of buildings by joining corresponding edges between the roof and ground
src/ts/ui/buildings.ts:68
↓ 1 callers
Method
getCrossLocations
()
src/ts/ui/tensor_field_gui.ts:83
↓ 1 callers
Method
getNodesAlongSegment
* Given a segment, step along segment and find all nodes along it
src/ts/impl/graph.ts:126
↓ 1 callers
Method
getRightmostNode
(nodeFrom: Node, nodeTo: Node)
src/ts/impl/polygon_finder.ts:217
↓ 1 callers
Method
getSTL
()
src/ts/model_generator.ts:47
↓ 1 callers
Method
getTensor
(point: Vector)
src/ts/impl/basis_field.ts:119
↓ 1 callers
Method
heightVectorToScreen
(v: Vector, h: number, d: number, camera: Vector)
src/ts/ui/buildings.ts:55
↓ 1 callers
Method
inParks
(point: Vector)
src/ts/impl/tensor_field.ts:128
↓ 1 callers
Method
lineRectanglePolygonIntersection
* Used to create sea polygon
src/ts/impl/polygon_util.ts:32
↓ 1 callers
Method
polygonToPolygonArray
* [ v.x, v.y, v.x, v.y ]...
src/ts/impl/polygon_util.ts:203
↓ 1 callers
Method
recursiveWalk
(visited: Node[], count=0)
src/ts/impl/polygon_finder.ts:200
↓ 1 callers
Method
register
* @param {(() => Vector)} Gets centre point * @param {((v: Vector) => void)} Called on move with delta vector * @param {(() => void)} Called
src/ts/ui/drag_controller.ts:105
↓ 1 callers
Method
removeField
(field: BasisField)
src/ts/impl/tensor_field.ts:63
↓ 1 callers
Method
removeFieldGUI
(field: BasisField, deregisterDrag: (() => void))
src/ts/ui/tensor_field_gui.ts:152
↓ 1 callers
Method
removePolygonAdjacencies
(polygon: Node[])
src/ts/impl/polygon_finder.ts:186
↓ 1 callers
Method
roadsEmpty
()
src/ts/ui/road_gui.ts:75
↓ 1 callers
Method
scale
(s: number)
src/ts/impl/tensor.ts:54
↓ 1 callers
Method
screenToWorld
* Edits vector
src/ts/ui/domain_controller.ts:177
↓ 1 callers
Method
setAllStreamlines
(s: Vector[][])
src/ts/ui/buildings.ts:134
↓ 1 callers
Method
setBuildingProjections
* Recalculated when the camera moves
src/ts/ui/buildings.ts:45
↓ 1 callers
Method
setGui
(parent: dat.GUI, folder: dat.GUI)
src/ts/impl/basis_field.ts:110
↓ 1 callers
Method
setParamsSq
()
src/ts/impl/streamlines.ts:289
↓ 1 callers
Method
setX
(x: number)
src/ts/vector.ts:159
↓ 1 callers
Method
setY
(y: number)
src/ts/vector.ts:164
↓ 1 callers
Method
setZoomUpdate
(callback: () => any)
src/ts/ui/domain_controller.ts:156
↓ 1 callers
Method
streamlineTurned
* Tests whether streamline has turned through greater than 180 degrees
src/ts/impl/streamlines.ts:393
↓ 1 callers
Method
streamlinesToSegment
(streamlines: Vector[][])
src/ts/impl/graph.ts:217
↓ 1 callers
Method
subdividePolygon
* Recursively divide a polygon by its longest side until the minArea stopping condition is met
src/ts/impl/polygon_util.ts:80
↓ 1 callers
Method
update
()
src/main.ts:305
↓ 1 callers
Method
validStreamline
(s: Vector[])
src/ts/impl/streamlines.ts:285
↓ 1 callers
Method
vectorFarFromVectors
* Test whether v is at least d away from vectors * Performance very important - this is called at every integration step * @param {number}
src/ts/impl/grid_storage.ts:92
↓ 1 callers
Method
worldToGrid
(v: Vector)
src/ts/impl/grid_storage.ts:129
↓ 1 callers
Method
zoomToScreen
* Edits vector
src/ts/ui/domain_controller.ts:170
Method
addField
(field: BasisField)
src/ts/ui/tensor_field_gui.ts:135
Method
allStreamlines
()
src/ts/ui/road_gui.ts:64
Method
animate
(v: boolean)
src/ts/ui/buildings.ts:109
Method
animate
(b: boolean)
src/ts/ui/road_gui.ts:60
Function
appendSvgNode
(node: any)
src/ts/ui/canvas_wrapper.ts:42
Method
buildingModels
()
src/ts/ui/buildings.ts:38
Method
buildingModels
()
src/ts/ui/main_gui.ts:307
Function
bundle
()
gulpfile.js:69
Method
cameraDirection
(v: Vector)
src/ts/ui/domain_controller.ts:137
Function
canvasScale
()
src/ts/ui/canvas_wrapper.ts:67
Function
canvasScale
(scale: number)
src/ts/ui/style.ts:112
Function
centre
(centre: Vector)
src/ts/impl/basis_field.ts:24
Method
clearCanvas
()
src/ts/ui/canvas_wrapper.ts:109
Method
clearStreamlines
()
src/ts/impl/streamlines.ts:85
Method
coastline
()
src/ts/impl/water_generator.ts:41
← previous
next →
101–200 of 327, ranked by callers