나선 패턴

Spiral

중심에서 감겨 나가는 선이 회전하며 움직이는 나선 무늬입니다.

다른 이름: Spiral스파이럴

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

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

React
// WebGPU 를 지원하는 브라우저에서만 그립니다.
import { Shader, Spiral } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <Spiral />
    </Shader>
  )
}
Vue
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<script setup lang="ts">
import { Shader, Spiral } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <Spiral/>
  </Shader>
</template>
Svelte
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<script>
  import { Shader, Spiral } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <Spiral />
</Shader>
Solid
// WebGPU 를 지원하는 브라우저에서만 그립니다.
import { Shader, Spiral } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <Spiral />
    </Shader>
  )
}
JavaScript
// WebGPU 를 지원하는 브라우저에서만 그립니다.
// <canvas id="canvas" style="width:100%;height:320px"></canvas> 가 페이지에 있어야 한다
import { createShader } from 'shaders/js'

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

속성(props) · Spiral

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

이름값기본값범위·선택지설명(원문)
colorAColor A#000000—Background color
colorBColor B#ffffff—Spiral stroke color
strokeWidthStroke Width0.50 – 2 (step 0.1)Thickness of spiral stroke
strokeFalloffStroke Falloff00 – 1 (step 0.1)Stroke losing width further from center
softnessSoftness00 – 1 (step 0.1)Color transition sharpness (0 = hard edge, 1 = smooth fade)
speedSpeed1-3 – 3 (step 0.1)Animation speed (negative values reverse direction)
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1The center point of the spiral
scaleScale10.1 – 5 (step 0.1)Scale factor for spiral bands (higher = more bands, lower = fewer bands)
colorSpaceColor Spacelinearlinear · oklch · oklab · hsl · hsv · lchColor space for color interpolation

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

팽이의 자국이나 소라 껍데기처럼 중심을 감싸며 바깥으로 이어지는 선이 보입니다. 선이 회전하면 정적인 방사형 무늬보다 강한 움직임을 줍니다.

`center`로 나선의 중심을 옮기고 `scale`을 올리면 감기는 띠가 더 많아집니다. `strokeWidth`는 선의 굵기, `strokeFalloff`는 중심에서 멀어질 때 선이 가늘어지는 정도를 조절합니다. `speed`는 회전 속도이며 음수면 반대 방향으로 돕니다.

`speed`의 기본값은 1이라 움직이는 상태로 시작합니다. 이 생성형 패턴에는 입력 레이어가 필요 없습니다. 빠른 회전은 시선을 붙잡으므로 글 뒤에 두지 말고, 차분한 배경이 필요하면 `speed`를 낮추거나 0으로 두세요.

언제 쓰나

시선을 중심으로 모으는 배경, 추상적인 전환 장면, 회전감을 보여 주는 짧은 인트로에 좋습니다. 빠른 회전이 멀미나 읽기 방해를 일으킬 수 있는 곳은 피하세요.

페이지로 열기 ↗