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

PixelWaterOptions

How a water draws as pixel art: square cells of pixelsPerMetre, depth bands dithered at their edges, ripple dashes carried by the flow, a broken foam rim with rings rolling in round a rock, and glints above 1 that bloom. The same options draw a PixelWaterMaterial and a block map’s water cells.

Property Type Default value Description
bandColors? readonly ColorRepresentation[] ["#3a6cb8", "#2c55a0", "#22448a", "#1a3474"], the reference’s river blues The bands’ colours from the shore to the deepest, two to seven, as a pixel artist’s ramp: each cell takes one of them exactly.
flowDirectionRadians? number undefined Which way they drift, radians about up from +z toward +x, in the world. On a block map, left out, the water drifts downhill along its body: toward a fall, else to its lowest edge of the map. On a plane, left out, toward +z.
flowSpeed? number 0 Metres a second the ripples drift; 0 holds the water still, and its dashes shimmer in place.
foamColor? ColorRepresentation "#a9c8e8" The foam rim’s colour.
foamWidth? number 0.15 Metres of the broken foam rim along the shore, with rings rolling in round a rock or a post from four times as far; 0 draws no foam.
glintIntensity? number 3 The glints’ brightness by day, a multiple of the key light’s colour: above 1 they bloom under the look’s bloom; 0 draws none.
nightEmissiveIntensity? number 0.06 The water’s own glow at full night, a multiple of its colour, as three’s emissiveIntensity, blended in by the hour’s night share, so a river reads under the moon. A scene with no day cycle stands at its look’s hour.
nightGlintIntensity? number 1.7 The glints’ multiple at full night, when the key light is the moon.
pixelsPerMetre? number 16 Texels a metre, the grid every cell, dash and glint snaps to: the pixel textures’ 16.
rippleColor? ColorRepresentation "#80a8e8" The wave crests’ colour, and the rings round what stands in the water.
rippleDensity? number 0.5 How many wave crests, from 0, none, to 1, the most; calm water holds one in every square from about 0.56.
shallowDepth? number 0.4 Metres of depth the bands span from the shore to the deepest: the bed shelves 0.6 m down for each metre out from the shore, so a channel 0.35 m deep shows its shallow bands along its banks.