ProceduralNodeSpawnCurve
Inherits: ProceduralNode < Resource < Shared < Object
Draws a line through the points: Line2D, Path2D or Path3D.
Description
Section titled “Description”Roads, rivers, fences: a Line2D (or a Path2D with NODE_PATH) in 2D, a Path3D in 3D, through the points that reach it, in their order or by order_attribute. Points with another value of group_attribute make another line: with a ProceduralNodeCurveSampler whose ProceduralNodeCurveSampler.curve_attribute and ProceduralNodeCurveSampler.distance_attribute are set, each curve of the graph becomes a line. At runtime each cell draws its part.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| bool | closed | false |
| Color | color | Color(1, 1, 1, 1) |
| StringName | group_attribute | &"" |
| int | node_type | 0 |
| StringName | order_attribute | &"" |
| Texture2D | texture | |
| float | width | 8.0 |
Enumerations and constants
Section titled “Enumerations and constants”- NODE_LINE =
0— A Line2D.
- NODE_PATH =
1— A Path2D.
Property descriptions
Section titled “Property descriptions”closed
Section titled “closed”bool closed = false
Setter/getter: set_closed(), get_closed()
Joins the last point to the first.
Color color = Color(1, 1, 1, 1)
Setter/getter: set_color(), get_color()
The colour of a Line2D.
group_attribute
Section titled “group_attribute”StringName group_attribute = &""
Setter/getter: set_group_attribute(), get_group_attribute()
Points with the same value make one line. Empty: one line.
node_type
Section titled “node_type”int node_type = 0
Setter/getter: set_node_type(), get_node_type()
In 2D, what it makes: a Line2D (seen) or a Path2D (to follow). In 3D, always a Path3D.
order_attribute
Section titled “order_attribute”StringName order_attribute = &""
Setter/getter: set_order_attribute(), get_order_attribute()
The order of the points along the line (for example the distance along the curve). Empty: as they come.
texture
Section titled “texture”Texture2D texture
Setter/getter: set_texture(), get_texture()
A texture tiled along a Line2D.
float width = 8.0
Setter/getter: set_width(), get_width()
The width of a Line2D.