Back to Node ListLine
line_generate
Draws a line between two points using Bresenham's algorithm
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.
Input Ports
| Name | Type | Description |
|---|
色 color | Color | 線の色(接続時はパラメータより優先) |
Output Ports
| Name | Type | Description |
|---|
画像 output | Image | 生成されたライン画像 |
Parameters
| Name | Type | Default | Range | Description / Options |
|---|
幅 width | Int | 64 | 1–1024 | キャンバスの幅(ピクセル) |
高さ height | Int | 64 | 1–1024 | キャンバスの高さ(ピクセル) |
始点X x1 | Int | 0 | 0–1024 | 始点の X 座標 |
始点Y y1 | Int | 0 | 0–1024 | 始点の Y 座標 |
終点X x2 | Int | 63 | 0–1024 | 終点の X 座標 |
終点Y y2 | Int | 63 | 0–1024 | 終点の Y 座標 |
太さ thickness | Int | 1 | 1–64 | 線の太さ(ピクセル) |
色 color | Color | [1,1,1,1] | — | 線の色(入力ポート未接続時に使用) |
キャンバスサイズ連動
ジェネレータノードとして、新規作成時に width / height がプロジェクトのキャンバスサイズ(_canvasWidth / _canvasHeight)に自動バインドされます。
| 状態 |
width/height の値 |
| デフォルト(新規作成時) |
プロジェクトキャンバスサイズにバインド(自動追従) |
| ユーザーが手入力 or バインド解除 |
ローカル値(キャンバスサイズと独立) |
インスペクターの 🔗 ボタンからバインドの解除・再登録ができます。
アルゴリズム
- 1px 太さ: Bresenham のラインアルゴリズム(正確なピクセルライン)
- 2px 以上: Bresenham の各点に円形ブラシを適用
使用例
- LineGenerate → Blend → Preview — 直線の描画
- TimeSource → SineWave → Remap → LineGenerate(x2) → AnimationRender — 線の端点アニメーション
- ColorPicker → LineGenerate(color) — 任意色でライン描画
Back to Node List