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

PixelWaterMaterialProps

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.
material? ModelMaterial undefined The game’s function over the engine’s material, as WaterMaterial’s sea takes one: handed the engine’s, it returns it patched, or a material of the game’s in its place. Define it once, outside the component.
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.
round? boolean false Keep only the circle inside the plane, a pond, rather than the whole plane. The shore, with its foam, is the edge of the plane’s UV square, or of that circle, and the bed shelves from it.
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.