PixelThrow

Throws pixels along the cursor's path like a fluid — brighter (or redder/greener/bluer) pixels are flung farther, then settle back with friction

Props

  • throwKey

    Which pixel value decides how far a pixel is thrown

    Type
    "luminance" | "darkness" | "red" | "green" | "blue"
    Default
    luminance
  • strength

    Maximum distance pixels can be thrown

    Type
    number
    Default
    0.25
  • keyInfluence

    How much the chosen value modulates throw distance (0 = all pixels thrown equally, 1 = only high-value pixels move)

    Type
    number
    Default
    0.8
  • radius

    Size of the cursor's throw brush

    Type
    number
    Default
    0.2
  • friction

    How quickly thrown pixels settle back to their origin (0 = float almost forever, 1 = snap back fast)

    Type
    number
    Default
    0.3
  • momentum

    How much the thrown flow keeps drifting and swirling after the cursor passes (fluidity)

    Type
    number
    Default
    0.5
  • edges

    How to handle pixels thrown beyond the canvas edges

    Type
    "stretch" | "transparent" | "mirror" | "wrap"
    Default
    stretch

Usage

<Shader>
  <PixelThrow
    radius={0.2}
  >
    <Circle />
  </PixelThrow>
</Shader>