Path2D
Memory category | Instances |
---|
Member index 24
Removed member index 7
History | Member | |
---|---|---|
613 | AbsoluteSize: Vector2 | |
621 | Color: Color3 | |
616 | ControlPointLeftTangent: UDim2 | |
616 | ControlPointPosition: UDim2 | |
616 | ControlPointRightTangent: UDim2 | |
621 | Position: UDim2 | |
621 | GetBoundingRect2D(): Rect |
Description
History 68
- 634 Add ControlPointChanged
- 634 Add GetMaxControlPoints
- 634 Change Security of GetLength from RobloxScriptSecurity to None
- 634 Add Closed
- 630 Change Tags of Path2D from [NotBrowsable] to []
- 621 Remove GetBoundingRect2D
- 621 Add GetBoundingRect
- 621 Remove Position
- 621 Add Color3
- 621 Remove Color
- 616 Add SelectedControlPointData
- 616 Remove ControlPointRightTangent
- 616 Remove ControlPointPosition
- 616 Remove ControlPointLeftTangent
- 616 Change Tags of Path2D from [] to [NotBrowsable]
- 614 Add GetLength
- 614 Change ReadSecurity of Thickness from RobloxScriptSecurity to None
- 614 Change WriteSecurity of Thickness from RobloxScriptSecurity to None
- 614 Change Tags of Path2D from [NotBrowsable] to []
- 613 Change Security of UpdateControlPoint from RobloxScriptSecurity to None
- 613 Change Security of SetControlPoints from RobloxScriptSecurity to None
- 613 Change Security of RemoveControlPoint from RobloxScriptSecurity to None
- 613 Change Security of InsertControlPoint from RobloxScriptSecurity to None
- 613 Change Security of GetTangentOnCurveArcLength from RobloxScriptSecurity to None
- 613 Change Security of GetTangentOnCurve from RobloxScriptSecurity to None
- 613 Change Security of GetPositionOnCurveArcLength from RobloxScriptSecurity to None
- 613 Change Security of GetPositionOnCurve from RobloxScriptSecurity to None
- 613 Change Security of GetControlPoints from RobloxScriptSecurity to None
- 613 Change Security of GetControlPoint from RobloxScriptSecurity to None
- 613 Change ReadSecurity of ZIndex from RobloxScriptSecurity to None
- 613 Change WriteSecurity of ZIndex from RobloxScriptSecurity to None
- 613 Change WriteSecurity of Visible from RobloxScriptSecurity to None
- 613 Change ReadSecurity of Visible from RobloxScriptSecurity to None
- 613 Change Default of SelectedControlPoint from 0 to 1
- 613 Add
- 613 Change ReadSecurity of Position from RobloxScriptSecurity to None
- 613 Change WriteSecurity of Position from RobloxScriptSecurity to None
- 613 Add ControlPointRightTangent
- 613 Add ControlPointPosition
- 613 Add ControlPointLeftTangent
- 613 Change WriteSecurity of Color from RobloxScriptSecurity to None
- 613 Change ReadSecurity of Color from RobloxScriptSecurity to None
- 613 Remove AbsoluteSize
- 613 Change Tags of Path2D from [NotReplicated] to [NotBrowsable]
- 611 Add UpdateControlPoint
- 611 Add RemoveControlPoint
- 611 Add InsertControlPoint
- 611 Add GetControlPoint
- 610 Add GetBoundingRect2D
- 610 Add ZIndex
- 604 Add Transparency
- 603 Remove Transparency
- 604 Add Transparency
- 602 Add GetTangentOnCurveArcLength
- 602 Add GetTangentOnCurve
- 602 Add GetSegmentCount
- 602 Add GetPositionOnCurveArcLength
- 602 Add GetPositionOnCurve
- 602 Change Category of Visible from Appearance to Data
- 602 Add Thickness
- 602 Add Color
- 601 Add SetControlPoints
- 601 Add GetControlPoints
- 601 Add Visible
- 601 Add SelectedControlPoint
- 601 Add Position
- 601 Add AbsoluteSize
- 601 Add Path2D
Members 24
Closed
Type | Default | |
---|---|---|
bool | false |
Connects the first and last control points when enabled.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
Color3
Type | Default | |
---|---|---|
Color3 | 0, 0, 0 |
Determines the Color of the Path2D.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
ControlPointChanged
Parameters (0) | ||
---|---|---|
No parameters. |
Fires any time control points change.
Thread safety | Unsafe |
---|
History 1
GetBoundingRect
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Rect |
Returns the Rect bounding size for the Path2D. This is computed based on the control points and is not modifiable outside of changing the control point data.
Thread safety | Unsafe |
---|
History 1
- 621 Add GetBoundingRect
GetControlPoint
Parameters (1) | ||
---|---|---|
index | int | |
Returns (1) | ||
Path2DControlPoint |
Returns the Path2DControlPoint for a given index. If the index is out of bounds, this method will throw an error.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of GetControlPoint from RobloxScriptSecurity to None
- 611 Add GetControlPoint
GetControlPoints
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Array |
Returns a table of all the Path2DControlPoints for the Path2D.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of GetControlPoints from RobloxScriptSecurity to None
- 601 Add GetControlPoints
GetLength
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
float |
Returns the length of the Path2D. This function can be expensive if called too frequently.
Thread safety | Unsafe |
---|
GetMaxControlPoints
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
int |
Returns the maximum allowed number of control points.
Thread safety | Unsafe |
---|
History 1
GetPositionOnCurve
Parameters (1) | ||
---|---|---|
t | float | |
Returns (1) | ||
UDim2 |
Returns the 2D UDim2 position at a given t
value between 0
and 1 (inclusive), representing the parameter space result of querying the
spline. The values will be more tightly packed near bends and wider apart
in straighter segments; see
GetPositionOnCurveArcLength()
for even spacing results.
Throws an error if the Path2D has less than two control points.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of GetPositionOnCurve from RobloxScriptSecurity to None
- 602 Add GetPositionOnCurve
GetPositionOnCurveArcLength
Parameters (1) | ||
---|---|---|
t | float | |
Returns (1) | ||
UDim2 |
Returns the 2D UDim2 position at a given t
value between 0
and 1 (inclusive), representing the arc length space result of querying
the spline. The values will be evenly spaced along the spline; see
GetPositionOnCurve() for parameter
spacing results.
Throws an error if the Path2D has less than two control points.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of GetPositionOnCurveArcLength from RobloxScriptSecurity to None
- 602 Add GetPositionOnCurveArcLength
GetSegmentCount
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
int |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 602 Add GetSegmentCount
GetTangentOnCurve
Parameters (1) | ||
---|---|---|
t | float | |
Returns (1) | ||
Vector2 |
Returns the tangent at a given t
value in parameter space where t
is a
value between 0 and 1 (inclusive). Throws an error if the Path2D
has less than two control points.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of GetTangentOnCurve from RobloxScriptSecurity to None
- 602 Add GetTangentOnCurve
GetTangentOnCurveArcLength
Parameters (1) | ||
---|---|---|
t | float | |
Returns (1) | ||
Vector2 |
Returns the tangent at a given t
value in arc length space where t
is
a value between 0 and 1 (inclusive). Throws an error if the Path2D
has less than two control points.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of GetTangentOnCurveArcLength from RobloxScriptSecurity to None
- 602 Add GetTangentOnCurveArcLength
InsertControlPoint
Parameters (2) | ||
---|---|---|
index | int | |
point | Path2DControlPoint | |
Returns (1) | ||
null |
Inserts a new Path2DControlPoint at a given index. Throws a warning if the index is out of bounds or if you're trying to add control points past the limit of 50.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of InsertControlPoint from RobloxScriptSecurity to None
- 611 Add InsertControlPoint
RemoveControlPoint
Parameters (1) | ||
---|---|---|
index | int | |
Returns (1) | ||
null |
Removes a control point at the given index. Throws a warning if the index is out of bounds.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of RemoveControlPoint from RobloxScriptSecurity to None
- 611 Add RemoveControlPoint
SelectedControlPoint
Type | Default | |
---|---|---|
int | 1 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Control Points |
Loaded/Saved | true/false |
History 2
- 613 Change Default of SelectedControlPoint from 0 to 1
- 601 Add SelectedControlPoint
SelectedControlPointData
Type | Default | |
---|---|---|
Path2DControlPoint |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Control Points |
Loaded/Saved | true/false |
History 1
SetControlPoints
Parameters (1) | ||
---|---|---|
controlPoints | Array | |
Returns (1) | ||
null |
Sets all the control points to the specified array, replacing all existing
points with new ones. Throws a warning if there are more than 50 points in
the controlPoints
array.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of SetControlPoints from RobloxScriptSecurity to None
- 601 Add SetControlPoints
Thickness
Type | Default | |
---|---|---|
float | 1 |
Determines how thick the Path2D path is.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
Transparency
Type | Default | |
---|---|---|
float | 0 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Data |
Loaded/Saved | true |
History 3
- 604 Add Transparency
- 603 Remove Transparency
- 604 Add Transparency
UpdateControlPoint
Parameters (2) | ||
---|---|---|
index | int | |
point | Path2DControlPoint | |
Returns (1) | ||
null |
Updates the control point at the given index. Throws a warning if the index is out of range.
Thread safety | Unsafe |
---|
History 2
- 613 Change Security of UpdateControlPoint from RobloxScriptSecurity to None
- 611 Add UpdateControlPoint
Visible
Type | Default | |
---|---|---|
bool | true |
Determines if the Path2D path is rendered or not. When false, the path will not render. However, any modifications to the control points will update correctly, ensuring that querying data will have the correct info.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
ZIndex
Type | Default | |
---|---|---|
int | 1 |
Determines the order in which a Path2D path renders relative to other GUIs. Works the same as GuiObject.ZIndex but does not interact with layout order in any way.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
Removed members 7
AbsoluteSize
Type | Default | |
---|---|---|
Vector2 | 0, 0 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Data |
Loaded/Saved | false/true |
History 2
- 613 Remove AbsoluteSize
- 601 Add AbsoluteSize
Color
Type | Default | |
---|---|---|
Color3 | 0, 0, 0 |
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
ControlPointLeftTangent
Type | Default | |
---|---|---|
UDim2 | {0, 0}, {0, 0} |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Control Points |
Loaded/Saved | true/false |
History 2
- 616 Remove ControlPointLeftTangent
- 613 Add ControlPointLeftTangent
ControlPointPosition
Type | Default | |
---|---|---|
UDim2 | {0, 0}, {0, 0} |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Control Points |
Loaded/Saved | true/false |
History 2
- 616 Remove ControlPointPosition
- 613 Add ControlPointPosition
ControlPointRightTangent
Type | Default | |
---|---|---|
UDim2 | {0, 0}, {0, 0} |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Control Points |
Loaded/Saved | true/false |
History 2
GetBoundingRect2D
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Rect |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 621 Remove GetBoundingRect2D
- 610 Add GetBoundingRect2D
Position
Type | Default | |
---|---|---|
UDim2 | {0, 0}, {0, 0} |
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |