Skip to content

foliage beta ​

Function of @v12-engine/client

ts
export declare function foliage(look?: FoliageLook | ((context: CellLayerContext) => FoliageLook)): CellLayerViewFactory;

Bushes over every cell of a layer, as a part of its look (GameView.ground.cellLayers): tall grass made in code (every tuft a copy of one shape, by chunks of the map), or the game's own models (models, copies by chunks of the map); laid out again as its cells change, swaying in the wind, shaken by who goes into them (shake) and rustling as they do, see-through around the player's own units. A ready-made part, which a game takes or leaves: bush: foliage( color, tip, height ) , bush: foliage( models: [ src: 'forest/bush_common_flowers.glb' ] ) . A look that needs the layer is given as a function of the part's context (CellLayerContext), asked as the part is made. Drawn by the renderer's foliage (lite/foliage's FoliageView), which the layers' code says as it is loaded (foliageMade)