Procgen Effects Showcase
- ..
- .metadata433 B
- README.md1.3 KB
- graph.json23.7 KB
- init.luau7.5 KB
- preview.png39.9 KB
README.md
dragon_breath
A dragon's fire breath sweeping a courtyard: a jet of flame from the mouth, rolling dark smoke born
where the flames die, and embers that drift and settle. The sweep is a function of time alone
(yaw = 0.72 sin(2 pi t / 14), from world +Z toward +X), so the effect loops forever, and the
Procgen Effects Showcase world's courtyard shader flagstone_scorch evaluates the same sweep to scorch the stones where the jet
has just passed. The mouth stands at (0, 2.4, -9) in the generator's own space.
-- `graph` is this graph's reference: the AssetRef `asset.resolve` or a search returns for it.
local e = entity.spawn("dragon_breath", { position = { 0, 0, 0 } })
e.component.add("Generator", { graph = graph, playOn = "load", ending = "loop" })
| Output | What it draws |
|---|---|
flame | The flame jet, additive, dragon_flame shader |
smoke | The smoke the flames leave, dragon_smoke shader |
embers | Embers drifting down, additive, dragon_ember shader |
In the Procgen Effects Showcase world's fx_breath scene, the DragonBreathDirector component on the same entity keeps
the ground's scorch and a set of flickering lights in step with this graph's clock. The timeline
has no end and plays at 60 fps.