Skip to content

FoliageShape beta ​

Interface of @v12-engine/client

ts
export interface FoliageShape

The shape of a tuft of grass (FoliageLook.shape): what one copy drawn over a cell is made of

Members ​

alphaCutoff ​

ts
alphaCutoff?: number;

How see-through a pixel of the picture is before it is left out, 0 to 1: 0.5 when left out

blades ​

ts
blades?: number;

Blades to a tuft, of a tuft or a blade: 5 when left out

cards ​

ts
cards?: 2 | 3;

Cards of a cross, 2 or 3: 2 when left out

curve ​

ts
curve?: number;

How far the tip of a blade leans out from its foot, of a tuft a unit tall: 0.3 when left out

droop ​

ts
droop?: number;

How far the tip of a blade hangs down past its highest point, 0 for not at all: 0 when left out

kind ​

ts
kind?: 'tuft' | 'blade' | 'cross' | 'mesh';

What a tuft is: tuft (flat blades leaning out from one foot, as the grass always was; when left out), blade (blades that taper and curve, of segments parts), cross (two or three cards crossed, with a picture on them: texture), mesh (a model of the game's as the tuft: src)

segments ​

ts
segments?: number | readonly [number, number, number];

Parts along a blade, 1 to 4: near the camera, further, far (FoliageLevels): a lighter blade further off. [3, 2, 1] when left out. A tuft and a cross are the same at every level

spread ​

ts
spread?: number;

How far apart the feet of a tuft's blades stand, of a tuft a unit tall: 0, one foot, when left out

src ​

ts
src?: string;

The model a mesh is, as ModelDef.src gives it

taper ​

ts
taper?: number;

How much a blade narrows to its tip, 0 (as wide as its foot) to 1 (a point): 1 when left out

texture ​

ts
texture?: string;

The picture on the cards of a cross, by its path under the game's assets: textures/fern.png

width ​

ts
width?: number;

How wide a blade is at its foot, of a tuft a unit tall: 0.09 when left out