물방울

Teardrop

둥근 몸통에서 뾰족한 끝으로 이어지는 물방울 실루엣입니다.

다른 이름: TeardropDrop shape

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

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

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

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

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

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

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <Teardrop />
    </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: 'Teardrop',
    }
  ]
}, { disableTelemetry: true })

속성(props) · Teardrop

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

이름값기본값범위·선택지설명(원문)
originOrigin코드에서 지정center—Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.
colorColor#ffffff—Fill color of the teardrop
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1Center position of the teardrop
radiusWidth0.220.02 – 0.6 (step 0.01)Radius of the rounded bulb
heightLength0.40.1 – 0.7 (step 0.01)Length from the bulb to the point
rotationRotation00 – 360 (step 1)Rotation in degrees
softnessSoftness00 – 0.1 (step 0.001)Edge softness for antialiasing
strokeThicknessStroke Thickness00 – 0.2 (step 0.005)Stroke thickness. Zero means no stroke.
strokeColorStroke Color#000000—Color of the stroke outline
strokePositionStroke Positioncenteroutside · center · insidePosition of the stroke relative to the shape edge
colorSpaceColor Blendinglinearlinear · oklch · oklab · hsl · hsv · lchColor space for blending fill and stroke colors

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

물방울은 둥근 몸통과 한쪽의 뾰족한 끝이 이어진 도형입니다. 위치 핀이나 액체·비·눈물 표시처럼 방향이 있는 표식으로 알아보기 쉽습니다.

`radius`는 둥근 몸통의 반지름으로 0.02–0.6 범위입니다. `height`는 몸통에서 끝까지의 길이로 0.1–0.7 범위이고, `rotation`은 0–360도 사이에서 끝의 방향을 바꿉니다. `softness`는 0–0.1 범위에서 가장자리를 부드럽게 합니다.

`height`는 전체 도형 높이가 아니라 몸통에서 끝까지의 길이입니다. 지도 핀처럼 쓸 때는 뾰족한 끝이 가리키는 위치를 고려하고, `Circle`이나 `Heart`와 겹쳐 장식할 때는 끝 방향이 가려지지 않게 하세요.

언제 쓰나

지도 위치 핀·비나 눈물 표시·방향이 있는 배지에 좋습니다. 둥근 면과 뾰족한 끝을 함께 보여 주어 시선을 유도할 수 있습니다. 좌우 대칭이나 끝이 없는 원형이 필요하면 피하세요.

페이지로 열기 ↗