# ReactionDiffusion

Import from `@pibbl/core/textures`. Defaults: `seed=42`, `preset="spots"`,
`resolution={width:256,height:160}`, lagoon palette, running, and a radius-6,
strength-0.8 brush. `preset` also accepts `stripes`.

The brush plants viable patches rather than a uniform chemical flood. Larger
brushes plant clusters; established ink is left intact. Very small or weak marks
may still dissipate as the field evolves.

`paused` stops evolution but permits painting. `brush={false}` disables painting.
A changed `resetRevision`, seed, preset, or simulation resolution resets the field.
Palette and display-size changes preserve it. Configurations are compared by value.
Use explicit signal reads in custom props.

`style` and event/focus props follow `defineRenderLayer`. Use `pointerEvents="none"`
for a decorative background. `render` optionally customizes how the generated
source/mask is drawn. Pointer painting continues to use the default stretched
rectangle mapping. The simulation persists across component evaluations and is
released on removal.

See [the texture guide](/guides/procedural-textures/) and
[Living Ink](/playground/#/examples/composition/living-ink).

Options: [ReactionDiffusionProps](/reference/types/textures/#reactiondiffusionprops), [TextureBrush](/reference/types/textures/#texturebrush), [TextureRenderer](/reference/types/textures/#texturerenderer).

## API details from source

<span id="api-ReactionDiffusion"></span>

An independently sized, persistent Gray–Scott surface, advanced by Pibbl's scheduler.

```ts
ReactionDiffusion: PibblComponent<ReactionDiffusionProps & PibblRenderLayerComponentProps>
```

Related API: [ReactionDiffusion](/reference/components/reaction-diffusion/), [PibblComponent](/reference/types/elements-components/#pibblcomponent), [ReactionDiffusionProps](/reference/types/textures/#reactiondiffusionprops), [PibblRenderLayerComponentProps](/reference/types/canvas-runtime/#pibblrenderlayercomponentprops).

### Parameters

- **`props`** — Authored component inputs, supplied through JSX or createElement. See the linked
props and style types.

### Throws

When called directly; Pibbl mounts this component through JSX or createElement.

### See also

[ReactionDiffusionProps](/reference/types/textures/#reactiondiffusionprops)

[View source — packages/core/src/features/textures/lib/reaction-diffusion.ts:221](/source/packages/core/src/features/textures/lib/reaction-diffusion-ts/#L221)

## Implementation guidance for agents

Read the [Textures and reaction-diffusion companion](/agents/topics/textures/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal examples

- [Paint reaction diffusion](/minimal-examples/textures/texture-reaction-component/): Mount an interactive reaction-diffusion layer with a typed brush. [Plain source](/minimal/textures/texture-reaction-component.tsx)
## Interactive examples

- [Living Ink](/examples/living-ink/) · [Full page](/experience/living-ink/)
- [Growing Reveal](/examples/growing-reveal/) · [Full page](/experience/growing-reveal/)
## Documentation version

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