Estella
0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
TweenData.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
3
#pragma once
4
5
#include "
../core/Types.hpp
"
6
#include "
../core/Reflection.hpp
"
7
8
namespace
esengine::animation
{
9
10
ES_ENUM
(stability=experimental)
11
enum class
EasingType
:
u8
{
12
Linear
= 0,
13
EaseInQuad
,
14
EaseOutQuad
,
15
EaseInOutQuad
,
16
EaseInCubic
,
17
EaseOutCubic
,
18
EaseInOutCubic
,
19
EaseInBack
,
20
EaseOutBack
,
21
EaseInOutBack
,
22
EaseInElastic
,
23
EaseOutElastic
,
24
EaseInOutElastic
,
25
EaseOutBounce
,
26
CubicBezier
,
27
Step
,
28
EaseInSine
,
29
EaseOutSine
,
30
EaseInOutSine
,
31
EaseInQuart
,
32
EaseOutQuart
,
33
EaseInOutQuart
,
34
EaseInQuint
,
35
EaseOutQuint
,
36
EaseInOutQuint
,
37
EaseInExpo
,
38
EaseOutExpo
,
39
EaseInOutExpo
,
40
EaseInCirc
,
41
EaseOutCirc
,
42
EaseInOutCirc
,
43
EaseInBounce
,
44
EaseInOutBounce
,
45
Smoothstep
,
46
Smootherstep
47
};
48
49
ES_ENUM
(stability=experimental)
50
enum class
TweenTarget
:
u8
{
51
PositionX
= 0,
52
PositionY
,
53
PositionZ
,
54
ScaleX
,
55
ScaleY
,
56
RotationZ
,
57
ColorR
,
58
ColorG
,
59
ColorB
,
60
ColorA
,
61
SizeX
,
62
SizeY
,
63
CameraOrthoSize
64
};
65
66
ES_ENUM
(stability=experimental)
67
enum class
TweenState
:
u8
{
68
Running
= 0,
69
Paused
,
70
Completed
,
71
Cancelled
72
};
73
74
ES_ENUM
(stability=experimental)
75
enum class
LoopMode
:
u8
{
76
None
= 0,
77
Restart
,
78
PingPong
79
};
80
81
struct
TweenData
{
82
Entity
target_entity
{
INVALID_ENTITY
};
83
TweenTarget
target_property
{
TweenTarget::PositionX
};
84
85
f32
from_value
{0.0f};
86
f32
to_value
{0.0f};
87
f32
duration
{1.0f};
88
f32
elapsed
{0.0f};
89
f32
delay
{0.0f};
90
91
EasingType
easing
{
EasingType::Linear
};
92
93
f32
bezier_p1x
{0.0f};
94
f32
bezier_p1y
{0.0f};
95
f32
bezier_p2x
{1.0f};
96
f32
bezier_p2y
{1.0f};
97
98
TweenState
state
{
TweenState::Running
};
99
100
LoopMode
loop_mode
{
LoopMode::None
};
101
i32
loop_count
{0};
102
i32
loops_remaining
{0};
103
104
u32
group_id
{0};
105
Entity
sequence_next
{
INVALID_ENTITY
};
106
};
107
108
}
// namespace esengine::animation
Reflection.hpp
Reflection and metadata system for automatic binding generation.
ES_ENUM
#define ES_ENUM(...)
Mark an enum that should be exposed to scripts.
Definition
Reflection.hpp:119
Types.hpp
Core type definitions and utilities for ESEngine.
esengine::animation
Definition
EasingFunctions.hpp:10
esengine::animation::EasingType
EasingType
Definition
TweenData.hpp:11
esengine::animation::EasingType::EaseInOutBounce
@ EaseInOutBounce
Definition
TweenData.hpp:44
esengine::animation::EasingType::EaseOutBack
@ EaseOutBack
Definition
TweenData.hpp:20
esengine::animation::EasingType::EaseInCubic
@ EaseInCubic
Definition
TweenData.hpp:16
esengine::animation::EasingType::Smoothstep
@ Smoothstep
Definition
TweenData.hpp:45
esengine::animation::EasingType::Linear
@ Linear
Definition
TweenData.hpp:12
esengine::animation::EasingType::EaseOutElastic
@ EaseOutElastic
Definition
TweenData.hpp:23
esengine::animation::EasingType::EaseInQuint
@ EaseInQuint
Definition
TweenData.hpp:34
esengine::animation::EasingType::EaseInOutQuart
@ EaseInOutQuart
Definition
TweenData.hpp:33
esengine::animation::EasingType::EaseOutCubic
@ EaseOutCubic
Definition
TweenData.hpp:17
esengine::animation::EasingType::Step
@ Step
Definition
TweenData.hpp:27
esengine::animation::EasingType::EaseInOutExpo
@ EaseInOutExpo
Definition
TweenData.hpp:39
esengine::animation::EasingType::EaseInOutCubic
@ EaseInOutCubic
Definition
TweenData.hpp:18
esengine::animation::EasingType::EaseInQuad
@ EaseInQuad
Definition
TweenData.hpp:13
esengine::animation::EasingType::EaseOutQuint
@ EaseOutQuint
Definition
TweenData.hpp:35
esengine::animation::EasingType::EaseOutQuart
@ EaseOutQuart
Definition
TweenData.hpp:32
esengine::animation::EasingType::EaseInSine
@ EaseInSine
Definition
TweenData.hpp:28
esengine::animation::EasingType::EaseOutBounce
@ EaseOutBounce
Definition
TweenData.hpp:25
esengine::animation::EasingType::EaseInOutElastic
@ EaseInOutElastic
Definition
TweenData.hpp:24
esengine::animation::EasingType::EaseInExpo
@ EaseInExpo
Definition
TweenData.hpp:37
esengine::animation::EasingType::EaseInOutCirc
@ EaseInOutCirc
Definition
TweenData.hpp:42
esengine::animation::EasingType::EaseOutCirc
@ EaseOutCirc
Definition
TweenData.hpp:41
esengine::animation::EasingType::EaseInOutBack
@ EaseInOutBack
Definition
TweenData.hpp:21
esengine::animation::EasingType::EaseInBack
@ EaseInBack
Definition
TweenData.hpp:19
esengine::animation::EasingType::EaseInQuart
@ EaseInQuart
Definition
TweenData.hpp:31
esengine::animation::EasingType::EaseOutExpo
@ EaseOutExpo
Definition
TweenData.hpp:38
esengine::animation::EasingType::EaseInBounce
@ EaseInBounce
Definition
TweenData.hpp:43
esengine::animation::EasingType::Smootherstep
@ Smootherstep
Definition
TweenData.hpp:46
esengine::animation::EasingType::CubicBezier
@ CubicBezier
Definition
TweenData.hpp:26
esengine::animation::EasingType::EaseInOutQuad
@ EaseInOutQuad
Definition
TweenData.hpp:15
esengine::animation::EasingType::EaseInCirc
@ EaseInCirc
Definition
TweenData.hpp:40
esengine::animation::EasingType::EaseInOutSine
@ EaseInOutSine
Definition
TweenData.hpp:30
esengine::animation::EasingType::EaseInOutQuint
@ EaseInOutQuint
Definition
TweenData.hpp:36
esengine::animation::EasingType::EaseOutSine
@ EaseOutSine
Definition
TweenData.hpp:29
esengine::animation::EasingType::EaseOutQuad
@ EaseOutQuad
Definition
TweenData.hpp:14
esengine::animation::EasingType::EaseInElastic
@ EaseInElastic
Definition
TweenData.hpp:22
esengine::animation::TweenState
TweenState
Definition
TweenData.hpp:67
esengine::animation::TweenState::Completed
@ Completed
Definition
TweenData.hpp:70
esengine::animation::TweenState::Running
@ Running
Definition
TweenData.hpp:68
esengine::animation::TweenState::Cancelled
@ Cancelled
Definition
TweenData.hpp:71
esengine::animation::TweenState::Paused
@ Paused
Definition
TweenData.hpp:69
esengine::animation::LoopMode
LoopMode
Definition
TweenData.hpp:75
esengine::animation::LoopMode::Restart
@ Restart
Definition
TweenData.hpp:77
esengine::animation::LoopMode::None
@ None
Definition
TweenData.hpp:76
esengine::animation::LoopMode::PingPong
@ PingPong
Definition
TweenData.hpp:78
esengine::animation::TweenTarget
TweenTarget
Definition
TweenData.hpp:50
esengine::animation::TweenTarget::PositionX
@ PositionX
Definition
TweenData.hpp:51
esengine::animation::TweenTarget::ColorR
@ ColorR
Definition
TweenData.hpp:57
esengine::animation::TweenTarget::PositionY
@ PositionY
Definition
TweenData.hpp:52
esengine::animation::TweenTarget::SizeY
@ SizeY
Definition
TweenData.hpp:62
esengine::animation::TweenTarget::ScaleY
@ ScaleY
Definition
TweenData.hpp:55
esengine::animation::TweenTarget::ColorB
@ ColorB
Definition
TweenData.hpp:59
esengine::animation::TweenTarget::PositionZ
@ PositionZ
Definition
TweenData.hpp:53
esengine::animation::TweenTarget::CameraOrthoSize
@ CameraOrthoSize
Definition
TweenData.hpp:63
esengine::animation::TweenTarget::ScaleX
@ ScaleX
Definition
TweenData.hpp:54
esengine::animation::TweenTarget::SizeX
@ SizeX
Definition
TweenData.hpp:61
esengine::animation::TweenTarget::ColorA
@ ColorA
Definition
TweenData.hpp:60
esengine::animation::TweenTarget::RotationZ
@ RotationZ
Definition
TweenData.hpp:56
esengine::animation::TweenTarget::ColorG
@ ColorG
Definition
TweenData.hpp:58
esengine::i32
std::int32_t i32
Signed 32-bit integer.
Definition
Types.hpp:54
esengine::INVALID_ENTITY
constexpr Entity INVALID_ENTITY
Invalid entity sentinel value.
Definition
Types.hpp:174
esengine::u32
std::uint32_t u32
Unsigned 32-bit integer.
Definition
Types.hpp:45
esengine::u8
std::uint8_t u8
Unsigned 8-bit integer.
Definition
Types.hpp:41
esengine::f32
float f32
32-bit floating point
Definition
Types.hpp:59
esengine::Entity
Entity identifier with packed index + generation.
Definition
Types.hpp:135
esengine::animation::TweenData
Definition
TweenData.hpp:81
esengine::animation::TweenData::bezier_p2x
f32 bezier_p2x
Definition
TweenData.hpp:95
esengine::animation::TweenData::easing
EasingType easing
Definition
TweenData.hpp:91
esengine::animation::TweenData::bezier_p1y
f32 bezier_p1y
Definition
TweenData.hpp:94
esengine::animation::TweenData::duration
f32 duration
Definition
TweenData.hpp:87
esengine::animation::TweenData::delay
f32 delay
Definition
TweenData.hpp:89
esengine::animation::TweenData::from_value
f32 from_value
Definition
TweenData.hpp:85
esengine::animation::TweenData::group_id
u32 group_id
Definition
TweenData.hpp:104
esengine::animation::TweenData::loop_mode
LoopMode loop_mode
Definition
TweenData.hpp:100
esengine::animation::TweenData::target_property
TweenTarget target_property
Definition
TweenData.hpp:83
esengine::animation::TweenData::elapsed
f32 elapsed
Definition
TweenData.hpp:88
esengine::animation::TweenData::state
TweenState state
Definition
TweenData.hpp:98
esengine::animation::TweenData::to_value
f32 to_value
Definition
TweenData.hpp:86
esengine::animation::TweenData::target_entity
Entity target_entity
Definition
TweenData.hpp:82
esengine::animation::TweenData::sequence_next
Entity sequence_next
Definition
TweenData.hpp:105
esengine::animation::TweenData::bezier_p1x
f32 bezier_p1x
Definition
TweenData.hpp:93
esengine::animation::TweenData::bezier_p2y
f32 bezier_p2y
Definition
TweenData.hpp:96
esengine::animation::TweenData::loops_remaining
i32 loops_remaining
Definition
TweenData.hpp:102
esengine::animation::TweenData::loop_count
i32 loop_count
Definition
TweenData.hpp:101
src
esengine
animation
TweenData.hpp
Generated by
1.15.0