@v12-engine/client/common
Core
What a game meets first.
| Name | Kind | What |
|---|---|---|
| hotView | function | A game's view module's new version, taken while it runs, as hotRules takes its rules: at its end, if (import.meta.hot) import.meta.hot.accept((module) = hotView(import.meta.hot, 'melee', meleeView, module?.meleeView)) What its types look like, are pictured as and say is taken by the games and editors of the page; the rest of a view (its HUD, its parts) a new game takes |
| presetFloats | function | The ready-made floats (PRESET_FLOATS) a game takes for GameView.hud.floats: all of them, or the kinds named, each with fields of the game's over it (presetFloats(['damage', 'heal'], { damage: { style: { color: '#ffe' } } })) |
| presetFx | function | Ready-made effects a game takes into its view's fx (fx: { ...presetFx(['fire', 'smoke']) }): those named, every one when left out, each with its knobs given here over its own ({ fire: { color: '#7fd0ff' } }). The client plays none a game did not take |
| presetPings | function | The ready-made pings (PRESET_PINGS) a game takes for GameView.pings.kinds: all of them in their order, or the kinds named in the order named, each with fields of the game's over it |
| readCinematic | function | A cinematic from its file, checked and filled in: lanes and markers in order of time. What is wrong throws with its path (td.intro.lanes[2].items[0].at is a number). A lane of a kind the client does not know is kept as it is (it may be a game's own, played by a lane the game registers) and said once in the log, so a typo in a kind is seen and a game's kind is not a wall of warnings |
Advanced
Classes
| Name | What |
|---|---|
| Actions beta | The actions of a game (client.keys) or a tool: what each is on now, the player's own keys in the place of those it comes with, and which of them an event is. Whoever listens to the keyboard feeds it (keyDown, keyUp, release); the rest asks it (is, held) or is told (on, ActionDef.run). What is read (bindings, list, key) are signals: a component that reads one follows it, and other code does with the client's watch |
| Assets beta | The game's files as the client reads them: the shared sounds and the game's own manifest, fetched and kept in the browser's cache |
| CinematicPlayer beta | The director (client.cinematics): see the top of this file |
| ClientRuntime beta | What one app of the page runs with: where it keeps things in the browser (storage), where its ground's textures are made and kept (ground), whether it is being developed (dev) and what opens its code (openCode) |
| DialogQueue beta | The lines said to the player, the first showing: see the top of this file. client.dialog is the game's; a cut on a stage that has none makes one of its own |
| EaseRegistry beta | The eases a cinematic may name (cinematic plan B1): how a key is reached, how a shot accelerates. An ease is a curve from 0 to 1: given how far along the time is, it says how far along the move is. Straight (linear) moves at one speed and stops dead; inOutQuad starts and ends gently, as a real camera operator does; outBack goes a little past and settles. A def names one by its name ("ease": "inOutCubic"); code may hand a function. The client's own are the curves of viewTimers.ease, registered as the game starts (kit.eases); a game adds its own (GameView.cinematics.eases, or kit.eases.add in code), and one of a name already there takes its place |
| FrameList beta | A list that is filled anew every frame and makes nothing doing it: its slots stay, and count says how many of them are in use. An array emptied with length = 0 gives its room back, and filling it again the next frame makes that room again, which is garbage every frame. Read it from 0 to count, not with for of |
| GameState beta | The game as far as this client knows it, rebuilt from the snapshots of its session |
| LaneRegistry beta | The lanes known, by kind: the client's own and the game's (kit.lanes). One of a kind already there takes its place, so a game may replace a built-in |
| Lifetime beta | The owner of what a part makes (C12): each thing kept at the line it is made (own), what to undo besides (onDispose), what it hears (listen, which owns the stopping), all taken apart in the reverse order of their making by one dispose. Safe halfway through being made, and twice; every step is taken whatever the one before it did, and one that throws is said in the log. What is kept after the end is taken apart at once |
| Overlay beta | 2D layer on top of the 3D view for things that should stay crisp and pixel sized: bars and the selection box. |
| PhaseTimes beta | How long each phase of the frame takes, with a pair of clock reads around it (stamp, lap), and the frames that hitched: the 📊 window's and the editor's Metrics. Off, a read is the test of a flag and nothing is kept; on, a lap is a clock read and an array write, and a frame makes nothing anew once its phases have been seen |
| Portraits beta | The portraits of the client (client.portraits) or of the editor: box(canvas) is a portrait box (one target, what it shows changed as wanted), show(canvas, spec) a box showing one portrait until stopped. The HUD's faces, the dialog box's and a game's own are shown this way |
| SoundPlayer beta | Plays sounds of the game for a listener: the mix, the buses, the music and where each sound is on the map |
| UnitHudLayer beta | The client's plates: works out each unit's (a plate set for it while the game runs, its type's, the game's, the default), lays it out over its head, and gives the overlay what to draw. The game's own widgets of the page it keeps, places and hides |
| WorldPins beta | Elements of the page pinned to the world: a label over a tower, a marker at a spot of the map. Each frame, the client puts them where their spot is on the screen, hides those that are out of the view or over what the player does not see, and takes out those whose entity is gone. They are in a layer of their own over the view and under the HUD, which lets the pointer through: an element that is to be clicked says so (pointer-events: auto) |
Interfaces
| Name | What |
|---|---|
| AnatomyNode beta | A node of the file: what it draws, and what hangs from it |
| GroundLooks beta | What the ground is drawn with: the colour of each tile and its texture, by the tile's index in the paint |
| GroundRecipe beta | What a ground made in code is made of besides its pattern and colour (TileLook.recipe, MapTile.pattern): each as the pattern has it when left out |
| MaterialFacts beta | A material of the file, as its maker set it: before the game's own replaces it |
| ModelAnatomy beta | What a model file is made of (modelAnatomy) |
| PatternDef beta | A pattern a ground's texture is made of in code (GameView.ground.patterns for a game's own, PATTERNS for the client's): what the Ground editor offers by name, with a slider for each of its parameters, and what groundTexture makes a texture of. Written as a shade, lighter or darker than the tile's colour at each point of the picture (about 1 on average: the texture is made the tile's colour exactly, whatever the shade does), from the parameters and a noise that repeats; or as every pixel, where a shade is not enough (several colours, a drawing) |
| PrimitiveFacts beta | A primitive of a mesh: one draw, in one material |
| ScreenLine beta | Line in the view, in CSS pixels |
| ScreenRect beta | Screen space rectangle, in CSS pixels relative to the canvas |
| ScreenText beta | Text that floats in the view, like the gold for a kill |
Functions
| Name | What |
|---|---|
| adjustPixels beta | The pixels of a picture (RGBA, 0..255) as an adjustment makes them, in place. Nothing is done for none |
| antialiasOf beta | The way the edges are smoothed as a setting or a file has it: one of the ways, or antialias as it was before there were ways (true for the GPU's samples, false for the pass), else taa, medium's and high's (PF5) |
| appBase beta | Where the app is served from, as the bundler says (Vite's BASE_URL), or the root of the site |
| applyTokens beta | Writes values onto an element as its variables: what is under it looks that way |
| assembleClient beta | Shows a game made ready (prepareGame): the one GameClient.create of the client's scenes and of launch (design review U1). The seat, the debug tools, where the view starts and the map's files are the prepared game's; the rest (the canvas, the view, the settings, how a dropped connection comes back) is the page's |
| assetCategoryOf beta | The category of a file, by its id, the first way of the module's that says one; nothing for none |
| buttonHeld beta | Whether a button (PointerEvent.button: 0 left, 1 middle, 2 right, 3 back, 4 forward) is still held, as a pointer event says (buttons). A drag that missed its button's release (let go over a menu that opened, in another window, while the browser had the mouse) ends on the next move with this, rather than going on with every move after |
| bytesText beta | A size in words: bytes, kB, MB, GB |
| cameraKeysFromPath beta | Keys of the camera lane along a path of the map: where a rail of it would take the camera, as keys a designer changes one by one (a key's distance, its lens, where it is, its time, a bend's handles). A key where each straight of the path starts and ends, and where each bend does, a bend a bezier between its two keys (with its handles, as the rail rounds it); timed by the distance along the path, so the camera goes at one speed (or as ease has it). The keys are the lane's as they are: put them in a lane's items, or after another key (the first is reached from the key before it as a key is, along its path and ease, which it leaves to the lane: set them on it) |
| cameraPoseAt beta | Where the camera is at a moment of a camera lane: between the keys around it, along the line and the curve the key being reached names (path, ease; straight when it names none); held at a key that holds; along a path of the map after a rail key; at the first before it, the last after. Keys whose view the map has not, or whose rail it has not, are passed over. eases are the curves a key may name (the client's own when left out); path finds a path of the map by its name |
| campaignFileText beta | A campaign as its file writes it: its fields and each mission's in order, what is left out or empty not there, a line at the end. Read back by readCampaignFile as it was |
| categoryId beta | An id for a category called this: My weapons is my-weapons |
| categoryName beta | What a category is called: as declared, as its group of @v12-engine/assets is called, or its id in words |
| checkLooks beta | What of a game's looks names a clip, a part or a node its model does not have: a clip in animations, casts or a death, a node or hide that is no part of the file, a point or a held model at a node there is none of. Wrong, any of them is drawn as if not said, without a word. A model without facts is left alone, as is a field the facts do not tell. Each as a GameProblem, where naming the look: view.units.looks.knight.model.animations.walk |
| cinematicCode beta | A cinematic written as TypeScript, for a game that keeps it in code (the Cinematic panel's Copy as code): a line of the view's cinematics.defs, the Cut script it plays as. That is cut.play of its data: the lanes are what the cut plays, whatever calls a script may make of its own around them. How it likes to be played (def.play) stands beside the script, as an entry has it, since cut.play does not read it |
| cinematicDefOf beta | The data of an entry of the view's, where it has some |
| cinematicLength beta | Seconds a cinematic lasts: as it says, or until its last item or marker is over: a clip for as long as it says (for) or its lane measures it (a line's reading time), by the client's lanes and the game's handed in. 0 with nothing in it |
| clearDraft beta | Forgets the draft of a map of a game (Draft.key): the map was saved, or the draft was turned down |
| clearTokens beta | Takes the variables written by applyTokens off an element again |
| cliffCells beta | Which cells of a terrain are the walls of cliffs, a byte a cell, row by row, into out: 0 for none, else which of its corners stand on the top, a bit each (1 the corner at its lowest x and z, 2 at x + 1, 4 at z + 1, 8 at both). A wall is in the cell below a cliff: its corners on the edge are lifted to the level above (updateMapTerrain). A corner is on the top where a cell around it is of a higher level and it stands CLIFF_RISE over the lowest corner, so that a ramp, a hill or a cell sunk between cliffs (all four corners lifted, flat) is no wall. Within area only (and the ring of cells around it) when it is given: what a change to those cells can have changed |
| cliffShapeOver beta | A map's shape of its cliffs (MapCliff.shape) over the game's (GameView.ground.cliffShape), field by field: the game's parameters kept only for the style they are of, the rocks the map's where it says. false from the map: the walls drawn the grid's way there. None where neither says one |
| cliffStyleDefs beta | The styles there are, the game's first, by id: those the Ground editor offers |
| createUi beta | Makes the HUD's model: the signals the client writes and the HUD's components read |
| cutWorldOf beta | A CutWorld of what any session gives: entities as its snapshots tell them, its tick and rate, and its fog |
| definePattern beta | Typed help for writing a pattern |
| deleteBrowserPrefab beta | Deletes a prefab kept in the browser for a game, by its name; does nothing where there is no IndexedDB |
| deleteCache beta | Takes a cache of the Cache Storage away |
| deleteDatabase beta | Takes a whole database away. Waits while another tab holds it open (blocked), and says so |
| deleteLocalStorage beta | Takes keys of localStorage away |
| deleteMap beta | Forgets a map kept in this browser |
| deleteMapVersion beta | Forgets a version of a map |
| deleteRecords beta | Takes records away from a store, by their keys; all of them when no keys are given |
| encodePng beta | A picture as a PNG file. deflate makes the zlib stream of its rows: stored blocks of our own when left out, or a compressing one where there is one (zlib.deflateSync in Node), for a smaller file |
| exportMap beta | Hands the map to the browser as a file to download, written as a file of a project is: to be read and compared |
| fightsLoaded beta | Settles once the staging of a fight (UnitDoing.fight) is loaded: it is loaded as the first fight is staged, and whatever runs a cinematic again from a moment (the editor's preview, as its world catches up) loads it ahead, so that a fight's commands land on the same tick each time |
| fitSetting beta | A value made to fit its setting: of its kind, in its range, one of its options |
| floatOfEvent beta | An event of the session as a float: the kinds it is looked up as, in order, and what it floats (the entity, the amount, who did it, where). Nothing for an event no float is for. removed: what went with the snapshot (a dead unit, for a deny) |
| foliageLookOf beta | The look a part made by foliage was given: none for another part, or for one given a function of its context (foliageSourceOf) |
| foliageLookParts beta | A look by its groups alone: each field said the old way (color, tip, size, sway, shake, tilt, far) moved to the group it is of (colors.foot, colors.tip, sizes.each, wind.sway, walked, rotation.lean, levels), under what the look says there already; its styles the same. Nothing is filled in: what a look does not say stays unsaid. The look given is not changed |
| foliageStyleLook beta | The look a style of a layer is drawn with, by the value of its cells: the style's over the layer's (FoliageLook.styles), the layer's where the style says nothing, false for a style not drawn |
| formatTime beta | A time as the ruler and the panel say it: 1:05 for a minute and five seconds, 4s, and the frames after a dot where it falls between seconds (4s 12f) |
| frameCapLabel beta | What a cap of frames a second is called on a settings screen |
| fxCode beta | An effect written as TypeScript, for a game that keeps its effects in code (the FX panel's Copy as code): a line of its view's fx |
| groundLooks beta | The looks of the ground of a game: its tiles' colours and textures, by their index in the paint (see GroundLookOptions) |
| groundTexture beta | A texture of the ground, as RGBA bytes of size by size pixels, that repeats without a seam and is color on average. seed makes two tiles of the same pattern look apart (grass and dark grass). The pattern is one of the client's by name, a game's own by id (among patterns) or as it is (PatternDef), or pixels as a game makes them (PatternMaker); recipe is what else it is made of, its parameters among it |
| heroesViewPack beta | The heroes, as the HUD shows them (GameView.packs): the panel of a hero selected alone (the slot hero), the player's heroes by their portraits (heroes), and the shop the selection is at (shop). The view's half of heroesPack; a game's own describer of a slot (GameView.hud.describe) goes over the pack's |
| hotTarget beta | Puts something live in the page among those told of a new version of its game. Returns what takes it out again |
| importMap beta | Reads a map from a file the player picked. Rejects with what is wrong with it |
| indexedStore beta | A store in IndexedDB: one object store of records, in a database of its own under the app's name (storage, its runtime's: KeptStorage.database; the page's when left out). Each call opens the database and closes it again. With no IndexedDB (a page made in a test, a server that draws a map), nothing is kept and nothing is listed. Given the heavy field of a record (the world of a save, the data of a replay), it keeps the record without it in a second object store beside, and heads() lists those: a list of the saves reads no world. Records kept before that are given theirs the first time heads() is asked |
| isAnimationFile beta | Whether a name of a clip is an animation file, by its path |
| isKey beta | Whether an item of a lane is a key (a value at a moment) rather than a clip (something that lasts) |
| isNone beta | Whether a level is one of drawing nothing |
| isPackPath beta | Whether a path is one a pack can hold: a file of a kind, where its kind goes |
| isSelected beta | Whether an item is selected |
| isTyping beta | Whether the key goes into something being typed in: a text field, a text area, a list to pick from, or anything editable (contenteditable). A game's keys are letters too, and are not taken from there |
| keptMapPicture beta | The picture of a map kept by its key, without the map: what a list shows at once, before it reads a map to draw |
| keptParams beta | A pattern's parameters as they are kept (MapTile.pattern.params): those the pattern has that are not at their default, or nothing where none is |
| keyIsFor beta | Whether a key is for what is in root (a game, the map editor): pressed with the focus inside it, or with the focus nowhere in particular (the page itself). With the focus on something else of the page, it is that one's; and on something marked data-own-keys (a view of its own: a panel's stage), it is that one's too |
| laidFile beta | What a file of the view's was laid over, and the file: none where it was not laid (the game's view does not read it) |
| languageName beta | What a language is called in itself: its table's name, else what the browser calls it (עברית for he), else its id |
| layeredPixels beta | A ground's picture with its layers laid over it (TileLook.layers, MapGroundLayer), as a new array: each layer's own picture made (kept, or in the ground worker: ground, the app's) or loaded, then laid. A layer whose picture does not load is left out |
| layFoliageLook beta | Looks laid over each other, the later over the earlier: the game's code, then its cellLayers.json, then the map's (MapEnvironment.bushes). Field by field, a group (FOLIAGE_GROUPS) field by field too, a style over the style of the same value the same way; false (no bushes drawn, a group turned off, a style not drawn) takes the place of what is under it, and what is laid over a false starts from nothing. Each is read by its groups first (foliageLookParts), so a look that says color the old way still wins over one under it that says colors.foot. None for no look at all |
| layMapBushes beta | The looks of a game's layers of cells with what a map says of its bushes (MapEnvironment.bushes) laid over them, layer by layer (layerWithEntry): over the game's code and its cellLayers.json (laid by layCellLayers), the map's wins. A layer the map does not name is the game's look as it is |
| layMapTiles beta | The looks of a game's tiles with those of a map's own grounds (MapEnvironment.tiles): what the ground, the minimap and the editor's palette draw the map's paint with |
| laySounds beta | The view's definitions of its sounds (GameView.sounds.defs) with a sounds.json laid over them: a sound's fields the file says over the code's, field by field |
| limitsOf beta | A game's caps, the defaults for what it leaves out: what a client holds and hands to the parts that read them, each client its own (the editor's scene and the game played in it are two). A number that is not at least 1 (0 for the intervals) is left out, the default taken |
| listCaches beta | Every cache of the Cache Storage, weighed by reading each file's length (what it says, or its body) |
| listDatabases beta | Every IndexedDB database of the page, its stores, how many records and about how big. Each record is read to be weighed: a database of many large files takes a moment |
| listLocalStorage beta | What localStorage keeps: each key, about how big (two bytes a character) |
| listMaps beta | Maps kept in this browser, the last saved first |
| listRecords beta | The records of a store of a database, the biggest first |
| loadBrowserPrefabs beta | The prefabs kept in this browser for a game, by name (see Clip) |
| loadDrafts beta | The drafts kept for a game, a map each, the newest first |
| loadGame beta | Gets a game (createGame) ready to play in the page: its view fetched (Game.toView()), checked against its rules as the game says (GameInit.checkView: a warning for each thing that does not fit when left out, an error with all of them with 'throw'), and the game registered, so that a replay or a server's welcome that names it finds it (gameById). Once for a game: what launch, appScenes and openEditor do with the game they are given |
| loadMap beta | A map kept in this browser, by its id (saveMap): nothing for one that is not there, or cannot be read |
| loadMapVersions beta | The versions kept of a map of a game (MapVersion.key), the newest first. None where there is no IndexedDB |
| loadPack beta | The files a map kept in this browser brings with it. Empty for one without, or where there is no IndexedDB |
| locomotion beta | A character's walks, runs and idles chosen as it moves (UnitLook.loop): forwards, backwards or to a side as it goes against the way it faces, a run past runFrom, its idles in turn. Each of its units its own turn of idles ts loop: locomotion({ walk: { forward: 'walk', back: 'walk_back', left: 'strafe_left', right: 'strafe_right' }, idle: ['idle', 'idle_2'] }) |
| lookOfCopy beta | Gives a copy the looks of what it is a copy of, where it has none of its own, in a view whose maps are its own (ownLooks): up the line of copies to the first with a look. Nothing for a definition that is no copy |
| looksOfCopies beta | Every copy of the registry given the looks of what it is a copy of, in a view whose maps are its own (ownLooks) |
| mapDiffPicture beta | Two maps of the same size, as a picture of the second with what changed marked: the ground that is different, in magenta, and what was put down or taken away, in green and red. For a map changed in a pull request |
| mapPicture beta | A map seen from above, as pixels: its ground as the minimap colours it (cellColor), and over it the room buildings and mines take, the starts in their players' colours, the regions and the paths. No engine running and no browser: it runs in Node and in the tests, for npm run map picture and for the pictures of maps in lists |
| mapPictureUrl beta | A picture of a map seen from above (mapPicture, with the game's tiles and ground colours), at most size across, as an address for the page: what the editor's lists of maps, its generator's preview and the start screen's random map show. more draws more over the ground (its scenery as dots: doodads). With a key (what the map is known by and when it changed: file:fort:1728000000), it is kept, and asked again it is not drawn again |
| mapVersionText beta | The text of a version's map file, as it was saved |
| mergeCategories beta | Several lists of categories as one: the first to declare an id says what it is, and a later one adds files to it |
| mergeParams beta | The knobs of an effect over its own: knobs of the effects it is made of merged too (smoke: { darkness }) |
| mixPixels beta | Two grounds' pixels (RGBA, size across) mixed into one, as a new array: the second in patches of a noise that repeats across the picture as they do, so the mix repeats without a seam too |
| modelAnatomy beta | What a model file is made of: a GLB (or glTF's JSON alone), as its bytes |
| modelExtension beta | What a model's file is read as, by its path: a glTF (one file, everything inside it) or a GLB, the usual |
| mountTitleCard beta | Puts a title card into an element, faded in as it is put up and out out seconds before its for is up: on the clock given (a cinematic's), else by the browser's animations (Element.animate). Gives back what takes it away |
| moveOldMaps beta | Moves every map still kept the old way (localStorage) into IndexedDB, freeing localStorage for the rest. Done once as the editor opens; nothing when there is none |
| nearestEnvironment beta | The named environment a map's look is nearest to, and how near (0 the same, 1 nothing alike): none when there are none |
| nullCinematicStage beta | The parts of a stage that has none of them (CinematicStage): what a test's stage or a tool's builds on, giving its own over them. Each function says once in log that a cinematic asked for it and it is left out, and does nothing (a question gets no answer); the parts the cut goes without in its own way are null. The lanes, eases and transitions are the client's own, made for this stage |
| opaque beta | A picture with no height and nothing see-through, in place: its alpha all 255. What a picture to show is made of a ground's pixels (their alpha is their height) |
| ownLooks beta | A copy of a view whose maps of looks by id are its own, to fill in for copies: the view given is the game's, shared by every game it plays |
| patternDefs beta | The patterns there are to make a ground of, in the order they are offered: a game's own (GameView.ground.patterns) first, then the client's (PATTERNS), each by its id |
| patternNamed beta | A pattern by what names it: a definition as it is, one of the game's own by id (own), one of the client's by name, or the client's plain noise for a name there is not |
| pixelsCapOf beta | The cap a quality has, as a number: the game's, or the client's where it says nothing |
| plainFloat beta | A kind's def made data, for floats.json: what is code (words, a size, a colour or an icon worked out in code, a motion of the game's own, a merge keyed in code, its own drawing) left out, and said where it was (dropped, paths as style.color, motion.2) |
| plainHud beta | A unit's HUD made data, for hud.json: a plain plate as a def of one plate; what is code (values worked out in code, the game's own widgets, when.of) left out, and said where it was (dropped, paths as plates.0.items.2) |
| plainParts beta | The parts of an effect as data, with its knobs as they are now: what reads them read, what is code (make, a path, a custom shape) left out, a part that plays only when code says kept where it would now. For an effect to be made its own in a file |
| plainPing beta | A kind's def made data, for pings.json: what is code (an effect def made in code, a mark of its own drawing) left out and said (dropped: fx, render) |
| preparedMap beta | A map read ahead (prepareMap), once |
| prepareGame beta | Gets a game ready to be shown, from wherever it comes (GameSource): the world made, loaded or joined, what the game starts on it, and the player seated at it. Nothing of the screen is in it: launch shows what this makes, and a page that shows a game its own way starts here. A world made here goes with the seat (session.dispose()), and is disposed when anything after it fails |
| prepareMap beta | Reads a map ahead, to be taken at once by preparedMap |
| readCampaignFile beta | A campaign.json, checked: what is not of a campaign dropped, what is wrong thrown (Invalid, saying where). Two missions or chapters of one id, or a chapter naming a mission there is not, are wrong |
| readFxEntry beta | An effect as data, checked: nothing in it that is not of an FxFileEntry. Throws on what is wrong |
| readMapBushes beta | A layer's look of bushes as data, checked: a map's (MapEnvironment.bushes) or a game file's entry, or false for no bushes drawn. Throws on what is wrong: a field that is not of a look, a colour out of range, a model that is no GLB, a style that is no value of a layer (1 to 255); each style's look checked as the layer's is |
| readRecord beta | A record's value, to look at |
| registerGame beta | Has the page know a game by its id, in the place of one of the same id |
| relayFile beta | Lays a file again over a view, in place, as it is now (the editor, as it writes it): over what its fields were before it was laid, and the files laid after it over the same fields laid again over that. A file the view never laid is laid over what its fields are now, and kept as laid by the editor alone. Gives back what the fields were before |
| resizeLoop beta | Whether a page's error event is the browser's word that a resize observer's notifications were put off to the next frame ("ResizeObserver loop completed with undelivered notifications"): no error of anyone's, nothing thrown, and the spec calls it benign. The page's error logs (the editor's, a game's mount) leave it out |
| rgbOf beta | A colour of #rrggbb as numbers from 0 to 1, for what is drawn in the world |
| runGame beta | Runs a game on a page, from its load to its end, with nothing drawn (design review U10): loads its client, preloads and prepares it behind the loading screen, starts it, records it, offers a lower quality where it keeps running slowly, and says why it could not be loaded or stopped. launch, a scene of a game and the editor's Play here each make one, and GameMount draws it: its loading screen, its HUD, its error screen. A page with a screen of its own draws it itself |
| saveBrowserPrefab beta | Saves a prefab's clip in the browser for a game under its name, replacing one of that name; does nothing where there is no IndexedDB |
| saveDraft beta | Keeps a draft of a map being edited for a game, in place of the one before of the same map (Draft.key): another map's, in another tab, is left as it is |
| saveMap beta | Keeps a map in the browser (IndexedDB). Resolves to its id, a new one when it had none. Rejects when the browser has no room. file says which map file of the project it is a copy of, if it is one; preview is a small picture of it for the list. Each of these keeps under the app's name (storage, its runtime's), the page's when left out |
| saveMapVersion beta | Keeps a version of a map as it was saved: its file's text, gzipped, beside the ones before, the oldest past keep (MAP_VERSIONS) forgotten. Nothing is kept where the newest is the same text. Gives back what was kept, or nothing |
| savePack beta | Keeps the files of a map with it, or forgets them when there are none |
| seamlessPixels beta | A square picture's pixels (RGBA, size across) made to repeat without a seam, as a new array. As it was for none |
| showForTests beta | Shows a part of the page to its browser tests by a name (window.__v12[name]), when it was opened for them (?test), or takes it away again (undefined; only while it is still the one shown: a newer one stays). A game's own parts too: a panel, a stage, a HUD of its own its specs read |
| storageUsage beta | How much the browser says the page keeps, and how much it may (navigator.storage.estimate). Nothing where it does not say |
| storedMap beta | What the browser keeps about a map, without the map itself |
| texturePixels beta | A tile's texture as the ground draws it, by itself: made in code, or its file loaded, its seams and adjustments done, by the app's ground works (ClientRuntime.ground). A mix is its colour here: what it is mixed of is the ground's to find (mixPixels) |
| themeNamed beta | A theme by name. Throws for one nobody added, saying which there are |
| tileColors beta | The colour of each tile of a game, by its index in the paint (0, no paint, has none): the game's own look, the client's for that id, or one that says there is none. tileset is the map's, for an editor, whose paint can hold tiles the game does not have; the game's own list when left out |
| trackToCinematic beta | A track of a tracks.json (the model before this one: three fixed lists) as a cinematic: its camera keys on a camera lane (a view's name as { view }, a pose as itself), its lines on a dialog lane (speaker, text, and seconds as for), its clips on a units lane (unit, clip). cut.track plays through it; the editor's Cinematic panel makes a cinematic of a track this way (New › From a track of tracks.json) |
| triangleBudgets beta | The triangles a frame may draw at each preset: what the game says (QualityLook.triangles) over TRIANGLE_BUDGETS |
| viewListener beta | Typed help for writing one: viewListener(invaderThrough, ({ x, z }, client) => client.camera.shake(x, z, 0.6)) |
| widgetKind beta | Which kind a widget is: the one of its fields that says what it is (plate for a plate) |
| withEnvironment beta | A map's look with a named one put on it: each part of the look (LOOK_FIELDS) as the named one has it, or none where it has none; the rest of the map's as it was |
| withFileIn beta | The categories of an assets.json with a file put into one (to), or out of the one it was listed in (nothing): it is listed by its path in the category it goes to, and taken off the lists of the others. A category not there is made, called name |
| withGameActions beta | The lists put together: the game's own first, then the client's as the game changes them, without those it hides |
| wordsFor beta | What a message says: in the game's own words when its view has some for the key, else in the engine's, else the client's (CLIENT_WORDS). A key nobody has words for is shown as it is, so a mod that gives plain text as a reason is still understood, and what a game or a map writes as plain text is its own key. viewer is who reads: their race goes to the words that are functions. Words that are text are put in with formatWords ({param}, plurals, names), the view's in locale (its language, English when left out), the client's in English |
| writeCinematic beta | A cinematic as its file: fields in one order, lanes in theirs (the order the panel shows them in is the designer's), items and markers by time, a tab in, a line at the end. The same def gives the same text, so a diff of the file reads |
| writtenSound beta | A sound's definition as a file writes it: its fields in order, what is left out not there; nothing for one that says nothing |
Values
| Name | What |
|---|---|
| ANTIALIAS beta | Every way of smoothing edges, cheapest first |
| ANTIALIAS_LABELS beta | Each way of smoothing edges, as the settings name it |
| BLEND_DEPTH beta | How deep two tiles' heights blend into each other where they meet (TileLook.blendDepth), when a tile does not say: a crisp, ragged edge, the higher picture over the lower (grass tufts over dirt) |
| BUILT_IN_LANES beta | The client's own lanes, in the order the editor lists them: each a plugin like a game's (LaneDef), registered on the kit as the game starts (kit.lanes), where a game adds its own (GameView.cinematics.lanes) or puts one of its own in a built-in's place |
| CAMERA_ACTIONS beta | What moves the view: the camera's own, which a tool that has a camera and no game (the map editor) has too |
| CAMPAIGN_FILE beta | The name of a campaign's file among the game's files: at the top of the game's folder, or in a folder of it |
| CATEGORY_ID beta | A category's id: what a folder can be called |
| CELL_LAYERS_FILE beta | A game's cellLayers.json, laid over the view's cellLayers (layCellLayers): each layer whose look changed drawn again at once, with the map's bushes over it as ever |
| classicTheme beta | The engine's look: a deep navy, a fine gold edge with a black line outside it, warm parchment text, round corners, Cinzel for names and titles and Barlow Semi Condensed for the rest. The same as packages/client/src/ui/tailwind.css says before any code runs |
| CLIENT_WORDS beta | The client's own words, in English, by key: what it says of its own (a hint, the buttons of the command card, why a save is not one to load), the HUD's words (hud.idle) and the words of its screens (ui.…). A table of its own, messages.en.json, in the shape of a language's (MessagesFile): a language of a game's has words for any of them |
| clientLog beta | What the client says when it is no one game's to say: a game got ready (loadGame), an engine made, a page launched into. Under the root logger (rootLogger), so the console has it, and whoever listens there |
| CLIFF_DETAIL beta | How many pieces a cell of a wall is cut into each way, where its shape says none (CliffShape.detail) |
| CLIFF_LOOKS_LAYER beta | The map's layer of cells (GameMap.cells) whose values say which of the map's looks of the walls of cliffs (MapCliff.looks) the walls of a cell take: 0 none, the map's or its top tile's |
| CLIFF_ROUGHNESS beta | How far a wall is pushed out and in halfway up, in cells, where its shape says none (CliffShape.roughness) |
| ease beta | Curves for a tween: how far along it is, 0..1, for how far along the time is, 0..1 |
| engineWords beta | English for everything the engine says. A game's view can put other words in place of any of these (GameView.hud.messages) |
| fallbackLook beta | The look given to a unit type that has none: a plain box 1.4 high in the owner's colour |
| FLOATS_FILE beta | A game's floats.json, laid over the view's hud.floats (layFloats): every kind a game played floats as it says now, at once |
| FRAME_CAPS beta | The caps of frames a second the settings offer (the setting maxFps, the editor's EditorPrefs.maxFps): 0 for none, as many as the screen shows. In code any number is a cap (client.maxFps) |
| fx beta | Helpers to write effects with (fx.extend, fx.particles): what they make is a plain FxDef, the same as one written out |
| FX_AMOUNTS beta | How much of the effects' particles a quality's fx level draws, 0 to 1: low 0.35, medium 0.65, high 1 |
| FX_FILE beta | A game's fx.json, laid over the view's effects (layFx): played at once by the world that draws them |
| GROUND_REPEAT beta | How many cells a picture of the ground covers across, where its tile does not say (TileLook.scale) |
| GROUND_RINGS beta | The ground's circles, provided by the world's ground (TerrainView.rings) |
| HUD_FILE beta | A game's hud.json, laid over the view's unitHud and its types' looks (layHud): a game played draws its units' HUD as it says now, at once. Laid after LOOKS_FILE, over the looks it made |
| LOOK_FIELDS beta | The parts of a map's look a named environment is made of, and replaces as a whole when put on a map |
| LOOK_RULES beta | The checks of what a map looks like, in the order they run: what the editor checks a map with beside the engine's (MAP_RULES), and a game view's own (GameView.world.mapRules) |
| mapLooksResizer beta | The client's looks of a map (MapEnvironment) moved along as it is grown or cut (resizeMap): its sounds, lights, effects, decals and waterfalls by their place, gone where they are off the map; its areas of mist, weather and clouds by their shape, what is left of each on the map. What the client keeps with a map, so the client's: given to resizeMap beside the engine's own (resizeMap(map, sides, [mapLooksResizer]); the editor's resize gives it) |
| pageRuntime beta | What runs where nothing gave a runtime of its own: a test, a tool, a part made on its own |
| pageStorage beta | What is kept where nothing gave a runtime of its own: a test, a tool, a part made on its own. Under v12 |
| PICTURE_ZONE_BLEND beta | How far in from a picture zone's edge its look is all there, in cells, where it does not say (MapPictureZone.blend) |
| PING_WHEEL_DEFAULTS beta | The defaults of the look: what a field the game leaves out is |
| PINGS_FILE beta | A game's pings.json, laid over the view's pings and their wheel (layPings, layPingWheel): a game played sends, draws and puts on its wheel the kinds as they are now, at once |
| PRESET_FLOATS beta | Ready-made floats for every kind (presetFloats): damage dealt in white, merged into one number that counts up and pops on each hit, bigger for bigger hits; damage taken in red, drifting aside; critical strikes in orange with a pop and a shake; healing in green, merged; misses in grey; experience in purple; mana in blue at the chest; a bounty's gold; a level reached bouncing in gold on a dark box; a buff's name; a deny's mark; a game's pool with its name; a snore. Data all of it (words with {amount} filled in, a size by the amount as numbers): what the editor's Words panel takes into a game's floats.json as it is |
| PRESET_FOLIAGE_NAMES beta | The names the editor gives the ready-made looks (presetFoliage) in its list of presets |
| PRESET_FX beta | The client's ready-made effects by name (presetFx): each an FxDef with its knobs open and said (knobs) |
| PRESET_LABELS beta | The words a quality picker shows for each preset, and custom for knobs set apart from any preset |
| PRESET_PINGS beta | Ready-made pings (presetPings), as hero arena games have them: a plain look at a spot, danger, help wanted, on my way, hold here, push, an enemy missing, fall back, and a question |
| presetFoliage beta | Ready-made looks of grass, by name: a short meadow with a few flowers in it, tall grass, dry grass, reeds, wheat, grass in snow, a thicket and a hedge. Each a look as data: foliage(presetFoliage.meadow), foliage( ...presetFoliage.meadow, styles: 2: presetFoliage.tallGrass ), or written to a map or cellLayers.json. Their rules, by the same names, are the engine's presetFoliageStyles |
| PRESETS beta | What each preset sets, before a game changes them (GameView.world.quality.presets). Edges are smoothed by the last frames blended (TAA) on medium and high (PF5), by a cheap pass (FXAA) on low; MSAA is a choice of the player's or the game's |
| QUALITY_FILE beta | A game's quality.json, laid over the view's world.quality (layQuality), put on at once in a game played |
| QUALITY_PRESETS beta | The presets in order, from the lightest to the heaviest: what a quality picker lists |
| REPLAY_CHECKPOINTS beta | Ticks between the checkpoints a game played in the page keeps in its replay when nothing says (a minute at 30 ticks a second): going back in it and opening it halfway run from the last one before, not from its start |
| RUN_CHANNEL beta | The channel a page opened from the editor and the editor's Run panel speak over (BroadcastChannel, so of one origin alone) |
| SHADOW_MAPS beta | What each knob's words are in numbers |
| SOUNDS_FILE beta | A game's sounds.json, laid over the view's sounds.defs (laySounds): a game played hears every sound as it says now, at once (a sound standing on the map as it is put there again) |
| SYMMETRY_LABELS beta | The ways a map is kept fair, by what each is called: the editor's Map › Symmetry, and the generator's form |
| TEXTURE_SIZE beta | The side of a texture, in pixels |
| UNPAINTED beta | The id that stands for the unpainted ground in a MapTransition |
| WATER_EDGE beta | The id that stands for water in a MapTransition: a shore, whatever is painted under it |
| WATER_FALLS beta | The waterfalls where a map and the game say nothing of them (WaterFalls): no sound, as the client has no file of one |
| WATER_WAVES beta | The waves where a map and the game say nothing of them (WaterWaves) |
Types
| Name | What |
|---|---|
| PatternMaker beta | A pattern of a game's own as pixels alone (TileLook.pattern, PatternDef.pixels): the pixels of its texture, RGBA, size by size, in a colour, from a seed, its alpha its height (PatternDef.height). Cracked earth, hexagonal tiles, a painted sea |