Log inGet started
World

Procgen Effects Showcase

Branchmain
Branchesmain
Commit99ff90d12c

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" })
OutputWhat it draws
flameThe flame jet, additive, dragon_flame shader
smokeThe smoke the flames leave, dragon_smoke shader
embersEmbers 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.