Skip to content

Texture types and palettes

Read as Markdown

Import these types and texturePalettes from @pibbl/core/textures.

Optional seed, preset, resolution, palette, paused, resetRevision, brush, and render inputs. Reset revision must be a safe integer.

Required kind, optional seed, resolution, scale, detail, palette, and render. Materials idle until inputs change.

{ radius, strength }: finite radius in (0,128] simulation cells and strength in [0,1]. false disables the reaction–diffusion brush.

A readonly array of 2–16 opaque #RRGGBB strings, evenly interpolated in sRGB.

Frozen lagoon, porcelain, and ember palettes. Pass an ordinary palette array for custom colors.

Readonly integer width/height, each from 8 to 1024, and at most 262,144 cells. Independent of the display box. Seed values are unsigned 32-bit integers.

'marble' | 'paper' | 'cellular'.

Synchronous (context, texture) => void callback. Its context uses logical display units; state is saved/restored. No promises, hooks, or signal writes.

source is the low-resolution color canvas; mask is a lazily allocated white canvas with normalized field intensity as alpha. width/height describe the display allocation; textureWidth/textureHeight describe generation resolution. Sources are read-only, callback-scoped borrows. Do not retain, transfer, resize, or dispose them. Copy to an application-owned surface for a still image.

Seed, scale, and detail for marble, paper, and cellular recipe factories.

Seed and spots/stripes preset for the reactionDiffusion recipe factory.

Typed paint, stir, pause, and reset messages delivered through the texture’s send method. Paint uses normalized u/v, a radius in cells (default 6), and strength in [0, 1] (default 0.8). Stir uses normalized u/v, normalized du/dv displacements in [-1, 1], and a radius in cells (default 16). Radii must be finite, greater than zero, and at most 128. All coordinates/vectors must be finite; centers outside [0, 1] are ignored.

Stir displaces existing ink with smooth local falloff; it adds no ink. Pause stops reaction stepping while explicit paint/stir commands still apply. Reset repeats the seed and preserves pause. Messages run in send order on the next eligible texture frame, and sends after disposal are inert.

Optional unsigned seed, finite nonnegative speed, integer scale from 1 through 32, finite nonnegative rippleStrength (default 1), and initial paused state. Ripple strength changes existing ripples independently of ambient waves. This numeric displacement map rejects palettes.

Typed pause, reset, and { type: "ripple", x, y } messages with normalized coordinates in [0, 1]. Reset returns phase to its seeded initial state and clears ripples while preserving the current pause state.

A normalized axis-aligned { x, y, width, height } rectangle within [0, 1]. It is a visual water boundary only and has no hit-testing or physics effect.

The same seed, speed, scale, ripple-strength, and paused inputs as waterWaves, plus optional obstacles and viscosity. Viscosity defaults to 0 and accepts 0–1: increasing it slows wave propagation and ambient motion and increases damping. It is an artistic thickness control, not physical density or a mass-conserving fluid solver. Changes preserve existing waves and pause state. For colored or textured liquid, paint a decorative Rectangle with a color or Pibbl texture and style.opacity inside the displaced group; keep pointerEvents="none" so it does not intercept scene input.

waterSurface is a WASM-backed, bounded reflective height field: it uses a maximum 128-cell short edge and 256-cell long edge, while preserving the source aspect ratio.

The same typed pause, reset, and normalized ripple messages as waterWaves. A ripple can keep a speed-zero field active until its damped energy settles; a paused field discards elapsed time.

marble, paper, cellular, reactionDiffusion, waterWaves, and waterSurface create inert recipes consumed by useTexture from core (also re-exported by this package). Use the returned resource directly as style.fill or style.stroke; no renderer callback is needed.

Creates a seamless warped-band material recipe.

Creates a seamless fiber and grain recipe.

Creates a seamless toroidal cell-field recipe.

Creates a living Gray–Scott recipe that accepts InkMessage values.

Creates a periodic numeric RG displacement map for the displacement filter. It advances through Pibbl’s scheduler and remains static when paused. Speed zero stops ambient motion while active ripples continue to spread.

Creates a numeric RG displacement map with bounded, reflecting outer and rectangle-obstacle boundaries. Solid obstacle pixels are transparent. It is appearance-only and does not couple to Pibbl physics.

rainDrops(options?) creates a seeded rain-on-glass displacement map. Mount it with useTexture and pass its stretched paint to displacement({ map, strength, region, blurRadius }). Blue encodes local condensation blur. Small beads cling, overlapping beads merge conserving volume, and larger beads slide downward. This is a droplet simulation, not Gray–Scott ink.

seed is an unsigned 32-bit integer (default 7). rainRate is new beads per second, 0–120 (default 24); gravity is a multiplier, 0–10 (default 1). initialDrops is an integer, 0–256 (default 100). paused defaults to false. At most 256 free beads and one held finger bead are live. Radius and motion scale with the shorter texture side. Palettes are rejected because red/green encode displacement data.

condensation is film coverage, 0–1 (default 0). trailPersistence is the exponential recovery/drying time in seconds, 0–60 (default 8); zero clears old trails at the next advancing frame. trailStrength controls newly deposited residual water, 0–1 (default 0.65). irregularity controls outline and path variation, 0–1 (default 0.8). These controls update without resetting the field. Moving beads gather film along their swept footprints, leaving clearer paths and uneven residual water. Film recovery and trail drying pause with the drops. The bounded, stylized height field models visual behavior, not fluid pressure.

Use a positive displacement blurRadius to soften only misted regions. At zero condensation the dry map is transparent; with condensation it is opaque and neutral in cleared regions, preserving blue-channel coverage independently from the displacement normals.

pause carries paused; reset repeats the configured seed. nudge carries normalized x/y in [0, 1], normalized width/height movement dx/dy in [-1, 1], and optional radius in (0, 2], measured against the shorter side (default 0.12). Nudges work while paused. Seed or initial-count changes reset simulation state; display resizing alone does not. Long frame gaps are capped at 50 ms. Refraction affects only filtered Pibbl content, not arbitrary HTML.

finger begins or moves one contact with normalized x/y in [0, 1] and optional positive radius up to 2 (default 0.045, relative to the shorter side). It wipes a continuous swept path through condensation and residual trails, collecting that water and intersected beads into one droplet pinned to the contact. It works while paused. release leaves the gathered bead at the last contact position with zero initial velocity; gravity resumes on advancement. Repeated release is harmless. Reset cancels the contact. Applications own pointer capture and should send release on up, cancel, or lost capture. At free-bead capacity, release coalesces the nearest free pair to make room, preserving their combined volume.

Authored inputs for ReactionDiffusion, including the declared data and presentation options.

interface ReactionDiffusionProps

Related API: ReactionDiffusionProps.

TextureRenderer

TextureResolution

TexturePalette

TextureBrush

ReactionDiffusion

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:33

render (optional)
readonly render?: TextureRenderer | undefined

Related API: TextureRenderer.

Renders the current data or resources using the supplied context. See TextureRenderer .

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:38

resolution (optional)
readonly resolution?: TextureResolution | undefined

Related API: TextureResolution.

Dimensions of the simulation or raster grid. See TextureResolution.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:40

seed (optional)
readonly seed?: number | undefined

Seed used for deterministic sampling or simulation initialization. See ReactionDiffusionProps.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:45

preset (optional)
readonly preset?: "spots" | "stripes" | undefined

Named pattern configuration used to initialize the simulation. See ReactionDiffusionProps.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:50

palette (optional)
readonly palette?: TexturePalette | undefined

Related API: TexturePalette.

Ordered colors used to present texture intensity. See TexturePalette.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:52

paused (optional)
readonly paused?: boolean | undefined

Whether simulation or playback advancement is suspended. See ReactionDiffusionProps.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:56

resetRevision (optional)
readonly resetRevision?: number | undefined

Changing this revision requests a fresh simulation initialization. See ReactionDiffusionProps.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:61

brush (optional)
readonly brush?: false | TextureBrush | undefined

Related API: TextureBrush.

Brush configuration for interactive reaction-diffusion input, or false to disable it. See TextureBrush.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:66

Radius and strength of a reaction-diffusion brush stroke.

interface TextureBrush

Related API: TextureBrush.

ReactionDiffusionProps

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:18

radius
readonly radius: number

Radius in the coordinate system of this geometry or effect. See TextureBrush.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:20

strength
readonly strength: number

Magnitude of the displacement or brush effect. See TextureBrush.

View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:22

Built-in immutable color ramps for procedural texture presentation.

texturePalettes: Readonly<{ lagoon: readonly string[]; porcelain: readonly string[]; ember: readonly string[]; }>

Related API: texturePalettes.

TexturePalette

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

Ordered colors forming a texture’s presentation ramp.

type TexturePalette = readonly string[]

Related API: TexturePalette.

texturePalettes

ProceduralTextureProps

ReactionDiffusionProps

View source — packages/core/src/features/textures/lib/palette.ts:10

The width and height of a texture’s raster grid.

interface TextureResolution

Related API: TextureResolution.

TexturePalette

ReactionDiffusionProps

ProceduralTextureProps

View source — packages/core/src/features/textures/lib/palette.ts:56

width
readonly width: number

Horizontal extent in the units of the containing geometry or surface. See TextureResolution.

View source — packages/core/src/features/textures/lib/palette.ts:61

height
readonly height: number

Vertical extent in the units of the containing geometry or surface. See TextureResolution.

View source — packages/core/src/features/textures/lib/palette.ts:66

Authored inputs for ProceduralTexture, including the declared data and presentation options.

interface ProceduralTextureProps

Related API: ProceduralTextureProps.

TextureKind

TextureResolution

TexturePalette

TextureRenderer

ProceduralTexture

View source — packages/core/src/features/textures/lib/procedural-texture.ts:23

kind
readonly kind: TextureKind

Related API: TextureKind.

Selects the kind of geometry, material, or result. See TextureKind.

View source — packages/core/src/features/textures/lib/procedural-texture.ts:25

seed (optional)
readonly seed?: number | undefined

Seed used for deterministic sampling or simulation initialization. See ProceduralTextureProps.

View source — packages/core/src/features/textures/lib/procedural-texture.ts:30

resolution (optional)
readonly resolution?: TextureResolution | undefined

Related API: TextureResolution.

Dimensions of the simulation or raster grid. See TextureResolution.

View source — packages/core/src/features/textures/lib/procedural-texture.ts:32

scale (optional)
readonly scale?: number | undefined

Feature frequency across the texture, from 1 to 32.

View source — packages/core/src/features/textures/lib/procedural-texture.ts:34

detail (optional)
readonly detail?: number | undefined

Distortion, grain strength, or cellular jitter, from 0 to 1.

View source — packages/core/src/features/textures/lib/procedural-texture.ts:36

palette (optional)
readonly palette?: TexturePalette | undefined

Related API: TexturePalette.

Ordered colors used to present texture intensity. See TexturePalette.

View source — packages/core/src/features/textures/lib/procedural-texture.ts:38

render (optional)
readonly render?: TextureRenderer | undefined

Related API: TextureRenderer.

Renders the current data or resources using the supplied context. See TextureRenderer .

View source — packages/core/src/features/textures/lib/procedural-texture.ts:43

The supported static material generators: marble, paper, and cellular.

type TextureKind = "marble" | "paper" | "cellular"

Related API: TextureKind, marble, paper, cellular.

ProceduralTextureProps

View source — packages/core/src/features/textures/lib/material-field.ts:11

Custom presentation callback receiving an offscreen context and the current texture raster frame.

type TextureRenderer = (
context: OffscreenCanvasRenderingContext2D,
texture: Readonly<TextureRenderFrame>,
) => void

Related API: TextureRenderer, TextureRenderFrame.

  • context — Offscreen drawing context to paint into.

  • texture — Current texture surface and frame metadata. See TextureRenderFrame.

TextureRenderFrame

ReactionDiffusionProps

ProceduralTextureProps

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

Borrowed sources are valid only during the synchronous renderer callback.

interface TextureRenderFrame

Related API: TextureRenderFrame.

TextureRenderer

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

source
readonly source: OffscreenCanvas

Current offscreen texture raster available to the presentation callback. See TextureRenderFrame.

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

mask
readonly mask: OffscreenCanvas

White with texture intensity as alpha, allocated lazily on first access.

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

width
readonly width: number

Horizontal extent in the units of the containing geometry or surface. See TextureRenderFrame.

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

height
readonly height: number

Vertical extent in the units of the containing geometry or surface. See TextureRenderFrame.

View source — packages/core/src/features/textures/lib/presentation.ts:23

textureWidth
readonly textureWidth: number

Width of the underlying texture raster in pixels. See TextureRenderFrame.

View source — packages/core/src/features/textures/lib/presentation.ts:25

textureHeight
readonly textureHeight: number

Height of the underlying texture raster in pixels. See TextureRenderFrame.

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

Creates a seeded marble texture recipe with configurable feature scale and distortion.

marble: (options?: MaterialOptions) => TextureRecipe<never>

Related API: marble, MaterialOptions, TextureRecipe.

  • options — Seed, feature scale, and detail settings. See MaterialOptions.

A procedural material recipe for useTexture. See TextureRecipe.

MaterialOptions

TextureRecipe

View source — packages/core/src/features/textures/lib/definitions.ts:163

Creates a seeded paper texture recipe with configurable feature scale and grain.

paper: (options?: MaterialOptions) => TextureRecipe<never>

Related API: paper, MaterialOptions, TextureRecipe.

  • options — Seed, feature scale, and detail settings. See MaterialOptions.

A procedural material recipe for useTexture. See TextureRecipe.

MaterialOptions

TextureRecipe

View source — packages/core/src/features/textures/lib/definitions.ts:173

Creates a seeded cellular texture recipe with configurable feature scale and jitter.

cellular: (options?: MaterialOptions) => TextureRecipe<never>

Related API: cellular, MaterialOptions, TextureRecipe.

  • options — Seed, feature scale, and detail settings. See MaterialOptions.

A procedural material recipe for useTexture. See TextureRecipe.

MaterialOptions

TextureRecipe

View source — packages/core/src/features/textures/lib/definitions.ts:183

Creates a stateful reaction-diffusion texture recipe supporting paint, stirring, pause, and reset messages.

reactionDiffusion: (options?: ReactionDiffusionOptions) => TextureRecipe<InkMessage>

Related API: reactionDiffusion, ReactionDiffusionOptions, TextureRecipe, InkMessage.

A reaction-diffusion texture recipe for useTexture.

ReactionDiffusionOptions

View source — packages/core/src/features/textures/lib/definitions.ts:326

Seed, feature scale, and detail controls shared by static material recipes.

interface MaterialOptions

Related API: MaterialOptions.

marble

paper

cellular

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

seed (optional)
readonly seed?: number | undefined

Seed used for deterministic sampling or simulation initialization. See MaterialOptions .

View source — packages/core/src/features/textures/lib/definitions.ts:25

scale (optional)
readonly scale?: number | undefined

Feature frequency across the generated material. See MaterialOptions.

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

detail (optional)
readonly detail?: number | undefined

Material-specific distortion, grain strength, or cellular jitter. See MaterialOptions.

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

Seed and pattern preset for a reaction-diffusion recipe.

interface ReactionDiffusionOptions

Related API: ReactionDiffusionOptions.

reactionDiffusion

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

seed (optional)
readonly seed?: number | undefined

Seed used for deterministic sampling or simulation initialization. See ReactionDiffusionOptions.

View source — packages/core/src/features/textures/lib/definitions.ts:41

preset (optional)
readonly preset?: "spots" | "stripes" | undefined

Named pattern configuration used to initialize the simulation. See ReactionDiffusionOptions.

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

Paint, stir, pause, or reset commands accepted by a reaction-diffusion texture.

Full type declaration
type InkMessage = | {
/** The literal "paint" identifying this variant. See {@link InkMessage}. */
readonly type: "paint";
/** Normalized horizontal texture coordinate. See {@link InkMessage}. */
readonly u: number;
/** Normalized vertical texture coordinate. See {@link InkMessage}. */
readonly v: number;
/** Radius in the coordinate system of this geometry or effect. See {@link InkMessage}. */
readonly radius?: number;
/** Magnitude of the displacement or brush effect. See {@link InkMessage}. */
readonly strength?: number;
}
| {
/** The literal "stir" identifying this variant. See {@link InkMessage}. */
readonly type: "stir";
/** Normalized horizontal texture coordinate. See {@link InkMessage}. */
readonly u: number;
/** Normalized vertical texture coordinate. See {@link InkMessage}. */
readonly v: number;
/** Normalized displacement of the existing field, not a paint dose. */
readonly du: number;
/** Normalized vertical displacement of the texture field. See {@link InkMessage}. */
readonly dv: number;
/** Influence radius in texture cells. */
readonly radius?: number;
}
| {
/** The literal "pause" identifying this variant. See {@link InkMessage}. */
readonly type: "pause";
/** Whether simulation or playback advancement is suspended. See {@link InkMessage}. */
readonly paused: boolean;
}
| {
/** The literal "reset" identifying this variant. See {@link InkMessage}. */
readonly type: "reset";
}

Related API: InkMessage, displacement.

reactionDiffusion

View source — packages/core/src/features/textures/lib/definitions.ts:53

type
readonly type: "paint" | "pause" | "reset" | "stir"

The literal “paint” identifying this variant. See InkMessage. The literal “stir” identifying this variant. See InkMessage. The literal “pause” identifying this variant. See InkMessage. The literal “reset” identifying this variant. See InkMessage.

View source — packages/core/src/features/textures/lib/definitions.ts:56

Creates an animated water-wave texture recipe that accepts ripple, pause, and reset commands.

waterWaves: (options?: WaterWavesOptions) => TextureRecipe<WaterWavesMessage>

Related API: waterWaves, WaterWavesOptions, TextureRecipe, WaterWavesMessage.

A water-wave texture recipe accepting wave messages. See TextureRecipe , WaterWavesMessage .

WaterWavesOptions

TextureRecipe

WaterWavesMessage

View source — packages/core/src/features/textures/lib/water-waves.ts:250

Seed, animation speed, feature scale, ripple strength, and initial pause state of water waves.

interface WaterWavesOptions

Related API: WaterWavesOptions.

waterWaves

View source — packages/core/src/features/textures/lib/water-waves.ts:14

seed (optional)
readonly seed?: number | undefined

Seed used for deterministic sampling or simulation initialization. See WaterWavesOptions.

View source — packages/core/src/features/textures/lib/water-waves.ts:19

speed (optional)
readonly speed?: number | undefined

Multiplier controlling the simulation’s animation rate. See WaterWavesOptions.

View source — packages/core/src/features/textures/lib/water-waves.ts:21

scale (optional)
readonly scale?: number | undefined

Spatial scale of the generated wave pattern. See WaterWavesOptions.

View source — packages/core/src/features/textures/lib/water-waves.ts:23

rippleStrength (optional)
readonly rippleStrength?: number | undefined

Strength of injected wave disturbances. See WaterWavesOptions.

View source — packages/core/src/features/textures/lib/water-waves.ts:25

paused (optional)
readonly paused?: boolean | undefined

Whether simulation or playback advancement is suspended. See WaterWavesOptions.

View source — packages/core/src/features/textures/lib/water-waves.ts:27

Ripple, pause, and reset commands for a water-wave texture.

Full type declaration
type WaterWavesMessage = | {
/** The literal "pause" identifying this variant. See {@link WaterWavesMessage}. */
readonly type: "pause";
/** Whether simulation or playback advancement is suspended. See {@link WaterWavesMessage}. */
readonly paused: boolean;
}
| {
/** The literal "reset" identifying this variant. See {@link WaterWavesMessage}. */
readonly type: "reset";
}
| {
/** The literal "ripple" identifying this variant. See {@link WaterWavesMessage}. */
readonly type: "ripple";
/**
* Horizontal coordinate or displacement in the containing coordinate system. See
* {@link WaterWavesMessage}.
*/
readonly x: number;
/**
* Vertical coordinate or displacement in the containing coordinate system. See
* {@link WaterWavesMessage}.
*/
readonly y: number;
}

Related API: WaterWavesMessage, displacement.

waterWaves

View source — packages/core/src/features/textures/lib/water-waves.ts:35

type
readonly type: "pause" | "reset" | "ripple"

The literal “pause” identifying this variant. See WaterWavesMessage. The literal “reset” identifying this variant. See WaterWavesMessage. The literal “ripple” identifying this variant. See WaterWavesMessage.

View source — packages/core/src/features/textures/lib/water-waves.ts:38

A WASM-only, bounded reflective height-field displacement map.

waterSurface: (options?: WaterSurfaceOptions) => TextureRecipe<WaterSurfaceMessage>

Related API: waterSurface, WaterSurfaceOptions, TextureRecipe, WaterSurfaceMessage.

A water-surface texture recipe accepting surface messages. See TextureRecipe , WaterSurfaceMessage .

WaterSurfaceOptions

TextureRecipe

WaterSurfaceMessage

View source — packages/core/src/features/textures/lib/water-surface.ts:617

Ripple, pause, and reset commands for a water-surface simulation.

Full type declaration
type WaterSurfaceMessage = | {
/** The literal "pause" identifying this variant. See {@link WaterSurfaceMessage}. */
readonly type: "pause";
/** Whether simulation or playback advancement is suspended. See {@link WaterSurfaceMessage}. */
readonly paused: boolean;
}
| {
/** The literal "reset" identifying this variant. See {@link WaterSurfaceMessage}. */
readonly type: "reset";
}
| {
/** The literal "ripple" identifying this variant. See {@link WaterSurfaceMessage}. */
readonly type: "ripple";
/**
* Horizontal coordinate or displacement in the containing coordinate system. See
* {@link WaterSurfaceMessage}.
*/
readonly x: number;
/**
* Vertical coordinate or displacement in the containing coordinate system. See
* {@link WaterSurfaceMessage}.
*/
readonly y: number;
}

Related API: WaterSurfaceMessage, displacement.

waterSurface

View source — packages/core/src/features/textures/lib/water-surface.ts:68

type
readonly type: "pause" | "reset" | "ripple"

The literal “pause” identifying this variant. See WaterSurfaceMessage. The literal “reset” identifying this variant. See WaterSurfaceMessage. The literal “ripple” identifying this variant. See WaterSurfaceMessage.

View source — packages/core/src/features/textures/lib/water-surface.ts:71

An axis-aligned obstacle rectangle in a water-surface simulation.

interface WaterSurfaceObstacle

Related API: WaterSurfaceObstacle.

WaterSurfaceOptions

View source — packages/core/src/features/textures/lib/water-surface.ts:14

x
readonly x: number

Horizontal coordinate or displacement in the containing coordinate system. See WaterSurfaceObstacle.

View source — packages/core/src/features/textures/lib/water-surface.ts:19

y
readonly y: number

Vertical coordinate or displacement in the containing coordinate system. See WaterSurfaceObstacle.

View source — packages/core/src/features/textures/lib/water-surface.ts:24

width
readonly width: number

Horizontal extent in the units of the containing geometry or surface. See WaterSurfaceObstacle.

View source — packages/core/src/features/textures/lib/water-surface.ts:29

height
readonly height: number

Vertical extent in the units of the containing geometry or surface. See WaterSurfaceObstacle.

View source — packages/core/src/features/textures/lib/water-surface.ts:34

Water simulation controls including wave motion, viscosity, pause state, and obstacles.

interface WaterSurfaceOptions

Related API: WaterSurfaceOptions.

WaterSurfaceObstacle

waterSurface

View source — packages/core/src/features/textures/lib/water-surface.ts:43

seed (optional)
readonly seed?: number | undefined

Seed used for deterministic sampling or simulation initialization. See WaterSurfaceOptions.

View source — packages/core/src/features/textures/lib/water-surface.ts:48

speed (optional)
readonly speed?: number | undefined

Multiplier controlling the simulation’s animation rate. See WaterSurfaceOptions.

View source — packages/core/src/features/textures/lib/water-surface.ts:50

scale (optional)
readonly scale?: number | undefined

Spatial scale of the generated water pattern. See WaterSurfaceOptions.

View source — packages/core/src/features/textures/lib/water-surface.ts:52

rippleStrength (optional)
readonly rippleStrength?: number | undefined

Strength of injected wave disturbances. See WaterSurfaceOptions.

View source — packages/core/src/features/textures/lib/water-surface.ts:54

viscosity (optional)
readonly viscosity?: number | undefined

Artistic thickness from 0 (water) to 1 (slow, strongly damped).

View source — packages/core/src/features/textures/lib/water-surface.ts:56

paused (optional)
readonly paused?: boolean | undefined

Whether simulation or playback advancement is suspended. See WaterSurfaceOptions.

View source — packages/core/src/features/textures/lib/water-surface.ts:58

obstacles (optional)
readonly obstacles?: readonly WaterSurfaceObstacle[] | undefined

Related API: WaterSurfaceObstacle.

Obstacle geometry used by the flow or water simulation. See WaterSurfaceObstacle.

View source — packages/core/src/features/textures/lib/water-surface.ts:60

A seeded rain-on-glass displacement map, advanced by Pibbl’s scheduler.

rainDrops: (options?: RainDropsOptions) => TextureRecipe<RainDropsMessage>

Related API: rainDrops, RainDropsOptions, TextureRecipe, RainDropsMessage.

  • options — Raindrop simulation and appearance settings. See RainDropsOptions.

A raindrop texture recipe accepting raindrop messages. See TextureRecipe , RainDropsMessage .

RainDropsOptions

TextureRecipe

RainDropsMessage

View source — packages/core/src/features/textures/lib/rain-drops.ts:401

Rain rate, gravity, initial drops, condensation, trail, and outline controls for a raindrop texture.

interface RainDropsOptions

Related API: RainDropsOptions.

rainDrops

View source — packages/core/src/features/textures/lib/rain-drops.ts:9

seed (optional)
readonly seed?: number | undefined

Seed used for deterministic sampling or simulation initialization. See RainDropsOptions.

View source — packages/core/src/features/textures/lib/rain-drops.ts:14

rainRate (optional)
readonly rainRate?: number | undefined

New beads per second, from 0 through 120.

View source — packages/core/src/features/textures/lib/rain-drops.ts:16

gravity (optional)
readonly gravity?: number | undefined

Downward acceleration multiplier, from 0 through 10.

View source — packages/core/src/features/textures/lib/rain-drops.ts:18

initialDrops (optional)
readonly initialDrops?: number | undefined

Number of drops seeded before continuous rain starts. See RainDropsOptions.

View source — packages/core/src/features/textures/lib/rain-drops.ts:20

paused (optional)
readonly paused?: boolean | undefined

Whether simulation or playback advancement is suspended. See RainDropsOptions.

View source — packages/core/src/features/textures/lib/rain-drops.ts:22

condensation (optional)
readonly condensation?: number | undefined

Fine droplet film coverage, from 0 (clear) through 1 (mist).

View source — packages/core/src/features/textures/lib/rain-drops.ts:24

trailPersistence (optional)
readonly trailPersistence?: number | undefined

Seconds controlling trail drying and condensation recovery, from 0 through 60.

View source — packages/core/src/features/textures/lib/rain-drops.ts:26

trailStrength (optional)
readonly trailStrength?: number | undefined

Residual water left behind a moving drop, from 0 through 1.

View source — packages/core/src/features/textures/lib/rain-drops.ts:28

irregularity (optional)
readonly irregularity?: number | undefined

Outline and path variation, from 0 (smooth) through 1.

View source — packages/core/src/features/textures/lib/rain-drops.ts:30

Pause, reset, finger-wipe, release, and localized nudge commands for a raindrop texture.

Full type declaration
type RainDropsMessage = | {
/** The literal "pause" identifying this variant. See {@link RainDropsMessage}. */
readonly type: "pause";
/** Whether simulation or playback advancement is suspended. See {@link RainDropsMessage}. */
readonly paused: boolean;
}
| {
/** The literal "reset" identifying this variant. See {@link RainDropsMessage}. */
readonly type: "reset";
}
/** Begin or move one finger contact; successive positions wipe a continuous path. */
| {
/** The literal "finger" identifying this variant. See {@link RainDropsMessage}. */
readonly type: "finger";
/**
* Horizontal coordinate or displacement in the containing coordinate system. See
* {@link RainDropsMessage}.
*/
readonly x: number;
/**
* Vertical coordinate or displacement in the containing coordinate system. See
* {@link RainDropsMessage}.
*/
readonly y: number;
/** Radius in the coordinate system of this geometry or effect. See {@link RainDropsMessage}. */
readonly radius?: number;
}
| {
/** The literal "release" identifying this variant. See {@link RainDropsMessage}. */
readonly type: "release";
}
/** Center and movement use normalized width/height; radius uses the shorter side. */
| {
/** The literal "nudge" identifying this variant. See {@link RainDropsMessage}. */
readonly type: "nudge";
/**
* Horizontal coordinate or displacement in the containing coordinate system. See
* {@link RainDropsMessage}.
*/
readonly x: number;
/**
* Vertical coordinate or displacement in the containing coordinate system. See
* {@link RainDropsMessage}.
*/
readonly y: number;
/** Horizontal displacement applied by the interaction. See {@link RainDropsMessage}. */
readonly dx: number;
/** Vertical displacement applied by the interaction. See {@link RainDropsMessage}. */
readonly dy: number;
/** Radius in the coordinate system of this geometry or effect. See {@link RainDropsMessage}. */
readonly radius?: number;
}

Related API: RainDropsMessage, wipe, displacement.

rainDrops

View source — packages/core/src/features/textures/lib/rain-drops.ts:38

type
readonly type: "finger" | "nudge" | "pause" | "release" | "reset"

The literal “pause” identifying this variant. See RainDropsMessage. The literal “reset” identifying this variant. See RainDropsMessage. The literal “finger” identifying this variant. See RainDropsMessage. The literal “release” identifying this variant. See RainDropsMessage. The literal “nudge” identifying this variant. See RainDropsMessage.

View source — packages/core/src/features/textures/lib/rain-drops.ts:41

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 2dccb19. ALPHA — NOT FOR PRODUCTION USE.