-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobals.js.html
202 lines (179 loc) · 5.22 KB
/
globals.js.html
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: globals.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: globals.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* Global Objects
* @module globals
*/
/**
* Visibility Animations IDs
*
* The key is the name of the animation function
* and the value is the index of the CSS class name
* inside CLASS_NAMES.hide and CLASS_NAMES.show
* @see module:globals.CLASS_NAMES
* @type {Object.<string, number>}
*/
export const VISIBILITY_ANIMS_ID = Object.freeze({
collapse: 0,
slideUp: 1,
slideDown: 2,
slideLeft: 3,
slideRight: 4,
fade: 5,
});
/**
* Motion Animations IDs
*
* The key is the name of the animation function
* and the value is the index of the CSS class name
* inside CLASS_NAMES.move and CLASS_NAMES.moveBack
* @see module:globals.CLASS_NAMES
* @type {Object.<string, number>}
*/
export const MOTION_ANIMS_ID = Object.freeze({
rotateUp: 0,
rotateUpCCW: 1,
rotateRight: 2,
rotateRightCCW: 3,
rotateDown: 4,
rotateDownCCW: 5,
rotateLeft: 6,
rotateLeftCCW: 7,
rotate: 8,
rotationLoop: 9,
scale: 10,
});
/**
* CSS Custom Properties
*
* The key is the name of the option passed to the animation function
* and the value is the respective CSS variable
* @type {Object.<string, string>}
*/
export const PROPERTY_NAMES = Object.freeze({
duration: '--js-css-animation--duration',
easing: '--js-css-animation--timing-function',
delay: '--js-css-animation--delay',
fillMode: '--js-css-animation--fill-mode',
cursor: '--js-css-animation--cursor',
blur: '--js-css-animation--blur',
angle: '--js-css-animation--rotation-angle',
iteration: '--js-css-animation--iteration',
direction: '--js-css-animation--direction',
transfOrigin: '--js-css-animation--transf-origin',
initialScale: '--js-css-animation--initial-scale',
finalScale: '--js-css-animation--final-scale',
});
/**
* CSS Class Names
*
* @type { {
* overflowHidden: string,
* dimensionsTransitions: string,
* heightTransition: string,
* widthTransition: string,
* trigger: string,
* btnCursor: string,
* collapsed: string,
* hidden: string,
* moved: string,
* hide: string[],
* show: string[],
* move: string[],
* moveBack: string[]
* } }
*/
export const CLASS_NAMES = Object.freeze({
overflowHidden: 'js-anim--overflow-hidden',
dimensionsTransitions: 'js-anim--dimensions-transitions',
heightTransition: 'js-anim--height-transition',
widthTransition: 'js-anim--width-transition',
trigger: 'js-anim--trigger',
btnCursor: 'js-anim--btn-cursor',
collapsed: 'js-anim--collapsed',
hidden: 'js-anim--hidden',
moved: 'js-anim--moved',
hide: [
'js-anim--collapse',
'js-anim--slide-up',
'js-anim--slide-down',
'js-anim--slide-left',
'js-anim--slide-right',
'js-anim--fade-out',
],
show: [
'js-anim--expand',
'js-anim--slide-up__back',
'js-anim--slide-down__back',
'js-anim--slide-left__back',
'js-anim--slide-right__back',
'js-anim--fade-in',
],
move: [
'js-anim--rotate-up',
'js-anim--rotate-up__ccw',
'js-anim--rotate-right',
'js-anim--rotate-right__ccw',
'js-anim--rotate-down',
'js-anim--rotate-down__ccw',
'js-anim--rotate-left',
'js-anim--rotate-left__ccw',
'js-anim--rotate',
'js-anim--rotation-loop',
'js-anim--scale',
],
moveBack: [
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--rotate-up',
'js-anim--scale__back',
],
});
/**
* CSS Properties customized by options passed in the animation function
*
* ('cursor' can only be customized in animations triggered by click event
* so it is not being included here)
* @type {ReadonlyArray<string>}
*/
export const CUSTOM_CSS_PROPERTIES = Object.freeze(
Object.keys(PROPERTY_NAMES).filter(k => k !== 'cursor')
);
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">JS-CSS Animations</a></h2><h3>Modules</h3><ul><li><a href="module-animate.html">animate</a></li><li><a href="module-globals.html">globals</a></li><li><a href="module-js-css-animations.html">js-css-animations</a></li><li><a href="module-measurements.html">measurements</a></li><li><a href="module-resize-parent.html">resize-parent</a></li><li><a href="module-transitions.html">transitions</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Wed Dec 07 2022 15:22:18 GMT-0300 (Horário Padrão de Brasília)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>