AnimationTrackクラス

クラスInstance.newでは作れない日本語解説は準備中

ひとことで言うと

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

公式の説明(英語):Controls the playback of an animation on an Animator.

クラスの関係

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

プロパティ(9)

名前と書き方説明
Animation
AnimationTrack.Animation: Animation
The Animation object that was used to create this AnimationTrack.
IsPlaying
AnimationTrack.IsPlaying: boolean
A read-only property that returns true when the AnimationTrack is playing.
Length
AnimationTrack.Length: float
A read-only property that returns the length (in seconds) of an AnimationTrack. This will return 0 until the animation has fully loaded and thus may not be immediately available.
Looped
AnimationTrack.Looped: boolean
Sets whether the animation will repeat after finishing. If it is changed while playing the result will take effect after the animation finishes.
Priority
AnimationTrack.Priority: AnimationPriority
Sets the priority of an AnimationTrack. Depending on what this is set to, playing multiple animations at once will look to this property to figure out which Keyframe Class.Pose|Poses should be played over one another.
Speed
AnimationTrack.Speed: float
Read-only property that gives the current playback speed of the AnimationTrack.
TimePosition
AnimationTrack.TimePosition: float
Returns the position in time in seconds that an AnimationTrack is through playing its source animation. Can be set to make the track jump to a specific moment in the animation.
WeightCurrent
AnimationTrack.WeightCurrent: float
Read-only property that gives the current weight of the AnimationTrack.
WeightTarget
AnimationTrack.WeightTarget: float
Read-only property that gives the current weight of the AnimationTrack.

メソッド(9)

名前と書き方説明
AdjustSpeed
AnimationTrack:AdjustSpeed(speed: float): ()
Changes the AnimationTrack.Speed of an animation. A positive value for speed plays the animation forward, a negative one plays it backwards, and 0 pauses it.
AdjustWeight
AnimationTrack:AdjustWeight(weight: float, fadeTime: float): ()
Changes the weight of an animation, with the optional fadeTime parameter determining how long it takes for AnimationTrack.WeightCurrent to reach AnimationTrack.WeightTarget.
GetMarkerReachedSignal
AnimationTrack:GetMarkerReachedSignal(name: string): RBXScriptSignal
Returns an RBXScriptSignal (event) that fires when a specified KeyframeMarker has been hit in an Class.Animation|animation.
GetParameter
AnimationTrack:GetParameter(key: string): Variant
Returns the value of a parameter on the animation graph by key. Returns nil if the parameter has not been set.
GetParameterDefaults
AnimationTrack:GetParameterDefaults(): Dictionary
Returns a dictionary of parameter values initially set as instance attributes on the AnimationGraphDefinition instance used to build the animation graph inside this track.
GetTimeOfKeyframe
AnimationTrack:GetTimeOfKeyframe(keyframeName: string): double
Returns the time position of the first Keyframe of the given name in an AnimationTrack.
Play
AnimationTrack:Play(fadeTime: float, weight: float, speed: float): ()
Plays the AnimationTrack. Once called an AnimationTrack will play with the specified fadeTime, weight and speed.
SetParameter
AnimationTrack:SetParameter(key: string, value: Variant): ()
Sets a parameter value on the animation graph, driving animation graph node inputs.
Stop
AnimationTrack:Stop(fadeTime: float): ()
Stops the AnimationTrack.

イベント(3)

名前と書き方説明
DidLoop
AnimationTrack.DidLoop()
Fires when an AnimationTrack loops on the next update following the end of the previous animation loop.
Ended
AnimationTrack.Ended()
Fires when the AnimationTrack is completely done moving anything in the world.
Stopped
AnimationTrack.Stopped()
Fires when the AnimationTrack finishes playing. The AnimationTrack might still animate the subject while the animation "fades out". To catch when the AnimationTrack is completely done moving anything in the world, use the AnimationTrack.Ended event.

受け継いでいるメンバー

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(AnimationTrack)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

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