Skip to content

Particle types

Read as Markdown

Import these public contracts with type from @pibbl/core/particles.

Exactly one 2D effect or system plus shared interaction and parameter props.

Declared Canvas box, layout-item, cursor, opacity, transform, and filter style.

A component-owned field handle with a readonly revision signal and batched velocity sampling into caller-owned numerical buffers.

Mount-only bounds and grid resolution, an optional obstacle source, and a buoyancy acceleration coefficient (default -300).

A revision, a borrowed Float64Array of packed boxes, and optional borrowed ellipses and polygons arrays. Each box occupies ten entries: center x/y, half width/height, rotation in radians, linear velocity x/y, angular velocity in radians/second, and center of mass x/y. All quantities use field-local logical coordinates. Ellipses use the same layout, with radii instead of half extents. Each polygon record contains vertex count (at least three), linear velocity x/y, angular velocity, center of mass x/y, then vertex x/y pairs. Extents must be positive. Increment revision whenever geometry or motion changes; unchanged revisions reuse the solid grid.

A read() method returning the latest committed obstacle batch. A read must not advance its upstream simulation. The field copies relevant data into its own storage and does not retain the batch buffer or assume shared WASM memory.

Signal-valued position, positive radius, optional acceleration, nonnegative heat injection rate, and enabled state. Sources drive flow independently of particle emission.

Optional size, rotation, color, and opacity values sampled over normalized lifetime.

A conservative local two-dimensional minimum and maximum used for coarse culling.

Reports the requested and accepted counts for an admitted manual burst.

Overrides count, local position, seed salt, or parameters for one manual birth request.

Reports a capacity, pause, stop, or disposal rejection and its accepted count.

An immutable weighted-selection descriptor created by particleChoice.

Shared parameter, event, error, pointer, and keyboard props for particle components.

An immutable scalar or two-dimensional curve over normalized lifetime.

Optional Pibbl easing applied within curve or gradient key intervals.

The scalar or two-dimensional value accepted by particleCurve.

The closed definition, capability, asset, binding, capacity, execution, and disposal diagnostic union.

Marks the committed transition that closes new emission while existing particles finish.

A nominal immutable two-dimensional definition carrying emitter and parameter inference.

The debug name, parameter definitions, and nonempty 2D emitter input.

Rate, scheduled burst, or manual emission configuration.

A fixed-capacity Canvas emitter with shape, initial state, motion, appearance, renderer, and bounds.

The readonly selected backend state published by a particle system.

Marks a drained finite population reaching its completed empty frame.

An immutable color curve created by particleGradient.

Lifetime, velocity, size, rotation, color, and opacity sampled at 2D birth.

An inclusive safe-integer descriptor created by particleInteger.

The closed two-dimensional acceleration, drag, drift, radial, orbit, sway, and angular module union.

Either deterministic "reject-newest" or "recycle-oldest" capacity behavior.

A typed number, vector, or color default with spawn, simulation, or render timing.

The named parameter-definition record accepted by an effect.

An immutable named reference created by particleParameter.

The "spawn", "simulation", or "render" parameter adoption category.

The number, color string, or two-dimensional vector value union.

A readonly named parameter-value record.

A continuous minimum/maximum descriptor created by particleRange.

The circle, rectangle, path, or sprite Canvas renderer union and its blend intent.

A fixed number or compiled range, integer, choice, or parameter descriptor.

The point, line, rectangle, circle, or ring birth-shape union.

Marks a committed system start.

Stable controls plus readonly status and execution signals for one owned population.

The start, burst acceptance/rejection, drain, and finish event union.

Autoplay, seed, debug name, event, and error options for useParticleSystem.

The idle, scheduled, running, paused, draining, finished, or disposed lifecycle state.

Maps one parameter definition to its accepted runtime value type.

Maps a named parameter-definition record to its inferred value record.

A two-component scalar tuple or compatible named parameter reference.

Size, rotation, color, and opacity changes over a particle’s lifetime.

interface PibblParticleAppearance

Related API: PibblParticleAppearance.

PibblParticleCurve

PibblParticleGradient

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:504

size (optional)
readonly size?: PibblParticleCurve<number | readonly [number, number]> | undefined

Related API: PibblParticleCurve.

Scalar or two-component size curve evaluated over normalized particle lifetime. See PibblParticleCurve.

View source — packages/core/src/features/particles/lib/types.ts:509

rotationDegrees (optional)
readonly rotationDegrees?: PibblParticleCurve<number> | undefined

Related API: PibblParticleCurve.

Rotation curve in degrees evaluated over normalized particle lifetime. See PibblParticleCurve.

View source — packages/core/src/features/particles/lib/types.ts:514

color (optional)
readonly color?: PibblParticleGradient | undefined

Related API: PibblParticleGradient.

Color gradient evaluated over normalized particle lifetime. See PibblParticleGradient.

View source — packages/core/src/features/particles/lib/types.ts:518

opacity (optional)
readonly opacity?: PibblParticleCurve<number> | undefined

Related API: opacity, PibblParticleCurve.

Opacity curve evaluated over normalized particle lifetime. See PibblParticleCurve.

View source — packages/core/src/features/particles/lib/types.ts:520

Conservative minimum and maximum particle extents used for emitter culling.

interface PibblParticleBounds2D

Related API: PibblParticleBounds2D.

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:571

min
readonly min: readonly [number, number]

Lower bound of the coordinate or sampling interval. See PibblParticleBounds2D.

View source — packages/core/src/features/particles/lib/types.ts:573

max
readonly max: readonly [number, number]

Upper bound of the coordinate or sampling interval. See PibblParticleBounds2D.

View source — packages/core/src/features/particles/lib/types.ts:575

Reports the requested and accepted particle counts for an emitter burst.

interface PibblParticleBurstAcceptedEvent

Related API: PibblParticleBurstAcceptedEvent.

PibblParticleSystemEvent

View source — packages/core/src/features/particles/lib/types.ts:716

type
readonly type: "burst-accepted"

The literal “burst-accepted” identifying this variant. See PibblParticleBurstAcceptedEvent.

View source — packages/core/src/features/particles/lib/types.ts:721

emitter
readonly emitter: string

Name of the emitter associated with this notification. See PibblParticleBurstAcceptedEvent.

View source — packages/core/src/features/particles/lib/types.ts:726

requested
readonly requested: number

Number of particles requested by the burst. See PibblParticleBurstAcceptedEvent.

View source — packages/core/src/features/particles/lib/types.ts:728

accepted
readonly accepted: number

Number of particles admitted by the burst. See PibblParticleBurstAcceptedEvent.

View source — packages/core/src/features/particles/lib/types.ts:730

Per-burst count, position, seed, and parameter overrides.

interface PibblParticleBurstOverrides

Related API: PibblParticleBurstOverrides.

PibblParticleSystem

View source — packages/core/src/features/particles/lib/types.ts:914

count (optional)
readonly count?: number | undefined

Number of particles or sources requested by this configuration. See PibblParticleBurstOverrides.

View source — packages/core/src/features/particles/lib/types.ts:919

position (optional)
readonly position?: readonly [number, number] | undefined

Position of the geometry, source, or selected resize handle. See PibblParticleBurstOverrides.

View source — packages/core/src/features/particles/lib/types.ts:924

seedSalt (optional)
readonly seedSalt?: number | undefined

Additional seed input distinguishing this burst from otherwise identical requests. See PibblParticleBurstOverrides.

View source — packages/core/src/features/particles/lib/types.ts:929

parameters (optional)
readonly parameters?: Readonly<Record<string, string | number | readonly number[]>> | undefined

Named parameter definitions or values for this effect instance. See PibblParticleBurstOverrides.

View source — packages/core/src/features/particles/lib/types.ts:934

Reports a burst rejection and whether capacity or system state prevented admission.

interface PibblParticleBurstRejectedEvent

Related API: PibblParticleBurstRejectedEvent.

PibblParticleSystemEvent

View source — packages/core/src/features/particles/lib/types.ts:738

type
readonly type: "burst-rejected"

The literal “burst-rejected” identifying this variant. See PibblParticleBurstRejectedEvent.

View source — packages/core/src/features/particles/lib/types.ts:743

emitter
readonly emitter: string

Name of the emitter associated with this notification. See PibblParticleBurstRejectedEvent.

View source — packages/core/src/features/particles/lib/types.ts:748

requested
readonly requested: number

Number of particles requested by the burst. See PibblParticleBurstRejectedEvent.

View source — packages/core/src/features/particles/lib/types.ts:750

accepted
readonly accepted: number

Number of particles admitted by the burst. See PibblParticleBurstRejectedEvent.

View source — packages/core/src/features/particles/lib/types.ts:752

reason
readonly reason: "capacity" | "disposed" | "paused" | "stopped"

Reason the operation could not produce its ordinary result. See PibblParticleBurstRejectedEvent.

View source — packages/core/src/features/particles/lib/types.ts:757

A weighted collection of candidate values for particle sampling.

interface PibblParticleChoice<T>

Related API: PibblParticleChoice.

PibblParticleInitial2D

PibblParticleScalar

particleChoice

View source — packages/core/src/features/particles/lib/types.ts:170

type
readonly type: "choice"

The literal “choice” identifying this variant. See PibblParticleChoice.

View source — packages/core/src/features/particles/lib/types.ts:172

choices
readonly choices: readonly Readonly<{ value: T; weight: number; }>[]

Weighted candidate values sampled by the effect. See PibblParticleChoice.

View source — packages/core/src/features/particles/lib/types.ts:174

Shared parameter, interaction, focus, and lifecycle inputs for particle components.

interface PibblParticleCommonProps<Parameters extends PibblParticleParameterValues> extends PibblEventHandlers, PibblEventParticipationOptions

Related API: PibblParticleCommonProps, PibblParticleParameterValues, PibblEventHandlers, PibblEventParticipationOptions.

PibblParticleParameterValues

PibblEventHandlers

PibblEventParticipationOptions

LayoutBox

PibblParticleSystemEvent

View source — packages/core/src/features/particles/lib/types.ts:1016

parameters (optional)
readonly parameters?: Readonly<Partial<Parameters>> | undefined

Named parameter definitions or values for this effect instance. See PibblParticleCommonProps.

View source — packages/core/src/features/particles/lib/types.ts:1022

keyboardFocusable (optional)
readonly keyboardFocusable?: boolean | undefined

Whether the target may receive keyboard focus. See PibblParticleCommonProps.

View source — packages/core/src/features/particles/lib/types.ts:1024

keyboardNavigationBounds (optional)
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefined

Related API: LayoutBox.

Logical rectangle used for directional keyboard navigation. See LayoutBox.

View source — packages/core/src/features/particles/lib/types.ts:1026

onEvent (optional)
readonly onEvent?: ((event: PibblParticleSystemEvent) => void) | undefined

Related API: PibblParticleSystemEvent.

Receives lifecycle and milestone notifications. See PibblParticleSystemEvent.

View source — packages/core/src/features/particles/lib/types.ts:1031

onError (optional)
readonly onError?: ((error: unknown) => void) | undefined

Receives failures reported by the owning runtime resource. See PibblParticleCommonProps .

  • error — Failure reported by the particle system.

View source — packages/core/src/features/particles/lib/types.ts:1037

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Keyframes describing a numeric or two-component value over particle lifetime.

interface PibblParticleCurve<T extends PibblParticleCurveValue>

Related API: PibblParticleCurve, PibblParticleCurveValue.

PibblParticleCurveValue

PibblParticleCurveOptions

PibblParticleAppearance

particleCurve

View source — packages/core/src/features/particles/lib/types.ts:258

type
readonly type: "curve"

The literal “curve” identifying this variant. See PibblParticleCurve.

View source — packages/core/src/features/particles/lib/types.ts:260

keys
readonly keys: readonly (readonly [time: number, value: T])[]

Ordered keyframes at normalized lifetime positions. See PibblParticleCurve.

View source — packages/core/src/features/particles/lib/types.ts:262

options (optional)
readonly options?: PibblParticleCurveOptions | undefined

Related API: PibblParticleCurveOptions.

Interpolation options applied between keyframes. See PibblParticleCurveOptions.

View source — packages/core/src/features/particles/lib/types.ts:264

Easing used to interpolate between particle keyframes.

interface PibblParticleCurveOptions

Related API: PibblParticleCurveOptions.

PibblParticleCurve

PibblParticleGradient

particleCurve

PibblEasing

View source — packages/core/src/features/particles/lib/types.ts:245

easing (optional)
readonly easing?: PibblEasing | undefined

Related API: easing, PibblEasing.

Maps normalized progress before interpolation. See PibblParticleCurveOptions.

View source — packages/core/src/features/particles/lib/types.ts:247

A scalar or two-component value supported by particle curves.

type PibblParticleCurveValue = number | readonly [number, number]

Related API: PibblParticleCurveValue.

PibblParticleCurve

particleCurve

View source — packages/core/src/features/particles/lib/types.ts:235

Structured validation, capability, asset, execution, or ownership failure from a particle system.

Full type declaration
type PibblParticleDiagnostic = | Readonly<{
/**
* The literal "definition-invalid" identifying this variant. See
* {@link PibblParticleDiagnostic}.
*/
type: "definition-invalid";
/** Human-readable diagnostic explanation. See {@link PibblParticleDiagnostic}. */
message: string;
/**
* Particle effect associated with this input or diagnostic. See
* {@link PibblParticleDiagnostic}.
*/
effect?: string;
/** Name of the emitter associated with this notification. See {@link PibblParticleDiagnostic}. */
emitter?: string;
/** Name of the affected input property. See {@link PibblParticleDiagnostic}. */
property?: string;
}>
| Readonly<{
/**
* The literal "capability-unsupported" identifying this variant. See
* {@link PibblParticleDiagnostic}.
*/
type: "capability-unsupported";
/** Human-readable diagnostic explanation. See {@link PibblParticleDiagnostic}. */
message: string;
/** Name of the unsupported runtime capability. See {@link PibblParticleDiagnostic}. */
capability: string;
/**
* Particle effect associated with this input or diagnostic. See
* {@link PibblParticleDiagnostic}.
*/
effect?: string;
/** Name of the emitter associated with this notification. See {@link PibblParticleDiagnostic}. */
emitter?: string;
}>
| Readonly<{
/**
* Selects `"asset-invalid"` , `"binding-conflict"` , `"backend-mismatch"` for type. See
* {@link PibblParticleDiagnostic}.
*/
type: "asset-invalid" | "binding-conflict" | "backend-mismatch";
/** Human-readable diagnostic explanation. See {@link PibblParticleDiagnostic}. */
message: string;
/**
* Particle effect associated with this input or diagnostic. See
* {@link PibblParticleDiagnostic}.
*/
effect?: string;
/** Name of the emitter associated with this notification. See {@link PibblParticleDiagnostic}. */
emitter?: string;
}>
| Readonly<{
/**
* Selects `"capacity-rejected"` , `"execution-failed"` , `"disposed"` for type. See
* {@link PibblParticleDiagnostic}.
*/
type: "capacity-rejected" | "execution-failed" | "disposed";
/** Human-readable diagnostic explanation. See {@link PibblParticleDiagnostic}. */
message: string;
/**
* Particle effect associated with this input or diagnostic. See
* {@link PibblParticleDiagnostic}.
*/
effect?: string;
/** Name of the emitter associated with this notification. See {@link PibblParticleDiagnostic}. */
emitter?: string;
}>

Related API: PibblParticleDiagnostic.

PibblParticleSystemOptions

PibblParticleEffect2DInput

View source — packages/core/src/features/particles/lib/types.ts:803

type
type: "asset-invalid" | "backend-mismatch" | "binding-conflict" | "capability-unsupported" | "capacity-rejected" | "definition-invalid" | "disposed" | "execution-failed"

The literal “definition-invalid” identifying this variant. See PibblParticleDiagnostic. The literal “capability-unsupported” identifying this variant. See PibblParticleDiagnostic. Selects "asset-invalid" , "binding-conflict" , "backend-mismatch" for type. See PibblParticleDiagnostic. Selects "capacity-rejected" , "execution-failed" , "disposed" for type. See PibblParticleDiagnostic.

View source — packages/core/src/features/particles/lib/types.ts:809

message
message: string

Human-readable diagnostic explanation. See PibblParticleDiagnostic.

View source — packages/core/src/features/particles/lib/types.ts:811

effect (optional)
effect?: string | undefined

Particle effect associated with this input or diagnostic. See PibblParticleDiagnostic.

View source — packages/core/src/features/particles/lib/types.ts:816

emitter (optional)
emitter?: string | undefined

Name of the emitter associated with this notification. See PibblParticleDiagnostic.

View source — packages/core/src/features/particles/lib/types.ts:818

Notifies that emission has stopped while existing particles finish their lifetimes.

interface PibblParticleDrainStartEvent

Related API: PibblParticleDrainStartEvent.

PibblParticleSystemEvent

View source — packages/core/src/features/particles/lib/types.ts:765

type
readonly type: "drain-start"

The literal “drain-start” identifying this variant. See PibblParticleDrainStartEvent.

View source — packages/core/src/features/particles/lib/types.ts:767

A validated, branded 2D effect carrying its emitter-name and parameter types.

interface PibblParticleEffect2D<EmitterName extends string = string, Parameters extends PibblParticleParameterValues = PibblParticleParameterValues>

Related API: PibblParticleEffect2D, PibblParticleParameterValues.

PibblParticleParameterValues

Particles2DProps

defineParticleEffect2D

useParticleSystem

View source — packages/core/src/features/particles/lib/types.ts:665

dimension
readonly dimension: 2

The literal 2 identifying this variant. See PibblParticleEffect2D.

View source — packages/core/src/features/particles/lib/types.ts:670

Authored parameters and nonempty emitter definitions used to create a 2D effect.

interface PibblParticleEffect2DInput

Related API: PibblParticleEffect2DInput.

PibblParticleParameterDefinitions

PibblParticleEmitter2D

PibblParticleDiagnostic

defineParticleEffect2D

View source — packages/core/src/features/particles/lib/types.ts:643

debugName (optional)
readonly debugName?: string | undefined

Optional label used in diagnostics. See PibblParticleEffect2DInput.

View source — packages/core/src/features/particles/lib/types.ts:645

parameters (optional)
readonly parameters?: Readonly<Record<string, PibblParticleParameterDefinition>> | undefined

Related API: PibblParticleParameterDefinition.

Named parameter definitions or values for this effect instance. See PibblParticleParameterDefinitions.

View source — packages/core/src/features/particles/lib/types.ts:650

emitters
readonly emitters: readonly [PibblParticleEmitter2D, ...PibblParticleEmitter2D[]]

Related API: PibblParticleEmitter2D.

Named emitters forming the reusable effect. See PibblParticleEmitter2D.

View source — packages/core/src/features/particles/lib/types.ts:652

A timed rate, scheduled burst, or manually triggered particle emission rule.

Full type declaration
type PibblParticleEmission = | Readonly<{
/** The literal "rate" identifying this variant. See {@link PibblParticleEmission}. */
type: "rate";
/** Continuous emission rate in particles per second. See {@link PibblParticleEmission}. */
particlesPerSecond: number;
/** Delay before the emission rule becomes active. See {@link PibblParticleEmission}. */
startMilliseconds?: number;
/** Duration for which the emission rule remains active. See {@link PibblParticleEmission}. */
durationMilliseconds?: number;
/**
* Probability that an eligible emission is accepted by this rule. See
* {@link PibblParticleEmission}.
*/
probability?: number;
/** Whether the browser reported an auto-repeated key press. See {@link PibblParticleEmission}. */
repeat?: Readonly<{
/** Interval between repeated emissions. See {@link PibblParticleEmission}. */
everyMilliseconds: number;
/**
* Number of particles or sources requested by this configuration. See
* {@link PibblParticleEmission}.
*/
count: number;
}>;
}>
| Readonly<{
/** The literal "burst" identifying this variant. See {@link PibblParticleEmission}. */
type: "burst";
/** Logical time at which a scheduled burst occurs. See {@link PibblParticleEmission}. */
atMilliseconds: number;
/**
* Number of particles or sources requested by this configuration. See
* {@link PibblParticleIntegerRange}.
*/
count: number | PibblParticleIntegerRange;
/**
* Probability that an eligible emission is accepted by this rule. See
* {@link PibblParticleEmission}.
*/
probability?: number;
/** Whether the browser reported an auto-repeated key press. See {@link PibblParticleEmission}. */
repeat?: Readonly<{
/** Interval between repeated emissions. See {@link PibblParticleEmission}. */
everyMilliseconds: number;
/**
* Number of particles or sources requested by this configuration. See
* {@link PibblParticleEmission}.
*/
count: number;
}>;
}>
| Readonly<{
/** The literal "manual" identifying this variant. See {@link PibblParticleEmission}. */
type: "manual";
/**
* Number of particles or sources requested by this configuration. See
* {@link PibblParticleIntegerRange}.
*/
count?: number | PibblParticleIntegerRange;
}>

Related API: PibblParticleEmission, repeat, PibblParticleIntegerRange.

PibblParticleIntegerRange

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:289

type
type: "burst" | "manual" | "rate"

The literal “rate” identifying this variant. See PibblParticleEmission. The literal “burst” identifying this variant. See PibblParticleEmission. The literal “manual” identifying this variant. See PibblParticleEmission.

View source — packages/core/src/features/particles/lib/types.ts:292

Capacity, emission, spawn geometry, motion, appearance, and rendering of one named emitter.

interface PibblParticleEmitter2D

Related API: PibblParticleEmitter2D.

PibblParticleOverflow

PibblParticleEmission

PibblParticleShape2D

PibblParticleInitial2D

PibblParticleMotion2D

PibblParticleAppearance

PibblParticleRenderer2D

PibblParticleBounds2D

PibblParticleEffect2DInput

View source — packages/core/src/features/particles/lib/types.ts:598

name
readonly name: string

Name identifying this backend, emitter, or parameter. See PibblParticleEmitter2D.

View source — packages/core/src/features/particles/lib/types.ts:600

capacity
readonly capacity: number

Maximum number of particles retained by this emitter. See PibblParticleEmitter2D.

View source — packages/core/src/features/particles/lib/types.ts:602

overflow (optional)
readonly overflow?: PibblParticleOverflow | undefined

Related API: PibblParticleOverflow.

Rejects newly emitted particles or recycles the oldest particles when capacity is exhausted. See PibblParticleOverflow.

View source — packages/core/src/features/particles/lib/types.ts:607

space (optional)
readonly space?: "local" | undefined

The literal “local” identifying this variant. See PibblParticleEmitter2D.

View source — packages/core/src/features/particles/lib/types.ts:609

emission
readonly emission: readonly PibblParticleEmission[]

Related API: PibblParticleEmission.

Timed and manual emission rules for the emitter. See PibblParticleEmission.

View source — packages/core/src/features/particles/lib/types.ts:611

shape
readonly shape: PibblParticleShape2D

Related API: PibblParticleShape2D.

Immutable collision geometry or particle spawn shape. See PibblParticleShape2D.

View source — packages/core/src/features/particles/lib/types.ts:613

initial
readonly initial: PibblParticleInitial2D

Related API: PibblParticleInitial2D.

Distributions and parameters sampled when a particle is born. See PibblParticleInitial2D .

View source — packages/core/src/features/particles/lib/types.ts:618

motion (optional)
readonly motion?: readonly PibblParticleMotion2D[] | undefined

Related API: PibblParticleMotion2D.

Motion rules applied over particle lifetime. See PibblParticleMotion2D.

View source — packages/core/src/features/particles/lib/types.ts:620

appearance (optional)
readonly appearance?: PibblParticleAppearance | undefined

Related API: PibblParticleAppearance.

Lifetime-dependent visual properties of the particles. See PibblParticleAppearance.

View source — packages/core/src/features/particles/lib/types.ts:622

renderer
readonly renderer: PibblParticleRenderer2D

Related API: PibblParticleRenderer2D.

Canvas mark or sprite configuration used to paint this emitter’s particles. See PibblParticleRenderer2D.

View source — packages/core/src/features/particles/lib/types.ts:627

bounds (optional)
readonly bounds?: PibblParticleBounds2D | undefined

Related API: PibblParticleBounds2D.

Conservative emitter bounds used for culling; required when they cannot be derived. See PibblParticleBounds2D.

View source — packages/core/src/features/particles/lib/types.ts:632

The selected particle execution path, or unbound before a renderer is attached.

type PibblParticleExecution = | "unbound"
| "stateless-canvas"
| "flow-canvas"

Related API: PibblParticleExecution.

PibblParticleSystem

View source — packages/core/src/features/particles/lib/types.ts:696

Notifies that a particle system has finished its active run.

interface PibblParticleFinishEvent

Related API: PibblParticleFinishEvent.

PibblParticleSystemEvent

View source — packages/core/src/features/particles/lib/types.ts:775

type
readonly type: "finish"

The literal “finish” identifying this variant. See PibblParticleFinishEvent.

View source — packages/core/src/features/particles/lib/types.ts:777

Color keyframes interpolated across normalized particle lifetime.

interface PibblParticleGradient

Related API: PibblParticleGradient.

PibblParticleCurveOptions

PibblParticleAppearance

particleGradient

View source — packages/core/src/features/particles/lib/types.ts:274

type
readonly type: "gradient"

The literal “gradient” identifying this variant. See PibblParticleGradient.

View source — packages/core/src/features/particles/lib/types.ts:276

keys
readonly keys: readonly (readonly [time: number, color: string])[]

Ordered keyframes at normalized lifetime positions. See PibblParticleGradient.

View source — packages/core/src/features/particles/lib/types.ts:278

options (optional)
readonly options?: PibblParticleCurveOptions | undefined

Related API: PibblParticleCurveOptions.

Interpolation options applied between keyframes. See PibblParticleCurveOptions.

View source — packages/core/src/features/particles/lib/types.ts:280

Particle birth values for lifetime, velocity, size, rotation, color, and opacity.

interface PibblParticleInitial2D

Related API: PibblParticleInitial2D.

PibblParticleScalar

PibblParticleVector2

PibblParticleChoice

PibblParticleParameterReference

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:416

lifetimeMilliseconds
readonly lifetimeMilliseconds: PibblParticleScalar

Related API: PibblParticleScalar.

Particle lifetime sampled at birth, in milliseconds. See PibblParticleScalar.

View source — packages/core/src/features/particles/lib/types.ts:418

velocity (optional)
readonly velocity?: PibblParticleVector2 | undefined

Related API: PibblParticleVector2.

Linear velocity used by the particle motion rule. See PibblParticleVector2.

View source — packages/core/src/features/particles/lib/types.ts:420

size (optional)
readonly size?: number | PibblParticleChoice<number> | PibblParticleIntegerRange | PibblParticleParameterReference<string> | PibblParticleRange | readonly [PibblParticleScalar, PibblParticleScalar] | undefined

Related API: PibblParticleChoice, PibblParticleIntegerRange, PibblParticleParameterReference, PibblParticleRange, PibblParticleScalar.

Scalar or two-component size sampled at particle birth. See PibblParticleScalar, PibblParticleVector2.

View source — packages/core/src/features/particles/lib/types.ts:425

rotationDegrees (optional)
readonly rotationDegrees?: PibblParticleScalar | undefined

Related API: PibblParticleScalar.

Rotation in degrees sampled at particle birth. See PibblParticleScalar.

View source — packages/core/src/features/particles/lib/types.ts:427

angularVelocityDegreesPerSecond (optional)
readonly angularVelocityDegreesPerSecond?: PibblParticleScalar | undefined

Related API: PibblParticleScalar.

Angular velocity in degrees per second. See PibblParticleScalar.

View source — packages/core/src/features/particles/lib/types.ts:429

color (optional)
readonly color?: string | PibblParticleChoice<string> | PibblParticleParameterReference<string> | undefined

Related API: PibblParticleChoice, PibblParticleParameterReference.

Color sampled at particle birth. See PibblParticleChoice, PibblParticleParameterReference.

View source — packages/core/src/features/particles/lib/types.ts:434

opacity (optional)
readonly opacity?: PibblParticleScalar | undefined

Related API: opacity, PibblParticleScalar.

Opacity sampled at particle birth. See PibblParticleScalar.

View source — packages/core/src/features/particles/lib/types.ts:437

An integer-valued random sampling interval.

interface PibblParticleIntegerRange

Related API: PibblParticleIntegerRange.

PibblParticleEmission

PibblParticleScalar

particleInteger

View source — packages/core/src/features/particles/lib/types.ts:154

type
readonly type: "integer"

The literal “integer” identifying this variant. See PibblParticleIntegerRange.

View source — packages/core/src/features/particles/lib/types.ts:156

min
readonly min: number

Lower bound of the coordinate or sampling interval. See PibblParticleIntegerRange.

View source — packages/core/src/features/particles/lib/types.ts:158

max
readonly max: number

Upper bound of the coordinate or sampling interval. See PibblParticleIntegerRange.

View source — packages/core/src/features/particles/lib/types.ts:160

An analytic 2D motion rule such as gravity, drag, drift, orbit, or sway.

Full type declaration
type PibblParticleMotion2D = | Readonly<{
/** Selects `"acceleration"`, `"gravity"` for type. See {@link PibblParticleMotion2D}. */
type: "acceleration" | "gravity";
/** Value associated with this sample, input, or result. See {@link PibblParticleVector2}. */
value: PibblParticleVector2;
}>
| Readonly<{
/** The literal "drag" identifying this variant. See {@link PibblParticleMotion2D}. */
type: "drag";
/** Magnitude of the filter or motion adjustment. See {@link PibblParticleScalar}. */
amount: PibblParticleScalar;
}>
| Readonly<{
/** The literal "drift" identifying this variant. See {@link PibblParticleMotion2D}. */
type: "drift";
/** Linear velocity used by the particle motion rule. See {@link PibblParticleVector2}. */
velocity: PibblParticleVector2;
}>
| Readonly<{
/** The literal "radialAcceleration" identifying this variant. See {@link PibblParticleMotion2D}. */
type: "radialAcceleration";
/** Center of radial acceleration or orbital motion. See {@link PibblParticleMotion2D}. */
center: readonly [number, number];
/** Magnitude of the filter or motion adjustment. See {@link PibblParticleScalar}. */
amount: PibblParticleScalar;
}>
| Readonly<{
/** The literal "orbit" identifying this variant. See {@link PibblParticleMotion2D}. */
type: "orbit";
/** Center of radial acceleration or orbital motion. See {@link PibblParticleMotion2D}. */
center: readonly [number, number];
/** Angular motion rate in degrees per second. See {@link PibblParticleScalar}. */
degreesPerSecond: PibblParticleScalar;
}>
| Readonly<{
/** The literal "sway" identifying this variant. See {@link PibblParticleMotion2D}. */
type: "sway";
/** Maximum excursion of the oscillating motion. See {@link PibblParticleScalar}. */
amplitude: PibblParticleScalar;
/** Rate at which the pattern or motion repeats. See {@link PibblParticleScalar}. */
frequency: PibblParticleScalar | readonly [number, number];
}>
| Readonly<{
/** The literal "angularVelocity" identifying this variant. See {@link PibblParticleMotion2D}. */
type: "angularVelocity";
/** Angular motion rate in degrees per second. See {@link PibblParticleScalar}. */
degreesPerSecond: PibblParticleScalar;
}>

Related API: PibblParticleMotion2D, PibblParticleVector2, PibblParticleScalar, degrees.

PibblParticleVector2

PibblParticleScalar

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:447

type
type: "acceleration" | "angularVelocity" | "drag" | "drift" | "gravity" | "orbit" | "radialAcceleration" | "sway"

Selects "acceleration", "gravity" for type. See PibblParticleMotion2D. The literal “drag” identifying this variant. See PibblParticleMotion2D. The literal “drift” identifying this variant. See PibblParticleMotion2D. The literal “radialAcceleration” identifying this variant. See PibblParticleMotion2D. The literal “orbit” identifying this variant. See PibblParticleMotion2D. The literal “sway” identifying this variant. See PibblParticleMotion2D. The literal “angularVelocity” identifying this variant. See PibblParticleMotion2D.

View source — packages/core/src/features/particles/lib/types.ts:450

Whether a full emitter rejects new particles or recycles its oldest particles.

type PibblParticleOverflow = "reject-newest" | "recycle-oldest"

Related API: PibblParticleOverflow.

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:583

A typed default value and sampling phase for a named particle parameter.

Full type declaration
type PibblParticleParameterDefinition = | Readonly<{
/** The literal "number" identifying this variant. See {@link PibblParticleParameterDefinition}. */
type: "number";
/**
* Value used when no parameter override is supplied. See
* {@link PibblParticleParameterDefinition}.
*/
default: number;
/** Phase at which the parameter value is sampled. See {@link PibblParticleParameterTiming}. */
timing: PibblParticleParameterTiming;
}>
| Readonly<{
/** The literal "vector2" identifying this variant. See {@link PibblParticleParameterDefinition}. */
type: "vector2";
/**
* Value used when no parameter override is supplied. See
* {@link PibblParticleParameterDefinition}.
*/
default: readonly [number, number];
/** Phase at which the parameter value is sampled. See {@link PibblParticleParameterTiming}. */
timing: PibblParticleParameterTiming;
}>
| Readonly<{
/** The literal "color" identifying this variant. See {@link PibblParticleParameterDefinition}. */
type: "color";
/**
* Value used when no parameter override is supplied. See
* {@link PibblParticleParameterDefinition}.
*/
default: string;
/** Phase at which the parameter value is sampled. See {@link PibblParticleParameterTiming}. */
timing: PibblParticleParameterTiming;
}>

Related API: PibblParticleParameterDefinition, PibblParticleParameterTiming.

PibblParticleParameterTiming

PibblParticleParameterDefinitions

PibblParticleValueFor

View source — packages/core/src/features/particles/lib/types.ts:34

type
type: "color" | "number" | "vector2"

The literal “number” identifying this variant. See PibblParticleParameterDefinition. The literal “vector2” identifying this variant. See PibblParticleParameterDefinition. The literal “color” identifying this variant. See PibblParticleParameterDefinition.

View source — packages/core/src/features/particles/lib/types.ts:37

default
default: string | number | readonly [number, number]

Value used when no parameter override is supplied. See PibblParticleParameterDefinition.

View source — packages/core/src/features/particles/lib/types.ts:42

timing
timing: PibblParticleParameterTiming

Related API: PibblParticleParameterTiming.

Phase at which the parameter value is sampled. See PibblParticleParameterTiming.

View source — packages/core/src/features/particles/lib/types.ts:44

Named parameter declarations belonging to a particle effect.

type PibblParticleParameterDefinitions = Readonly<
Record<string, PibblParticleParameterDefinition>
>

Related API: PibblParticleParameterDefinitions, PibblParticleParameterDefinition.

PibblParticleParameterDefinition

PibblParticleEffect2DInput

PibblParticleValuesOf

View source — packages/core/src/features/particles/lib/types.ts:76

A symbolic reference resolved against the owning effect’s parameter definitions.

interface PibblParticleParameterReference<Name extends string>

Related API: PibblParticleParameterReference.

PibblParticleInitial2D

PibblParticleScalar

PibblParticleVector2

View source — packages/core/src/features/particles/lib/types.ts:189

type
readonly type: "parameter"

The literal “parameter” identifying this variant. See PibblParticleParameterReference.

View source — packages/core/src/features/particles/lib/types.ts:193

name
readonly name: Name

Name identifying this backend, emitter, or parameter. See PibblParticleParameterReference.

View source — packages/core/src/features/particles/lib/types.ts:198

Whether a parameter is sampled at spawn, simulation, or rendering time.

type PibblParticleParameterTiming = "spawn" | "simulation" | "render"

Related API: PibblParticleParameterTiming.

PibblParticleParameterDefinition

View source — packages/core/src/features/particles/lib/types.ts:25

A numeric, color, or two-component particle parameter value.

type PibblParticleParameterValue = | number
| string
| readonly [number, number]

Related API: PibblParticleParameterValue.

PibblParticleParameterValues

View source — packages/core/src/features/particles/lib/types.ts:116

Values keyed by a particle effect’s parameter names.

type PibblParticleParameterValues = Readonly<
Record<string, PibblParticleParameterValue>
>

Related API: PibblParticleParameterValues, PibblParticleParameterValue.

PibblParticleParameterValue

PibblParticleCommonProps

PibblParticleEffect2D

View source — packages/core/src/features/particles/lib/types.ts:128

A continuous numeric interval for particle sampling.

interface PibblParticleRange

Related API: PibblParticleRange.

PibblParticleScalar

particleRange

View source — packages/core/src/features/particles/lib/types.ts:138

type
readonly type: "between"

The literal “between” identifying this variant. See PibblParticleRange.

View source — packages/core/src/features/particles/lib/types.ts:140

min
readonly min: number

Lower bound of the coordinate or sampling interval. See PibblParticleRange.

View source — packages/core/src/features/particles/lib/types.ts:142

max
readonly max: number

Upper bound of the coordinate or sampling interval. See PibblParticleRange.

View source — packages/core/src/features/particles/lib/types.ts:144

Canvas rendering configuration for circles, rectangles, paths, or sprites.

Full type declaration
type PibblParticleRenderer2D = | Readonly<{
/** The literal "circle" identifying this variant. See {@link PibblParticleRenderer2D}. */
type: "circle";
/** Selects `"source-over"`, `"additive"` for blend. See {@link PibblParticleRenderer2D}. */
blend?: "source-over" | "additive";
}>
| Readonly<{
/** The literal "rectangle" identifying this variant. See {@link PibblParticleRenderer2D}. */
type: "rectangle";
/** Width-to-height ratio of the particle rectangle. See {@link PibblParticleRenderer2D}. */
aspectRatio?: number;
/** Selects `"source-over"`, `"additive"` for blend. See {@link PibblParticleRenderer2D}. */
blend?: "source-over" | "additive";
}>
| Readonly<{
/** The literal "path" identifying this variant. See {@link PibblParticleRenderer2D}. */
type: "path";
/** Path geometry used by this operation. See {@link PathGeometry}. */
path: Path2D | PathGeometry;
/** Selects `"source-over"`, `"additive"` for blend. See {@link PibblParticleRenderer2D}. */
blend?: "source-over" | "additive";
}>
| Readonly<{
/** The literal "sprite" identifying this variant. See {@link PibblParticleRenderer2D}. */
type: "sprite";
/** Image used to paint each sprite particle. See {@link PibblParticleRenderer2D}. */
source: CanvasImageSource;
/**
* Logical point to which the content or result is anchored. See
* {@link PibblParticleRenderer2D}.
*/
anchor?: readonly [number, number];
/** Selects `"source-over"`, `"additive"` for blend. See {@link PibblParticleRenderer2D}. */
blend?: "source-over" | "additive";
}>

Related API: PibblParticleRenderer2D, Path, PathGeometry, Image.

PathGeometry

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:529

type
type: "circle" | "path" | "rectangle" | "sprite"

The literal “circle” identifying this variant. See PibblParticleRenderer2D. The literal “rectangle” identifying this variant. See PibblParticleRenderer2D. The literal “path” identifying this variant. See PibblParticleRenderer2D. The literal “sprite” identifying this variant. See PibblParticleRenderer2D.

View source — packages/core/src/features/particles/lib/types.ts:532

blend (optional)
blend?: "additive" | "source-over" | undefined

Selects "source-over", "additive" for blend. See PibblParticleRenderer2D.

View source — packages/core/src/features/particles/lib/types.ts:534

A literal, random distribution, weighted choice, or parameter reference yielding a number.

type PibblParticleScalar = | number
| PibblParticleRange
| PibblParticleIntegerRange
| PibblParticleChoice<number>
| PibblParticleParameterReference<string>

Related API: PibblParticleScalar, PibblParticleRange, PibblParticleIntegerRange, PibblParticleChoice, PibblParticleParameterReference.

PibblParticleRange

PibblParticleIntegerRange

PibblParticleChoice

PibblParticleParameterReference

PibblParticleInitial2D

View source — packages/core/src/features/particles/lib/types.ts:210

The point, line, rectangle, circle, or ring used to sample particle birth positions.

Full type declaration
type PibblParticleShape2D = | Readonly<{
/** The literal "point" identifying this variant. See {@link PibblParticleShape2D}. */
type: "point";
/**
* Position of the geometry, source, or selected resize handle. See
* {@link PibblParticleShape2D}.
*/
position?: readonly [number, number];
}>
| Readonly<{
/** The literal "line" identifying this variant. See {@link PibblParticleShape2D}. */
type: "line";
/** Starting endpoint or value. See {@link PibblParticleShape2D}. */
from: readonly [number, number];
/** Destination endpoint or value. See {@link PibblParticleShape2D}. */
to: readonly [number, number];
}>
| Readonly<{
/** The literal "rectangle" identifying this variant. See {@link PibblParticleShape2D}. */
type: "rectangle";
/**
* Horizontal extent in the units of the containing geometry or surface. See
* {@link PibblParticleShape2D}.
*/
width: number;
/**
* Vertical extent in the units of the containing geometry or surface. See
* {@link PibblParticleShape2D}.
*/
height: number;
/** Selects `"interior"`, `"edge"` for sample. See {@link PibblParticleShape2D}. */
sample: "interior" | "edge";
}>
| Readonly<{
/** The literal "circle" identifying this variant. See {@link PibblParticleShape2D}. */
type: "circle";
/** Radius in the coordinate system of this geometry or effect. See {@link PibblParticleShape2D}. */
radius: number;
/** Selects `"interior"`, `"circumference"` for sample. See {@link PibblParticleShape2D}. */
sample: "interior" | "circumference";
}>
| Readonly<{
/** The literal "ring" identifying this variant. See {@link PibblParticleShape2D}. */
type: "ring";
/** Radius of the inner boundary. See {@link PibblParticleShape2D}. */
innerRadius: number;
/** Radius of the outer boundary. See {@link PibblParticleShape2D}. */
outerRadius: number;
}>

Related API: PibblParticleShape2D, extent.

PibblParticleEmitter2D

View source — packages/core/src/features/particles/lib/types.ts:356

type
type: "circle" | "line" | "point" | "rectangle" | "ring"

The literal “point” identifying this variant. See PibblParticleShape2D. The literal “line” identifying this variant. See PibblParticleShape2D. The literal “rectangle” identifying this variant. See PibblParticleShape2D. The literal “circle” identifying this variant. See PibblParticleShape2D. The literal “ring” identifying this variant. See PibblParticleShape2D.

View source — packages/core/src/features/particles/lib/types.ts:359

Notifies that a particle system has started a run.

interface PibblParticleStartEvent

Related API: PibblParticleStartEvent.

PibblParticleSystemEvent

View source — packages/core/src/features/particles/lib/types.ts:706

type
readonly type: "start"

The literal “start” identifying this variant. See PibblParticleStartEvent.

View source — packages/core/src/features/particles/lib/types.ts:708

Mount-owned playback and burst controls with reactive status and execution-path information.

interface PibblParticleSystem<EmitterName extends string = string, Parameters extends PibblParticleParameterValues = PibblParticleParameterValues>

Related API: PibblParticleSystem, PibblParticleParameterValues.

PibblParticleParameterValues

Signal

PibblParticleSystemStatus

PibblParticleExecution

PibblParticleBurstOverrides

Particles2DProps

View source — packages/core/src/features/particles/lib/types.ts:949

status
readonly status: Signal<PibblParticleSystemStatus>

Related API: Signal, PibblParticleSystemStatus.

Reactive lifecycle state of this mounted particle system. See Signal, PibblParticleSystemStatus.

View source — packages/core/src/features/particles/lib/types.ts:961

execution
readonly execution: Signal<PibblParticleExecution>

Related API: Signal, PibblParticleExecution.

Reactive execution path selected for the current renderer binding. See Signal, PibblParticleExecution.

View source — packages/core/src/features/particles/lib/types.ts:966

play
play: () => void

Queues a new particle-system run. See PibblParticleSystem.

View source — packages/core/src/features/particles/lib/types.ts:968

pause
pause: () => void

Queues suspension of particle-system advancement. See PibblParticleSystem.

View source — packages/core/src/features/particles/lib/types.ts:970

resume
resume: () => void

Queues resumption of a paused particle-system run. See PibblParticleSystem.

View source — packages/core/src/features/particles/lib/types.ts:972

restart
restart: (options?: Readonly<{ seed?: number; }>) => void

Queues a fresh run, optionally replacing its deterministic seed. See PibblParticleSystem .

  • options — Optional seed override for the restarted simulation.

View source — packages/core/src/features/particles/lib/types.ts:978

emit
emit: (emitter: EmitterName, options?: PibblParticleBurstOverrides) => void

Related API: PibblParticleBurstOverrides.

Queues a manual burst for the named emitter with optional birth overrides. See PibblParticleSystem.

View source — packages/core/src/features/particles/lib/types.ts:993

stop
stop: (options?: Readonly<{ mode?: "drain" | "clear"; }>) => void

Queues stopping; drain retains live particles until they finish, while clear removes them. See PibblParticleSystem.

  • options — Whether to drain existing particles or clear them immediately.

View source — packages/core/src/features/particles/lib/types.ts:999

The lifecycle and burst-admission notifications emitted by a particle system.

type PibblParticleSystemEvent = | PibblParticleStartEvent
| PibblParticleBurstAcceptedEvent
| PibblParticleBurstRejectedEvent
| PibblParticleDrainStartEvent
| PibblParticleFinishEvent

Related API: PibblParticleSystemEvent, PibblParticleStartEvent, PibblParticleBurstAcceptedEvent, PibblParticleBurstRejectedEvent, PibblParticleDrainStartEvent, PibblParticleFinishEvent.

PibblParticleStartEvent

PibblParticleBurstAcceptedEvent

PibblParticleBurstRejectedEvent

PibblParticleDrainStartEvent

PibblParticleFinishEvent

PibblParticleCommonProps

View source — packages/core/src/features/particles/lib/types.ts:790

type
readonly type: "burst-accepted" | "burst-rejected" | "drain-start" | "finish" | "start"

The literal “burst-accepted” identifying this variant. See PibblParticleBurstAcceptedEvent. The literal “burst-rejected” identifying this variant. See PibblParticleBurstRejectedEvent. The literal “drain-start” identifying this variant. See PibblParticleDrainStartEvent. The literal “finish” identifying this variant. See PibblParticleFinishEvent. The literal “start” identifying this variant. See PibblParticleStartEvent.

View source — packages/core/src/features/particles/lib/types.ts:721

Autoplay, deterministic seed, flow binding, and lifecycle callbacks for a mounted system.

interface PibblParticleSystemOptions

Related API: PibblParticleSystemOptions.

PibblFlowField2D

PibblParticleSystemEvent

PibblParticleDiagnostic

useParticleSystem

View source — packages/core/src/features/particles/lib/types.ts:881

flow (optional)
readonly flow?: PibblFlowField2D | undefined

Related API: PibblFlowField2D.

Mount-owned field binding; advects emitter positions instead of analytic translation.

View source — packages/core/src/features/particles/lib/types.ts:883

autoplay (optional)
readonly autoplay?: boolean | undefined

Whether playback is requested automatically when the owner mounts. See PibblParticleSystemOptions.

View source — packages/core/src/features/particles/lib/types.ts:888

seed (optional)
readonly seed?: number | undefined

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

View source — packages/core/src/features/particles/lib/types.ts:893

debugName (optional)
readonly debugName?: string | undefined

Optional label used in diagnostics. See PibblParticleSystemOptions.

View source — packages/core/src/features/particles/lib/types.ts:895

onEvent (optional)
readonly onEvent?: ((event: PibblParticleSystemEvent) => void) | undefined

Related API: PibblParticleSystemEvent.

Receives lifecycle and milestone notifications. See PibblParticleSystemEvent.

View source — packages/core/src/features/particles/lib/types.ts:900

onError (optional)
readonly onError?: ((error: unknown) => void) | undefined

Receives failures reported by the owning runtime resource. See PibblParticleSystemOptions.

  • error — Failure reported by the particle system.

View source — packages/core/src/features/particles/lib/types.ts:906

The lifecycle state of a mounted particle system, including draining and disposal.

type PibblParticleSystemStatus = | "idle"
| "scheduled"
| "running"
| "paused"
| "draining"
| "finished"
| "disposed"

Related API: PibblParticleSystemStatus.

PibblParticleSystem

View source — packages/core/src/features/particles/lib/types.ts:682

Derives a parameter’s value type from its declared particle parameter kind.

type PibblParticleValueFor<Definition extends PibblParticleParameterDefinition> = Definition["type"] extends "number"
? number
: Definition["type"] extends "vector2"
? readonly [number, number]
: Definition["type"] extends "color"
? string
: never

Related API: PibblParticleValueFor, PibblParticleParameterDefinition.

PibblParticleParameterDefinition

PibblParticleValuesOf

View source — packages/core/src/features/particles/lib/types.ts:86

Derives the named value record from an effect’s parameter definitions.

type PibblParticleValuesOf<Definitions extends PibblParticleParameterDefinitions | undefined> = Definitions extends PibblParticleParameterDefinitions
? Readonly<{
[Name in keyof Definitions]: PibblParticleValueFor<Definitions[Name]>;
}>
: Readonly<Record<never, never>>

Related API: PibblParticleValuesOf, PibblParticleParameterDefinitions, PibblParticleValueFor.

PibblParticleParameterDefinitions

PibblParticleValueFor

defineParticleEffect2D

View source — packages/core/src/features/particles/lib/types.ts:103

Two independently sampled scalar values or a reference to a vector parameter.

type PibblParticleVector2 = | readonly [PibblParticleScalar, PibblParticleScalar]
| PibblParticleParameterReference<string>

Related API: PibblParticleVector2, PibblParticleScalar, PibblParticleParameterReference.

PibblParticleScalar

PibblParticleParameterReference

PibblParticleInitial2D

PibblParticleMotion2D

View source — packages/core/src/features/particles/lib/types.ts:225

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

Full type declaration
type Particles2DProps<EmitterName extends string = string, Parameters extends PibblParticleParameterValues = PibblParticleParameterValues> = PibblParticleCommonInputProps<Parameters> & {
/**
* Declared presentation and layout properties. See {@link PibblParticleStyleInput},
* {@link Particles2DStyle}.
*/
readonly style?: PibblParticleStyleInput<Particles2DStyle>;
} & (
| {
/**
* Particle effect associated with this input or diagnostic. See {@link SignalValue},
* {@link PibblParticleEffect2D}.
*/
readonly effect: SignalValue<PibblParticleEffect2D<EmitterName, Parameters>>;
/**
* Not accepted in this variant; use the alternative fields instead. See
* {@link Particles2DProps}.
*/
readonly system?: never;
/** Whether playback is requested automatically when the owner mounts. See {@link SignalValue}. */
readonly autoplay?: SignalValue<boolean>;
/** Seed used for deterministic sampling or simulation initialization. See {@link SignalValue}. */
readonly seed?: SignalValue<number>;
}
| {
/**
* Not accepted in this variant; use the alternative fields instead. See
* {@link Particles2DProps}.
*/
readonly effect?: never;
/**
* Mounted particle controller supplying this component's simulation. See
* {@link PibblParticleSystem}.
*/
readonly system: PibblParticleSystem<EmitterName, Parameters>;
/**
* Not accepted in this variant; use the alternative fields instead. See
* {@link Particles2DProps}.
*/
readonly autoplay?: never;
/**
* Not accepted in this variant; use the alternative fields instead. See
* {@link Particles2DProps}.
*/
readonly seed?: never;
}
)

Related API: Particles2DProps, PibblParticleParameterValues, Particles2DStyle, SignalValue, PibblParticleEffect2D, PibblParticleSystem.

PibblParticleParameterValues

Particles2DStyle

SignalValue

PibblParticleEffect2D

PibblParticleSystem

Particles2D

View source — packages/core/src/features/particles/lib/types.ts:1081

pointerEvents (optional)
readonly pointerEvents?: SignalValue<PibblPointerEvents | undefined>

Related API: SignalValue, PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

parameters (optional)
readonly parameters?: SignalValue<Readonly<Partial<Parameters>> | undefined>

Related API: SignalValue.

Named parameter definitions or values for this effect instance. See PibblParticleCommonProps.

View source — packages/core/src/features/particles/lib/types.ts:1022

keyboardFocusable (optional)
readonly keyboardFocusable?: SignalValue<boolean | undefined>

Related API: SignalValue.

Whether the target may receive keyboard focus. See PibblParticleCommonProps.

View source — packages/core/src/features/particles/lib/types.ts:1024

keyboardNavigationBounds (optional)
readonly keyboardNavigationBounds?: SignalValue<Readonly<LayoutBox> | undefined>

Related API: SignalValue, LayoutBox.

Logical rectangle used for directional keyboard navigation. See LayoutBox.

View source — packages/core/src/features/particles/lib/types.ts:1026

onEvent (optional)
readonly onEvent?: SignalValue<((event: PibblParticleSystemEvent) => void) | undefined>

Related API: SignalValue, PibblParticleSystemEvent.

Receives lifecycle and milestone notifications. See PibblParticleSystemEvent.

View source — packages/core/src/features/particles/lib/types.ts:1031

onError (optional)
readonly onError?: SignalValue<((error: unknown) => void) | undefined>

Related API: SignalValue.

Receives failures reported by the owning runtime resource. See PibblParticleCommonProps .

  • error — Failure reported by the particle system.

View source — packages/core/src/features/particles/lib/types.ts:1037

style (optional)
readonly style?: PibblParticleStyleInput<Particles2DStyle> | undefined

Related API: Particles2DStyle.

Declared presentation and layout properties. See PibblParticleStyleInput, Particles2DStyle.

View source — packages/core/src/features/particles/lib/types.ts:1089

effect (optional)
readonly effect?: SignalValue<PibblParticleEffect2D<EmitterName, Parameters>> | undefined

Related API: SignalValue, PibblParticleEffect2D.

Particle effect associated with this input or diagnostic. See SignalValue, PibblParticleEffect2D. Not accepted in this variant; use the alternative fields instead. See Particles2DProps.

View source — packages/core/src/features/particles/lib/types.ts:1096

system (optional)
readonly system?: PibblParticleSystem<EmitterName, Parameters> | undefined

Related API: PibblParticleSystem.

Not accepted in this variant; use the alternative fields instead. See Particles2DProps. Mounted particle controller supplying this component’s simulation. See PibblParticleSystem.

View source — packages/core/src/features/particles/lib/types.ts:1101

autoplay (optional)
readonly autoplay?: SignalValue<boolean> | undefined

Related API: SignalValue.

Whether playback is requested automatically when the owner mounts. See SignalValue. Not accepted in this variant; use the alternative fields instead. See Particles2DProps.

View source — packages/core/src/features/particles/lib/types.ts:1103

seed (optional)
readonly seed?: SignalValue<number> | undefined

Related API: SignalValue.

Seed used for deterministic sampling or simulation initialization. See SignalValue. Not accepted in this variant; use the alternative fields instead. See Particles2DProps.

View source — packages/core/src/features/particles/lib/types.ts:1105

Supported geometry and presentation properties for Particles2D.

interface Particles2DStyle extends SystemStyle, BoxStyle, LayoutItemStyle, CursorStyle

Related API: Particles2DStyle, SystemStyle, BoxStyle, LayoutItemStyle, CursorStyle.

SystemStyle

BoxStyle

LayoutItemStyle

CursorStyle

Particles2DProps

View source — packages/core/src/features/particles/lib/types.ts:1065

opacity (optional)
readonly opacity?: number | undefined

Related API: opacity.

Opacity of the painted result. See Particles2DStyle.

View source — packages/core/src/features/particles/lib/types.ts:1068

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. See Length.

View source — packages/core/src/lib/style/positioning.ts:127

top (optional)
top?: number | `${number}%` | undefined

Top edge value or top envelope guide. See Length.

View source — packages/core/src/lib/style/positioning.ts:129

width (optional)
width?: Length | undefined

Related API: Length.

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

View source — packages/core/src/lib/style/types.ts:81

height (optional)
height?: Length | undefined

Related API: Length.

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

View source — packages/core/src/lib/style/types.ts:83

minWidth (optional)
minWidth?: number | `${number}%` | undefined

Minimum permitted width. See Length.

View source — packages/core/src/lib/style/types.ts:85

maxWidth (optional)
maxWidth?: number | `${number}%` | undefined

Maximum permitted width. See Length.

View source — packages/core/src/lib/style/types.ts:87

minHeight (optional)
minHeight?: number | `${number}%` | undefined

Minimum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:89

maxHeight (optional)
maxHeight?: number | `${number}%` | undefined

Maximum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:91

padding (optional)
padding?: EdgeValues | undefined

Related API: EdgeValues.

Insets between the border box and content box. See EdgeValues.

View source — packages/core/src/lib/style/types.ts:93

overflow (optional)
overflow?: "clip" | "visible" | undefined

Selects "visible", "clip" for overflow. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:95

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:121

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:123

flexBasis (optional)
flexBasis?: Length | undefined

Related API: Length.

Initial main-axis size before flex growth or shrinkage. See Length.

View source — packages/core/src/lib/style/types.ts:125

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:127

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:129

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:131

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:133

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:135

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:137

cursor (optional)
cursor?: string | undefined

Cursor shown while this target owns pointer presentation. See CursorStyle.

View source — packages/core/src/lib/style/types.ts:212

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:76

A mount-owned flow field with revision tracking and batched velocity sampling.

interface PibblFlowField2D

Related API: PibblFlowField2D.

Signal

useFlowField2D

useFlowSource2D

PibblParticleSystemOptions

View source — packages/core/src/features/particles/lib/flow/hook.ts:93

revision
readonly revision: Signal<number>

Related API: Signal.

Revision used to detect changes to the underlying state or geometry. See Signal.

View source — packages/core/src/features/particles/lib/flow/hook.ts:96

sampleBatch
sampleBatch: (positions: Float32Array, velocities: Float32Array, count: number) => void

Samples velocities for packed position pairs into caller-provided output storage. See PibblFlowField2D.

  • positions — Packed input positions, with two floats per particle.

  • velocities — Output buffer receiving sampled velocities, with two floats per particle.

  • count — Number of position pairs to sample.

View source — packages/core/src/features/particles/lib/flow/hook.ts:104

Logical bounds, grid resolution, obstacle source, and buoyancy for a flow field.

interface PibblFlowFieldOptions2D

Related API: PibblFlowFieldOptions2D.

PibblFlowObstacleSource2D

useFlowField2D

View source — packages/core/src/features/particles/lib/flow/hook.ts:61

bounds
readonly bounds: Readonly<{ width: number; height: number; }>

Logical region constraining the content or query. See PibblFlowFieldOptions2D.

View source — packages/core/src/features/particles/lib/flow/hook.ts:63

resolution
readonly resolution: readonly [columns: number, rows: number]

Dimensions of the simulation or raster grid. See PibblFlowFieldOptions2D.

View source — packages/core/src/features/particles/lib/flow/hook.ts:76

obstacles (optional)
readonly obstacles?: PibblFlowObstacleSource2D | undefined

Related API: PibblFlowObstacleSource2D.

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

View source — packages/core/src/features/particles/lib/flow/hook.ts:80

buoyancy (optional)
readonly buoyancy?: number | undefined

Strength of heat-driven upward motion in the flow field. See PibblFlowFieldOptions2D.

View source — packages/core/src/features/particles/lib/flow/hook.ts:82

Committed obstacle geometry and motion packed into borrowed numeric buffers.

interface PibblFlowObstacleBatch2D

Related API: PibblFlowObstacleBatch2D.

PibblFlowObstacleSource2D

View source — packages/core/src/features/particles/lib/flow/hook.ts:24

revision
readonly revision: number

Revision used to detect changes to the underlying state or geometry. See PibblFlowObstacleBatch2D.

View source — packages/core/src/features/particles/lib/flow/hook.ts:29

boxes
readonly boxes: Float64Array<ArrayBufferLike>

cx, cy, halfWidth, halfHeight, radians, vx, vy, omega, COM x/y.

View source — packages/core/src/features/particles/lib/flow/hook.ts:31

ellipses (optional)
readonly ellipses?: Float64Array<ArrayBufferLike> | undefined

Packed ellipse obstacle data consumed by the simulation. See PibblFlowObstacleBatch2D.

View source — packages/core/src/features/particles/lib/flow/hook.ts:35

polygons (optional)
readonly polygons?: Float64Array<ArrayBufferLike> | undefined

Packed polygon obstacle data consumed by the simulation. See PibblFlowObstacleBatch2D.

View source — packages/core/src/features/particles/lib/flow/hook.ts:39

Supplies committed obstacle batches to a flow field without transferring buffer ownership.

interface PibblFlowObstacleSource2D

Related API: PibblFlowObstacleSource2D.

PibblFlowObstacleBatch2D

PibblFlowFieldOptions2D

View source — packages/core/src/features/particles/lib/flow/hook.ts:47

read
read: () => PibblFlowObstacleBatch2D

Related API: PibblFlowObstacleBatch2D.

Returns committed simulation state. Buffers are borrowed for this call only.

The current obstacle revision and packed obstacle geometry. See PibblFlowObstacleBatch2D .

View source — packages/core/src/features/particles/lib/flow/hook.ts:53

Reactive position, radius, acceleration, heat, and enablement of a flow source.

interface PibblFlowSourceOptions2D

Related API: PibblFlowSourceOptions2D.

SignalValue

useFlowSource2D

View source — packages/core/src/features/particles/lib/flow/hook.ts:112

position
readonly position: SignalValue<readonly [number, number]>

Related API: SignalValue.

Position of the geometry, source, or selected resize handle. See SignalValue.

View source — packages/core/src/features/particles/lib/flow/hook.ts:114

radius
readonly radius: SignalValue<number>

Related API: SignalValue.

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

View source — packages/core/src/features/particles/lib/flow/hook.ts:116

acceleration (optional)
readonly acceleration?: SignalValue<readonly [number, number]> | undefined

Related API: SignalValue.

Acceleration injected by this flow source. See SignalValue.

View source — packages/core/src/features/particles/lib/flow/hook.ts:118

heat (optional)
readonly heat?: SignalValue<number> | undefined

Related API: SignalValue.

Heat injected by this flow source. See SignalValue.

View source — packages/core/src/features/particles/lib/flow/hook.ts:120

enabled (optional)
readonly enabled?: SignalValue<boolean> | undefined

Related API: SignalValue.

Whether this operation or resource participates in updates. See SignalValue.

View source — packages/core/src/features/particles/lib/flow/hook.ts:122

Read the Canvas particles companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

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