Repository navigation
Expand file tree
/
Copy pathTweenEase.h
More file actions
95 lines (73 loc) · 2.3 KB
/
Copy pathTweenEase.h
File metadata and controls
95 lines (73 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* The original algorithms of easing functions come from Robert Penner.
* The open source licensed under the MIT License and the BSD License.
*
* Introduce: http://robertpenner.com/easing
* License : http://robertpenner.com/easing_terms_of_use.html
*
*----------------------------------------------------------------------------------------------------------------------
*
* Copyright (c) scott.cgi All Rights Reserved.
*
* This source code belongs to project Mojoc, which is a pure C Game Engine hosted on GitHub.
* The Mojoc Game Engine is licensed under the MIT License, and will continue to be iterated with coding passion.
*
* License : https://github.com/scottcgi/Mojoc/blob/master/LICENSE
* GitHub : https://github.com/scottcgi/Mojoc
* CodeStyle: https://github.com/scottcgi/Mojoc/blob/master/Docs/CodeStyle.md
*
* Since : 2013-11-5
* Update : 2021-8-16
* Author : scott.cgi
*/
#ifndef TWEEN_EASE_H
#define TWEEN_EASE_H
typedef enum
{
TweenEaseType_Linear,
TweenEaseType_Smooth,
TweenEaseType_QuadraticIn,
TweenEaseType_QuadraticOut,
TweenEaseType_QuadraticInOut,
TweenEaseType_CubicIn,
TweenEaseType_CubicOut,
TweenEaseType_CubicInOut,
TweenEaseType_QuarticIn,
TweenEaseType_QuarticOut,
TweenEaseType_QuarticInOut,
TweenEaseType_QuinticIn,
TweenEaseType_QuinticOut,
TweenEaseType_QuinticInOut,
TweenEaseType_ExponentialIn,
TweenEaseType_ExponentialOut,
TweenEaseType_ExponentialInOut,
TweenEaseType_SineIn,
TweenEaseType_SineOut,
TweenEaseType_SineInOut,
TweenEaseType_CircularIn,
TweenEaseType_CircularOut,
TweenEaseType_CircularInOut,
TweenEaseType_ElasticIn,
TweenEaseType_ElasticOut,
TweenEaseType_ElasticInOut,
TweenEaseType_BackIn,
TweenEaseType_BackOut,
TweenEaseType_BackInOut,
TweenEaseType_BackInExponentialOut,
TweenEaseType_BackInElasticOut,
TweenEaseType_BounceIn,
TweenEaseType_BounceOut,
TweenEaseType_BounceInOut,
TweenEaseType_Length,
}
TweenEaseType;
struct ATweenEase
{
/**
* Tween easing time functions.
* the return value between [0.0f, 1.0f], which is the time between [0.0f, 1.0f] after easing.
*/
float (*Easing[TweenEaseType_Length])(float time);
};
extern struct ATweenEase ATweenEase[1];
#endif