물결 와이프

Ripple Wipe

동심원 물결이 중심에서 퍼지며 입력 화면을 지웁니다.

다른 이름: RippleWiperipple transition

WebGPU 를 지원하는 브라우저에서 움직입니다

이 기기에서는 데모를 그리지 못해 정지 화면을 보여 줍니다

React
// WebGPU 를 지원하는 브라우저에서만 그립니다.
// /samples/… 는 이 사이트의 샘플 파일입니다. 내 프로젝트의 이미지·영상 경로로 바꾸세요.
import { Shader, ImageTexture, RippleWipe } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <ImageTexture
        objectFit="cover"
        url="/samples/still.jpg" />
      <RippleWipe
        progress={{
          type: "auto-animate",
          mode: "ping-pong",
          outputMin: 0,
          outputMax: 1,
          speed: 0.5
        }}>
        <ImageTexture
          objectFit="cover"
          url="/samples/photo.jpg" />
      </RippleWipe>
    </Shader>
  )
}
Vue
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<!-- /samples/… 는 이 사이트의 샘플 파일입니다. 내 프로젝트의 이미지·영상 경로로 바꾸세요. -->
<script setup lang="ts">
import { Shader, ImageTexture, RippleWipe } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <ImageTexture
      object-fit="cover"
      url="/samples/still.jpg"/>
    <RippleWipe
      :progress="{
        type: 'auto-animate',
        mode: 'ping-pong',
        outputMin: 0,
        outputMax: 1,
        speed: 0.5
      }">
      <ImageTexture
        object-fit="cover"
        url="/samples/photo.jpg"/>
    </RippleWipe>
  </Shader>
</template>
Svelte
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<!-- /samples/… 는 이 사이트의 샘플 파일입니다. 내 프로젝트의 이미지·영상 경로로 바꾸세요. -->
<script>
  import { Shader, ImageTexture, RippleWipe } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <ImageTexture
    objectFit="cover"
    url="/samples/still.jpg" />
  <RippleWipe
    progress={{
      type: "auto-animate",
      mode: "ping-pong",
      outputMin: 0,
      outputMax: 1,
      speed: 0.5
    }}>
    <ImageTexture
      objectFit="cover"
      url="/samples/photo.jpg" />
  </RippleWipe>
</Shader>
Solid
// WebGPU 를 지원하는 브라우저에서만 그립니다.
// /samples/… 는 이 사이트의 샘플 파일입니다. 내 프로젝트의 이미지·영상 경로로 바꾸세요.
import { Shader, ImageTexture, RippleWipe } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <ImageTexture
        objectFit="cover"
        url="/samples/still.jpg" />
      <RippleWipe
        progress={{
          type: "auto-animate",
          mode: "ping-pong",
          outputMin: 0,
          outputMax: 1,
          speed: 0.5
        }}>
        <ImageTexture
          objectFit="cover"
          url="/samples/photo.jpg" />
      </RippleWipe>
    </Shader>
  )
}
JavaScript
// WebGPU 를 지원하는 브라우저에서만 그립니다.
// /samples/… 는 이 사이트의 샘플 파일입니다. 내 프로젝트의 이미지·영상 경로로 바꾸세요.
// <canvas id="canvas" style="width:100%;height:320px"></canvas> 가 페이지에 있어야 한다
import { createShader } from 'shaders/js'

const shader = await createShader(document.getElementById("canvas"), {
  components: [
    {
      type: 'ImageTexture',
      props: {
        objectFit: 'cover',
        url: '/samples/still.jpg',
      },
    },
    {
      type: 'RippleWipe',
      props: {
        progress: {
          type: 'auto-animate',
          mode: 'ping-pong',
          outputMin: 0,
          outputMax: 1,
          speed: 0.5
        },
      },
      children: [
        {
          type: 'ImageTexture',
          props: {
            objectFit: 'cover',
            url: '/samples/photo.jpg',
          },
        },
      ],
    }
  ]
}, { disableTelemetry: true })

속성(props) · RippleWipe

값을 바꾸면 위 데모와 코드 탭에 바로 반영됩니다. 설명은 라이브러리 레지스트리의 영어 원문(MIT)입니다.

이름값기본값범위·선택지설명(원문)
progressProgress데모에서 자동으로 오가는 값 — 움직이면 그 값에 고정됩니다0.50 – 1 (step 0.01)How far the ripple has expanded (0 = fully visible, 1 = fully wiped away)
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1Point the rings expand from
ringsRings82 – 40 (step 1)Number of concentric rings
featherFeather0.20 – 1 (step 0.01)How softly adjacent rings' timing overlaps (0 = discrete ring pops)
invertInvertfalse—Wipe from the outside inward instead

모든 컴포넌트 공통: blendMode · opacity · visible · maskSource/maskType · boundingBox · id

물에 떨어진 물방울처럼 동심원이 번져 나가며 장면을 덮습니다. 한 번에 사라지는 대신 원형 파동이 차례로 지나갑니다.

`progress`는 기본 0.5, 범위 0–1이고 `center`는 기본 {x: 0.5, y: 0.5}로 파동의 시작점입니다. `rings`는 기본 8, 범위 2–40으로 동심원 수를 정하며, `feather`는 기본 0.2, 범위 0–1로 이웃한 링 사이의 겹침을 조절합니다. `invert`는 기본 false로 바깥에서 안쪽으로 지웁니다.

이미지나 영상 입력을 효과 아래에 놓고, 장면 전환에서는 새 화면을 더 아래 레이어에 둔 뒤 progress를 애니메이션하세요. 링 수가 많으면 반복이 촘촘해지고, feather가 낮으면 링이 각각 튀어 보여 화면이 산만할 수 있습니다.

언제 쓰나

물방울이나 파동을 떠올리게 하는 장면 전환, 중심에서 퍼지는 인트로, 원형 그래픽과 맞춘 효과에 좋습니다. 잔잔하고 거의 움직임이 없는 화면에는 피하세요.

페이지로 열기 ↗