AnimationComponent struct in Thread

Plays an animation clip on an entity. Two paths share one component: skeletal (GPU bone skinning of a rigged MeshComponent) when a Skeleton is present, and object animation (keyframing the entity's own transform) when it is not. The AnimationSystem advances Time each frame and, for skeletal clips, fills FinalBoneMatrices which the mesh shader consumes.

Properties

ClipPathstd::stringAnimation asset (VFS path).
Clipstd::shared_ptr<AnimationClip>Loaded keyframe data.
Skeletonstd::shared_ptr<Skeleton>Bone hierarchy + offsets; presence selects the skeletal path.
TimefloatCurrent play time (seconds).
SpeedfloatPlayback speed multiplier.
PlayingboolAdvance Time each frame.
LoopboolWrap at the end instead of stopping.

Runtime

FinalBoneMatricesstd::vector<Mat4>Skinning matrices (size = Skeleton bone count) uploaded to the shader.
Quickest way to add one: drag an .anim from the Content Browser onto a character, in the viewport or the hierarchy. It gets an Animation Component playing that clip, on whichever entity of the model carries the skinned mesh (the skeleton is wired from a mesh on the same entity).
Skinning is GPU-side: vertex bone weights come in through the mesh import, and the shader multiplies by u_Bones[]. The AnimationSystem auto-wires the skeleton onto a rigged mesh. Edit and scrub clips in the editor's Animation panel.

AnimationComponent struct w Thread

Odtwarza klip animacji na encji. Jeden komponent obsługuje dwie ścieżki: szkieletową (skinning kości na GPU dla zriggowanego MeshComponent), gdy jest Skeleton, oraz animację obiektu (klatki kluczowe własnej transformacji encji), gdy go nie ma. AnimationSystem co klatkę przesuwa Time, a dla klipów szkieletowych wypełnia FinalBoneMatrices, z których korzysta shader siatki.

Właściwości

ClipPathstd::stringAsset animacji (ścieżka VFS).
Clipstd::shared_ptr<AnimationClip>Wczytane klatki kluczowe.
Skeletonstd::shared_ptr<Skeleton>Hierarchia kości i offsety; jego obecność wybiera ścieżkę szkieletową.
TimefloatBieżący czas odtwarzania (sekundy).
SpeedfloatMnożnik szybkości odtwarzania.
PlayingboolPrzesuwaj Time co klatkę.
LoopboolNa końcu zawijaj zamiast się zatrzymać.

W czasie działania

FinalBoneMatricesstd::vector<Mat4>Macierze skinningu (rozmiar = liczba kości szkieletu) wysyłane do shadera.
Najszybszy sposób: przeciągnij plik .anim z Content Browsera na postać, w viewporcie albo w hierarchii. Dostanie Animation Component grający ten klip, na tej encji modelu, która ma skinowany mesh (szkielet podpina się z meshu na tej samej encji).
Skinning dzieje się na GPU: wagi kości wierzchołków przychodzą z importu siatki, a shader mnoży przez u_Bones[]. AnimationSystem sam podpina szkielet do zriggowanej siatki. Klipy edytujesz i przewijasz w panelu Animation edytora.