Flower
Petal shape with N lobes and adjustable inner-to-outer radius ratio
Petal shape with N lobes and adjustable inner-to-outer radius ratio
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | color | #ffffff | Fill color of the flower |
| center | position | {"x":0.5,"y":0.5} | Center position of the flower |
| radius | range | 0.4 | Outer petal tip radius in UV space |
| sides | range | 5 | Number of petals |
| innerRatio | range | 0.4 | Inner valley radius as a ratio of outer radius - lower values make deeper notches |
| rotation | range | 0 | Rotation in degrees |
| softness | range | 0 | Edge softness for antialiasing |
| strokeThickness | range | 0 | Stroke thickness. Zero means no stroke. |
| strokeColor | color | #000000 | Color of the stroke outline |
| strokePosition | "outside" | "center" | "inside" | center | Position of the stroke relative to the shape edge |
| colorSpace | "linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch" | linear | Color space for blending fill and stroke colors |
Usage
vue
<Shader>
<Flower
color="#ffffff"
:radius="0.4"
/>
</Shader>