-
Notifications
You must be signed in to change notification settings - Fork 6
CleanSpline
Juju Adams edited this page Mar 22, 2021
·
5 revisions
Returns: Spline struct
Name | Datatype | Purpose |
---|---|---|
controlPointArray |
array | Array of x/y coordinate pairs for control points for the spline |
segments |
integer | Number of segments to use to build the spline |
N.B. A shape will only draw when you call the .Draw()
method. Splines tend not to cope well with very sharp angles and very short distances so be careful about the geometry you're trying to draw.
Splines have the following methods:
Returns: N/A (undefined
)
Name | Datatype | Purpose |
---|---|---|
None |
Returns: self
Name | Datatype | Purpose |
---|---|---|
color |
24-bit color | Color of the spline |
alpha |
number | Alpha value of the spline |
Returns: self
Name | Datatype | Purpose |
---|---|---|
color1 |
24-bit color | Color of the start of the spline |
alpha1 |
number | Alpha value of the start of the spline |
color2 |
24-bit color | Color of the end of the spline |
alpha2 |
number | Alpha value of the end of the spline |
Returns: self
Name | Datatype | Purpose |
---|---|---|
array |
array | Array of color/alpha pairs to colour the spline |
Multi-vertex blending uses triangle-based interpolation and can look ugly with large differences in colour. Use with caution!
Returns: self
Name | Datatype | Purpose |
---|---|---|
pixels |
number | Width of the line |
Returns: self
Name | Datatype | Purpose |
---|---|---|
startType |
string | Cap type for the start of the line, either "none" , "square" , "round" , or "closed"
|
endType |
string | Cap type for the end of the line, either "none" , "square" , "round" , "closed"
|
If either cap type is "closed"
then the spline will be a closed loop with no caps.
Returns: self
Name | Datatype | Purpose |
---|---|---|
type |
string | Join type, either "none" , "miter" , "bevel" , or "round"
|
@jujuadams 2020