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
Method
coastline
()
src/ts/ui/water_gui.ts:91
Method
coastlinePolygon
()
src/ts/ui/main_gui.ts:327
Function
constructor
(centre: Vector, protected _size: number, protected _decay: number)
src/ts/impl/basis_field.ts:20
Function
constructor
(protected field: TensorField)
src/ts/impl/integrator.ts:6
Function
constructor
(private canvas: HTMLCanvasElement, protected _scale=1, resizeToWindow=true)
src/ts/ui/canvas_wrapper.ts:31
Function
constructor
(protected dragController: DragController, protected colourScheme: ColourScheme)
src/ts/ui/style.ts:65
Method
constructor
()
src/main.ts:57
Method
constructor
(public x: number, public y: number)
src/ts/vector.ts:4
Method
constructor
(private ground: Vector[], private sea: Vector[], private coastline: Vector[],
src/ts/model_generator.ts:36
Method
constructor
* worldDimensions assumes origin of 0,0 * @param {number} dsep Separation distance between samples
src/ts/impl/grid_storage.ts:18
Method
constructor
(centre: Vector, size: number, decay: number, private _theta: number)
src/ts/impl/basis_field.ts:102
Method
constructor
(centre: Vector, size: number, decay: number)
src/ts/impl/basis_field.ts:130
Method
constructor
(public noiseParams: NoiseParams)
src/ts/impl/tensor_field.ts:32
Method
constructor
* Uses world-space coordinates
src/ts/impl/streamlines.ts:63
Method
constructor
(field: TensorField, private params: StreamlineParams)
src/ts/impl/integrator.ts:22
Method
constructor
(field: TensorField, private params: StreamlineParams)
src/ts/impl/integrator.ts:32
Method
constructor
(public value: Vector, public neighbors=new Set<Node>())
src/ts/impl/graph.ts:31
Method
constructor
* Create a graph from a set of streamlines * Finds all intersections, and creates a list of Nodes
src/ts/impl/graph.ts:53
Method
constructor
(private nodes: Node[], private params: PolygonParams, private tensorField: TensorField)
src/ts/impl/polygon_finder.ts:26
Method
constructor
(integrator: FieldIntegrator, origin: Vector, worldDimensions: Vector,
src/ts/impl/water_generator.ts:33
Method
constructor
(private r: number, private matrix: number[])
src/ts/impl/tensor.ts:7
Method
constructor
(private gui: dat.GUI)
src/ts/ui/drag_controller.ts:28
Method
constructor
(canvas: HTMLCanvasElement, scale=1, resizeToWindow=true)
src/ts/ui/canvas_wrapper.ts:93
Method
constructor
(canvas: HTMLCanvasElement, scale=1, resizeToWindow=true)
src/ts/ui/canvas_wrapper.ts:248
Method
constructor
(private tensorField: TensorField, protected params: WaterParams, integrator:
src/ts/ui/water_gui.ts:22
Method
constructor
(lots: Vector[][])
src/ts/ui/buildings.ts:25
Method
constructor
(private tensorField: TensorField, folder: dat.GUI, private redraw: () => void
src/ts/ui/buildings.ts:97
Method
constructor
(protected params: StreamlineParams, protected integrator: FieldIntegrator, pr
src/ts/ui/road_gui.ts:22
Method
constructor
(private guiFolder: dat.GUI, private tensorField: TensorField, private closeTensorFolder: () => void)
src/ts/ui/main_gui.ts:62
Method
constructor
()
src/ts/ui/domain_controller.ts:34
Method
constructor
(private guiFolder: dat.GUI, private dragController: DragController, public drawCentre: boolean, noise
src/ts/ui/tensor_field_gui.ts:19
Method
constructor
(c: HTMLCanvasElement, dragController: DragController, colourScheme: ColourScheme, private heightmap=false)
src/ts/ui/style.ts:126
Method
constructor
(c: HTMLCanvasElement, dragController: DragController, colourScheme: ColourScheme)
src/ts/ui/style.ts:249
Function
createSVG
(svgElement: any)
src/ts/ui/canvas_wrapper.ts:48
Method
cross
(v: Vector)
src/ts/vector.ts:63
Function
decay
(decay: number)
src/ts/impl/basis_field.ts:32
Method
divide
(v: Vector)
src/ts/vector.ts:77
Method
doesStreamlineCollideSelf
* Didn't end up using - bit expensive, used streamlineTurned instead * Stops spirals from forming * uses 0.5 dcirclejoin so that circles are
src/ts/impl/streamlines.ts:369
Method
dragEnd
()
src/ts/ui/drag_controller.ts:88
Method
dragMove
(event: any)
src/ts/ui/drag_controller.ts:75
Function
dragMoveListener
(delta: Vector)
src/ts/impl/basis_field.ts:44
Method
dragStart
(event: any)
src/ts/ui/drag_controller.ts:49
Function
dragStartListener
()
src/ts/impl/basis_field.ts:40
Method
draw
(style: Style, forceDraw=false, customCanvas?: CanvasWrapper)
src/ts/ui/main_gui.ts:261
Method
draw
(canvas: DefaultCanvasWrapper)
src/ts/ui/tensor_field_gui.ts:111
Method
draw
(canvas=this.canvas as DefaultCanvasWrapper)
src/ts/ui/style.ts:135
Method
draw
(canvas=this.canvas as RoughCanvasWrapper)
src/ts/ui/style.ts:264
Method
drawCityName
()
src/ts/ui/canvas_wrapper.ts:127
Method
drawFrame
(left: number, right: number, up: number, down: number)
src/ts/ui/canvas_wrapper.ts:120
Method
drawPolygon
(polygon: Vector[])
src/ts/ui/canvas_wrapper.ts:157
Method
drawPolyline
(line: Vector[])
src/ts/ui/canvas_wrapper.ts:208
Method
drawSquare
(centre: Vector, radius: number)
src/ts/ui/canvas_wrapper.ts:193
Method
fromAngle
(angle: number)
src/ts/impl/tensor.ts:15
Method
fromVector
(vector: Vector)
src/ts/impl/tensor.ts:19
Method
generate
* Generate an entire map with no control over the process
src/main.ts:132
Method
getBlocks
* Only used when creating the 3D model to 'fake' the roads
src/ts/ui/buildings.ts:120
Method
getCentrePoints
()
src/ts/impl/tensor_field.ts:77
Method
getCursor
* Change cursor style
src/ts/ui/drag_controller.ts:44
Method
getTensor
(point: Vector)
src/ts/impl/basis_field.ts:134
Function
getTensorWeight
* Interpolates between (0 and 1)^decay
src/ts/impl/basis_field.ts:85
Function
getWeightedTensor
(point: Vector, smooth: boolean)
src/ts/impl/basis_field.ts:51
Method
gridToWorld
(v: Vector)
src/ts/impl/grid_storage.ts:133
Function
height
()
src/ts/ui/canvas_wrapper.ts:63
Method
initFolder
()
src/ts/ui/water_gui.ts:36
Method
integrate
(point: Vector, major: boolean)
src/ts/impl/integrator.ts:26
Method
isDragging
()
src/ts/ui/drag_controller.ts:95
Method
isLeft
* Tests whether a point lies to the left of a line * @param {Vector} linePoint Point on the line * @param {Vector} lineDirection
src/ts/vector.ts:35
Method
isScrolling
* Used to stop drawing buildings while scrolling for certain styles * to keep the framerate up
src/ts/ui/domain_controller.ts:59
Method
isValidSample
* Tests whether v is at least d away from samples * Performance very important - this is called at every integration step * @param dSq=this.
src/ts/impl/grid_storage.ts:66
Method
lots
()
src/ts/ui/buildings.ts:113
Method
mainRoadPolygons
()
src/ts/ui/main_gui.ts:323
Method
majorRoadPolygons
()
src/ts/ui/main_gui.ts:319
Method
manuallyAddStreamline
* Assumes simplified * Used for adding river roads
src/ts/impl/water_generator.ts:160
Method
minorRoadPolygons
()
src/ts/ui/main_gui.ts:315
Method
models
()
src/ts/ui/buildings.ts:129
Function
needsUpdate
()
src/ts/ui/style.ts:116
Function
onLand
(point: Vector)
src/ts/impl/integrator.ts:16
Method
onScreen
(v: Vector)
src/ts/ui/domain_controller.ts:122
Method
origin
* Screen origin in world space
src/ts/ui/domain_controller.ts:87
Method
orthographic
(v: boolean)
src/ts/ui/domain_controller.ts:128
Method
pointInRectangle
(point: Vector, origin: Vector, dimensions: Vector)
src/ts/impl/polygon_util.ts:185
Method
polygons
()
src/ts/impl/polygon_finder.ts:28
Method
removeAllFolders
(gui: dat.GUI)
src/ts/util.ts:27
Function
removeFolderFromParent
()
src/ts/impl/basis_field.ts:64
Method
reset
()
src/ts/impl/tensor_field.ts:70
Method
reset
()
src/ts/impl/polygon_finder.ts:40
Function
resizeCanvas
()
src/ts/ui/canvas_wrapper.ts:82
Method
river
()
src/ts/ui/water_gui.ts:83
Method
riverPolygon
()
src/ts/impl/water_generator.ts:49
Method
riverPolygon
()
src/ts/ui/main_gui.ts:303
Method
riverSecondaryRoad
()
src/ts/impl/water_generator.ts:53
Method
roads
()
src/ts/ui/road_gui.ts:68
Method
roadsEmpty
()
src/ts/ui/main_gui.ts:290
Method
rotateAround
* Angle in radians
src/ts/vector.ts:141
Function
sampleFieldVector
(point: Vector, major: boolean)
src/ts/impl/integrator.ts:10
Method
screenDimensions
()
src/ts/ui/domain_controller.ts:95
Method
seaPolygon
()
src/ts/impl/water_generator.ts:45
Method
seaPolygon
()
src/ts/ui/water_gui.ts:97
Method
seaPolygon
()
src/ts/ui/main_gui.ts:299
Method
secondaryRiver
()
src/ts/ui/water_gui.ts:87
← previous
next →
201–300 of 327, ranked by callers