# stepper

`stepper(options)` defines fixed-step state such as acceleration, velocity, or
constraints. Each playback owns its integration state. Elapsed input is clamped
and consumed in fixed increments; seeking recreates the same step sequence.

Related types: [`PibblAnimationDefinition`](/reference/types/canvas-runtime/#pibblanimationdefinition)
and [`PibblStepperOptions`](/reference/types/canvas-runtime/#pibblstepperoptions).

## API details from source

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

Returns an opaque immutable stepper definition. Steppers are evaluated by
the playback engine, not by the seekable sampler.

```ts
stepper: <State, T>(options: Readonly<PibblStepperOptions<State, T>>) => PibblAnimationDefinition<T>
```

Related API: [stepper](/reference/functions/stepper/), [PibblStepperOptions](/reference/types/canvas-runtime/#pibblstepperoptions), [PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition).

### Parameters

- **`options`** — Initial state, fixed-step integration, value reader, and completion predicate.
See [PibblStepperOptions](/reference/types/canvas-runtime/#pibblstepperoptions) .

### Returns

A stateful animation definition advanced by fixed simulation steps. See
[PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition) .

### See also

[PibblStepperOptions](/reference/types/canvas-runtime/#pibblstepperoptions)

[PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition)

[View source — packages/core/src/lib/animation/definition.ts:672](/source/packages/core/src/lib/animation/definition-ts/#L672)

## Implementation guidance for agents

Read the [Animation and scheduling companion](/agents/topics/animation/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal examples

- [Custom sampling and fixed steps](/minimal-examples/animation/custom/): Combine a time-sampled sine wave with a fixed-step state machine. [Plain source](/minimal/animation/custom.tsx)
## Documentation version

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