The pack
uiTextureStone
function uiTextureStone(options: UiTextureStoneOptions = {}): Pack<{}>
Pack ui-texture-stone: paints the graveyard-stone texture once, as the picture ui-texture-stone (or
ui-texture-<name>), for a ui style's texture: 'stone' — or any sprite's. Needs no other pack.
Helpers
stoneTexture
function stoneTexture(options: UiTextureStoneOptions = {}): { size: number; data: Uint8ClampedArray<ArrayBuffer> }
The stone as RGBA bytes, size × size, grey around a mid tone so a style's colour tints it, tiling seamlessly both
ways. Pure and deterministic: the same options give the same pixels.
Types
UiTextureStoneOptions
interface UiTextureStoneOptions
How the stone is laid. Every field optional.
name?: string— The picture isui-texture-<name>, and a style saystexture: '<name>'. Default 'stone'.size?: number— The tile's side, px. Default 256.stones?: number— Slabs across one tile. Default 4.mortar?: number— The mortar between them, px. Default 4.weathering?: number— How cracked and worn, 0..1. Default 0.5.seed?: number— Changes the slabs without changing their kind. Default 1.


