Renderables
Sector
A pie slice of a circle, such as a semicircle.
Object type renderable pins
A sector is the part of a circle of radius around its position between
startAngle and endAngle, closed through the centre like a pie slice: a
semicircle is a sector spanning π. Like every Shape,
it has a fill and a stroke.
Hierarchy
- Parents
Shape→Renderable- Subtypes
- None
Properties
| Name | Type | Notes |
|---|---|---|
| position | Point | from Renderable |
| rotation | number | from Renderable |
| scale | number | from Renderable |
| opacity | number | read-only from Renderable |
| blendMode | BlendMode | read-only from Renderable |
| fill | Paint | from Shape |
| stroke | Stroke | from Shape |
| radius | number | |
| startAngle | number | |
| endAngle | number |
Nodes
Break Sector
Node id break/Sector
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Sector | type default |
Outputs
Make Sector
Node id make/Sector
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| position | Point | { x: 0, y: 0 } | |
| rotation | number | 0 | |
| scale | number | 1 | |
| fill | Paint | { r: 128, g: 128, b: 128, a: 1 } | |
| stroke | Stroke | { width: 1, color: { r: 0, g: 0, b: 0, a: 1 }, dashStyle: "SOLID", caps: "round" } | |
| radius | number | 100 | |
| startAngle | number | 0 | |
| endAngle | number | 2.0943951023931953 |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Sector |
Set Sector
Node id set/Sector
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Sector | type default | |
| position | Point | — | |
| rotation | number | — | |
| scale | number | — | |
| fill | Paint | — | |
| stroke | Stroke | — | |
| radius | number | — | |
| startAngle | number | — | |
| endAngle | number | — |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Sector |
Lerp Sector
Node id lerp/Sector
Inputs
Outputs
| Name | Type | Notes |
|---|---|---|
| result | Sector |
Notes
- Units. Angles are in radians, 0 pointing right and growing clockwise (the page's y axis points down), like an Arc's. A sector and an arc with the same radius, angles and position line up.
- Semicircles.
startAngle0 andendAngleπ give the lower half, π and 2π the upper half, π/2 and 3π/2 the left half. - Span. The arc always goes clockwise from
startAngle: anendAnglebelowstartAnglegoes the long way round (0 to -π/2 gives three quarters of the circle). Equal angles, or a radius of 0 or less, draw nothing. - Whole turns. A span of 2π or more is the whole disk, never more than one turn. Its stroke still draws the radius from the centre to the start, so a sector growing to a full turn changes smoothly. For a disk without that line, use a Circle.
- Default. Make Sector gives a wedge of radius 100 from 0 to 2π/3 (120°).
- Path nodes. The outline starts at the centre (
t= 0), goes out to the start of the arc, around it, and back: equal steps oftare equal distances along it. Length is 2 ×radiusplus the arc. Segments doesn't work on sectors. - Pie charts. Each slice starts where the previous one ends: chain the
endAngleof one into thestartAngleof the next.
Lerp
Lerp Sector blends the radius, both angles, the transform, fill and stroke.
t is clamped to 0, 1.