Model - textures[]
Every method of the textures[] lane. Each step of a textures[] entry returns a texture, and the lane's entries are addressed by the identity schema/lanes.ts declares for it.
| Method | Description | Arg | Type | Default | Meaning |
|---|---|---|---|---|---|
bandpass | Bandpass — Filter — keep only spatial frequencies between low and high (FFT; needs power-of-two dimensions). | low | number | 0 | Lowest frequency kept (cycles per tile). |
high | number | 64 | Highest frequency kept (cycles per tile). | ||
blend | Blend — Filter — combine the running image with another chain's output, optionally through a mask. | source | string | '' | textures[] chain key to blend in (quote literals). |
mode | string | 'add' | Blend mode. | ||
amount | number | 1 | Blend weight 0..1. | ||
mask | string | '' | textures[] chain key whose values weight the blend (quote literals). | ||
blur | Blur — Filter — box/gaussian softening. | radius | number | 1 | Blur radius in PIXELS. |
cells | Cells — Source — the per-unit-variation grid (brick / tile / plank): split the tile into cells, carve the joints, then evaluate value with u/v = LOCAL cell coordinates and k = the cell's stable id. | pattern | string | 'running' | Cell bond. |
columns | number | 4 | Cells across the tile. | ||
rows | number | 8 | Cells down the tile. | ||
offset | number | 0.5 | Row offset as a fraction of a cell ('running' bond) — 0.5 = classic brick, 0 = stack bond. | ||
joint | number | 0.01 | Joint thickness as a fraction of the TILE (same both axes). | ||
value | string | 1 | Per-pixel formula (u, v, t, k + math builtins) — compiled once, evaluated for every pixel. u/v = LOCAL cell coordinates, k = the cell's stable id — 0.8 + 0.2 * rand(k, 3) tints every brick differently. | ||
width | number | imageWidth | Output width in PIXELS. Defaults to the chain's imageWidth builtin. | ||
height | number | imageHeight | Output height in PIXELS. 0 = derive from the physical aspect (lengthY/lengthX). | ||
channels | Channels — Filter — pack up to four referenced chains into RGBA. May start a stream on its own (the only filter that can). Empty channel → 0, empty alpha → 1. | red | string | '' | textures[] chain key for the red channel (quote literals). |
green | string | '' | textures[] chain key for the green channel. | ||
blue | string | '' | textures[] chain key for the blue channel. | ||
alpha | string | '' | textures[] chain key for the alpha channel. | ||
distance | Distance Field — Filter — per-pixel distance to the nearest pixel above threshold, clamped and normalized to 0..1 (two-pass chamfer, O(n)). | threshold | number | 0.5 | Values above this count as the mask. |
maxDistance | number | 32 | Distance in PIXELS that maps to 1. | ||
field | Field — Source — evaluate one per-pixel formula over the tile. The general-purpose maths source (gradients, stripes, rings, anything closed-form). | value | string | 0.5 | Per-pixel formula (u, v, t, k + math builtins) — compiled once, evaluated for every pixel. u/v = tile coordinates 0..1. |
width | number | imageWidth | Output width in PIXELS. Defaults to the chain's imageWidth builtin. | ||
height | number | imageHeight | Output height in PIXELS. 0 = derive from the physical aspect (lengthY/lengthX). | ||
gradientMap | Gradient Map — Filter — map the scalar stream through a color ramp. | stops | object | [{t:0, color:'#000000'}, {t:1, color:'#ffffff'}] | Ramp stops [{t, color}] — t in 0..1. |
image | Image — Source — a pre-loaded bitmap resampled into the stream. The bytes must already be loaded (Store pre-load / editor upload); evaluation never fetches. | url | url | '' | A url-method parameter KEY, or a direct https:/data: URI. |
channel | string | 'rgba' | 'rgba' = color stream; 'luma' = scalar stream (feeds the scalar-only filters). | ||
width | number | imageWidth | Output width in PIXELS. Defaults to the chain's imageWidth builtin. | ||
height | number | imageHeight | Output height in PIXELS. 0 = derive from the physical aspect (lengthY/lengthX). | ||
isolines | Isolines — Filter — turn sin(density × value) into ring boundaries: contour lines through any scalar field. | density | number | 20 | Rings across the value range. |
blur | number | 0.08 | Ring softness — 0 = hard edge. | ||
levels | Levels — Filter — gamma, gain, offset and inversion on the scalar stream. | gamma | number | 1 | Gamma exponent — <1 brightens midtones. |
multiply | number | 1 | Gain applied after gamma. | ||
add | number | 0 | Offset applied after gain. | ||
invert | binary | 0 | 1 = invert the stream. | ||
noise | Noise — Source — deterministic value / fbm / worley noise. A whole-number scale tiles seamlessly (the lattice is embedded on a torus). | type | string | 'fbm' | Noise family. |
scale | number | 8 | Lattice cells per tile — a WHOLE number keeps the tile seamless. | ||
octaves | number | 4 | Octaves summed (fbm), 1–8. | ||
seed | number | 1 | Deterministic offset — the same seed always produces the same image. | ||
width | number | imageWidth | Output width in PIXELS. Defaults to the chain's imageWidth builtin. | ||
height | number | imageHeight | Output height in PIXELS. 0 = derive from the physical aspect (lengthY/lengthX). | ||
normalMap | Normal Map — Filter — read the stream as a height field and emit a tangent-space normal map. | strength | number | 1 | Slope multiplier — higher = deeper relief. |
splatter | Splatter — Source — scatter a stamp formula across the tile with per-stamp size / rotation / intensity jitter. Speckle, gravel, foliage. | stamp | string | max(0, 1 - 2 * hypot(u, v)) | Per-pixel formula (u, v, t, k + math builtins) — compiled once, evaluated for every pixel. u/v = coordinates within the stamp, k = stamp index. |
count | number | 64 | How many stamps to scatter. | ||
stampSize | number | 0.12 | Stamp size as a fraction of the tile. | ||
sizeJitter | number | 0.3 | Random size variation 0..1. | ||
rotationJitter | number | 1 | Random rotation 0..1 (1 = any angle). | ||
intensityJitter | number | 0.3 | Random brightness variation 0..1. | ||
seed | number | 1 | Deterministic scatter seed. | ||
mode | string | 'max' | How overlapping stamps combine. | ||
width | number | imageWidth | Output width in PIXELS. Defaults to the chain's imageWidth builtin. | ||
height | number | imageHeight | Output height in PIXELS. 0 = derive from the physical aspect (lengthY/lengthX). | ||
strokes | Strokes — Source — sweep a parametric path (x(t), y(t)) and stamp a stroke along it, optionally in several copies. Grain, hatching, fibres. | x | string | t | Per-pixel formula (u, v, t, k + math builtins) — compiled once, evaluated for every pixel. t = path parameter, k = copy index. |
y | string | 0.5 | Per-pixel formula (u, v, t, k + math builtins) — compiled once, evaluated for every pixel. t = path parameter, k = copy index. | ||
t0 | number | 0 | Path parameter at the start of the sweep. | ||
t1 | number | 1 | Path parameter at the end of the sweep. | ||
samples | number | 800 | Points sampled along each stroke. | ||
copies | number | 1 | How many strokes to draw — k is the copy index. | ||
strokeWidth | number | 0.01 | Stroke half-width as a fraction of the tile. | ||
intensity | number | 1 | Stroke brightness 0..1. | ||
width | number | imageWidth | Output width in PIXELS. Defaults to the chain's imageWidth builtin. | ||
height | number | imageHeight | Output height in PIXELS. 0 = derive from the physical aspect (lengthY/lengthX). | ||
tint | Tint — Filter — colorize the scalar stream by interpolating between two colors. | low | color | '#000000' | Color at value 0. |
high | color | '#ffffff' | Color at value 1. | ||
transform | Transform — Filter — affine resample (rotate / scale / offset / flip), bilinear, honoring the chain's declared wrap out of bounds. | rotate | angle | 0 | Rotation in degrees. |
scale | object | 1 | Uniform number, or [scaleX, scaleY]. | ||
offset | object | [0, 0] | [offsetX, offsetY] as a fraction of the tile. | ||
flipX | binary | 0 | 1 = mirror horizontally. | ||
flipY | binary | 0 | 1 = mirror vertically. | ||
warp | Warp — Filter — displace the running image by another chain's values. | source | string | '' | textures[] chain key supplying the displacement (quote literals). |
strength | number | 0.05 | Displacement as a fraction of the tile. |