Renderables
Rectangle
A rectangle centred on its position, of a given width and height.
Object type renderable pins
A rectangle is drawn centred on its position, width across and
height high, before any rotation. 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 |
| width | number | |
| height | number |
Nodes
Break Rectangle
Node id break/Rectangle
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Rectangle | type default |
Outputs
Make Rectangle
Node id make/Rectangle
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" } | |
| width | number | 100 | |
| height | number | 100 |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Rectangle |
Set Rectangle
Node id set/Rectangle
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Rectangle | type default | |
| position | Point | — | |
| rotation | number | — | |
| scale | number | — | |
| fill | Paint | — | |
| stroke | Stroke | — | |
| width | number | — | |
| height | number | — |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Rectangle |
Lerp Rectangle
Node id lerp/Rectangle
Inputs
Outputs
| Name | Type | Notes |
|---|---|---|
| result | Rectangle |
Notes
- Default. Make Rectangle gives a 100 × 100 square at the origin.
- Centred. The position is the rectangle's centre, not a corner: to place its top-left corner at a point, move it by half its size.
Lerp
Lerp Rectangle blends the transform, width, height, fill and stroke. t is
clamped to 0, 1.
Related types
- Polygon, for other four-sided shapes.
- BoundingBox, an area rather than a shape.