20 vskelField.
_name =
"Show Skeleton";
21 vskelField.
_data = &_showSkeleton;
25 _editorComponent.registerField(
MOV(vskelField));
28 playAnimationsField.
_name =
"Play Animations";
33 _editorComponent.registerField(
MOV(playAnimationsField));
36 animationSpeedField.
_name =
"Animation Speed";
37 animationSpeedField.
_data = &_animationSpeed;
40 animationSpeedField.
_range = { 0.01f, 100.0f };
42 _editorComponent.registerField(
MOV(animationSpeedField));
45 animationFrameIndexInfoField.
_name =
"Animation Frame Index";
46 animationFrameIndexInfoField.
_tooltip =
" [Curr - Prev - Next]";
50 animationFrameIndexInfoField.
_readOnly =
true;
51 _editorComponent.registerField(
MOV(animationFrameIndexInfoField));
54 _editorComponent.onChangedCbk([
this]([[maybe_unused]] std::string_view field) {
84 if (pAnimIndex >= _animator->animations().size() && pAnimIndex !=
U32_MAX)
89 const U32 oldIndex = animationIndex();
90 _animationIndex = pAnimIndex;
92 if ( _animationIndex ==
U32_MAX)
99 if (oldIndex != _animationIndex )
101 _parentSGN->getNode<Object3D>().onAnimationChange(_parentSGN, _animationIndex );
116 const U32 oldIndex = animationIndex();
117 if ( _animationIndex ==
U32_MAX)
119 _animationIndex = 0u;
122 _animationIndex = (_animationIndex + 1u) % _animator->animations().size();
126 return oldIndex != _animationIndex;
136 const U32 oldIndex = _animationIndex;
137 if ( _animationIndex == 0 || _animationIndex ==
U32_MAX)
139 _animationIndex =
to_I32(_animator->animations().size());
146 return oldIndex != _animationIndex;
151 assert(_animator !=
nullptr);
155 return _animator->skeletonLines( _animationIndex, animTimeStamp);
166 assert(_animator !=
nullptr);
168 return _animator->frameCount(animationID);
173 assert(_animator !=
nullptr);
175 return _animator->boneCount();
185 assert(_animator !=
nullptr && animationID !=
U32_MAX);
187 return _animator->animationByIndex(animationID);
ShaderBuffer * boneBuffer() const
AnimEvaluator & getAnimationByIndex(U32 animationID) const
const vector< Line > & skeletonLines() const
AnimationComponent(SceneGraphNode *parentSGN, PlatformContext &context)
ShaderBuffer * getBoneBuffer() const
bool playPreviousAnimation() noexcept
Select previous available animation.
AnimEvaluator::FrameIndex _frameIndex
bool playAnimation(const string &name)
Select an animation by name.
static bool s_globalAnimationState
bool playNextAnimation() noexcept
Select next available animation.
D64 _currentTimeStamp
Current animation timestamp for the current SGN.
void resetTimers() noexcept
bool frameTicked() const noexcept
Handle console commands that start with a forward slash.
constexpr U32 to_U32(const T value)
eastl::vector< Type > vector
SGNComponent::Registrar< T, C > BaseComponentType
constexpr I32 to_I32(const T value)
DELEGATE_STD< void, void * > _dataGetter
vec2< F32 > _range
Used by slider_type as a min / max range or dropdown as selected_index / count.
PushConstantType _basicType
EditorComponentFieldType _type