Path2D

사용되지 않는 항목 표시
찾아볼 수 없음

요약

속성

메서드

속성

Color3

병렬 읽기

SelectedControlPoint

복제되지 않음
병렬 읽기
Roblox 스크립트 보안

SelectedControlPointData

복제되지 않음
병렬 읽기
Roblox 스크립트 보안

Thickness

병렬 읽기

Determines how thick the Path2D path is.

Transparency

병렬 읽기
Roblox 스크립트 보안

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


반환

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.

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

void

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 250.

매개 변수

index: number

The index to insert at.

The control point to insert.


반환

void

RemoveControlPoint

void

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.


반환

void

SetControlPoints

void

Sets all the control points to the specified array, replacing all existing points with new ones. Throws a warning if there are more than 250 points in the controlPoints array.

매개 변수

controlPoints: Array

The new list of control points to set.


반환

void

UpdateControlPoint

void

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.


반환

void

이벤트