Parameterized patterns, fabrics, and Gray–Scott presets
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.
stripes
Section titled “stripes”Creates a recipe with StripesOptions.
StripesOptions
Section titled “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 }).
checkers
Section titled “checkers”Creates a recipe with CheckersOptions.
CheckersOptions
Section titled “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.
woodGrain
Section titled “woodGrain”Creates a recipe with WoodGrainOptions.
WoodGrainOptions
Section titled “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.
PatternMotionOptions
Section titled “PatternMotionOptions”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.
grayScottPresets
Section titled “grayScottPresets”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.
ReactionDiffusionPreset
Section titled “ReactionDiffusionPreset”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
Section titled “plainWeave”plainWeave(options) alternates warp over weft at each crossing.
twill(options) creates two-over, two-under crossings stepping diagonally.
herringbone
Section titled “herringbone”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.
FabricOptions
Section titled “FabricOptions”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
Section titled “softNoise”softNoise(options) sums periodic smooth value-noise layers. Each successive
layer doubles the integer lattice frequency. Layer amplitudes are normalized.
ridgedNoise
Section titled “ridgedNoise”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.
NoiseOptions
Section titled “NoiseOptions”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
Section titled “schnakenberg”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
Section titled “barkley”barkley(options?) creates an excitable two-field simulation initialized with a
broken excitation front. Paint excites activator; stir advects both fields.
brusselator
Section titled “brusselator”brusselator(options?) creates a periodic two-field feed/conversion simulation.
Color represents activator relative to twice its equilibrium concentration.
SchnakenbergOptions
Section titled “SchnakenbergOptions”a and b are 0.01–2 (defaults 0.1, 0.9); diffusion defaults to 1, 20.
BarkleyOptions
Section titled “BarkleyOptions”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.
BrusselatorOptions
Section titled “BrusselatorOptions”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.
schnakenbergPresets
Section titled “schnakenbergPresets”Immutable spots and labyrinths option objects, spread into schnakenberg.
barkleyPresets
Section titled “barkleyPresets”Immutable spirals and waves option objects, spread into barkley.
brusselatorPresets
Section titled “brusselatorPresets”Immutable spots and oscillations option objects, spread into brusselator.
polkaDots
Section titled “polkaDots”Creates seamless circular dots from PolkaDotsOptions, using the palette endpoints.
PolkaDotsOptions
Section titled “PolkaDotsOptions”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.
halftone
Section titled “halftone”Creates seamless variable-size dots driven by a periodic tonal field.
HalftoneOptions
Section titled “HalftoneOptions”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.
truchet
Section titled “truchet”Creates seeded quarter-circle tiles connecting at every edge midpoint.
TruchetOptions
Section titled “TruchetOptions”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.
PlaidOptions
Section titled “PlaidOptions”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.
PlaidBand
Section titled “PlaidBand”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.
plaidPresets
Section titled “plaidPresets”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.
API details from source
Section titled “API details from source”
stripes
Section titled “stripes”Creates seamless straight or wavy stripes using the palette endpoints.
stripes: (options?: StripesOptions) => TextureRecipeRelated API: stripes, StripesOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Stripe geometry and periodic motion. See StripesOptions.
Returns
Section titled “Returns”A mountable texture recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:199
checkers
Section titled “checkers”Creates a seamless checkerboard using the palette endpoints.
checkers: (options?: CheckersOptions) => TextureRecipeRelated API: checkers, CheckersOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Even row/column counts and periodic motion. See CheckersOptions.
Returns
Section titled “Returns”A mountable texture recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:227
woodGrain
Section titled “woodGrain”Creates seamless seeded wood with irregular grain, fine fibers, and optional knots.
woodGrain: (options?: WoodGrainOptions) => TextureRecipeRelated API: woodGrain, WoodGrainOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Grain frequency, distortion, roughness, knots, seed, and motion. See WoodGrainOptions.
Returns
Section titled “Returns”A mountable texture recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:331
plainWeave
Section titled “plainWeave”Creates an alternating over-under plain weave with rounded threads and seeded fibers.
plainWeave: (options?: FabricOptions) => TextureRecipeRelated API: plainWeave, FabricOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Thread geometry, shading, seed, and motion. See FabricOptions.
Returns
Section titled “Returns”A mountable recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:447
Creates a two-over, two-under diagonal twill fabric.
twill: (options?: FabricOptions) => TextureRecipeRelated API: twill, FabricOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Thread geometry, shading, seed, and motion. See FabricOptions.
Returns
Section titled “Returns”A mountable recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:456
herringbone
Section titled “herringbone”Creates a reversing twill fabric with repeating herringbone chevrons.
herringbone: (options?: FabricOptions) => TextureRecipeRelated API: herringbone, FabricOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Thread geometry, shading, seed, and motion. See FabricOptions.
Returns
Section titled “Returns”A mountable recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:465
FabricOptions
Section titled “FabricOptions”Shared thread geometry and shading for seamless woven fabrics.
interface FabricOptions extends PatternMotionOptionsRelated API: FabricOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:336
Properties and methods
Section titled “Properties and methods”
seed (optional)
readonly seed?: number | undefinedUnsigned 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 | undefinedThread 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 | undefinedThread 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 | undefinedRounded 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 | undefinedSeeded 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 | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
PatternMotionOptions
Section titled “PatternMotionOptions”Shared periodic motion controls for geometric and fiber recipes.
interface PatternMotionOptionsRelated API: PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:9
Properties and methods
Section titled “Properties and methods”
phase (optional)
readonly phase?: number | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
StripesOptions
Section titled “StripesOptions”Controls for periodic stripes; rotate the repeat lattice through paint placement.
interface StripesOptions extends PatternMotionOptionsRelated API: StripesOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:16
Properties and methods
Section titled “Properties and methods”
bands (optional)
readonly bands?: number | undefinedInteger 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 | undefinedForeground 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 | undefinedHorizontal 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 | undefinedInteger 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 | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
CheckersOptions
Section titled “CheckersOptions”Controls for a two-color checkerboard.
interface CheckersOptions extends PatternMotionOptionsRelated API: CheckersOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:27
Properties and methods
Section titled “Properties and methods”
columns (optional)
readonly columns?: number | undefinedEven integer columns, 2–64; default 8. See CheckersOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:29
rows (optional)
readonly rows?: number | undefinedEven integer rows, 2–64; default 8. See CheckersOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:31
phase (optional)
readonly phase?: number | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
WoodGrainOptions
Section titled “WoodGrainOptions”Controls for seeded seamless wood grain with optional knots.
interface WoodGrainOptions extends PatternMotionOptionsRelated API: WoodGrainOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:34
Properties and methods
Section titled “Properties and methods”
seed (optional)
readonly seed?: number | undefinedUnsigned 32-bit variation seed; default 42. See WoodGrainOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:36
grain (optional)
readonly grain?: number | undefinedInteger 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 | undefinedIrregular 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 | undefinedFine 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 | undefinedInteger 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 | undefinedKnot 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 | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
grayScottPresets
Section titled “grayScottPresets”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.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/gray-scott.ts:3
ReactionDiffusionPreset
Section titled “ReactionDiffusionPreset”Named configurations of the same Gray–Scott solver and message contract.
type ReactionDiffusionPreset = keyof typeof grayScottPresetsRelated API: ReactionDiffusionPreset, grayScottPresets.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/gray-scott.ts:18
softNoise
Section titled “softNoise”Creates smooth seamless multiscale lattice noise for clouds, pigment, and material variation.
softNoise: (options?: NoiseOptions) => TextureRecipeRelated API: softNoise, NoiseOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Seed, lattice frequencies, amplitudes, contrast, and motion. See NoiseOptions.
Returns
Section titled “Returns”A mountable recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:530
ridgedNoise
Section titled “ridgedNoise”Creates seamless multiscale ridges by folding each noise layer around its midpoint.
ridgedNoise: (options?: NoiseOptions) => TextureRecipeRelated API: ridgedNoise, NoiseOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Seed, lattice frequencies, amplitudes, contrast, and motion. See NoiseOptions.
Returns
Section titled “Returns”A mountable recipe with no message commands. See TextureRecipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:539
NoiseOptions
Section titled “NoiseOptions”Seeded seamless noise layers and their tonal response.
interface NoiseOptions extends PatternMotionOptionsRelated API: NoiseOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/patterns.ts:470
Properties and methods
Section titled “Properties and methods”
seed (optional)
readonly seed?: number | undefinedUnsigned 32-bit noise seed; default 42. See NoiseOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:472
frequency (optional)
readonly frequency?: number | undefinedInteger 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 | undefinedNumber 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 | undefinedRelative 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 | undefinedRelated 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 | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
schnakenberg
Section titled “schnakenberg”Creates a periodic Schnakenberg activator/inhibitor texture with paint, stir, pause and reset.
schnakenberg: (options?: SchnakenbergOptions) => TextureRecipe<InkMessage>Related API: schnakenberg, SchnakenbergOptions, TextureRecipe, InkMessage.
Parameters
Section titled “Parameters”options— Reaction rates, diffusion and initialization. See SchnakenbergOptions.
Returns
Section titled “Returns”A mountable simulation recipe. See TextureRecipe, InkMessage.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/chemical-recipes.ts:345
barkley
Section titled “barkley”Creates a periodic Barkley excitable texture initialized with a broken excitation front.
barkley: (options?: BarkleyOptions) => TextureRecipe<InkMessage>Related API: barkley, BarkleyOptions, TextureRecipe, InkMessage.
Parameters
Section titled “Parameters”options— Excitability, recovery, diffusion and initialization. See BarkleyOptions.
Returns
Section titled “Returns”A mountable simulation recipe. See TextureRecipe, InkMessage.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/chemical-recipes.ts:356
brusselator
Section titled “brusselator”Creates a periodic Brusselator texture with paint, stir, pause and reset.
brusselator: (options?: BrusselatorOptions) => TextureRecipe<InkMessage>Related API: brusselator, BrusselatorOptions, TextureRecipe, InkMessage.
Parameters
Section titled “Parameters”options— Feed rates, diffusion and initialization. See BrusselatorOptions.
Returns
Section titled “Returns”A mountable simulation recipe. See TextureRecipe, InkMessage.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/chemical-recipes.ts:367
schnakenbergPresets
Section titled “schnakenbergPresets”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
barkleyPresets
Section titled “barkleyPresets”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
brusselatorPresets
Section titled “brusselatorPresets”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
SchnakenbergOptions
Section titled “SchnakenbergOptions”Schnakenberg production rates, diffusion and initialization. See schnakenberg.
interface SchnakenbergOptions extends ChemicalOptionsRelated API: SchnakenbergOptions.
View source — packages/core/src/features/textures/lib/chemical-recipes.ts:34
Properties and methods
Section titled “Properties and methods”
a (optional)
readonly a?: number | undefinedActivator 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 | undefinedInhibitor 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 | undefinedUnsigned 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 | undefinedActivator 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 | undefinedInhibitor 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 | undefinedInitial 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 | undefinedInitialization 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 | undefinedMultiplier 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 | undefinedInitially suspend stepping; default false. See InkMessage.
View source — packages/core/src/features/textures/lib/chemical-recipes.ts:31
BarkleyOptions
Section titled “BarkleyOptions”Excitability, recovery, diffusion and initialization. See barkley.
interface BarkleyOptions extends ChemicalOptionsRelated API: BarkleyOptions.
View source — packages/core/src/features/textures/lib/chemical-recipes.ts:41
Properties and methods
Section titled “Properties and methods”
a (optional)
readonly a?: number | undefinedExcitability 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 | undefinedExcitation 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 | undefinedFast/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 | undefinedUnsigned 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 | undefinedActivator 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 | undefinedInhibitor 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 | undefinedInitial 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 | undefinedInitialization 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 | undefinedMultiplier 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 | undefinedInitially suspend stepping; default false. See InkMessage.
View source — packages/core/src/features/textures/lib/chemical-recipes.ts:31
BrusselatorOptions
Section titled “BrusselatorOptions”Brusselator feed rates, diffusion and initialization. See brusselator.
interface BrusselatorOptions extends ChemicalOptionsRelated API: BrusselatorOptions.
View source — packages/core/src/features/textures/lib/chemical-recipes.ts:50
Properties and methods
Section titled “Properties and methods”
a (optional)
readonly a?: number | undefinedActivator 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 | undefinedConversion 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 | undefinedUnsigned 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 | undefinedActivator 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 | undefinedInhibitor 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 | undefinedInitial 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 | undefinedInitialization 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 | undefinedMultiplier 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 | undefinedInitially suspend stepping; default false. See InkMessage.
View source — packages/core/src/features/textures/lib/chemical-recipes.ts:31
polkaDots
Section titled “polkaDots”Creates a seamless dot lattice using palette endpoints.
polkaDots: (options?: PolkaDotsOptions) => TextureRecipeRelated API: polkaDots, PolkaDotsOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Dot geometry and motion.
Returns
Section titled “Returns”A mountable texture recipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:297
halftone
Section titled “halftone”Creates seamless varying-size dots from a periodic tonal field.
halftone: (options?: HalftoneOptions) => TextureRecipeRelated API: halftone, HalftoneOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Dot sizes, tonal periods, and motion.
Returns
Section titled “Returns”A mountable texture recipe.
See also
Section titled “See also”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>) => TextureRecipeRelated API: plaid, PlaidOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Named colors, bands, crossing balance, and motion.
Returns
Section titled “Returns”A mountable texture recipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:474
truchet
Section titled “truchet”Creates seeded quarter-circle tiles that connect across every edge.
truchet: (options?: TruchetOptions) => TextureRecipeRelated API: truchet, TruchetOptions, TextureRecipe.
Parameters
Section titled “Parameters”options— Tile counts, stroke width, seed, and motion.
Returns
Section titled “Returns”A mountable texture recipe.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:382
plaidPresets
Section titled “plaidPresets”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.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:494
PolkaDotsOptions
Section titled “PolkaDotsOptions”Seamless circular dots with optional stagger and seeded displacement.
interface PolkaDotsOptions extends PatternMotionOptionsRelated API: PolkaDotsOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:6
Properties and methods
Section titled “Properties and methods”
phase (optional)
readonly phase?: number | undefinedInitial 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 | undefinedNonnegative 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 | undefinedInteger columns, 1–64; default 12. See PolkaDotsOptions.
View source — packages/core/src/features/textures/lib/geometric-patterns.ts:8
rows (optional)
readonly rows?: number | undefinedEven 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 | undefinedRadius 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 | undefinedAlternate-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 | undefinedSeeded 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 | undefinedUnsigned 32-bit variation seed; default 42. See PolkaDotsOptions.
View source — packages/core/src/features/textures/lib/geometric-patterns.ts:18
HalftoneOptions
Section titled “HalftoneOptions”A periodic tonal field expressed as varying dot sizes.
interface HalftoneOptions extends PatternMotionOptionsRelated API: HalftoneOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:21
Properties and methods
Section titled “Properties and methods”
columns (optional)
readonly columns?: number | undefinedInteger columns, 1–64; default 24. See HalftoneOptions.
View source — packages/core/src/features/textures/lib/geometric-patterns.ts:23
rows (optional)
readonly rows?: number | undefinedEven 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 | undefinedSmallest 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 | undefinedLargest 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 | undefinedInteger 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 | undefinedInteger 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 | undefinedRelated 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 | undefinedAlternate-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 | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
PlaidBand
Section titled “PlaidBand”One band in an ordered plaid repeat; colors are named keys.
interface PlaidBand<Key extends string = string>Related API: PlaidBand.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:53
Properties and methods
Section titled “Properties and methods”
width
readonly width: numberPositive 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: KeyA key from the plaid’s colors dictionary. See PlaidBand.
View source — packages/core/src/features/textures/lib/geometric-patterns.ts:57
PlaidOptions
Section titled “PlaidOptions”A plaid’s named colors, ordered bands, and crossing balance.
interface PlaidOptions<Colors extends Readonly<Record<string, string>> = Readonly< Record<string, string> >> extends PatternMotionOptionsRelated API: PlaidOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:60
Properties and methods
Section titled “Properties and methods”
colors
readonly colors: ColorsDictionary 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 | undefinedHorizontal 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 | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
TruchetOptions
Section titled “TruchetOptions”Seeded connecting quarter-circle tiles.
interface TruchetOptions extends PatternMotionOptionsRelated API: TruchetOptions, PatternMotionOptions.
See also
Section titled “See also”View source — packages/core/src/features/textures/lib/geometric-patterns.ts:40
Properties and methods
Section titled “Properties and methods”
columns (optional)
readonly columns?: number | undefinedInteger columns, 1–64; default 8. See TruchetOptions.
View source — packages/core/src/features/textures/lib/geometric-patterns.ts:42
rows (optional)
readonly rows?: number | undefinedInteger rows, 1–64; default 8. See TruchetOptions.
View source — packages/core/src/features/textures/lib/geometric-patterns.ts:44
lineWidth (optional)
readonly lineWidth?: number | undefinedStroke 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 | undefinedFraction 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 | undefinedUnsigned 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 | undefinedInitial 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 | undefinedNonnegative cycles per second, up to 20; zero idles. See PatternMotionOptions.
View source — packages/core/src/features/textures/lib/patterns.ts:13
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Textures and reaction-diffusion companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Repeat dots, halftone, plaid, and curves: Use ordered color ramps and checked named plaid color references. Plain source
- Compare three fabric weaves: Compare alternating plain weave, diagonal twill, and broken herringbone. Plain source
- Compare periodic noise fields: Paint soft and ridged multiscale noise as seamless surfaces. Plain source
- Compare reaction–diffusion models: Paint Schnakenberg spots, Barkley excitation, and Brusselator fields. Plain source
- Repeat stripes, checks, and wood: Compare geometric bands and irregular grain with optional knots. Plain source
- Choose living ink chemistry: Use a typed Gray–Scott preset and its reusable coefficients. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision a1dcf8e. ALPHA — NOT FOR PRODUCTION USE.