This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
config-constants.js
109 lines (103 loc) · 3.61 KB
/
config-constants.js
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
"use strict";
import constants from './constants.js';
const curves = {
[constants.PROPERTY_MOVE]:{
[constants.MOMENT_EXPRESSIVE]:{
"easeInOut":"cubic-bezier(0.4, 0.14, 0.3, 1)",
"easeIn":"cubic-bezier(0.4, 0.14, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_PRODUCTIVE]:{
"easeInOut":"cubic-bezier(0.2, 0.2, 0.38, 0.9)",
"easeIn":"cubic-bezier(0.2, 0, 1, 0.9)",
"easeOut":"cubic-bezier(0, 0, 0.38, 0.9)",
},
[constants.MOMENT_NARRATIVE]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_CELEBRATORY]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
}
},
[constants.PROPERTY_SCALE]:{
[constants.MOMENT_EXPRESSIVE]:{
"easeInOut":"cubic-bezier(0.4, 0.14, 0.3, 1)",
"easeIn":"cubic-bezier(0.4, 0.14, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_PRODUCTIVE]:{
"easeInOut":"cubic-bezier(0.2, 0.2, 0.38, 0.9)",
"easeIn":"cubic-bezier(0.2, 0, 1, 0.9)",
"easeOut":"cubic-bezier(0, 0, 0.38, 0.9)",
},
[constants.MOMENT_NARRATIVE]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_CELEBRATORY]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
}
},
[constants.PROPERTY_FADE]:{
[constants.MOMENT_EXPRESSIVE]:{
"easeInOut":"cubic-bezier(0.4, 0.14, 0.3, 1)",
"easeIn":"cubic-bezier(0.4, 0.14, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_PRODUCTIVE]:{
"easeInOut":"cubic-bezier(0.2, 0.2, 0.38, 0.9)",
"easeIn":"cubic-bezier(0.2, 0, 1, 0.9)",
"easeOut":"cubic-bezier(0, 0, 0.38, 0.9)",
},
[constants.MOMENT_NARRATIVE]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_CELEBRATORY]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
}
},
[constants.PROPERTY_ROTATE]:{
[constants.MOMENT_EXPRESSIVE]:{
"easeInOut":"cubic-bezier(0.4, 0.14, 0.3, 1)",
"easeIn":"cubic-bezier(0.4, 0.14, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_PRODUCTIVE]:{
"easeInOut":"cubic-bezier(0.2, 0.2, 0.38, 0.9)",
"easeIn":"cubic-bezier(0.2, 0, 1, 0.9)",
"easeOut":"cubic-bezier(0, 0, 0.38, 0.9)",
},
[constants.MOMENT_NARRATIVE]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
},
[constants.MOMENT_CELEBRATORY]:{
"easeInOut":"cubic-bezier(0.29, 0.04, 0.23, 1)",
"easeIn":"cubic-bezier(0.39, .06, 1, 1)",
"easeOut":"cubic-bezier(0, 0, 0.3, 1)",
}
}
};
const motionModes = [constants.MOMENT_EXPRESSIVE, constants.MOMENT_PRODUCTIVE, constants.MOMENT_NARRATIVE, constants.MOMENT_CELEBRATORY];
const distances = {
[constants.PROPERTY_MOVE]:[10, 25, 50, 75, 100, 200, 400, 800, 1600, 3200],
[constants.PROPERTY_SCALE]:[100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400, 204800],
[constants.PROPERTY_FADE]:[25, 50, 75, 100],
[constants.PROPERTY_ROTATE]:[30, 60, 90, 120, 150, 180, 270, 360]
};
const sizes = '123456789'.split('').reduce( (prev, curr, i) => [...prev, prev[prev.length-1] * 4], [8*8]);
module.exports = {
curves, distances, sizes, motionModes
}