Overview
Draws a perfect straight line with a constant step, such as two pixels across and one pixel up. For isometric floor edges, roof slopes, 45° diagonals, and other lines where pixel angle is critical, this is more reliably clean than a Bézier path.
Usage tips
- For 2:1 isometric edges, the golden ratio is
step_x=2, step_y=1. Change direction while keeping it to build all four sides of a diamond. lengthis the number of step repetitions. At 2:1 with length 16, the line travels 32px horizontally.- Choose by line: use this node for regular structural angles; use a hand-drawn bezier_path→path_stroke for free curves.
- To animate a growing line, drive
lengthwithtime_source → remap(see Examples).
Common pitfalls
- The line stops midway: anything beyond the canvas is not drawn. Calculate the end
from
originandlengthand keep it inside the canvas. - An isometric diamond does not close: origin coordinates for all four sides must
agree. Calculate each endpoint as the next side's start using step×length, or consider
an
iso_block-family node.
Canvas-size binding
As a generator node, new nodes automatically bind width / height to the project
canvas dimensions (_canvasWidth / _canvasHeight).
| State | width/height value |
|---|---|
| Default (new node) | Bound to and automatically follows project canvas dimensions |
| Manually entered or unbound | Local value independent of canvas dimensions |
Use the 🔗 button in the inspector to remove or restore the binding.
Step pattern examples
| step_x | step_y | Use |
|---|---|---|
| 2 | 1 | Isometric line (2:1) |
| 1 | 1 | 45-degree diagonal |
| 1 | 2 | Steep slope (1:2) |
| 3 | 1 | Shallow angle |
| 1 | 1 | Horizontal line with direction Right/Left (step_y is ignored) |
| 1 | 1 | Vertical line with direction Up/Down (step_x is ignored) |
Direction
| Value | Symbol | Description |
|---|---|---|
| Right-Up | ↗ | Up and right |
| Right-Down | ↘ | Down and right |
| Left-Up | ↖ | Up and left |
| Left-Down | ↙ | Down and left |
| Right | → | Right (horizontal) |
| Left | ← | Left (horizontal) |
| Up | ↑ | Up (vertical) |
| Down | ↓ | Down (vertical) |
Examples
- PixelLine(2:1, Right-Up) → Blend — edge of an isometric floor
- TimeSource → Remap → PixelLine(length) → AnimationRender — animation of a growing line
- PixelLine(1:1) — clean 45-degree diagonal
Related nodes
line_generate— straight line from two coordinatespath_stroke— pixel-perfect free-curve lineiso_block— build a complete isometric solidrule_polyline— polyline for rule tiles