Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WarFrontIO/client
/ functions
Functions
628 in github.com/WarFrontIO/client
⨍
Functions
628
◇
Types & classes
194
↓ 2 callers
Method
siftUp
* Sift up a node in the heap. * @param node The node to sift up. * @param index The index of the node in the heap. * @private
src/util/PriorityQueue.ts:86
↓ 2 callers
Method
startBlend
* Draw with blending. * @param src The source blend factor * @param dst The destination blend factor * @param srcAlpha The source alpha blend fa
src/renderer/GameGLContext.ts:313
↓ 2 callers
Function
submitGameAction
(action: T)
src/network/NetworkManager.ts:159
↓ 2 callers
Function
tryStartGame
(map: string, mode: GameModeIds, seed: number, players: { name: string }[], clientId: number, isLocal: boolean
src/game/GameLoader.ts:16
↓ 2 callers
Method
update
* Update the player name rendering data.
src/renderer/manager/PlayerNameRenderingManager.ts:254
↓ 2 callers
Method
updatePalette
(theme: GameTheme)
src/renderer/layer/TerritoryRenderer.ts:45
↓ 2 callers
Function
validatePacket
(packet: {prototype: T}, validator: (packet: T) => boolean)
src/network/PacketManager.ts:13
↓ 2 callers
Method
withAlpha
* @param a The alpha value to set. * @returns A new color with the alpha value set.
src/util/HSLColor.ts:62
↓ 1 callers
Function
actuallyStartGame
()
src/game/Game.ts:43
↓ 1 callers
Method
actuallyWriteBits
(length, value)
scripts/shader-loader.js:38
↓ 1 callers
Method
addAttack
* Add an attack to the list of ongoing attacks. * @param player The player that is attacking. * @param target The player that is being attacked.
src/game/attack/AttackActionHandler.ts:99
↓ 1 callers
Method
addAuth
(conf: RequestInit)
src/network/NetworkAuthenticator.ts:37
↓ 1 callers
Method
addBoat
* Adds a boat to the boat manager. * @param owner The owner of the boat. * @param start The starting position of the boat. * @param end The endi
src/game/boat/BoatManager.ts:60
↓ 1 callers
Method
addBodyClass
* Adds a class to the body of this panel. * @param classes The classes * @returns This panel
src/ui/type/ContentField.ts:75
↓ 1 callers
Method
addOption
* Adds an option to the select element. * @param value The value of the option * @param text The text of the option
src/ui/type/SingleSelectElement.ts:24
↓ 1 callers
Method
addPacket
* Adds a game tick packet to the queue. * @param gameTickPacket The game tick packet to add.
src/game/GameTicker.ts:130
↓ 1 callers
Method
addPosition
* Add a tile to the queue or adjust the current position if applicable. * @param max the maximum size of the square * @param pos the position of t
src/renderer/manager/PlayerNameRenderingManager.ts:161
↓ 1 callers
Method
addRule
* Adds a validation rule to the input element. * @param errorMessage The error message to display if the rule fails * @param rule The validation r
src/util/settings/StringSetting.ts:41
↓ 1 callers
Method
addTile
* Update the player name rendering data. * @param tile The tile that was added to the territory * @param transaction The transaction that added th
src/renderer/manager/PlayerNameRenderingManager.ts:48
↓ 1 callers
Method
addUnclaimed
* Add an unclaimed attack to the list of ongoing attacks. * @param player The player that is attacking. * @param troops The amount of troops that
src/game/attack/AttackActionHandler.ts:83
↓ 1 callers
Method
allowAttack
* @returns Whether to allow the bot to attack
src/game/bot/BotPlayer.ts:91
↓ 1 callers
Method
anchor
* Adds a child element to this module at the given position. * This positions the child element at the given anchor relative to this module. * Not
src/ui/type/ContentField.ts:31
↓ 1 callers
Method
asAddress
(defaultValue: string, category: SettingCategory | null, version: number = 0)
src/util/settings/StringSetting.ts:10
↓ 1 callers
Function
awaitHandshakeResponse
* Awaits a handshake response from the server
src/network/NetworkManager.ts:133
↓ 1 callers
Function
buildAlert
(type: "primary" | "secondary" | "danger" | "success", text: string, duration: "fast" | "normal" | "slow" = "n
src/ui/type/TextNode.ts:111
↓ 1 callers
Method
buildAreaGraph
* Creates graphs on a per-area basis.
src/map/area/AreaCalculator.ts:152
↓ 1 callers
Function
buildContentField
(type: "primary" | "secondary" | "danger" | "success", ...content: UIElement[])
src/ui/type/ContentField.ts:92
↓ 1 callers
Function
buildCopyableTextContainer
(title: string, content: string, titleClasses: string[] = [], contentClasses: string[] = [])
src/ui/type/CopyableTextContainer.ts:57
↓ 1 callers
Function
buildIcon
(icon: string, ...classes: string[])
src/ui/type/TextNode.ts:85
↓ 1 callers
Function
buildSingleSelect
(description: string)
src/ui/type/SingleSelectElement.ts:75
↓ 1 callers
Method
buildSpawns
* Build spawn points with the given radius. * * The spawn points are generated using poisson disc sampling. * Algorithm by Robert Bridson (https
src/game/player/SpawnManager.ts:50
↓ 1 callers
Function
buildTooltipContainer
(element: HTMLElement)
src/ui/type/TooltipContainer.ts:57
↓ 1 callers
Function
buildValidatedInput
(placeholder: string, description: string)
src/ui/type/ValidatedInput.ts:141
↓ 1 callers
Method
calculateAreaMap
* Calculate the area map. * @internal
src/map/GameMap.ts:88
↓ 1 callers
Method
calculateAttackCost
* Calculate the cost of attacking the target. * The cost is the amount of troops that are required to conquer a single pixel of the target's territo
src/game/attack/AttackExecutor.ts:201
↓ 1 callers
Method
calculateBias
* Calculate the bias for the area of the given tile. * @param tile The tile to calculate the bias for * @private
src/map/GameMap.ts:213
↓ 1 callers
Function
calculateBoatWaypoints
(start: number, end: number)
src/map/area/BoatPathfinding.ts:23
↓ 1 callers
Method
calculateDistanceMap
* Calculate the distance map. * @internal
src/map/GameMap.ts:113
↓ 1 callers
Method
calculateDistancesRaw
* Calculates the distance starting from one node to others. * Just a simple flood fill. * @param node The node to start from. * @param others Th
src/map/area/AreaCalculator.ts:190
↓ 1 callers
Method
calculateSpeed
* Calculates the target speed at the next waypoint. * @param oldX The x-coordinate of the previous waypoint. * @param oldY The y-coordinate of the
src/game/boat/Boat.ts:131
↓ 1 callers
Method
checkMobileGesture
(this: void, event: PointerEvent)
src/event/InteractionManager.ts:128
↓ 1 callers
Method
cleanup
()
src/game/transaction/TerritoryTransaction.ts:43
↓ 1 callers
Method
clearTiles
* Clear the tiles at the given indices. * @param tiles the tiles to clear
src/renderer/manager/TerritoryRenderingManager.ts:21
↓ 1 callers
Method
compress
()
scripts/shader-loader.js:53
↓ 1 callers
Function
connectToServer
(host: string, abortSignal: AbortSignal | undefined = undefined)
src/network/NetworkManager.ts:27
↓ 1 callers
Method
copy
* Copies the content of this copyable text container to the clipboard.
src/ui/type/CopyableTextContainer.ts:38
↓ 1 callers
Method
createAreas
* Creates areas for a specific level.
src/map/area/AreaCalculator.ts:48
↓ 1 callers
Method
createFramebuffer
* Creates a framebuffer with the given texture. * @param texture The texture to use for the framebuffer
src/renderer/GameGLContext.ts:117
↓ 1 callers
Method
createPalette
(theme: GameTheme)
src/renderer/layer/MapRenderer.ts:64
↓ 1 callers
Method
createProgram
* Creates a program with the given shaders. * @param vertexShader The vertex shader to use * @param fragmentShader The fragment shader to use *
src/renderer/GameGLContext.ts:66
↓ 1 callers
Function
disconnectFromServer
()
src/network/NetworkManager.ts:124
↓ 1 callers
Method
doRenderTick
* Tick layers and render them to the canvas.
src/renderer/GameRenderer.ts:68
↓ 1 callers
Method
drawText
(data: GameTextEntry[])
src/renderer/GameFont.ts:66
↓ 1 callers
Function
encodeFontData
(data)
scripts/shader-loader.js:9
↓ 1 callers
Method
execute
* @returns Whether the strategy was executed
src/game/bot/BotPlayer.ts:98
↓ 1 callers
Method
fillOptions
* Fills the given options into this setting. * @param options The options to fill into this setting
src/util/settings/SingleSelectSetting.ts:35
↓ 1 callers
Method
findCoastNear
* Finds a tile bordering water near the given tile (5x5 area). * @param tile The tile to find water near. * @returns The coast tile or null if no
src/game/boat/BoatManager.ts:25
↓ 1 callers
Function
findContext
* Finds a translation, applying context narrowing if possible. * If the arguments contain a "context" property, a fitting suffix is appended. * @par
src/util/Lang.ts:48
↓ 1 callers
Function
findModules
(dir)
webpack.config.js:11
↓ 1 callers
Function
findStartingPoint
(target: number)
src/map/area/BoatPathfinding.ts:175
↓ 1 callers
Function
formatTime
(time: number)
src/util/StringFormatter.ts:11
↓ 1 callers
Method
fromRaw
(context: GameGLContext, image: string, data: string)
src/renderer/GameFont.ts:30
↓ 1 callers
Method
fromString
* Parses a string to set the value of this setting.
src/util/settings/ManagedSetting.ts:10
↓ 1 callers
Function
gameModeFromId
(id: GameModeIds)
src/game/mode/GameModeRegistry.ts:18
↓ 1 callers
Method
getBoats
* @returns The boats that are currently active
src/game/boat/BoatManager.ts:106
↓ 1 callers
Function
getDebugEvents
()
src/util/DebugData.ts:28
↓ 1 callers
Function
getDefaultMapIds
()
src/map/MapRegistry.ts:52
↓ 1 callers
Method
getEnabledOptions
* Returns the enabled options. * @returns An array of the values of the enabled options
src/util/settings/MultiSelectSetting.ts:60
↓ 1 callers
Method
getIndex
* Converts screen coordinates to a map tile index. * @param x The x-coordinate on the screen. * @param y The y-coordinate on the screen.
src/game/action/MapNavigationHandler.ts:117
↓ 1 callers
Method
getMutators
* @returns The mutators of this input element
src/util/settings/StringSetting.ts:49
↓ 1 callers
Method
getNextX
* @returns The next x coordinate of the boat
src/game/boat/Boat.ts:178
↓ 1 callers
Method
getNextY
* @returns The next y coordinate of the boat
src/game/boat/Boat.ts:185
↓ 1 callers
Method
getOptionRegistry
* Returns the registry for option listeners. * @returns The registry for option listeners
src/util/settings/SingleSelectSetting.ts:54
↓ 1 callers
Method
getRawToken
()
src/network/NetworkAuthenticator.ts:43
↓ 1 callers
Method
getResult
()
src/game/mode/FFAGameMode.ts:11
↓ 1 callers
Method
getRules
* @returns The validation rules of this input element
src/util/settings/StringSetting.ts:56
↓ 1 callers
Method
getSelectedOption
* Gets the id of the currently selected option. * Use {@link Setting.get} to get the value of the selected option. * @returns The id of the curren
src/util/settings/SingleSelectSetting.ts:63
↓ 1 callers
Function
getSettingTab
(category: SettingCategory)
src/ui/element/SettingsPanel.ts:59
↓ 1 callers
Method
getTarget
* @returns The target of this bot strategy, or null if no attack should be performed
src/game/bot/modifier/SimpleAttackStrategy.ts:30
↓ 1 callers
Function
getTopUIElement
()
src/ui/UIManager.ts:76
↓ 1 callers
Function
getUserToken
()
src/network/NetworkAuthenticator.ts:72
↓ 1 callers
Method
getWaypoint
* Returns the next waypoint in the path. * @param offset The amount of waypoints to skip. * @returns The next waypoint. * @private
src/game/boat/Boat.ts:154
↓ 1 callers
Method
getWinnerString
()
src/game/result/FFAGameResult.ts:10
↓ 1 callers
Function
handlePath
()
src/util/PathHandler.ts:13
↓ 1 callers
Method
handlePlayerTileAdd
* Handle the addition of a tile to the player's territory. * Called when a new tile is added to the player's territory (including by this attack).
src/game/attack/AttackExecutor.ts:116
↓ 1 callers
Method
handleTargetTileAdd
* Handle the addition of a tile to the target's territory. * Called when a new tile is added to the target's territory. * @param tile The tile tha
src/game/attack/AttackExecutor.ts:132
↓ 1 callers
Method
handleTerritoryAdd
* Handle a tile being added to a player. * @param tile The tile that was added. * @param player The player that the tile was added to.
src/game/attack/AttackActionHandler.ts:139
↓ 1 callers
Function
hasBorderWith
(player: Player, target: number)
src/game/attack/AttackActionValidator.ts:10
↓ 1 callers
Method
hasOwner
* Checks if a tile has an owner. * @param tile The tile to check. * @returns True if the tile has an owner, false otherwise.
src/game/TerritoryManager.ts:44
↓ 1 callers
Method
hideTooltip
* Hides the tooltip.
src/ui/type/TooltipContainer.ts:42
↓ 1 callers
Method
income
* Process one tick worth of income.
src/game/player/Player.ts:45
↓ 1 callers
Method
initDefaultListeners
()
src/ui/type/UIPanel.ts:19
↓ 1 callers
Method
initDetails
(theme: GameTheme)
src/renderer/layer/MapRenderer.ts:84
↓ 1 callers
Function
initGameData
(map: GameMap, mode: GameMode, isLocal: boolean)
src/game/GameData.ts:21
↓ 1 callers
Method
isAreaEmpty
* Checks if an area only contains non-solid tiles. * @param area The area to check. * @returns True if the area is empty, false otherwise.
src/map/area/AreaCalculator.ts:257
↓ 1 callers
Method
isBot
* Check if the player with the given ID is a bot. * @param player The ID of the player. * @returns Whether the player is a bot.
src/game/player/PlayerManager.ts:68
↓ 1 callers
Method
isOnMap
* Checks if the given screen coordinates are on the map. * Not to be confused with map coordinates (This method does not convert screen coordinates
src/game/action/MapNavigationHandler.ts:108
↓ 1 callers
Method
isSelected
* Checks if the option with the given key is selected. * @param key The key of the option * @returns true if the option is selected, false otherwi
src/util/settings/MultiSelectSetting.ts:38
↓ 1 callers
Method
isValidSpawnPoint
* Checks whether the given tile is a valid spawning spot. * @param tile The tile to check the spawn point of. * @returns true if the tile is a val
src/game/player/SpawnManager.ts:190
↓ 1 callers
Method
linkMultiSetting
* Links the checkbox to a multi-select setting. * @param setting The multi-select setting * @param key The key of the option to link
src/ui/type/CheckboxInput.ts:56
← previous
next →
201–300 of 628, ranked by callers