꽃 모양

Flower

꽃잎 수와 안쪽 골의 깊이를 조절하는 방사형 꽃 모양입니다.

다른 이름: FlowerPetal shapeRosette

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

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

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

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

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

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

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

속성(props) · Flower

값을 바꾸면 위 데모와 코드 탭에 바로 반영됩니다. 설명은 라이브러리 레지스트리의 영어 원문(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 flower
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1Center position of the flower
radiusRadius0.40 – 1 (step 0.01)Outer petal tip radius in UV space
sidesPetals53 – 12 (step 1)Number of petals
innerRatioInner Ratio0.40.1 – 0.95 (step 0.01)Inner valley radius as a ratio of outer radius — lower values make deeper notches
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

꽃 모양 도형은 중심을 둘러싼 둥근 꽃잎이 반복되는 실루엣입니다. 배지나 장식 패턴에 부드러운 방사형 리듬을 더합니다.

`sides`는 꽃잎 수로 3–12 범위입니다. `radius`는 바깥 꽃잎 끝까지의 거리이며 0–1 범위이고, `innerRatio`는 안쪽 골 반지름의 비율로 0.1–0.95 범위입니다. 낮은 `innerRatio`일수록 골이 깊어지며, `rotation`은 0–360도 사이에서 방향을 바꿉니다.

꽃잎 수가 많고 골이 깊으면 작은 크기에서 외곽이 복잡해질 수 있습니다. `Star`와 함께 두면 뾰족한 별과 둥근 꽃잎의 대비를 만들고, 배경에서는 색 대비를 낮춰 장식이 본문을 가리지 않게 하세요.

언제 쓰나

꽃잎 배지·장식 패턴·부드러운 방사형 강조에 좋습니다. 점 형태의 스티커나 중심을 향하는 장식에도 쓸 수 있습니다. 작은 크기에서 외곽의 세부가 뭉개지면 피하세요.

페이지로 열기 ↗