@v12-engine/client/ground
Interfaces
| Name | What |
|---|---|
| CliffNoise beta | Noise in three dimensions to shape a wall with (CliffStyleDef.push): by where a point is in the world, so that the walls of two cells meet. Each is the same for the same seed and salt |
| CliffStyleDef beta | A style of the walls of cliffs (defineCliffStyle): its name and parameters (each a slider of the Ground editor, and a field of CliffShape.params), and how far a point of a wall is pushed out of it, about -1..1 (times the shape's depth): out where it is more, in where less. It is let off at the foot and the lip by itself, so that the wall meets the ground |
| 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 |
| GroundWorkerLike beta | What a worker that makes ground textures is to the page (a Worker, or anything that answers as one) |
| 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) |
| PatternNoise beta | Noise to write a pattern with (PatternDef.shade): it repeats across the picture, so the texture has no seam; it is seeded from the pattern's seed, so two tiles of one pattern look apart (salt tells two noises of one pattern apart); and it is as fine or coarse as the recipe says (GroundRecipe.fineness) |
| PatternParamDef beta | A parameter of a pattern (PatternDef.params): a slider of the Ground editor, and a number in code (GroundRecipe.params, MapTile.pattern.params) |
| WallPoint beta | Where a point of a wall is, for a style: in the world (x, y up, z), and how far up the wall (up, 0 at its foot and 1 on its lip) |
| WorleyPoint beta | What a cellular noise says of a point (PatternNoise.worley) |
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 |
| cliffNoise beta | The noise a style is written with, for a seed |
| cliffPush beta | A style's push for its parameters (each at its default where not given) and a seed: the client's rough for a style there is not |
| cliffStyleDefs beta | The styles there are, the game's first, by id: those the Ground editor offers |
| defineCliffStyle beta | Typed help for writing a style of cliffs |
| definePattern beta | Typed help for writing a pattern |
| fileNormals beta | A normal map of a file (<texture>_n.png: x right, y up the picture, as most are drawn) made as heightNormals makes them, y down its rows, in place |
| 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 |
| heightBlend beta | How much of each of the tiles around a point shows, blended by height as the ground's shader does (GroundTilesPlugin): each tile's height there (0..1, its picture's alpha) raised by how near it is (weights, summing to 1); what is within depth of the highest shows, in proportion to how far over that line it is. Sums to 1. A small depth gives a crisp, ragged edge along the pictures' heights; a large one fades as the weights do |
| heightNormals beta | The normals of pictures by their heights (their alpha, as the ground blends by: withHeight, PatternDef.height), as a normal map of each (RGBA, size across, count of them one after another as the ground's array has them): x along the picture's width, y down its rows and z out of it in red, green and blue (0..255 for -1..1, as normal maps are), alpha 255. Its slopes wrap round the edges, as the picture repeats. Into out where given (a layer's own map is kept where keep says) |
| 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 |
| 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) |
| 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 |
| patternNoise beta | The noise a pattern is written with (PatternNoise), for a seed and a fineness: what groundTexture gives a pattern's shade, and what a game's pixels maker may take for itself |
| rockShape beta | A rock: a sphere of 20 × 4^subdivisions triangles bumped by a noise (lumpiness, 0..1), its bottom flattened, a unit across: its corners, which way each faces, and its triangles (wound as Babylon takes them to face out) |
| serveGroundTextures beta | What a ground worker's file does: it makes the textures it is asked for and sends them back. port is where it hears: the worker's own scope when left out (a page's worker) // ground.worker.ts // the client's ground entry, alone (@v12-engine/client/ground) serveGroundTextures() |
| withHeight beta | A picture's height written into its alpha, in place (RGBA, 0..255): how light from is at each pixel (a height picture of its own, TileLook.height, the same size), or the picture itself. What a file's height is: its light stones and tufts stand over its dark seams |
Values
| Name | What |
|---|---|
| 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) |
| CLIFF_STYLES beta | The client's styles of cliffs, by id: rough (the default: rock bumped all over), strata (shelves of rock laid one on another, each standing out its own way), columns (upright columns, as basalt cools), boulders (round blocks piled), eroded (gullies run down by rain). A game's of the same id take their place (GameView.ground.cliffStyles) |
| PATTERNS beta | The client's patterns, by name (GroundPattern): grass, dirt, gravel, sand, rock, snow, plain, cobbles, cracked (cracked earth), mud, moss, ice, lava, planks and flagstones, each with the parameters its formula has. A game's own (GameView.ground.patterns) are offered before them; a game names one of these in a look (pattern: 'gravel') or a map's ground does (MapTile.pattern.kind) |
| RELIEF_SCALE beta | How steep a picture's height (its alpha, 0..1) is drawn as, across the picture: a slope of 1 is a rise of the whole height over a 32nd of the picture (an eighth of a cell, at four cells a picture). What heightNormals scales by |
| TEXTURE_SIZE beta | The side of a texture, in pixels |
Types
| Name | What |
|---|---|
| GroundPattern beta | The client's own patterns, by name (PATTERNS): what a tile's texture made in code is a texture of, where a game names none of its own |
| 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 |
Namespaces
| Name | What |
|---|---|
| groundTextures |