---
title: "Looping vs one-shot effects: what is the difference?"
description: "A looping effect plays until you stop it, like a campfire. A one-shot plays once and ends, like an explosion. Each needs its own frames and settings."
canonical: https://appliedmanifold.com/learn/loop-vs-one-shot/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Learn](https://appliedmanifold.com/learn/)
3.  Loop vs one-shot

LEARN // EFFECTS

# Looping vs one-shot effects: what is the difference

A looping effect repeats until your code stops it, like a campfire, a burning window or chimney smoke. A one-shot effect plays once from start to finish and ends faded out, like an explosion, an impact or a dust burst. You choose one per effect, because each needs different frames and different engine settings.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [See the examples →](https://appliedmanifold.com/docs/pyrofx/examples/)

-   Godot 4 Available
-   Unity Manual setup
-   Unreal Engine Manual setup
-   Roblox Studio Manual setup
-   three.js Available

A draft compile is from $0.05, and new accounts start with $5 of usage.

**FIRE\_WHIRLFINAL**

![First frame of the fire\_whirl bake](/bakes/fire_whirl/poster.webp)

Fire whirl, 4.4 x 7.1 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-fire_whirl)

01 // THE DIFFERENCE

## What changes between the two

A loop needs an ending that leads back to its start, and its frames show a steady state, with the fire already burning on frame 1. A one-shot needs a clear beginning and an end where the effect has faded to nothing, so the node can be removed without a visible cut.

Timing works differently too. A loop's length only sets how often the pattern repeats. A one-shot's length is the event itself, so the fireball's 4 s clip should take 4 s on screen, and gameplay such as damage or camera shake often lines up with its first frames. One-shots often spend more frames on the fast start, so their frames are not evenly spaced in time.

02 // IN YOUR ENGINE

## The switch in each engine

-   Godot 4: `one_shot` on `GPUParticles3D`. Set `emitting = true` to fire it and free the node on the `finished` signal with `queue_free()`.
-   Unity: Looping in the Main module, and Stop Action Destroy to remove a finished one-shot.
-   Unreal Engine: Loop Behavior on the Niagara emitter (Once or Infinite), and the loop count on the Sub UV Animation module.
-   Roblox Studio: `FlipbookMode` Loop or OneShot, with `Emit(count)` for a burst.
-   three.js: advance the frame each tick, and after the last frame of a one-shot call `sprite.removeFromParent()` and `material.dispose()`.

03 // REAL OUTPUT

## A loop and a one-shot from real compiles

The fire whirl loops every 2 s. The fireball plays once over a 4 s clip and ends faded out.

**FIREBALLFINAL**

![First frame of the fireball bake](/bakes/fireball/poster.webp)

Fireball, 9.4 x 13.4 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-fireball)

04 // SPATIAL COMPILER

## Asking for one or the other

Tell your agent whether the effect loops. A loop compiles with `export.loop = true` and blended ends, and a one-shot ends when the effect has faded. Of the eight example effects, fire, fire whirl, window fire and smoke plume loop, while fireball, impact, smoke column and dust ring play once. See [the examples](https://appliedmanifold.com/docs/pyrofx/examples/).

05 // RELATED

## Related pages

-   [One-shot explosion Godot 4Build a GPUParticles3D explosion in Godot 4 that plays once and frees itself, by hand or from a wired fireball scene.](https://appliedmanifold.com/guides/godot-one-shot-explosion/)
-   [Play an explosion once UnityMake a Unity Particle System play an explosion flipbook a single time and destroy itself, with a prefab and a spawn script.](https://appliedmanifold.com/guides/unity-play-explosion-once/)
-   [Play a flipbook once Roblox StudioTrigger an explosion flipbook a single time in Roblox Studio with OneShot mode, Emit and Debris cleanup.](https://appliedmanifold.com/guides/roblox-play-flipbook-once/)
-   [Fireball sprite sheetA fuel fireball as a 3.7 second one-shot sprite sheet, why its frames bunch at the start, and how to play it once in Godot 4 and by hand.](https://appliedmanifold.com/effects/fireball-sprite-sheet/)
-   [Loops without a seamA loop with no visible seam blends its last frames into its first, so a fire or smoke effect keeps looping without a pop.](https://appliedmanifold.com/learn/seamless-loop/)
-   [Loop a fire sheet Godot 4Find why a fire loop pops in Godot 4 and fix it in the sheet, the AnimatedSprite3D or the GPUParticles3D emitter settings.](https://appliedmanifold.com/guides/godot-loop-fire-sprite-sheet/)
-   [Bake and wireCall `bake` with a `.pyro.toml` spec and an output folder, then `wire` to write a Godot 4 scene with the six-way shader. `check`, `schema` and `sweep` support the loop.](https://appliedmanifold.com/docs/pyrofx/bake-and-wire/)

[All pages in Learn →](https://appliedmanifold.com/learn/)

[← Loops without a seam](https://appliedmanifold.com/learn/seamless-loop/)[Precomputed vs real-time effects →](https://appliedmanifold.com/learn/baked-vs-real-time-effects/)

06 // FAQ

## Loop and one-shot questions

[All questions →](https://appliedmanifold.com/faq/)

**README.LOOP\_VS\_ONE\_SHOT**

### How do I play an explosion flipbook once and remove it in three.js?

Advance frames with THREE.Clock, stop at the last frame and call sprite.removeFromParent and material.dispose to clean up.

### How do I play an explosion flipbook once instead of looping it in Unity?

Turn off Looping in the Main module, set Duration to the clip length, set Cycles to 1 and set Stop Action to Destroy.

### How do I play an explosion flipbook only once in Roblox Studio?

Set FlipbookMode to OneShot, keep Rate at 0 and call Emit with your particle count when the explosion triggers.

### How do I trigger an explosion and remove the particle node afterward in Godot?

Set one\_shot to true, start playback with emitting set to true and connect the finished signal to queue\_free.

### How do I play an explosion flipbook once and stop on its final frame in Unreal Engine?

Set the emitter Loop Behavior to Once and Sub UV Animation loop count to 1 so the particle finishes on its final cell.

## Compile your first effect

You pay per compile and see the price before it runs. New accounts start with $5 of usage.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Bake and wire →](https://appliedmanifold.com/docs/pyrofx/bake-and-wire/)

[All effects, guides and explainers →](https://appliedmanifold.com/effects/)
