Browse documentation ⌄
On this page

VFX syntax reference

Native VFX files use ashfox 1 followed by vfx <name> { ... } or shared module <name> { ... } palette modules.

Every VFX block has a closed key set: an unknown or repeated key, an unknown enum value (blend, loop, primitive, texture, dissolve, shape, particle, easing), or an alpha #rrggbbaa palette color is a compile diagnostic. Palette colors are opaque #rrggbb; fade with alpha curves. Curve easings are linear, ease_in, ease_out, ease_in_out, and snap.

Root contract

Declaration / field Contract
duration Effect duration in seconds (for example 0.65s)
fps Integer playback sample rate
loop once or loop
palette Palette reference (pal.Name) or inline palette { core = #...; mid = #...; edge = #...; smoke = #...; }
import Shared palette module (import "../module/palettes.ashfox" as pal;)
preview Named capture views (time, sheet = flipbook, `background = dark
element <id> : <primitive> Procedural geometry element (slash_arc, ribbon, ring, beam, dome)
emitter <id> : voxel_burst Deterministic particle simulation emitter

Geometric elements (element <id> : <primitive>)

Common properties inside element: at = <start>..<end>;, blend = additive | blend | premul;, texture <kind> { ... }, dissolve <mode> { ... }, position, rotation, spin, scale, alpha, color = core | mid | edge | smoke;.

  • Primitives:
    • : slash_arc — radius = inner..outer;, arc = startDeg..endDeg;, pitch, segments, tip_taper, crossed
    • : ribbon — points = [(x, y, z), ...];, width_start, width_end, profile = crossed | tube;
    • : ring — radius = inner..outer;, segments, bevel, ripple_amp, ripple_freq
    • : beam — start = (x, y, z);, end = (x, y, z);, width, style = column | lightning;, jagged, forks, fork_depth, seed
    • : dome — shape = hemisphere | sphere | cone | torus;, radius, inner_radius, height, subdiv = 1 | 2;
  • Procedural textures (texture <kind>): slash_streak, radial_flare, starburst, ring_wave, magic_circle, stylized_smoke (width, height, posterize, bristles, spikes, runes, rings, curl_scale, tint, seed).
  • Dissolve strips (dissolve <mode>): voronoi, simplex, directional_wipe, radial_noise (frames, edge_width, edge_glow = core | mid | edge | smoke;, direction, seed).

Particle emitters (emitter <id> : voxel_burst)

Inside emitter: at = <start>..<end>;, seed, count, shape (point, cone(angle, radius), sphere(radius), ring(radius[, inner]), box(x, y, z), arc(sweep, radius); angles take deg, lengths take u, and omitted arguments use the same defaults as the bare name), particle = voxel_cube | shard | puff | cross_card;, speed = min..max;, life = min..max;, gravity, drag, turbulence = curl(freq, amp);, vortex { axis; center; strength; radial_pull; }, ground { y; bounce; friction; }, size_over_life, color_over_life, velocity_stretch, spin_speed, and blend = additive | blend | premul;. at is the emission window: particle i of count is born in the i-th equal slice of start..end (seeded jitter), so emission is continuous across the window; start..start is a single burst. The window must lie inside 0..duration (the build rejects one that does not). Each particle lives its full authored life and size_over_life / color_over_life follow that life: with loop = once a life that runs past the clip end is cut there, and with loop = loop the overflow wraps to t = 0 so the seam is continuous (a looping emitter's maximum life must not exceed duration). size_over_life is exported as a linear scale track, so shrink and grow curves survive in the .glb.

See VFX creation and review for authoring workflow, flipbook capture, and delivery details.

Ready to make something? Get agent instructions →