Prism

A beam of light that fans out and splits into a slowly-rotating rainbow past a controllable point. Transparent background — composite over a dark layer.

Props

  • position

    Where the beam originates

    Type
    {x: number, y: number}
    Default
    {"x":0.18,"y":0.18}
  • beamWidth

    Thickness of the white beam

    Type
    number
    Default
    0.04
  • intensity

    Brightness (above 1 blows the core to white)

    Type
    number
    Default
    1.6
  • beamColor

    color of the beam before it splits

    Type
    string
    Default
    #ffffff
  • startFalloff

    How softly the beam fades in at its source

    Type
    number
    Default
    0.15
  • endFalloff

    How quickly the rainbow fades out with distance

    Type
    number
    Default
    0.6
  • splitPosition

    Where the beam starts to fan out and split (projected onto the beam axis)

    Type
    {x: number, y: number}
    Default
    {"x":0.5,"y":0.42}
  • spread

    How widely the rainbow diffuses as it travels past the split point

    Type
    number
    Default
    0.7
  • softness

    How quickly the white beam transitions into the rainbow

    Type
    number
    Default
    0.12
  • saturation

    Rainbow saturation — 0 = white, 1 = full color

    Type
    number
    Default
    0.95
  • speed

    Speed the hue slowly rotates through the rainbow (0 = static)

    Type
    number
    Default
    0.1

Usage

<Shader>
  <Prism
    intensity={1.6}
  />
</Shader>