Skip to content

Parameterized patterns, fabrics, and Gray–Scott presets

Read as Markdown

Import recipes and types from @pibbl/core/textures. Mount a recipe with useTexture from @pibbl/core, supplying resolution and palette there. Recipes return TextureRecipe<never>: these patterns have no message commands.

Creates a recipe with StripesOptions.

stripes({ bands, dutyCycle, wave, waveCycles, phase, speed }) uses the first palette color for the background and the last for the bands. bands is an integer 1–64 (default 8), dutyCycle is 0–1 (default 0.5), wave is horizontal amplitude in tile fractions 0–1 (default 0), and waveCycles is an integer 1–16 (default 1). Rotate the complete repeating paint through texture.paint({ rotation: 45 }).

Creates a recipe with CheckersOptions.

checkers({ columns, rows, phase, speed }) alternates the palette endpoints. Rows/columns are even integers 2–64 (default 8), preserving seamless alternation. Change tile width/height independently to make rectangular checks.

Creates a recipe with WoodGrainOptions.

woodGrain({ seed, grain, distortion, roughness, knots, knotSize, phase, speed }) produces a seeded wood surface. Seed is unsigned 32-bit (default 42). Grain periods are integer 4–128 (default 32). Distortion and roughness are 0–1 (defaults 0.5 and 0.4). Distortion bends growth lines with several scales of periodic seeded noise; zero leaves straight grain except where knots deflect it. Roughness adds fine fibers and pore variation. Knots are integer 0–12 (default 0); zero gives clear wood. Knot size is a tile-radius fraction 0.02–0.18 (default 0.09). Elliptical knots have seeded round-to-elliptical outlines with their long axis along the grain. They push nearby growth lines outward so the grain flows around the core, and contain darker concentric rings. Their seeded positions wrap at tile boundaries. Palette colors form a tonal ramp.

The initial unreleased hair / HairOptions study was replaced by woodGrain / WoodGrainOptions after visual feedback. No compatibility alias is retained; actual hair/fur remains a separate future family.

All three accept finite phase in cycles (wrapped) and speed in cycles per second, finite 0–20 (default 0). Zero speed stops continuing frame requests. Changing speed preserves the current phase; changing authored phase sets it. Geometry is periodic on both axes throughout motion. At fixed parameters one phase cycle repeats the field. These recipes use reusable Canvas raster buffers; the existing chemical solver remains WASM.

Frozen feed/kill pairs for spots, stripes, coral, worms, labyrinths, and mitosis. The first two preserve their existing coefficients. Appearance depends on resolution, seed, and step count; names describe characteristic regimes rather than guaranteeing a particular shape at every seed and time.

The six keys of grayScottPresets, selecting chemistry within one solver.

reactionDiffusion and ReactionDiffusion additionally accept optional feed and kill overrides, finite 0–0.1, and warmupSteps, integer 0–4096 (default 0). Warmup runs once during initialization, synchronously, before the first texture publication. Large grids and warmups can delay mounting; use a modest simulation resolution for previews. Changing chemistry or warmup resets the field. Recoloring preserves it. Existing paint/stir/pause/reset commands remain available.

The simulation uses periodic neighboring cells. Existing paint clipping and clamped stirring are unchanged; interactions do not wrap around the tile. Living ink is animated, without an exact animation-loop or arbitrary-time seek promise.

plainWeave(options) alternates warp over weft at each crossing.

twill(options) creates two-over, two-under crossings stepping diagonally.

herringbone(options) uses a 2/2 broken twill, offsetting the interlacing order at each four-column reversal rather than forming a continuous chevron point. Its eight-column harness sequence is 1,2,3,4,2,1,4,3, matching the example in CottonWorks Weaving 101, page 23.

All three factories return TextureRecipe<never> and share optional controls: threads is the thread count on each axis, a multiple of 8 in 8–128 (default 16). threadWidth is the fraction of spacing occupied by a thread, 0.2–1 (default 0.8). relief controls rounded thread shading, 0–1 (default 0.65), and fuzz controls seeded directional fiber variation and softened, uneven yarn edges, 0–1 (default 0.2). seed is unsigned 32-bit (default 42). Phase and speed follow PatternMotionOptions; speed defaults to zero and idles. Palette colors form a tonal ramp with lighter warp and darker weft. Gap pixels use the dark end. This is a stylized fabric surface, without physical cloth simulation or individually simulated fibers. Rotate the complete repeat lattice through paint placement. Use enough raster resolution for the chosen thread count; small raster or display sizes can alias fine fibers.

softNoise(options) sums periodic smooth value-noise layers. Each successive layer doubles the integer lattice frequency. Layer amplitudes are normalized.

ridgedNoise(options) folds each layer with 1 - abs(noise) before summing it, producing connected bright crests and softer valleys. Both are material fields, without a terrain or physical cloud simulation contract.

Seed is unsigned 32-bit (default 42). Frequency is integer 1–16 (default 4); octaves is integer 1–6 (default 4); persistence is 0–1 (default 0.5). Contrast is 0–4 (default 1), centered around 0.5 with final color values clamped to the ramp. Zero contrast is a uniform midpoint field. Phase/speed follow PatternMotionOptions. Motion scrolls the field periodically, preserving its seams; zero speed idles. Mount with useTexture for colors and resolution. Use enough resolution for the highest selected frequency to avoid aliasing. Layer composition belongs to the application; these factories add no new blending or filter API.

schnakenberg(options?) creates a periodic activator/inhibitor simulation recipe accepting InkMessage paint, stir, pause and reset. Mount with useTexture for palette and resolution, and use paint placement for tile size.

barkley(options?) creates an excitable two-field simulation initialized with a broken excitation front. Paint excites activator; stir advects both fields.

brusselator(options?) creates a periodic two-field feed/conversion simulation. Color represents activator relative to twice its equilibrium concentration.

a and b are 0.01–2 (defaults 0.1, 0.9); diffusion defaults to 1, 20.

a is 0.3–1.2 (default 0.75), b is 0–0.2 (default 0.02), and epsilon is 0.005–0.1 (default 0.02). Diffusion defaults to 1, 0. Color represents excitation.

a is 0.1–3 (default 1), b is 0.1–5 (default 1.8). Diffusion defaults to 0.2, 2.

All three types accept seed (uint32, default 42), diffusionU/diffusionV (0–32), initialNoise (0–1, default 0.1), warmupSteps (integer 0–12000, default 4096), speed (0–4, default 1) and paused (default false). Speed multiplies 480 numerical steps per second; an internal stability-limited step size depends on chemistry and diffusion. Zero speed or pause idles. Chemistry, seed, noise and warmup changes reset the field; speed and pause changes preserve it. Reset reproduces initialization and preserves pause state. Palette changes preserve the field. Resolution changes initialize a new field. Minimum resolution is 3×3. Raster borders duplicate periodic samples. All stepping, brushes and stirring wrap. Brush radius is in simulation cells.

Immutable spots and labyrinths option objects, spread into schnakenberg.

Immutable spirals and waves option objects, spread into barkley.

Immutable spots and oscillations option objects, spread into brusselator.

Creates seamless circular dots from PolkaDotsOptions, using the palette endpoints.

columns is an integer 1–64 (default 12). rows is an even integer 2–64 (default 12) so stagger wraps. radius is 0–0.5 of a cell (default 0.3), stagger is 0–1 (default 0), and jitter is 0–0.5 of a cell (default 0). seed is an unsigned 32-bit integer (default 42). With unequal cell sizes, dots become elliptical.

Creates seamless variable-size dots driven by a periodic tonal field.

columns is an integer 1–64 (default 24), and rows is an even integer 2–64 (default 24). minRadius and maxRadius are cell fractions 0–0.5 (defaults 0.05 and 0.45); minimum must not exceed maximum. cyclesX and cyclesY are integers 0–16 (default 1); zero removes that axis’s variation. contrast is 0–1 (default 0.7), and stagger is 0–1 (default 0.5). Motion advances the tonal field.

Creates seeded quarter-circle tiles connecting at every edge midpoint.

Rows and columns are integers 1–64 (default 8). lineWidth is 0–0.5 of a cell (default 0.12); zero draws only background. orientationBias is 0–1 (default 0.5); endpoints choose one orientation everywhere. seed is an unsigned 32-bit integer (default 42). Unequal cell sizes produce elliptical arcs. Motion scrolls the connected pattern along both axes.

Creates a named-color plaid. The dictionary supplies colors directly; omit the useTexture palette for this recipe. Palette arrays remain ordered ramps for other textures.

/** @jsxImportSource @pibbl/core */
import { Rectangle, useTexture } from "@pibbl/core";
import { plaid, plaidPresets } from "@pibbl/core/textures";
function PlaidPreview() {
const recipe = plaid({
colors: { paper: "#f5e9d3", ink: "#304c48", accent: "#c56948" },
horizontal: [
{ width: 8, color: "paper" },
{ width: 1, color: "accent" },
],
vertical: [
{ width: 3, color: "paper" },
{ width: 1, color: "ink" },
],
crossing: 0.5,
});
const texture = useTexture(recipe, {
resolution: { width: 256, height: 256 },
});
return <Rectangle style={{ width: 400, height: 300, fill: texture }} />;
}

TypeScript checks band color names against the inferred dictionary keys. Runtime validation also rejects missing keys. Color changes update the mounted recipe.

colors contains 1–16 named opaque #RRGGBB entries. horizontal and vertical each contain 1–32 ordered bands. crossing is the horizontal color contribution 0–1 (default 0.5); the vertical contribution is its complement. Crossings use linear interpolation in sRGB. Dictionary order has no visual effect.

width is finite and positive, up to 1,000,000; widths on each axis are normalized together into one repeat. color is a checked dictionary key. Band order determines placement; band arrays are deliberately ordered.

Immutable gingham, tartan, and windowpane configurations use background, primary, and accent keys. Spread a preset and replace its colors or bands:

plaid({
...plaidPresets.tartan,
colors: {
background: "#f5e9d3",
primary: "#304c48",
accent: "#c56948",
},
});

All four geometric recipes accept phase (finite cycles, wrapping) and speed (0–20 cycles/sec, default 0). Dot motion scrolls horizontally; plaid and Truchet scroll along both axes. Smooth edge coverage is computed at the selected raster resolution. Increasing resolution improves detail independently of painted tile size. Every recipe preserves periodic borders during animation.

Creates seamless straight or wavy stripes using the palette endpoints.

stripes: (options?: StripesOptions) => TextureRecipe

Related API: stripes, StripesOptions, TextureRecipe.

  • options — Stripe geometry and periodic motion. See StripesOptions.

A mountable texture recipe with no message commands. See TextureRecipe.

StripesOptions

View source — packages/core/src/features/textures/lib/patterns.ts:199

Creates a seamless checkerboard using the palette endpoints.

checkers: (options?: CheckersOptions) => TextureRecipe

Related API: checkers, CheckersOptions, TextureRecipe.

  • options — Even row/column counts and periodic motion. See CheckersOptions.

A mountable texture recipe with no message commands. See TextureRecipe.

CheckersOptions

View source — packages/core/src/features/textures/lib/patterns.ts:227

Creates seamless seeded wood with irregular grain, fine fibers, and optional knots.

woodGrain: (options?: WoodGrainOptions) => TextureRecipe

Related API: woodGrain, WoodGrainOptions, TextureRecipe.

  • options — Grain frequency, distortion, roughness, knots, seed, and motion. See WoodGrainOptions.

A mountable texture recipe with no message commands. See TextureRecipe.

WoodGrainOptions

View source — packages/core/src/features/textures/lib/patterns.ts:331

Creates an alternating over-under plain weave with rounded threads and seeded fibers.

plainWeave: (options?: FabricOptions) => TextureRecipe

Related API: plainWeave, FabricOptions, TextureRecipe.

  • options — Thread geometry, shading, seed, and motion. See FabricOptions.

A mountable recipe with no message commands. See TextureRecipe.

FabricOptions

View source — packages/core/src/features/textures/lib/patterns.ts:447

Creates a two-over, two-under diagonal twill fabric.

twill: (options?: FabricOptions) => TextureRecipe

Related API: twill, FabricOptions, TextureRecipe.

  • options — Thread geometry, shading, seed, and motion. See FabricOptions.

A mountable recipe with no message commands. See TextureRecipe.

FabricOptions

View source — packages/core/src/features/textures/lib/patterns.ts:456

Creates a reversing twill fabric with repeating herringbone chevrons.

herringbone: (options?: FabricOptions) => TextureRecipe

Related API: herringbone, FabricOptions, TextureRecipe.

  • options — Thread geometry, shading, seed, and motion. See FabricOptions.

A mountable recipe with no message commands. See TextureRecipe.

FabricOptions

View source — packages/core/src/features/textures/lib/patterns.ts:465

Shared thread geometry and shading for seamless woven fabrics.

interface FabricOptions extends PatternMotionOptions

Related API: FabricOptions, PatternMotionOptions.

plainWeave

View source — packages/core/src/features/textures/lib/patterns.ts:336

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit fiber variation seed; default 42. See FabricOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:338

threads (optional)
readonly threads?: number | undefined

Thread count on each axis, a multiple of 8 in 8–128; default 16. See FabricOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:340

threadWidth (optional)
readonly threadWidth?: number | undefined

Thread width as a fraction of cell spacing, 0.2–1; default 0.8. See FabricOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:342

relief (optional)
readonly relief?: number | undefined

Rounded thread lighting strength, 0–1; default 0.65. See FabricOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:344

fuzz (optional)
readonly fuzz?: number | undefined

Seeded directional fibers and soft, uneven yarn edges, 0–1; default 0.2. See FabricOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:346

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Shared periodic motion controls for geometric and fiber recipes.

interface PatternMotionOptions

Related API: PatternMotionOptions.

stripes

View source — packages/core/src/features/textures/lib/patterns.ts:9

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Controls for periodic stripes; rotate the repeat lattice through paint placement.

interface StripesOptions extends PatternMotionOptions

Related API: StripesOptions, PatternMotionOptions.

stripes

View source — packages/core/src/features/textures/lib/patterns.ts:16

bands (optional)
readonly bands?: number | undefined

Integer stripe periods across the tile, 1–64; default 8. See StripesOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:18

dutyCycle (optional)
readonly dutyCycle?: number | undefined

Foreground fraction of each period, 0–1; default 0.5. See StripesOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:20

wave (optional)
readonly wave?: number | undefined

Horizontal wave amplitude in tile fractions, 0–1; default 0. See StripesOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:22

waveCycles (optional)
readonly waveCycles?: number | undefined

Integer wave periods down the tile, 1–16; default 1. See StripesOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:24

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Controls for a two-color checkerboard.

interface CheckersOptions extends PatternMotionOptions

Related API: CheckersOptions, PatternMotionOptions.

checkers

View source — packages/core/src/features/textures/lib/patterns.ts:27

columns (optional)
readonly columns?: number | undefined

Even integer columns, 2–64; default 8. See CheckersOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:29

rows (optional)
readonly rows?: number | undefined

Even integer rows, 2–64; default 8. See CheckersOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:31

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Controls for seeded seamless wood grain with optional knots.

interface WoodGrainOptions extends PatternMotionOptions

Related API: WoodGrainOptions, PatternMotionOptions.

woodGrain

View source — packages/core/src/features/textures/lib/patterns.ts:34

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit variation seed; default 42. See WoodGrainOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:36

grain (optional)
readonly grain?: number | undefined

Integer grain periods across the tile, 4–128; default 32. See WoodGrainOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:38

distortion (optional)
readonly distortion?: number | undefined

Irregular grain bending, 0–1; default 0.5. See WoodGrainOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:40

roughness (optional)
readonly roughness?: number | undefined

Fine fiber and pore variation, 0–1; default 0.4. See WoodGrainOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:42

knots (optional)
readonly knots?: number | undefined

Integer knot count, 0–12; default 0 for clear grain. See WoodGrainOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:44

knotSize (optional)
readonly knotSize?: number | undefined

Knot radius in tile fractions, 0.02–0.18; default 0.09. See WoodGrainOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:46

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Curated immutable Gray–Scott feed/kill pairs. Appearance also depends on seed and elapsed steps.

grayScottPresets: Readonly<{ spots: Readonly<{ feed: 0.0367; kill: 0.0649; }>; stripes: Readonly<{ feed: 0.029; kill: 0.057; }>; coral: Readonly<{ feed: 0.0545; kill: 0.062; }>; worms: Readonly<{ feed: 0.078; kill: 0.061; }>; labyrinths: Readonly<{ feed: 0.037; kill: 0.06; }>; mitosis: Readonly<{ feed: 0.028; kill: 0.062; }>; }>

Related API: grayScottPresets, stripes.

ReactionDiffusionOptions

View source — packages/core/src/features/textures/lib/gray-scott.ts:3

Named configurations of the same Gray–Scott solver and message contract.

type ReactionDiffusionPreset = keyof typeof grayScottPresets

Related API: ReactionDiffusionPreset, grayScottPresets.

grayScottPresets

View source — packages/core/src/features/textures/lib/gray-scott.ts:18

Creates smooth seamless multiscale lattice noise for clouds, pigment, and material variation.

softNoise: (options?: NoiseOptions) => TextureRecipe

Related API: softNoise, NoiseOptions, TextureRecipe.

  • options — Seed, lattice frequencies, amplitudes, contrast, and motion. See NoiseOptions.

A mountable recipe with no message commands. See TextureRecipe.

NoiseOptions

View source — packages/core/src/features/textures/lib/patterns.ts:530

Creates seamless multiscale ridges by folding each noise layer around its midpoint.

ridgedNoise: (options?: NoiseOptions) => TextureRecipe

Related API: ridgedNoise, NoiseOptions, TextureRecipe.

  • options — Seed, lattice frequencies, amplitudes, contrast, and motion. See NoiseOptions.

A mountable recipe with no message commands. See TextureRecipe.

NoiseOptions

View source — packages/core/src/features/textures/lib/patterns.ts:539

Seeded seamless noise layers and their tonal response.

interface NoiseOptions extends PatternMotionOptions

Related API: NoiseOptions, PatternMotionOptions.

softNoise

View source — packages/core/src/features/textures/lib/patterns.ts:470

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit noise seed; default 42. See NoiseOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:472

frequency (optional)
readonly frequency?: number | undefined

Integer base lattice periods per axis, 1–16; default 4. See NoiseOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:474

octaves (optional)
readonly octaves?: number | undefined

Number of doubled-frequency layers, integer 1–6; default 4. See NoiseOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:476

persistence (optional)
readonly persistence?: number | undefined

Relative amplitude of each successive layer, 0–1; default 0.5. See NoiseOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:478

contrast (optional)
readonly contrast?: number | undefined

Related API: contrast.

Tonal contrast about the midpoint, 0–4; default 1. See NoiseOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:480

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Creates a periodic Schnakenberg activator/inhibitor texture with paint, stir, pause and reset.

schnakenberg: (options?: SchnakenbergOptions) => TextureRecipe<InkMessage>

Related API: schnakenberg, SchnakenbergOptions, TextureRecipe, InkMessage.

A mountable simulation recipe. See TextureRecipe, InkMessage.

schnakenbergPresets

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:345

Creates a periodic Barkley excitable texture initialized with a broken excitation front.

barkley: (options?: BarkleyOptions) => TextureRecipe<InkMessage>

Related API: barkley, BarkleyOptions, TextureRecipe, InkMessage.

  • options — Excitability, recovery, diffusion and initialization. See BarkleyOptions.

A mountable simulation recipe. See TextureRecipe, InkMessage.

barkleyPresets

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:356

Creates a periodic Brusselator texture with paint, stir, pause and reset.

brusselator: (options?: BrusselatorOptions) => TextureRecipe<InkMessage>

Related API: brusselator, BrusselatorOptions, TextureRecipe, InkMessage.

A mountable simulation recipe. See TextureRecipe, InkMessage.

brusselatorPresets

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:367

Immutable Schnakenberg starting configurations. See SchnakenbergOptions.

schnakenbergPresets: Readonly<{ spots: Readonly<{ a: 0.1; b: 0.9; diffusionU: 1; diffusionV: 20; }>; labyrinths: Readonly<{ a: 0.01; b: 1.7; diffusionU: 1; diffusionV: 20; warmupSteps: 10000; }>; }>

Related API: schnakenbergPresets.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:57

Immutable Barkley starting configurations. See BarkleyOptions.

barkleyPresets: Readonly<{ spirals: Readonly<{ a: 0.75; b: 0.02; epsilon: 0.02; diffusionU: 1; diffusionV: 0; }>; waves: Readonly<{ a: 0.9; b: 0.01; epsilon: 0.04; diffusionU: 1; diffusionV: 0; }>; }>

Related API: barkleyPresets.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:70

Immutable Brusselator starting configurations. See BrusselatorOptions.

brusselatorPresets: Readonly<{ spots: Readonly<{ a: 1; b: 1.9; diffusionU: 0.2; diffusionV: 2; warmupSteps: 10000; }>; oscillations: Readonly<{ a: 1; b: 3; diffusionU: 0.3; diffusionV: 0.3; }>; }>

Related API: brusselatorPresets.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:89

Schnakenberg production rates, diffusion and initialization. See schnakenberg.

interface SchnakenbergOptions extends ChemicalOptions

Related API: SchnakenbergOptions.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:34

a (optional)
readonly a?: number | undefined

Activator source, finite 0.01–2; default 0.1. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:36

b (optional)
readonly b?: number | undefined

Inhibitor source, finite 0.01–2; default 0.9. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:38

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit initialization seed; default 42. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:19

diffusionU (optional)
readonly diffusionU?: number | undefined

Activator diffusion per grid cell, finite 0–32. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:21

diffusionV (optional)
readonly diffusionV?: number | undefined

Inhibitor diffusion per grid cell, finite 0–32. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:23

initialNoise (optional)
readonly initialNoise?: number | undefined

Initial seeded disturbance amplitude, finite 0–1; default 0.1. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:25

warmupSteps (optional)
readonly warmupSteps?: number | undefined

Initialization steps, integer 0–12000; default 4096. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:27

speed (optional)
readonly speed?: number | undefined

Multiplier of 480 numerical steps/second, finite 0–4; default 1. Zero idles. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:29

paused (optional)
readonly paused?: boolean | undefined

Initially suspend stepping; default false. See InkMessage.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:31

Excitability, recovery, diffusion and initialization. See barkley.

interface BarkleyOptions extends ChemicalOptions

Related API: BarkleyOptions.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:41

a (optional)
readonly a?: number | undefined

Excitability scale, finite 0.3–1.2; default 0.75. See barkley.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:43

b (optional)
readonly b?: number | undefined

Excitation threshold offset, finite 0–0.2; default 0.02. See barkley.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:45

epsilon (optional)
readonly epsilon?: number | undefined

Fast/slow time separation, finite 0.005–0.1; default 0.02. See barkley.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:47

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit initialization seed; default 42. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:19

diffusionU (optional)
readonly diffusionU?: number | undefined

Activator diffusion per grid cell, finite 0–32. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:21

diffusionV (optional)
readonly diffusionV?: number | undefined

Inhibitor diffusion per grid cell, finite 0–32. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:23

initialNoise (optional)
readonly initialNoise?: number | undefined

Initial seeded disturbance amplitude, finite 0–1; default 0.1. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:25

warmupSteps (optional)
readonly warmupSteps?: number | undefined

Initialization steps, integer 0–12000; default 4096. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:27

speed (optional)
readonly speed?: number | undefined

Multiplier of 480 numerical steps/second, finite 0–4; default 1. Zero idles. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:29

paused (optional)
readonly paused?: boolean | undefined

Initially suspend stepping; default false. See InkMessage.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:31

Brusselator feed rates, diffusion and initialization. See brusselator.

interface BrusselatorOptions extends ChemicalOptions

Related API: BrusselatorOptions.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:50

a (optional)
readonly a?: number | undefined

Activator feed, finite 0.1–3; default 1. See brusselator.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:52

b (optional)
readonly b?: number | undefined

Conversion rate, finite 0.1–5; default 1.8. See brusselator.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:54

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit initialization seed; default 42. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:19

diffusionU (optional)
readonly diffusionU?: number | undefined

Activator diffusion per grid cell, finite 0–32. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:21

diffusionV (optional)
readonly diffusionV?: number | undefined

Inhibitor diffusion per grid cell, finite 0–32. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:23

initialNoise (optional)
readonly initialNoise?: number | undefined

Initial seeded disturbance amplitude, finite 0–1; default 0.1. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:25

warmupSteps (optional)
readonly warmupSteps?: number | undefined

Initialization steps, integer 0–12000; default 4096. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:27

speed (optional)
readonly speed?: number | undefined

Multiplier of 480 numerical steps/second, finite 0–4; default 1. Zero idles. See schnakenberg.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:29

paused (optional)
readonly paused?: boolean | undefined

Initially suspend stepping; default false. See InkMessage.

View source — packages/core/src/features/textures/lib/chemical-recipes.ts:31

Creates a seamless dot lattice using palette endpoints.

polkaDots: (options?: PolkaDotsOptions) => TextureRecipe

Related API: polkaDots, PolkaDotsOptions, TextureRecipe.

  • options — Dot geometry and motion.

A mountable texture recipe.

PolkaDotsOptions

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:297

Creates seamless varying-size dots from a periodic tonal field.

halftone: (options?: HalftoneOptions) => TextureRecipe

Related API: halftone, HalftoneOptions, TextureRecipe.

  • options — Dot sizes, tonal periods, and motion.

A mountable texture recipe.

HalftoneOptions

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:341

Creates plaid using checked color keys and ordered relative-width bands.

plaid: <const Colors extends Readonly<Record<string, string>>>(options: PlaidOptions<Colors>) => TextureRecipe

Related API: plaid, PlaidOptions, TextureRecipe.

  • options — Named colors, bands, crossing balance, and motion.

A mountable texture recipe.

PlaidOptions

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:474

Creates seeded quarter-circle tiles that connect across every edge.

truchet: (options?: TruchetOptions) => TextureRecipe

Related API: truchet, TruchetOptions, TextureRecipe.

  • options — Tile counts, stroke width, seed, and motion.

A mountable texture recipe.

TruchetOptions

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:382

Named-color band configurations for gingham, tartan, and windowpane patterns.

Full type declaration
plaidPresets: Readonly<{ gingham: Readonly<{ colors: Readonly<{ background: "#f5e9d3"; primary: "#304c48"; accent: "#c56948"; }>; horizontal: readonly Readonly<{ width: number; color: "accent" | "background" | "primary"; }>[]; vertical: readonly Readonly<{ width: number; color: "accent" | "background" | "primary"; }>[]; crossing: 0.5; }>; tartan: Readonly<{ colors: Readonly<{ background: "#f5e9d3"; primary: "#304c48"; accent: "#c56948"; }>; horizontal: readonly Readonly<{ width: number; color: "accent" | "background" | "primary"; }>[]; vertical: readonly Readonly<{ width: number; color: "accent" | "background" | "primary"; }>[]; crossing: 0.5; }>; windowpane: Readonly<{ colors: Readonly<{ background: "#f5e9d3"; primary: "#304c48"; accent: "#c56948"; }>; horizontal: readonly Readonly<{ width: number; color: "accent" | "background" | "primary"; }>[]; vertical: readonly Readonly<{ width: number; color: "accent" | "background" | "primary"; }>[]; crossing: 0.5; }>; }>

Related API: plaidPresets.

plaid

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:494

Seamless circular dots with optional stagger and seeded displacement.

interface PolkaDotsOptions extends PatternMotionOptions

Related API: PolkaDotsOptions, PatternMotionOptions.

polkaDots

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:6

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

columns (optional)
readonly columns?: number | undefined

Integer columns, 1–64; default 12. See PolkaDotsOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:8

rows (optional)
readonly rows?: number | undefined

Even integer rows, 2–64; default 12, preserving stagger across the seam. See PolkaDotsOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:10

radius (optional)
readonly radius?: number | undefined

Radius in cell fractions, 0–0.5; default 0.3. See PolkaDotsOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:12

stagger (optional)
readonly stagger?: number | undefined

Alternate-row horizontal offset in cell fractions, 0–1; default 0. See PolkaDotsOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:14

jitter (optional)
readonly jitter?: number | undefined

Seeded center displacement per axis in cell fractions, 0–0.5; default 0. See PolkaDotsOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:16

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit variation seed; default 42. See PolkaDotsOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:18

A periodic tonal field expressed as varying dot sizes.

interface HalftoneOptions extends PatternMotionOptions

Related API: HalftoneOptions, PatternMotionOptions.

halftone

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:21

columns (optional)
readonly columns?: number | undefined

Integer columns, 1–64; default 24. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:23

rows (optional)
readonly rows?: number | undefined

Even integer rows, 2–64; default 24. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:25

minRadius (optional)
readonly minRadius?: number | undefined

Smallest dot radius in cell fractions, 0–0.5; default 0.05. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:27

maxRadius (optional)
readonly maxRadius?: number | undefined

Largest dot radius in cell fractions, minRadius–0.5; default 0.45. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:29

cyclesX (optional)
readonly cyclesX?: number | undefined

Integer horizontal tonal periods, 0–16; default 1. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:31

cyclesY (optional)
readonly cyclesY?: number | undefined

Integer vertical tonal periods, 0–16; default 1. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:33

contrast (optional)
readonly contrast?: number | undefined

Related API: contrast.

Tonal wave amplitude, 0–1; default 0.7. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:35

stagger (optional)
readonly stagger?: number | undefined

Alternate-row offset in cell fractions, 0–1; default 0.5. See HalftoneOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:37

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

One band in an ordered plaid repeat; colors are named keys.

interface PlaidBand<Key extends string = string>

Related API: PlaidBand.

PlaidOptions

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:53

width
readonly width: number

Positive relative width; all widths on an axis are normalized together. See PlaidBand.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:55

color
readonly color: Key

A key from the plaid’s colors dictionary. See PlaidBand.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:57

A plaid’s named colors, ordered bands, and crossing balance.

interface PlaidOptions<Colors extends Readonly<Record<string, string>> = Readonly<
Record<string, string>
>> extends PatternMotionOptions

Related API: PlaidOptions, PatternMotionOptions.

plaid

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:60

colors
readonly colors: Colors

Dictionary of 1–16 opaque #RRGGBB colors. See PlaidOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:66

horizontal
readonly horizontal: readonly PlaidBand<NoInfer<Extract<keyof Colors, string>>>[]

Related API: PlaidBand.

Ordered horizontal bands, 1–32, referencing existing color keys. See PlaidOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:68

vertical
readonly vertical: readonly PlaidBand<NoInfer<Extract<keyof Colors, string>>>[]

Related API: PlaidBand.

Ordered vertical bands, 1–32, referencing existing color keys. See PlaidOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:72

crossing (optional)
readonly crossing?: number | undefined

Horizontal contribution at crossings, 0–1; default 0.5. See PlaidOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:76

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Seeded connecting quarter-circle tiles.

interface TruchetOptions extends PatternMotionOptions

Related API: TruchetOptions, PatternMotionOptions.

truchet

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:40

columns (optional)
readonly columns?: number | undefined

Integer columns, 1–64; default 8. See TruchetOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:42

rows (optional)
readonly rows?: number | undefined

Integer rows, 1–64; default 8. See TruchetOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:44

lineWidth (optional)
readonly lineWidth?: number | undefined

Stroke width in cell fractions, 0–0.5; default 0.12. See TruchetOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:46

orientationBias (optional)
readonly orientationBias?: number | undefined

Fraction of tiles with the first orientation, 0–1; default 0.5. See TruchetOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:48

seed (optional)
readonly seed?: number | undefined

Unsigned 32-bit orientation seed; default 42. See TruchetOptions.

View source — packages/core/src/features/textures/lib/geometric-patterns.ts:50

phase (optional)
readonly phase?: number | undefined

Initial phase in cycles; any finite value wraps. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:11

speed (optional)
readonly speed?: number | undefined

Nonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.

View source — packages/core/src/features/textures/lib/patterns.ts:13

Read the Textures and reaction-diffusion companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision a1dcf8e. ALPHA — NOT FOR PRODUCTION USE.