Skip to content

useParticleSystem

Read as Markdown

import { useParticleSystem } from "@pibbl/core/particles";

Creates a stable component-owned system for an immutable 2D definition. Its controls are play, pause, resume, restart, emit, and stop. status and execution are readonly Pibbl signals.

Commands enter the shared scheduler’s Begin phase. Population advances in Advance, metadata publishes in Commit, renderer work plans and paints, and events/errors deliver in Complete. Removal cancels queued commands, unregisters the scheduler participant, releases the renderer binding and parameter epochs, and makes retained controls inert.

Use explicit system mode when event handlers need manual bursts or lifecycle controls. Canvas supports both automatic emission and manual births.

Types: PibblParticleSystem, PibblParticleSystemOptions, PibblParticleSystemStatus, and PibblParticleExecution.

Creates a mount-owned system retaining the effect’s emitter and parameter types. See PibblParticleEffect2D, PibblParticleSystemOptions, and PibblParticleSystem. Creates one stable particle-system handle owned by the current hook slot.

useParticleSystem: <EmitterName extends string, Parameters extends PibblParticleParameterValues>(effect: SignalValue<PibblParticleEffect2D<EmitterName, Parameters>>, options?: SignalValue<SignalFields<PibblParticleSystemOptions>>) => PibblParticleSystem<EmitterName, Parameters>

Related API: useParticleSystem, PibblParticleParameterValues, SignalValue, PibblParticleEffect2D, PibblParticleSystemOptions, PibblParticleSystem.

Stable mount-owned controls for the particle simulation. See PibblParticleSystem.

SignalValue

PibblParticleEffect2D

PibblParticleSystemOptions

PibblParticleSystem

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

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