Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tobspr-games/shapez.io
/ functions
Functions
2,842 in github.com/tobspr-games/shapez.io
⨍
Functions
2,842
◇
Types & classes
696
↓ 4 callers
Method
requestSaveMarker
* Requests to save a marker at the current camera position. If worldPos is set, * uses that position instead. * @param {object} param0
src/js/game/hud/parts/waypoints.js:282
↓ 4 callers
Method
resize
(w, h)
src/js/game/core.js:350
↓ 4 callers
Function
round1Digit
(n)
src/js/core/utils.js:336
↓ 4 callers
Method
runAfterMethod
* Runs after a method on a given class * @template {constructable} C the class * @template {C["prototype"]} P the prototype of said class
src/js/mods/mod_interface.js:487
↓ 4 callers
Method
saveThenGoToState
* Moves to a state outside of the game * @param {string} stateId * @param {any=} payload
src/js/states/ingame.js:198
↓ 4 callers
Function
schemaToJsonSchema
(schema)
src/js/savegame/serialization_data_types.js:14
↓ 4 callers
Method
sendGameEvent
* Sends a game event to the analytics * @param {string} category * @param {string} value
src/js/platform/browser/game_analytics.js:145
↓ 4 callers
Function
serve
* * @param {object} param0 * @param {"web"|"standalone"|"china"|"wegame"} param0.version
gulp/gulpfile.js:147
↓ 4 callers
Method
shapeActionPaintWith
* Generates a definition for painting it with the given color * @param {ShapeDefinition} definition * @param {enumColors} color * @r
src/js/game/shape_definition_manager.js:212
↓ 4 callers
Method
showVideoAd
* Shows an video ad * @returns {Promise<void>}
src/js/platform/ad_provider.js:44
↓ 4 callers
Method
subScalars
* Substracts two scalars and return a new vector * @param {number} x * @param {number} y * @returns {Vector}
src/js/core/vector.js:148
↓ 4 callers
Method
throughputDoesNotMatter
()
src/js/game/game_mode.js:140
↓ 4 callers
Method
updateKeybindings
()
src/js/states/keybindings.js:130
↓ 4 callers
Method
updateSetting
* @param {string} key * @param {string|boolean|number} value
src/js/profile/application_settings.js:463
↓ 4 callers
Method
worldToLocalTile
* Transforms from world space to local space * @param {Vector} worldTile
src/js/game/components/static_map_entity.js:195
↓ 4 callers
Method
writeFileAsync
* Writes a string to a file asynchronously * @param {string} filename * @param {string} contents * @returns {Promise<void>} * @abs
src/js/platform/storage.js:30
↓ 3 callers
Method
abortDragging
* Aborts any dragging
src/js/game/hud/parts/building_placer_logic.js:252
↓ 3 callers
Method
addNewBuildingToToolbar
* @param {object} param0 * @param {"regular"|"wires"} param0.toolbar * @param {"primary"|"secondary"} param0.location * @param {typeof
src/js/mods/mod_interface.js:429
↓ 3 callers
Method
addToTop
(receiver: (...args: T) => /* STOP_PROPAGATION */ string | void, scope?: object)
src/js/globals.d.ts:195
↓ 3 callers
Method
anyBuildingOutsideZone
(width, height)
src/js/game/hud/parts/puzzle_editor_settings.js:182
↓ 3 callers
Method
canAfford
* @param {GameRoot} root
src/js/game/blueprint.js:145
↓ 3 callers
Method
canDeleteBuilding
* Returns whether the given building can get removed * @param {Entity} building
src/js/game/logic.js:209
↓ 3 callers
Method
canUnlockUpgrade
* Returns whether a given upgrade can be unlocked * @param {string} upgradeId
src/js/game/hub_goals.js:282
↓ 3 callers
Method
centered
* * @param {number} width * @param {number} height
src/js/core/rectangle.js:52
↓ 3 callers
Method
checkPreventDoubleMouse
* Checks if the mouse event is too close after a touch event and thus * should get ignored
src/js/game/camera.js:425
↓ 3 callers
Method
cleanup
* Cleans up all event listeners
src/js/game/camera.js:326
↓ 3 callers
Method
clone
* Returns a clone of this entity
src/js/game/entity.js:88
↓ 3 callers
Method
clone
* Copies this instance * @returns {Rectangle}
src/js/core/rectangle.js:69
↓ 3 callers
Method
close
()
src/js/game/hud/parts/standalone_advantages.js:72
↓ 3 callers
Function
compressObject
(obj)
src/js/savegame/savegame_compressor.js:118
↓ 3 callers
Method
computePositionFromProgress
* Computes a world space position from the given progress * @param {number} progress * @returns {Vector}
src/js/game/belt_path.js:1262
↓ 3 callers
Method
containsRect
* Returns if the given rectangle is contained * @param {Rectangle} rect * @returns {boolean}
src/js/core/rectangle.js:233
↓ 3 callers
Method
containsRect4Params
* Returns if this rectangle contains the other rectangle specified by the parameters * @param {number} x * @param {number} y * @param {
src/js/core/rectangle.js:250
↓ 3 callers
Method
context
(src: string, flag: boolean, regexp: RegExp)
src/js/globals.d.ts:128
↓ 3 callers
Method
createSpeedOptions
(level, time)
src/js/platform/achievement_provider.js:461
↓ 3 callers
Method
createTimeOptions
(duration)
src/js/platform/achievement_provider.js:468
↓ 3 callers
Method
degrees
(number)
src/js/globals.d.ts:137
↓ 3 callers
Method
distance
* Computes the distance to a given vector * @param {Vector} v * @returns {number}
src/js/core/vector.js:276
↓ 3 callers
Method
draw
* * @param {DrawParameters} parameters
src/js/game/hud/parts/mass_selector.js:288
↓ 3 callers
Function
drawSpriteClipped
({ parameters, sprite, x, y, w, h, originalW, originalH })
src/js/core/draw_utils.js:87
↓ 3 callers
Method
endTick
* Call whenever a tick ended
src/js/game/dynamic_tickrate.js:123
↓ 3 callers
Function
execute
gulp/image-resources.js:6
↓ 3 callers
Method
extractPointerPosition
* Extracts the mous position from an event * @param {TouchEvent|MouseEvent} event * @returns {Vector} The client space position
src/js/core/click_detector.js:268
↓ 3 callers
Function
fillInLinkIntoTranslation
(translation, link)
src/js/core/utils.js:675
↓ 3 callers
Method
findChainedMiner
* Finds the target chained miner for a given entity * @param {Entity} entity * @returns {Entity|false} The chained entity or null if not f
src/js/game/systems/miner.js:93
↓ 3 callers
Method
findGoalValueForShape
* Finds the current goal for the given key. If the key is the story goal, returns * the story goal. If its the blueprint shape, no goal is retur
src/js/game/hud/parts/pinned_shapes.js:105
↓ 3 callers
Method
findMatchingSlot
* Tries to find a slot which accepts the current item * @param {Vector} targetLocalTile * @param {enumDirection} fromLocalDirection
src/js/game/components/item_acceptor.js:110
↓ 3 callers
Method
findSupplyingEntity
* Finds the supplying belt for a given belt. Used for building the dependencies * @param {Entity} entity * @returns {Entity|null}
src/js/game/systems/belt.js:393
↓ 3 callers
Function
formatDigit
(digit, unit, quintuple, decuple)
src/js/core/utils.js:735
↓ 3 callers
Method
fromSerializedObject
* Deserializes a vector from a serialized json object * @param {object} obj * @returns {Vector}
src/js/core/vector.js:664
↓ 3 callers
Method
fromTRBL
* Creates a rectangle from top right bottom and left offsets * @param {number} top * @param {number} right * @param {number} bottom
src/js/core/rectangle.js:20
↓ 3 callers
Method
getAvailableVariants
()
src/js/game/buildings/wire.js:93
↓ 3 callers
Method
getCurrentVersion
()
src/js/profile/application_settings.js:549
↓ 3 callers
Method
getDesiredFps
()
src/js/profile/application_settings.js:392
↓ 3 callers
Function
getDeviceDPI
()
src/js/core/dpi_manager.js:8
↓ 3 callers
Method
getFormElement
(parent)
src/js/core/modal_dialog_forms.js:29
↓ 3 callers
Method
getHasAds
()
src/js/platform/ad_providers/adinplay.js:46
↓ 3 callers
Method
getHasAds
()
src/js/platform/ad_providers/gamedistribution.js:39
↓ 3 callers
Method
getHasExtendedSettings
* Returns if the app has all settings available * @returns {boolean}
src/js/core/restriction_manager.js:135
↓ 3 callers
Method
getHasFreeCopyPaste
()
src/js/game/hud/parts/blueprint_placer.js:53
↓ 3 callers
Method
getIntersection
* Returns the shared area with another rectangle, or null if there is no intersection * @param {Rectangle} rect * @returns {Rectangle|null}
src/js/core/rectangle.js:285
↓ 3 callers
Method
getIsAvailable
* Returns whether this setting is enabled and available * @param {Application} app
src/js/profile/setting_types.js:78
↓ 3 callers
Method
getIsRemovable
()
src/js/game/buildings/hub.js:44
↓ 3 callers
Method
getIsReplaceable
()
src/js/game/buildings/wire.js:122
↓ 3 callers
Method
getKeyCodeString
* Returns the key code as a nice string
src/js/game/key_action_mapper.js:399
↓ 3 callers
Method
getMaximumZoom
()
src/js/game/camera.js:395
↓ 3 callers
Method
getMinerBaseSpeed
* Miner speed * @returns {number} items / sec
src/js/game/hub_goals.js:502
↓ 3 callers
Method
getMinimumZoom
()
src/js/game/camera.js:399
↓ 3 callers
Method
getModsListForSavegame
* * @returns {import("../savegame/savegame_typedefs").SavegameStoredMods}
src/js/mods/modloader.js:66
↓ 3 callers
Method
getNumEntries
()
src/js/globals.d.ts:158
↓ 3 callers
Method
getPlacementSound
()
src/js/game/buildings/wire.js:105
↓ 3 callers
Method
getSavegameById
* * @param {string} internalId * @returns {Savegame}
src/js/savegame/savegame_manager.js:84
↓ 3 callers
Method
getShapesStoredByKey
* Returns how much of the current shape is stored * @param {string} key * @returns {number}
src/js/game/hub_goals.js:164
↓ 3 callers
Method
getSpecialOverlayRenderMatrix
* Can return a special interlaved 9 elements overlay matrix for rendering * @param {number} rotation * @param {number} rotationVariant
src/js/game/meta_building.js:76
↓ 3 callers
Method
getStateHeaderTitle
* Should return the title of the game state. If null, no title and back button will * get created * @returns {string|null}
src/js/core/textual_game_state.js:37
↓ 3 callers
Method
getUnion
* Returns the union of this rectangle with another * @param {Rectangle} rect
src/js/core/rectangle.js:312
↓ 3 callers
Method
getWaypointUiScale
* Returns the scale for rendering waypoints
src/js/game/hud/parts/waypoints.js:185
↓ 3 callers
Method
hasHub
()
src/js/game/modes/puzzle.js:64
↓ 3 callers
Method
hasResources
@returns {boolean}
src/js/game/game_mode.js:111
↓ 3 callers
Method
initialize
()
src/js/platform/browser/wrapper.js:16
↓ 3 callers
Method
internalCheckTile
* Checks a given tile for validty * @param {Vector} tile
src/js/game/map.js:270
↓ 3 callers
Method
internalLoadSpritesAndSounds
* @param {Array<string>} sprites * @param {Array<string>} sounds * @param {Array<AtlasDefinition>} atlases * @returns {Promise<void>
src/js/core/background_resources_loader.js:168
↓ 3 callers
Method
isBad
()
src/js/core/explained_result.js:19
↓ 3 callers
Method
isEndOfDemoReached
* Returns whether the end of the demo is reached * @returns {boolean}
src/js/game/hub_goals.js:131
↓ 3 callers
Method
isRecieverAttached
* @param {InputReceiver} reciever
src/js/core/input_distributor.js:92
↓ 3 callers
Method
left
* @returns {number}
src/js/core/rectangle.js:98
↓ 3 callers
Function
mainTask
({ cachebust, isProd })
gulp/css.js:93
↓ 3 callers
Function
make2DUndefinedArray
(w, h)
src/js/core/utils.js:51
↓ 3 callers
Function
makeNewRng
* @param {number|string} seed
src/js/core/rng.js:24
↓ 3 callers
Function
matchDataRecursive
(dest, src, addNewKeys = false)
src/js/translations.js:91
↓ 3 callers
Method
moveToStateAddGoBack
* Goes to a new state, telling him to go back to this state later * @param {string} stateId
src/js/core/textual_game_state.js:66
↓ 3 callers
Function
newEmptyMap
()
src/js/core/utils.js:62
↓ 3 callers
Method
normalize
* Normalizes the vector, dividing by the length(), and return a new vector * @returns {Vector}
src/js/core/vector.js:379
↓ 3 callers
Method
performBulkOperation
* Performs a bulk operation, not updating caches in the meantime * @param {function} operation
src/js/game/logic.js:170
↓ 3 callers
Method
performTicks
* Performs update ticks based on the queued logic budget * @param {number} deltaMs * @param {function():boolean} updateMethod
src/js/game/time/game_time.js:113
↓ 3 callers
Function
randomChoice
(arr)
src/js/core/utils.js:94
↓ 3 callers
Method
readFileAsync
* Reads a string asynchronously. Returns Promise<FILE_NOT_FOUND> if file was not found. * @param {string} filename * @returns {Promise<strin
src/js/platform/storage.js:41
↓ 3 callers
Function
rebalance
* Rebalances a value from the old balancing to the new one * @param {number} value * @returns {number}
src/js/savegame/schemas/1006.js:42
↓ 3 callers
Method
recomputeOnComponentsChanged
* Makes this detector recompute the area of an entity whenever * it changes in any way * @param {Array<typeof Component>} components
src/js/core/stale_area_detector.js:45
↓ 3 callers
Method
registerGameSystem
* * @param {Object} param0 * @param {string} param0.id * @param {new (any) => GameSystem} param0.systemClass * @param {string=} pa
src/js/mods/mod_interface.js:220
← previous
next →
301–400 of 2,842, ranked by callers