Path2Dクラス

クラス日本語解説は準備中

ひとことで言うと

Path2Dは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):Represents a 2D cubic spline path that renders a stroked curve under any GuiObject.

クラスの関係

受け継いでいるクラス:Object → Instance → GuiBase → Path2D

プロパティ(5)

名前と書き方説明
Closed
Path2D.Closed: boolean
Connects the first and last control points when enabled.
Color3
Path2D.Color3: Color3
Determines the color of the Path2D.
Thickness
Path2D.Thickness: float
Determines how thick the Path2D path is.
Visible
Path2D.Visible: boolean
Determines if the Path2D path is rendered or not.
ZIndex
Path2D.ZIndex: int
Determines the order in which a Path2D path renders relative to other GUIs.

メソッド(13)

名前と書き方説明
GetBoundingRect
Path2D:GetBoundingRect(): Rect
Returns the bounding size for the Path2D.
GetControlPoint
Path2D:GetControlPoint(index: int): Path2DControlPoint
Returns the Path2DControlPoint for a given index.
GetControlPoints
Path2D:GetControlPoints(): Array
Returns all the Datatype.Path2DControlPoint|Path2DControlPoints for the Path2D.
GetLength
Path2D:GetLength(): float
Returns the length of the Path2D.
GetMaxControlPoints
Path2D:GetMaxControlPoints(): int
Returns the maximum allowed number of control points.
GetPositionOnCurve
Path2D:GetPositionOnCurve(t: float): UDim2
Returns the position at a given value in parameter space.
GetPositionOnCurveArcLength
Path2D:GetPositionOnCurveArcLength(t: float): UDim2
Returns the position at a given value in arc length space.
GetTangentOnCurve
Path2D:GetTangentOnCurve(t: float): Vector2
Returns the tangent at a given value in parameter space.
GetTangentOnCurveArcLength
Path2D:GetTangentOnCurveArcLength(t: float): Vector2
Returns the tangent at a given value in arc length space.
InsertControlPoint
Path2D:InsertControlPoint(index: int, point: Path2DControlPoint): ()
Inserts a new control point at a given index.
RemoveControlPoint
Path2D:RemoveControlPoint(index: int): ()
Removes a control at the given index.
SetControlPoints
Path2D:SetControlPoints(controlPoints: Array): ()
Sets all the control points to the specified array, replacing all existing points with new ones.
UpdateControlPoint
Path2D:UpdateControlPoint(index: int, point: Path2DControlPoint): ()
Updates a control point at the given index.

イベント(1)

名前と書き方説明
ControlPointChanged
Path2D.ControlPointChanged()
Fires any time control points change.

受け継いでいるメンバー

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(Path2D)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む