Creates an animated flame SVG visualization whose size and color gradient can be customized. The flame grows or shrinks based on the intensity parameter, with smooth pulsing and wobbling animation.

flame(
  intensity = 50,
  flameGradientColors = c("white", "yellow", "darkred"),
  flameOutline = "darkred",
  bgcol = "white",
  width = NULL,
  height = NULL
)

Arguments

intensity

Numeric value controlling the size of the flame. Values greater than 100 cause the flame to grow beyond default scaling, while smaller values shrink it. Defaults to 50.

flameGradientColors

A length-3 character vector specifying the colors of the flame gradient, from the center outward. Defaults to c("white", "yellow", "darkred").

flameOutline

Color string for the flame's outline stroke. Defaults to "darkred".

bgcol

Background color of the SVG canvas. Defaults to "white".

width

Optional width of the SVG output.

height

Optional height of the SVG output.

Value

An r2d3 object displaying the animated flame visualization.

Examples

flame(intensity = 5)
flame(intensity = 50, flameGradientColors = c("lightblue", "blue", "darkblue"), flameOutline = "navy")