Smoke

Realistic fluid smoke simulation with vorticity dynamics

Props

  • colorA

    Color of fresh smoke

    Type
    string
    Default
    #fc83f9
  • colorB

    Color smoke transitions to as it ages

    Type
    string
    Default
    #c21c79
  • stops

    Multi-stop gradient colors (overrides Color A / Color B when set)

    Type
    object
    Default
    null
  • emitFrom

    The emission source point

    Type
    {x: number, y: number}
    Default
    {"x":0.5,"y":1}
  • direction

    Emission direction (0 = up, 90 = right, 180 = down, 270 = left)

    Type
    number
    Default
    0
  • speed

    Emission velocity strength

    Type
    number
    Default
    20
  • spread

    Emission cone angle in degrees

    Type
    number
    Default
    60
  • emitRadius

    Size of the emission area

    Type
    number
    Default
    0.08
  • intensity

    Smoke emission density

    Type
    number
    Default
    1
  • dissipation

    How fast smoke fades over time

    Type
    number
    Default
    0.2
  • detail

    Fine-scale swirling detail

    Type
    number
    Default
    25
  • gravity

    Downward gravitational pull on smoke

    Type
    number
    Default
    0.5
  • colorDecay

    How quickly smoke shifts from Color A to Color B

    Type
    number
    Default
    0.4
  • mouseInfluence

    Strength of cursor influence

    Type
    number
    Default
    0.1
  • mouseRadius

    Radius of cursor influence area

    Type
    number
    Default
    0.1
  • colorSpace

    Color space for color interpolation

    Type
    "linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"
    Default
    linear

Usage

<Shader>
  <Smoke
    intensity={1}
  />
</Shader>