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
/
Copy pathgetDuration.js
379 lines (267 loc) · 29.6 KB
/
getDuration.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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.getDuration = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
MOMENT_EXPRESSIVE: "expr",
MOMENT_PRODUCTIVE: "prod",
MOMENT_NARRATIVE: "narr",
MOMENT_CELEBRATORY: "celeb",
SIZE_BASE: 20,
PROPERTY_MOVE: "move",
PROPERTY_SCALE: "scale",
PROPERTY_FADE: "fade",
PROPERTY_ROTATE: "rotate",
EASE_IN_OUT: "easeInOut",
EASE_IN: "easeIn",
EASE_OUT: "easeOut"
};
},{}],2:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _constants = require('./constants');
var _constants2 = _interopRequireDefault(_constants);
var _helpers = require('./helpers');
var _helpers2 = _interopRequireDefault(_helpers);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getDuration = function getDuration() {
var _distance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
var _size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
var property = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants2.default.PROPERTY_MOVE;
var motionMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _constants2.default.MOMENT_PRODUCTIVE;
var easing = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : _constants2.default.EASE_IN_OUT;
var unit = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'rem';
var remSize = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 16;
if (unit === 'rem') {
if (property === _constants2.default.PROPERTY_MOVE || property === _constants2.default.PROPERTY_SCALE) _distance *= remSize;
_size *= remSize * remSize;
}
var distance = Math.max(10, parseFloat(_distance));
var size = Math.max(unit === 'rem' ? 1 : 16, parseFloat(_size));
var SIZE_BASE = _constants2.default.SIZE_BASE;
var ret = void 0,
sizeFactorNatural = _helpers2.default.getSizeFactor(distance, size, _constants2.default.MOMENT_EXPRESSIVE, 1),
sizeFactorMechanical = _helpers2.default.getSizeFactor(distance, size, _constants2.default.MOMENT_PRODUCTIVE, 1);
switch (property) {
case _constants2.default.PROPERTY_FADE:
{
var SIZE1 = 48 * 48;
var SIZE2 = 400 * 400;
switch (motionMode) {
case _constants2.default.MOMENT_CELEBRATORY:
{
var DUR1 = 310;
var DUR2 = 438;
var SLOPE = (DUR2 - DUR1) / (SIZE2 - SIZE1);
var DISPLACEMENT = DUR1 - SLOPE * SIZE1;
ret = Math.max(310, SLOPE * size + DISPLACEMENT);
break;
}
case _constants2.default.MOMENT_NARRATIVE:
{
var _DUR = 228;
var _DUR2 = 344;
var _SLOPE = (_DUR2 - _DUR) / (SIZE2 - SIZE1);
var _DISPLACEMENT = _DUR - _SLOPE * SIZE1;
ret = Math.max(230, _SLOPE * size + _DISPLACEMENT);
break;
}
case _constants2.default.MOMENT_EXPRESSIVE:
{
var _DUR3 = 146;
var _DUR4 = 240;
var _SLOPE2 = (_DUR4 - _DUR3) / (SIZE2 - SIZE1);
var _DISPLACEMENT2 = _DUR3 - _SLOPE2 * SIZE1;
ret = Math.max(150, _SLOPE2 * size + _DISPLACEMENT2);
break;
}
default:
case _constants2.default.MOMENT_PRODUCTIVE:
{
var _DUR5 = 108;
var _DUR6 = 160;
var _SLOPE3 = (_DUR6 - _DUR5) / (SIZE2 - SIZE1);
var _DISPLACEMENT3 = _DUR5 - _SLOPE3 * SIZE1;
ret = Math.max(110, _SLOPE3 * size + _DISPLACEMENT3);
break;
}
}
ret = ret / 100 * distance;
console.log('fade:ret===' + ret);
break;
}
case _constants2.default.PROPERTY_ROTATE:
{
var _SIZE = 16 * 10;
var _SIZE2 = 400 * 400;
switch (motionMode) {
case _constants2.default.MOMENT_CELEBRATORY:
{
var _DUR7 = 360;
var _DUR8 = 480;
var _SLOPE4 = (_DUR8 - _DUR7) / (_SIZE2 - _SIZE);
var _DISPLACEMENT4 = _DUR7 - _SLOPE4 * _SIZE;
ret = _SLOPE4 * size + _DISPLACEMENT4;
break;
}
case _constants2.default.MOMENT_NARRATIVE:
{
var _DUR9 = 268;
var _DUR10 = 394;
var _SLOPE5 = (_DUR10 - _DUR9) / (_SIZE2 - _SIZE);
var _DISPLACEMENT5 = _DUR9 - _SLOPE5 * _SIZE;
ret = _SLOPE5 * size + _DISPLACEMENT5;
break;
}
case _constants2.default.MOMENT_EXPRESSIVE:
{
var _DUR11 = 188;
var _DUR12 = 280;
var _SLOPE6 = (_DUR12 - _DUR11) / (_SIZE2 - _SIZE);
var _DISPLACEMENT6 = _DUR11 - _SLOPE6 * _SIZE;
ret = _SLOPE6 * size + _DISPLACEMENT6;
break;
}
default:
case _constants2.default.MOMENT_PRODUCTIVE:
{
var _DUR13 = 128;
var _DUR14 = 190;
var _SLOPE7 = (_DUR14 - _DUR13) / (_SIZE2 - _SIZE);
var _DISPLACEMENT7 = _DUR13 - _SLOPE7 * _SIZE;
ret = _SLOPE7 * size + _DISPLACEMENT7;
break;
}
}
ret = ret / 180 * distance;
break;
}
case _constants2.default.PROPERTY_SCALE:
{
var AREA_DELTA_1 = 100 * 200 - 100 * 100;
var AREA_DELTA_2 = 400 * 400 - 100 * 100;
switch (motionMode) {
case _constants2.default.MOMENT_CELEBRATORY:
{
var _DUR15 = 268;
var _DUR16 = 392;
var _SLOPE8 = (_DUR16 - _DUR15) / (AREA_DELTA_2 - AREA_DELTA_1);
var _DISPLACEMENT8 = _DUR15 - _SLOPE8 * AREA_DELTA_1;
ret = _SLOPE8 * size + _DISPLACEMENT8;
break;
}
case _constants2.default.MOMENT_NARRATIVE:
{
var _DUR17 = 208;
var _DUR18 = 260;
var _SLOPE9 = (_DUR18 - _DUR17) / (AREA_DELTA_2 - AREA_DELTA_1);
var _DISPLACEMENT9 = _DUR17 - _SLOPE9 * AREA_DELTA_1;
ret = _SLOPE9 * size + _DISPLACEMENT9;
break;
}
case _constants2.default.MOMENT_EXPRESSIVE:
{
var _DUR19 = 128;
var _DUR20 = 168;
var _SLOPE10 = (_DUR20 - _DUR19) / (AREA_DELTA_2 - AREA_DELTA_1);
var _DISPLACEMENT10 = _DUR19 - _SLOPE10 * AREA_DELTA_1;
ret = _SLOPE10 * size + _DISPLACEMENT10;
break;
}
default:
case _constants2.default.MOMENT_PRODUCTIVE:
{
var _DUR21 = 94;
var _DUR22 = 143;
var _SLOPE11 = (_DUR22 - _DUR21) / (AREA_DELTA_2 - AREA_DELTA_1);
var _DISPLACEMENT11 = _DUR21 - _SLOPE11 * AREA_DELTA_1;
ret = _SLOPE11 * size + _DISPLACEMENT11;
break;
}
}
break;
}
case _constants2.default.PROPERTY_MOVE:
default:
{
var DISTANCE1 = 100;
var DISTANCE2 = 1400;
var SIZE_DUR1 = 200;
var SIZE_DUR2 = 208;
var SIZE_DISTANCE1 = 100 * 100;
var SIZE_DISTANCE2 = 400 * 400;
var SIZE_SLOPE = (SIZE_DUR2 - SIZE_DUR1) / (SIZE_DISTANCE2 - SIZE_DISTANCE1) / SIZE_DUR1;
var SIZE_DISPLACEMENT = (SIZE_DUR2 - SIZE_DISTANCE2 * SIZE_SLOPE) / SIZE_DUR1;
switch (motionMode) {
case _constants2.default.MOMENT_CELEBRATORY:
{
var _DUR23 = 276;
var _DUR24 = 466;
var _SLOPE12 = (_DUR24 - _DUR23) / (DISTANCE2 - DISTANCE1);
var _DISPLACEMENT12 = _DUR23 - _SLOPE12 * DISTANCE1;
ret = _SLOPE12 * distance + _DISPLACEMENT12;
ret = ret * (size * SIZE_SLOPE + SIZE_DISPLACEMENT);
break;
}
case _constants2.default.MOMENT_NARRATIVE:
{
var _DUR25 = 201;
var _DUR26 = 369;
var _SLOPE13 = (_DUR26 - _DUR25) / (DISTANCE2 - DISTANCE1);
var _DISPLACEMENT13 = _DUR25 - _SLOPE13 * DISTANCE1;
ret = _SLOPE13 * distance + _DISPLACEMENT13;
ret = ret * (size * SIZE_SLOPE + SIZE_DISPLACEMENT);
break;
}
case _constants2.default.MOMENT_EXPRESSIVE:
{
var _DUR27 = 128;
var _DUR28 = 268;
var _SLOPE14 = (_DUR28 - _DUR27) / (DISTANCE2 - DISTANCE1);
var _DISPLACEMENT14 = _DUR27 - _SLOPE14 * DISTANCE1;
ret = _SLOPE14 * distance + _DISPLACEMENT14;
ret = ret * (size * SIZE_SLOPE + SIZE_DISPLACEMENT);
break;
}
default:
case _constants2.default.MOMENT_PRODUCTIVE:
{
var _DUR29 = 90;
var _DUR30 = 190;
var _SLOPE15 = (_DUR30 - _DUR29) / (DISTANCE2 - DISTANCE1);
var _DISPLACEMENT15 = _DUR29 - _SLOPE15 * DISTANCE1;
ret = _SLOPE15 * distance + _DISPLACEMENT15;
ret = ret * (size * SIZE_SLOPE + SIZE_DISPLACEMENT);
break;
}
}
break;
}
}
return ret;
};
exports.default = getDuration;
},{"./constants":1,"./helpers":3}],3:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _constants = require('./constants.js');
var _constants2 = _interopRequireDefault(_constants);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getSizeFactor = function getSizeFactor() {
var distance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;
var motionMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants2.default.PRODUCTIVE_MOTION;
var adjustmentFactor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
return Math.min(1.5, Math.pow(_constants2.default.SIZE_BASE / size, (motionMode === _constants2.default.PRODUCTIVE_MOTION ? 0.05 : 0.1) * adjustmentFactor || 1));
};
exports.default = {
getSizeFactor: getSizeFact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