Path2D

แสดงที่เลิกใช้งานแล้ว

สรุป

คุณสมบัติ

  • อ่านพร้อมๆ กัน

    Connects the first and last control points when enabled.

  • อ่านพร้อมๆ กัน

    Determines the Color of the Path2D.

  • ไม่ซ้ำ
    การรักษาความปลอดภัยของสคริปต์ Roblox
    อ่านพร้อมๆ กัน
  • ไม่ซ้ำ
    การรักษาความปลอดภัยของสคริปต์ Roblox
    อ่านพร้อมๆ กัน
  • อ่านพร้อมๆ กัน

    Determines how thick the Path2D path is.

  • อ่านพร้อมๆ กัน

    Determines if the Path2D path is rendered or not.

  • อ่านพร้อมๆ กัน

    Determines the order in which a Path2D path renders relative to other GUIs.

วิธีการ

คุณสมบัติ

Closed

อ่านพร้อมๆ กัน

Connects the first and last control points when enabled.

Color3

อ่านพร้อมๆ กัน

Determines the Color of the Path2D.

SelectedControlPoint

ไม่ซ้ำ
การรักษาความปลอดภัยของสคริปต์ Roblox
อ่านพร้อมๆ กัน

SelectedControlPointData

ไม่ซ้ำ
การรักษาความปลอดภัยของสคริปต์ Roblox
อ่านพร้อมๆ กัน

Thickness

อ่านพร้อมๆ กัน

Determines how thick the Path2D path is.

Visible

อ่านพร้อมๆ กัน

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.

ZIndex

อ่านพร้อมๆ กัน

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.

วิธีการ

GetBoundingRect

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.


ส่งค่ากลับ

GetControlPoint

Returns the Path2DControlPoint for a given index. If the index is out of bounds, this method will throw an error.

พารามิเตอร์

index: number
ค่าเริ่มต้น: ""

ส่งค่ากลับ

The control point at the given index.

GetControlPoints

Returns a table of all the Path2DControlPoints for the Path2D.


ส่งค่ากลับ

Table of all the Path2DControlPoints.

GetLength

Returns the length of the Path2D. This function can be expensive if called too frequently.


ส่งค่ากลับ

GetMaxControlPoints

Returns the maximum allowed number of control points.


ส่งค่ากลับ

GetPositionOnCurve

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.

พารามิเตอร์

The value to query the Path2D at.

ค่าเริ่มต้น: ""

ส่งค่ากลับ

The position in parameter space.

GetPositionOnCurveArcLength

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.

พารามิเตอร์

The value to query the Path2D at.

ค่าเริ่มต้น: ""

ส่งค่ากลับ

The position in arc length space.

GetTangentOnCurve

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.

พารามิเตอร์

The value to query the Path2D at.

ค่าเริ่มต้น: ""

ส่งค่ากลับ

GetTangentOnCurveArcLength

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.

พารามิเตอร์

The value to query the Path2D at.

ค่าเริ่มต้น: ""

ส่งค่ากลับ

The tangent in arc length space.

InsertControlPoint

()

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.

พารามิเตอร์

index: number

The index to insert at.

ค่าเริ่มต้น: ""

The control point to insert.

ค่าเริ่มต้น: ""

ส่งค่ากลับ

()

RemoveControlPoint

()

Removes a control point at the given index. Throws a warning if the index is out of bounds.

พารามิเตอร์

index: number

The index to remove at.

ค่าเริ่มต้น: ""

ส่งค่ากลับ

()

SetControlPoints

()

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.

พารามิเตอร์

controlPoints: Array

The new list of control points to set.

ค่าเริ่มต้น: ""

ส่งค่ากลับ

()

UpdateControlPoint

()

Updates the control point at the given index. Throws a warning if the index is out of range.

พารามิเตอร์

index: number

The control point index to update.

ค่าเริ่มต้น: ""
ค่าเริ่มต้น: ""

ส่งค่ากลับ

()

อีเวนต์

ControlPointChanged

Fires any time control points change.