index/
wasm_interface.rs

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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
use js_sys::{Array, Function};
use wasm_bindgen::prelude::*;
use crate::{colors::Color, objects::wasm_interface::{WasmColor, WasmVectorObject}, utils::{add_n_more_subobjects, align_data, align_points, align_subobjects, bezier, bezier_f64, center, choose, consider_points_equals, distance_squared, double_smooth, ease_in_back, ease_in_circ, ease_in_cubic, ease_in_elastic, ease_in_expo, ease_in_out_back, ease_in_out_bounce, ease_in_out_circ, ease_in_out_cubic, ease_in_out_elastic, ease_in_out_expo, ease_in_out_quad, ease_in_out_quart, ease_in_out_quint, ease_in_out_sine, ease_in_quad, ease_in_quart, ease_in_quint, ease_in_sine, ease_out_bounce, ease_out_circ, ease_out_cubic, ease_out_elastic, ease_out_expo, ease_out_quad, ease_out_quart, ease_out_quint, ease_out_sine, elliptical_arc_path, exponential_decay, factorial, get_bbox, get_nth_subpath, has_new_path_begun, hex_to_color, insert_n_curves_to_point_list, integer_interpolate, interpolate, interpolate_color, interpolate_tuple, interpolate_tuple_3d, line_as_cubic_bezier, linear, lingering, not_quite_there, null_point_align, permutation, points_from_anchors_and_handles, quadratic_bezier_as_cubic_bezier, radian, running_start, rush_from, rush_into, sigmoid, sleep, slow_into, smooth, smoothererstep, smootherstep, smoothstep, squish_rate_func, start_new_path, there_and_back, there_and_back_with_pause, wiggle}};

#[wasm_bindgen(js_name = radian)]
pub fn radian_js(ux: f64, uy: f64, vx: f64, vy: f64) -> f64 {
    return radian(ux, uy, vx, vy);
}


#[wasm_bindgen(js_name = sleep)]
pub async fn sleep_js(ms: i32) {
    sleep(ms).await;
}


#[wasm_bindgen(js_name = ellipticalArcPath)]
pub fn elliptical_arc_path_js(
    last_move: Array,
    rx: f64,
    ry: f64,
    rotation: f64,
    large_arc: bool,
    sweep: bool,
    x: f64,
    y: f64
) -> Array {
    let result = elliptical_arc_path(
        (last_move.get(0).as_f64().unwrap(), last_move.get(1).as_f64().unwrap()),
        rx,
        ry,
        rotation,
        large_arc,
        sweep,
        x,
        y
    );
    return Array::from(
        &JsValue::from(result.iter().map(|point| {
            return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
        }).collect::<Array>()),
    );
}


#[wasm_bindgen(js_name = getBbox)]
pub fn get_bbox_js(points: Array) -> Array {
    let points = points.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let result = get_bbox(&points);
    return Array::from(
        &JsValue::from(Array::of2(
            &Array::of2(&JsValue::from_f64(result.0.0), &JsValue::from_f64(result.0.1)),
            &Array::of2(&JsValue::from_f64(result.1.0), &JsValue::from_f64(result.1.1)),
        )),
    );
}


#[wasm_bindgen(js_name = center)]
pub fn center_js(points: Array, center_if_no_points: Array) -> Array {
    let points = points.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let result = center(&points, (center_if_no_points.get(0).as_f64().unwrap(), center_if_no_points.get(1).as_f64().unwrap()));
    return Array::of2(&JsValue::from_f64(result.0), &JsValue::from_f64(result.1));
}


#[wasm_bindgen(js_name = factorial)]
pub fn factorial_js(n: u64) -> u64 {
    return factorial(n);
}


#[wasm_bindgen(js_name = hexToColor)]
pub fn hex_to_color_js(hex: String, a: f64) -> WasmColor {
    return WasmColor { color: hex_to_color(hex.as_str(), a) }
}


#[wasm_bindgen(js_name = bezier)]
pub fn bezier_js(points: Array, t: f64) -> Array {
    let points = points.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let result = bezier(&points, t);
    return Array::of2(&JsValue::from_f64(result.0), &JsValue::from_f64(result.1));
}


#[wasm_bindgen(js_name = bezierNumber)]
pub fn bezier_number_js(numbers: Array, t: f64) -> f64 {
    let numbers = numbers.iter().map(|number| {
        return number.as_f64().unwrap();
    }).collect();
    let result = bezier_f64(numbers, t);
    return result;
}


#[wasm_bindgen(js_name = permutation)]
pub fn permutation_js(n: u64, r: u64) -> u64 {
    return permutation(n, r);
}


#[wasm_bindgen(js_name = choose)]
pub fn choose_js(n: u64, r: u64) -> u64 {
    return choose(n, r);
}


#[wasm_bindgen(js_name = distanceSquared)]
pub fn distance_squared_js(x1: f64, y1: f64, x2: f64, y2: f64) -> f64 {
    return distance_squared((x1, y1), (x2, y2));
}


#[wasm_bindgen(js_name = interpolate)]
pub fn interpolate_js(x: f64, y: f64, t: f64) -> f64 {
    return interpolate(x, y, t);
}


#[wasm_bindgen(js_name = interpolateTuple)]
pub fn interpolate_tuple_js(x: Array, y: Array, t: f64) -> Array {
    let x = (x.get(0).as_f64().unwrap(), x.get(1).as_f64().unwrap());
    let y = (y.get(0).as_f64().unwrap(), y.get(1).as_f64().unwrap());
    let result = interpolate_tuple(x, y, t);
    return Array::of2(&JsValue::from_f64(result.0), &JsValue::from_f64(result.1));
}


#[wasm_bindgen(js_name = interpolateTuple3D)]
pub fn interpolate_tuple_3d_js(x: Array, y: Array, t: f64) -> Array {
    let x = (x.get(0).as_f64().unwrap(), x.get(1).as_f64().unwrap(), x.get(2).as_f64().unwrap());
    let y = (y.get(0).as_f64().unwrap(), y.get(1).as_f64().unwrap(), y.get(2).as_f64().unwrap());
    let result = interpolate_tuple_3d(x, y, t);
    return Array::of3(&JsValue::from_f64(result.0), &JsValue::from_f64(result.1), &JsValue::from_f64(result.2));
}


#[wasm_bindgen(js_name = interpolateColor)]
pub fn interpolate_color_js(x: WasmColor, y: WasmColor, t: f64) -> WasmColor {
    let result = interpolate_color(
        (x.get_r(), x.get_g(), x.get_b(), x.get_a()),
        (y.get_r(), y.get_g(), y.get_b(), y.get_a()),
        t
    );
    return WasmColor { color: Color { red: result.0, blue: result.1, green: result.2, alpha: result.3 } };
}


#[wasm_bindgen(js_name = pointsFromAnchorsAndHandles)]
pub fn points_from_anchors_and_handles_js(
    anchors1: Array,
    handles1: Array,
    handles2: Array,
    anchors2: Array,
) -> Array {
    let anchors1 = anchors1.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let handles1 = handles1.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let handles2 = handles2.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let anchors2 = anchors2.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let result = points_from_anchors_and_handles(anchors1, handles1, handles2, anchors2);
    return result.iter().map(|point| {
        return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
    }).collect();
}


#[wasm_bindgen(js_name = startNewPath)]
pub fn start_new_path_js(points: Array, point: Array) -> Array {
    let points = points.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect::<Vec<(f64, f64)>>();
    let point = (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    let result = start_new_path(&points, point);
    return result.iter().map(|point| {
        return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
    }).collect();
}


#[wasm_bindgen(js_name = hasNewPathBegun)]
pub fn has_new_path_begun_js(points: Array) -> bool {
    let points = points.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    return has_new_path_begun(&points);
}


#[wasm_bindgen(js_name = getNthSubpath)]
pub fn get_nth_subpath_js(points: Array, n: usize) -> Array {
    let points = points.iter().map(|points| {
        let points = points.dyn_into::<Array>().unwrap();
        let points = points.iter().collect::<Vec<JsValue>>();
        let points = points.iter().map(|point| {
            let point = point.clone().dyn_into::<Array>().unwrap();
            return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
        }).collect();
        return points;
    }).collect();
    let result = get_nth_subpath(&points, n);
    return result.iter().map(|point| {
        return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
    }).collect();
}


#[wasm_bindgen(js_name = insertNCurvesToPointList)]
pub fn insert_n_curves_to_point_list_js(n: usize, points: Array) -> Array {
    let points = points.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let result = insert_n_curves_to_point_list(n, &points);
    return result.iter().map(|point| {
        return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
    }).collect();
}


#[wasm_bindgen(js_name = nullPointAlign)]
pub fn null_point_align_js(
    vec_obj1: WasmVectorObject,
    vec_obj2: WasmVectorObject
) -> Array {
    let vec_obj1 = vec_obj1.native_vec_features;
    let vec_obj2 = vec_obj2.native_vec_features;
    let result = null_point_align(vec_obj1, vec_obj2);
    return Array::of2(
        &JsValue::from(WasmVectorObject { native_vec_features: result.0 }),
        &JsValue::from(WasmVectorObject { native_vec_features: result.1 })
    )
}


#[wasm_bindgen(js_name = alignPoints)]
pub fn align_points_js(points1: Array, points2: Array, center_if_no_points: Array) -> Array {
    let points1 = points1.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let points2 = points2.iter().map(|point| {
        let point = point.dyn_into::<Array>().unwrap();
        return (point.get(0).as_f64().unwrap(), point.get(1).as_f64().unwrap());
    }).collect();
    let center_if_no_points = (center_if_no_points.get(0).as_f64().unwrap(), center_if_no_points.get(1).as_f64().unwrap());
    let result = align_points(&points1, &points2, center_if_no_points);
    return Array::of2(
        &JsValue::from(result.0.iter().map(|point| {
            return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
        }).collect::<Array>()),
        &JsValue::from(result.1.iter().map(|point| {
            return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
        }).collect::<Array>())
    )
}


#[wasm_bindgen(js_name = addNMoreSubobjects)]
pub fn add_n_more_subobjects_js(
    vec_obj: WasmVectorObject,
    n: usize,
    center_if_no_points: Array
) -> WasmVectorObject {
    let result = add_n_more_subobjects(vec_obj.native_vec_features, n, (center_if_no_points.get(0).as_f64().unwrap(), center_if_no_points.get(1).as_f64().unwrap()));
    return WasmVectorObject { native_vec_features: result };
}


#[wasm_bindgen(js_name = alignSubobjects)]
pub fn align_subobjects_js(
    vec_obj1: WasmVectorObject,
    vec_obj2: WasmVectorObject,
    center_if_no_points: Array
) -> Vec<WasmVectorObject> {
    let result = align_subobjects(vec_obj1.native_vec_features, vec_obj2.native_vec_features, (center_if_no_points.get(0).as_f64().unwrap(), center_if_no_points.get(1).as_f64().unwrap()));
    return vec![
        WasmVectorObject { native_vec_features: result.0 },
        WasmVectorObject { native_vec_features: result.1 }
    ];
}


#[wasm_bindgen(js_name = alignData)]
pub fn align_data_js(
    vec_obj1: WasmVectorObject,
    vec_obj2: WasmVectorObject,
    skip_point_align: bool,
    center_if_no_points: Array
) -> Array {
    let vec_obj1 = vec_obj1.native_vec_features;
    let vec_obj2 = vec_obj2.native_vec_features;
    let result = align_data(vec_obj1, vec_obj2, skip_point_align, (center_if_no_points.get(0).as_f64().unwrap(), center_if_no_points.get(1).as_f64().unwrap()));
    return Array::of2(
        &JsValue::from(WasmVectorObject { native_vec_features: result.0 }),
        &JsValue::from(WasmVectorObject { native_vec_features: result.1 })
    )
}


#[wasm_bindgen(js_name = integerInterpolate)]
pub fn integer_interpolate_js(x: f64, y: f64, t: f64) -> Array {
    let result = integer_interpolate(x, y, t);
    return Array::of2(&JsValue::from_f64(result.0 as f64), &JsValue::from_f64(result.1));
}


#[wasm_bindgen(js_name = lineAsCubicBezier)]
pub fn line_as_cubic_bezier_js(
    x1: f64,
    y1: f64,
    x2: f64,
    y2: f64
) -> Array {
    let result = line_as_cubic_bezier((x1, y1), (x2, y2));
    return Array::from(
        &JsValue::from(result.iter().map(|point| {
            return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
        }).collect::<Array>()),
    );
}


#[wasm_bindgen(js_name = quadraticBezierAsCubicBezier)]
pub fn quadratic_bezier_as_cubic_bezier_js(
    x1: f64,
    y1: f64,
    x2: f64,
    y2: f64,
    x3: f64,
    y3: f64
) -> Array {
    let result = quadratic_bezier_as_cubic_bezier((x1, y1), (x2, y2), (x3, y3));
    return Array::from(
        &JsValue::from(result.iter().map(|point| {
            return Array::of2(&JsValue::from_f64(point.0), &JsValue::from_f64(point.1));
        }).collect::<Array>()),
    );
}


#[wasm_bindgen(js_name = considerPointsEquals)]
pub fn consider_points_equals_js(
    x1: f64,
    y1: f64,
    x2: f64,
    y2: f64
) -> bool {
    return consider_points_equals((x1, y1), (x2, y2))
}


#[wasm_bindgen(js_name = sigmoid)]
pub fn sigmoid_js(t: f64) -> f64 {
    return sigmoid(t);
}


#[wasm_bindgen(js_name = linear)]
pub fn linear_js(t: f64) -> f64 {
    return linear(t);
}


#[wasm_bindgen(js_name = smooth)]
pub fn smooth_js(t: f64, inflection: f64) -> f64 {
    return smooth(t, inflection);
}


#[wasm_bindgen(js_name = smoothstep)]
pub fn smoothstep_js(t: f64) -> f64 {
    return smoothstep(t);
}


#[wasm_bindgen(js_name = smootherstep)]
pub fn smootherstep_js(t: f64) -> f64 {
    return smootherstep(t);
}


#[wasm_bindgen(js_name = smoothererstep)]
pub fn smoothererstep_js(t: f64) -> f64 {
    return smoothererstep(t);
}


#[wasm_bindgen(js_name = rushInto)]
pub fn rush_into_js(t: f64, inflection: f64) -> f64 {
    return rush_into(t, inflection);
}


#[wasm_bindgen(js_name = rushFrom)]
pub fn rush_from_js(t: f64, inflection: f64) -> f64 {
    return rush_from(t, inflection);
}


#[wasm_bindgen(js_name = slowInto)]
pub fn slow_into_js(t: f64) -> f64 {
    return slow_into(t);
}


#[wasm_bindgen(js_name = doubleSmooth)]
pub fn double_smooth_js(t: f64) -> f64 {
    return double_smooth(t);
}


#[wasm_bindgen(js_name = thereAndBack)]
pub fn there_and_back_js(t: f64, inflection: f64) -> f64 {
    return there_and_back(t, inflection);
}


#[wasm_bindgen(js_name = thereAndBackWithPause)]
pub fn there_and_back_with_pause_js(t: f64, pause_ratio: f64) -> f64 {
    return there_and_back_with_pause(t, pause_ratio);
}


#[wasm_bindgen(js_name = runningStart)]
pub fn running_start_js(t: f64, pull_factor: f64) -> f64 {
    return running_start(t, pull_factor);
}


#[wasm_bindgen(js_name = notQuiteThere)]
pub fn not_quite_there_js(
    func: Function,
    t: f64,
    proportion: f64
) -> f64 {
    let function = |t: f64| -> f64 {
        let this = JsValue::NULL;
        let args = Array::of1(&JsValue::from_f64(t));
        return func.call1(&this, &args).unwrap().as_f64().unwrap();
    };
    return not_quite_there(function, t, proportion);
}


#[wasm_bindgen(js_name = wiggle)]
pub fn wiggle_js(
    t: f64,
    wiggles: f64
) -> f64 {
    return wiggle(t, wiggles);
}


#[wasm_bindgen(js_name = squishRateFunc)]
pub fn squish_rate_func_js(
    func: Function,
    t: f64,
    a: f64,
    b: f64
) -> f64 {
    let function = |t: f64| -> f64 {
        let this = JsValue::NULL;
        let args = Array::of1(&JsValue::from_f64(t));
        return func.call1(&this, &args).unwrap().as_f64().unwrap();
    };
    return squish_rate_func(function, t, a, b);
}


#[wasm_bindgen(js_name = lingering)]
pub fn lingering_js(t: f64) -> f64 {
    return lingering(t);
}


#[wasm_bindgen(js_name = exponentialDecay)]
pub fn exponential_decay_js(
    t: f64,
    half_life: f64
) -> f64 {
    return exponential_decay(t, half_life);
}


#[wasm_bindgen(js_name = easeInSine)]
pub fn ease_in_sine_js(t: f64) -> f64 {
    return ease_in_sine(t);
}


#[wasm_bindgen(js_name = easeOutSine)]
pub fn ease_out_sine_js(t: f64) -> f64 {
    return ease_out_sine(t);
}


#[wasm_bindgen(js_name = easeInOutSine)]
pub fn ease_in_out_sine_js(t: f64) -> f64 {
    return ease_in_out_sine(t);
}


#[wasm_bindgen(js_name = easeInQuad)]
pub fn ease_in_quad_js(t: f64) -> f64 {
    return ease_in_quad(t);
}


#[wasm_bindgen(js_name = easeOutQuad)]
pub fn ease_out_quad_js(t: f64) -> f64 {
    return ease_out_quad(t);
}


#[wasm_bindgen(js_name = easeInOutQuad)]
pub fn ease_in_out_quad_js(t: f64) -> f64 {
    return ease_in_out_quad(t);
}


#[wasm_bindgen(js_name = easeInCubic)]
pub fn ease_in_cubic_js(t: f64) -> f64 {
    return ease_in_cubic(t);
}


#[wasm_bindgen(js_name = easeOutCubic)]
pub fn ease_out_cubic_js(t: f64) -> f64 {
    return ease_out_cubic(t);
}


#[wasm_bindgen(js_name = easeInOutCubic)]
pub fn ease_in_out_cubic_js(t: f64) -> f64 {
    return ease_in_out_cubic(t);
}


#[wasm_bindgen(js_name = easeInQuart)]
pub fn ease_in_quart_js(t: f64) -> f64 {
    return ease_in_quart(t);
}


#[wasm_bindgen(js_name = easeOutQuart)]
pub fn ease_out_quart_js(t: f64) -> f64 {
    return ease_out_quart(t);
}


#[wasm_bindgen(js_name = easeInOutQuart)]
pub fn ease_in_out_quart_js(t: f64) -> f64 {
    return ease_in_out_quart(t);
}


#[wasm_bindgen(js_name = easeInQuint)]
pub fn ease_in_quint_js(t: f64) -> f64 {
    return ease_in_quint(t);
}


#[wasm_bindgen(js_name = easeOutQuint)]
pub fn ease_out_quint_js(t: f64) -> f64 {
    return ease_out_quint(t);
}


#[wasm_bindgen(js_name = easeInOutQuint)]
pub fn ease_in_out_quint_js(t: f64) -> f64 {
    return ease_in_out_quint(t);
}


#[wasm_bindgen(js_name = easeInExpo)]
pub fn ease_in_expo_js(t: f64) -> f64 {
    return ease_in_expo(t);
}


#[wasm_bindgen(js_name = easeOutExpo)]
pub fn ease_out_expo_js(t: f64) -> f64 {
    return ease_out_expo(t);
}


#[wasm_bindgen(js_name = easeInOutExpo)]
pub fn ease_in_out_expo_js(t: f64) -> f64 {
    return ease_in_out_expo(t);
}


#[wasm_bindgen(js_name = easeInCirc)]
pub fn ease_in_circ_js(t: f64) -> f64 {
    return ease_in_circ(t);
}


#[wasm_bindgen(js_name = easeOutCirc)]
pub fn ease_out_circ_js(t: f64) -> f64 {
    return ease_out_circ(t);
}


#[wasm_bindgen(js_name = easeInOutCirc)]
pub fn ease_in_out_circ_js(t: f64) -> f64 {
    return ease_in_out_circ(t);
}


#[wasm_bindgen(js_name = easeInBack)]
pub fn ease_in_back_js(t: f64) -> f64 {
    return ease_in_back(t);
}


#[wasm_bindgen(js_name = easeOutBack)]
pub fn ease_out_back_js(t: f64) -> f64 {
    return ease_in_back(t);
}


#[wasm_bindgen(js_name = easeInOutBack)]
pub fn ease_in_out_back_js(t: f64) -> f64 {
    return ease_in_out_back(t);
}


#[wasm_bindgen(js_name = easeInElastic)]
pub fn ease_in_elastic_js(t: f64) -> f64 {
    return ease_in_elastic(t);
}


#[wasm_bindgen(js_name = easeOutElastic)]
pub fn ease_out_elastic_js(t: f64) -> f64 {
    return ease_out_elastic(t);
}


#[wasm_bindgen(js_name = easeInOutElastic)]
pub fn ease_in_out_elastic_js(t: f64) -> f64 {
    return ease_in_out_elastic(t);
}


#[wasm_bindgen(js_name = easeOutBounce)]
pub fn ease_out_bounce_js(t: f64) -> f64 {
    return ease_out_bounce(t);
}


#[wasm_bindgen(js_name = easeInBounce)]
pub fn ease_in_bounce_js(t: f64) -> f64 {
    return ease_out_bounce(t);
}


#[wasm_bindgen(js_name = easeInOutBounce)]
pub fn ease_in_out_bounce_js(t: f64) -> f64 {
    return ease_in_out_bounce(t);
}