Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A pickup pulse in PixiJS: event, lifetime, cleanup

A pickup pulse in PixiJS: event, lifetime, cleanup

A pickup pulse needs a clear lifetime: one collection event starts one short burst, the particles finish, and the owning scene releases or reuses the instance. This deck walks through a small PixiJS example built with nixie-fx 0.1.20, using procedural billboards and a fixed seed so the result can be replayed. It covers common integration mistakes, including restarting every frame, mixing milliseconds with seconds, using mismatched coordinates, and mistaking particle expiry for cleanup. The local test observed 24 particles at 0.5 simulated seconds, with no unsupported PixiJS features reported for the definition. That result applies to this small effect, not every material or backend setting. The slides include the tested preview and a concrete integration checklist. For the pixi js particle editor used by the runtime example, see https://nixiefx.com/pixijs-particle-effects/ .

Avatar for valentina-mkrtu

valentina-mkrtu

October 14, 2026

More Decks by valentina-mkrtu

Other Decks in Programming

Transcript

  1. A pickup pulse in PixiJS One collection event. A short

    particle lifetime. Explicit cleanup. 01
  2. The event contract Trigger after collection succeeds. Keep the pickup's

    final world position. Do not restart the burst in every update. 02
  3. The tested effect 24 procedural billboards; lifetime 0.7 s. Seed

    42; simulation step 1/60 s. nixie-fx 0.1.20; no external assets. 03
  4. Runtime preview Actual local test screenshot at 0.5 s. 24

    particles in PixiJS. PixiJS unsupported-feature list was empty for this definition. 04
  5. Coordinate mistakes Convert the pickup position into the effect parent's

    space. Apply pixel scaling once. Match the sign of the vertical axis. 05
  6. Clock mistakes Pass seconds to update. Advance the owning renderer

    once per simulation step. Avoid updating the same instance a second time. 06
  7. Restart mistakes Restarting an active instance can cut off its

    previous burst. Choose a free pool member for overlapping pickups. Count dropped requests when the pool is full. 07
  8. Cleanup mistakes Invisible particles do not prove the instance was

    removed. Remove retained instances or destroy their owning renderer. Track host-owned texture and material resources separately. 08
  9. Support limits Tested: procedural unlit billboards. Not tested: mesh particles,

    collision, lighting, or material graphs. Matching particle positions does not establish identical pixels. 09
  10. Integration checks One successful pickup creates one burst at the

    right position. Repeated pickups follow the chosen overlap policy. Scene teardown leaves no retained effect instances. 10