부채꼴

Arc

중심에서 바깥쪽으로 펼쳐지는 부채꼴의 반지름과 열림 각도를 조절합니다.

다른 이름: ArcPie sectorWedge

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

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

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

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

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

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

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

속성(props) · Arc

값을 바꾸면 위 데모와 코드 탭에 바로 반영됩니다. 설명은 라이브러리 레지스트리의 영어 원문(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 arc
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1Center position of the arc
radiusSize0.380 – 1 (step 0.01)Radius of the pie sector
apertureAperture2700 – 360 (step 1)Aperture angle of the wedge in degrees (360 = full circle)
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–1 범위입니다. `aperture`는 열림 각도이며 0–360도 범위이고 360이면 원 전체가 됩니다. `rotation`은 0–360도 사이에서 열린 방향을 돌리고, `softness`는 0–0.1 범위에서 경계를 부드럽게 합니다.

이 도형은 가는 곡선 호가 아니라 중심까지 채워지는 쐐기입니다. 얇은 원호가 필요하면 `Ring`의 띠를 좁게 쓰거나 별도 선 조합을 고려하고, `Circle`과 겹칠 때는 덮이는 순서를 살펴보세요.

언제 쓰나

파이 차트 조각·방사형 진행 구간·각도 강조에 좋습니다. 중심을 향해 열린 컬러 블록을 만들 수 있습니다. 중심이 비어 있는 가는 곡선만 필요하면 피하세요.

페이지로 열기 ↗