Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

BlockCover

One kind of cover a block’s top grows: upright cards, each a frame of a sprite strip, yawed to the camera, rooted at their bottom middle, swayed by the look’s wind and darkened toward the root.

Property Type Default value Description
besideWater? boolean false Grows only on a cell with water beside it, its surface within 0.4 m of the cell’s top, as reeds do.
castShadow? boolean false Casts into the sun’s shadow map, each card turned to the sun. Cover a player stands in, such as grass, casts nothing, or the shadow pass pays for thousands of cards.
columns? number 1 Frames across the strip, each drawn as often as the others.
frames? BlockCoverFrames every frame once The frames a card is drawn from, each evenly: list one twice to draw it twice as often, such as a tinted tuft one in four.
patches? BlockCoverPatchesOptions none Grows another count from other frames where the map’s patch field passes a value, so a meadow thickens and grows tall in clumps and its flowers clump with it. Every cover reads the one field.
perCell number | readonly [number, number] undefined How many grow on a cell: a mean, of which a 0.05 is a 5% chance of one and a 2.5 is two and half the time three, or a range of whole numbers drawn evenly, such as [3, 5]. A cell is the set’s cellSize[0] by cellSize[2].
rootDarkening? number 0.35 How dark a card’s root is: its colour times 1 less this at the root, rising to its own over its lower 60%, as LeafCards’s. The reference’s grass takes 0.35 and its shrubs 0.25.
scale? readonly [number, number] [0.7, 1.05] Each card’s scale, drawn evenly between the two. The strip’s frame gives its width and height, so one scale keeps the painting’s shape; Unity’s details and Unreal’s grass scale each axis apart.
texture PixelTexture undefined A row of frames side by side, each card one frame: a card’s size is its frame’s at the texture’s texels per metre, scaled 0.7 to 1.05.
windWeight? number 1 Its share of the look’s sway, as a leaf card’s: the reference sways shrubs 0.5, tufts 1, flowers 1.1 and reeds 1.4.
zones? BlockCoverZonesOptions none Splits the map into zones, each drawing its cards from one list of frames, so a meadow’s flowers stand in drifts of one colour. Its lists take the place of frames and of a patch’s frames, which a cover with zones leaves out; its patches still set the count.