Ripples

물결무늬

Concentric animated ripples emanating from a point.

Also known as: RipplesConcentric ripples

Moves in browsers that support WebGPU

This device could not render the demo — showing a still

React
// Renders only in browsers with WebGPU.
import { Shader, Ripples } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <Ripples />
    </Shader>
  )
}
Vue
<!-- Renders only in browsers with WebGPU. -->
<script setup lang="ts">
import { Shader, Ripples } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <Ripples/>
  </Shader>
</template>
Svelte
<!-- Renders only in browsers with WebGPU. -->
<script>
  import { Shader, Ripples } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <Ripples />
</Shader>
Solid
// Renders only in browsers with WebGPU.
import { Shader, Ripples } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <Ripples />
    </Shader>
  )
}
JavaScript
// Renders only in browsers with WebGPU.
// expects <canvas id="canvas" style="width:100%;height:320px"></canvas> on the page
import { createShader } from 'shaders/js'

const shader = await createShader(document.getElementById("canvas"), {
  components: [
    {
      type: 'Ripples',
    }
  ]
}, { disableTelemetry: true })

Props · Ripples

Changes apply to the demo above and to the code tabs. Descriptions come from the library registry (MIT).

NameValueDefaultRange / optionsDescription
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1The center point where ripples emanate from
colorAColor A#ffffff—Color of the ripple waves
colorBColor B#000000—Background color between ripples
speedSpeed1-5 – 5 (step 0.1)Speed of ripple animation
frequencyFrequency201 – 80 (step 0.1)Number of ripples/spacing between them
softnessSoftness00 – 3 (step 0.1)Softness of ripple edges
thicknessThickness0.50 – 1 (step 0.1)Thickness of each ripple band
phasePhase00 – 6.28 (step 0.1)Phase offset for ripple animation

Every component also takes blendMode · opacity · visible · maskSource/maskType · boundingBox · id

It looks like the rings that spread after a pebble lands in still water: circular bands radiate from a center.

Move the origin with `center` and set ring spacing with `frequency` from 1–80. `thickness` from 0–1 changes band width, `softness` from 0–3 feathers its edges, and `speed` from -5–5 controls motion direction and pace.

Ripples draws a pattern; it does not refract an image beneath it. Use it as decoration over a dark background, and check that its generated background color does not cover a photo when layering it there.

When to use

Use it for a water or wave inspired background, a decorative click focus, or a hero that needs slow circular motion. Avoid it when you need to distort a photo or simulate a real water surface.

Open as page ↗