{
  "name": "Realistic Fire",
  "dimension": "3d",
  "slot": "action_bar",
  "width": 256,
  "height": 128,
  "textBaseline": 128,
  "placement": {
    "x": 0,
    "y": 0
  },
  "shapes": [],
  "texts": [],
  "heads": [],
  "images": [],
  "bars": [],
  "triggers": [],
  "world": {
    "glsl": "const int STATE_BURNING = 0;\n\nfloat fireNoise(vec3 p) {\n    vec3 cell = floor(p);\n    vec3 f = fract(p);\n    f = f * f * (3.0 - 2.0 * f);\n    float a = dot(cell, vec3(1.0, 57.0, 113.0));\n    vec4 x = fract(sin(a + vec4(0.0, 1.0, 57.0, 58.0)) * 43758.5453);\n    vec4 y = fract(sin(a + vec4(113.0, 114.0, 170.0, 171.0)) * 43758.5453);\n    vec4 z = mix(x, y, f.z);\n    return mix(mix(z.x, z.y, f.x), mix(z.z, z.w, f.x), f.y);\n}\n\nvec4 object(vec3 ro, vec3 rd, float t0, float t1, float time, vec3 light, inout float depth) {\n    float clock = time + rpw_seed * 1.37;\n    float start = t0;\n    float end = t1;\n    float aa = dot(rd.xz, rd.xz);\n    float bb = dot(ro.xz, rd.xz);\n    float cc = dot(ro.xz, ro.xz) - 0.25;\n    float disc = bb * bb - aa * cc;\n    if (aa > 0.00001) {\n        if (disc < 0.0) return vec4(0.0);\n        float root = sqrt(disc);\n        start = max(start, (-bb - root) / aa);\n        end = min(end, (-bb + root) / aa);\n    }\n    if (abs(rd.y) > 0.00001) {\n        float ya = (-0.77 - ro.y) / rd.y;\n        float yb = (0.86 - ro.y) / rd.y;\n        start = max(start, min(ya, yb));\n        end = min(end, max(ya, yb));\n    }\n    if (end <= start) return vec4(0.0);\n    float stepLen = (end - start) / 32.0;\n    vec3 sum = vec3(0.0);\n    float alpha = 0.0;\n    bool found = false;\n    for (int i = 0; i < 32; i++) {\n        float t = start + (float(i) + 0.5) * stepLen;\n        vec3 p = ro + rd * t;\n        float h = (p.y + 0.76) / 1.52;\n        if (h > 0.0 && h < 1.06 && dot(p,p) < 0.8836) {\n            vec2 drift = vec2(sin(h * 7.2 - clock * 2.0), sin(h * 9.5 - clock * 1.6 + 2.0)) * (0.012 + h * 0.075);\n            vec3 q = vec3(p.x - drift.x, p.y, p.z - drift.y);\n            float central = 0.255 * (1.0 - h) - length(q.xz - vec2(-0.08 * h, 0.015));\n            float tongueA = 0.175 * (1.0 - h / 0.78) - length(q.xz - vec2(0.19, 0.09 + h * 0.06));\n            float tongueB = 0.17 * (1.0 - h / 0.70) - length(q.xz - vec2(-0.12, -0.18));\n            float envelope = max(central, max(tongueA, tongueB));\n            float roughness = 0.36 + h * 0.13;\n            if (envelope + 0.57 * roughness < -0.028) continue;\n            vec3 flow = q * vec3(10.0, 4.5, 10.0) - vec3(0.0, clock * 3.0, 0.0);\n            float n = fireNoise(flow);\n            if (envelope + ((n - 0.5) * 0.72 + 0.21) * roughness < -0.028) continue;\n            float fine = fireNoise(flow * 2.73 + vec3(n * 1.4, -clock * 1.1, n * 1.4 + 9.0));\n            float turbulence = (n - 0.5) * 0.72 + (fine - 0.5) * 0.42;\n            float field = envelope + turbulence * roughness;\n            float fire = smoothstep(-0.028, 0.038, field) * (1.0 - 0.62 * smoothstep(0.04, 0.19, field));\n            fire *= smoothstep(0.0, 0.035, h) * (1.0 - smoothstep(0.84, 1.05, h));\n            float heat = clamp(field * 2.5 + (1.0 - h) * 0.60 + fine * 0.20, 0.0, 1.0);\n            float hot2 = heat * heat;\n            vec3 color = vec3(1.8, 0.17 + 1.26 * hot2, 0.008 + 0.78 * hot2 * hot2 * hot2);\n            float a = 1.0 - exp(-fire * 9.0 * stepLen);\n            sum += (1.0 - alpha) * color * a;\n            alpha += (1.0 - alpha) * a;\n            if (!found && alpha > 0.3) { depth = t; found = true; }\n            if (alpha > 0.987) break;\n        }\n    }\n    for (int j = 0; j < 6; j++) {\n        float id = float(j);\n        float cycle = fract(clock * (0.24 + id * 0.007) + id * 0.618);\n        float ang = id * 2.4 + clock * 0.35;\n        vec3 center = vec3(sin(ang) * (0.17 + cycle * 0.15) + sin(cycle * 8.0 + id) * 0.06, -0.48 + cycle * 1.24, cos(ang) * (0.17 + cycle * 0.13));\n        float along = clamp(dot(center - ro, rd), t0, t1);\n        vec3 delta = ro + rd * along - center;\n        float d2 = dot(delta * vec3(1.0, 0.5, 1.0), delta * vec3(1.0, 0.5, 1.0));\n        float spark = exp(-d2 / 0.000024) * sin(cycle * 3.14159);\n        if (spark > 0.002) {\n            sum += vec3(1.6, 0.5, 0.035) * spark * (1.0 - alpha * 0.8);\n            alpha = max(alpha, spark * 0.8);\n            if (!found && spark > 0.3) { depth = along; found = true; }\n        }\n    }\n    if (!found) depth = clamp(dot(-ro + vec3(0.0, -0.15, 0.0), rd), t0, t1);\n    return vec4(sum / max(alpha, 0.0001), alpha);\n}",
    "prompt": "Realistic fire",
    "size": 3,
    "summary": "Volumetric fire with a brilliant golden base, turbulent orange flame tongues, translucent wisps, and gently rising embers."
  }
}