@vived/app 4.8.0 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,6 @@ export * from "./Babylon";
3
3
  export * from "./Camera";
4
4
  export * from "./ChannelModel";
5
5
  export * from "./Dispatcher";
6
- export * from "./Ease";
7
6
  export * from "./Enablement";
8
7
  export * from "./FramedScreen";
9
8
  export * from "./Hideable";
@@ -15,7 +15,6 @@ __exportStar(require("./Babylon"), exports);
15
15
  __exportStar(require("./Camera"), exports);
16
16
  __exportStar(require("./ChannelModel"), exports);
17
17
  __exportStar(require("./Dispatcher"), exports);
18
- __exportStar(require("./Ease"), exports);
19
18
  __exportStar(require("./Enablement"), exports);
20
19
  __exportStar(require("./FramedScreen"), exports);
21
20
  __exportStar(require("./Hideable"), exports);
@@ -0,0 +1,19 @@
1
+ export declare function easeLinear(x: number): number;
2
+ export declare function quadIn(x: number): number;
3
+ export declare function quadOut(x: number): number;
4
+ export declare function quadInOut(x: number): number;
5
+ export declare function cubicIn(x: number): number;
6
+ export declare function cubicOut(x: number): number;
7
+ export declare function cubicInOut(x: number): number;
8
+ export declare function expoIn(x: number): number;
9
+ export declare function expoOut(x: number): number;
10
+ export declare function expoInOut(x: number): number;
11
+ export declare function sinIn(x: number): number;
12
+ export declare function sinOut(x: number): number;
13
+ export declare function sinInOut(x: number): number;
14
+ export declare function quartIn(x: number): number;
15
+ export declare function quartOut(x: number): number;
16
+ export declare function quartInOut(x: number): number;
17
+ export declare function quintIn(x: number): number;
18
+ export declare function quintOut(x: number): number;
19
+ export declare function quintInOut(x: number): number;
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.quintInOut = exports.quintOut = exports.quintIn = exports.quartInOut = exports.quartOut = exports.quartIn = exports.sinInOut = exports.sinOut = exports.sinIn = exports.expoInOut = exports.expoOut = exports.expoIn = exports.cubicInOut = exports.cubicOut = exports.cubicIn = exports.quadInOut = exports.quadOut = exports.quadIn = exports.easeLinear = void 0;
4
+ function easeLinear(x) {
5
+ if (x <= 0)
6
+ return 0;
7
+ if (x >= 1)
8
+ return 1;
9
+ return x;
10
+ }
11
+ exports.easeLinear = easeLinear;
12
+ function quadIn(x) {
13
+ if (x <= 0)
14
+ return 0;
15
+ if (x >= 1)
16
+ return 1;
17
+ return x * x;
18
+ }
19
+ exports.quadIn = quadIn;
20
+ function quadOut(x) {
21
+ if (x <= 0)
22
+ return 0;
23
+ if (x >= 1)
24
+ return 1;
25
+ return x * (2 - x);
26
+ }
27
+ exports.quadOut = quadOut;
28
+ function quadInOut(x) {
29
+ if (x <= 0)
30
+ return 0;
31
+ if (x >= 1)
32
+ return 1;
33
+ if (x < 0.5) {
34
+ return 2 * x * x;
35
+ }
36
+ else {
37
+ return 1 - Math.pow(-2 * x + 2, 2) / 2;
38
+ }
39
+ }
40
+ exports.quadInOut = quadInOut;
41
+ function cubicIn(x) {
42
+ if (x <= 0)
43
+ return 0;
44
+ if (x >= 1)
45
+ return 1;
46
+ return x * x * x;
47
+ }
48
+ exports.cubicIn = cubicIn;
49
+ function cubicOut(x) {
50
+ if (x <= 0)
51
+ return 0;
52
+ if (x >= 1)
53
+ return 1;
54
+ return --x * x * x + 1;
55
+ }
56
+ exports.cubicOut = cubicOut;
57
+ function cubicInOut(x) {
58
+ if (x <= 0)
59
+ return 0;
60
+ if (x >= 1)
61
+ return 1;
62
+ x *= 2;
63
+ if (x <= 1) {
64
+ return (x * x * x) / 2;
65
+ }
66
+ else {
67
+ return ((x -= 2) * x * x + 2) / 2;
68
+ }
69
+ }
70
+ exports.cubicInOut = cubicInOut;
71
+ function expoIn(x) {
72
+ if (x <= 0)
73
+ return 0;
74
+ if (x >= 1)
75
+ return 1;
76
+ return Math.pow(2, 10 * x - 10);
77
+ }
78
+ exports.expoIn = expoIn;
79
+ function expoOut(x) {
80
+ if (x <= 0)
81
+ return 0;
82
+ if (x >= 1)
83
+ return 1;
84
+ return 1 - Math.pow(2, -10 * x);
85
+ }
86
+ exports.expoOut = expoOut;
87
+ function expoInOut(x) {
88
+ if (x <= 0)
89
+ return 0;
90
+ if (x >= 1)
91
+ return 1;
92
+ return x < 0.5
93
+ ? Math.pow(2, 20 * x - 10) / 2
94
+ : (2 - Math.pow(2, -20 * x + 10)) / 2;
95
+ }
96
+ exports.expoInOut = expoInOut;
97
+ function sinIn(x) {
98
+ if (x <= 0)
99
+ return 0;
100
+ if (x >= 1)
101
+ return 1;
102
+ return 1 - Math.cos((x * Math.PI) / 2);
103
+ }
104
+ exports.sinIn = sinIn;
105
+ function sinOut(x) {
106
+ if (x <= 0)
107
+ return 0;
108
+ if (x >= 1)
109
+ return 1;
110
+ return Math.sin((x * Math.PI) / 2);
111
+ }
112
+ exports.sinOut = sinOut;
113
+ function sinInOut(x) {
114
+ if (x <= 0)
115
+ return 0;
116
+ if (x >= 1)
117
+ return 1;
118
+ return -(Math.cos(Math.PI * x) - 1) / 2;
119
+ }
120
+ exports.sinInOut = sinInOut;
121
+ function quartIn(x) {
122
+ if (x <= 0)
123
+ return 0;
124
+ if (x >= 1)
125
+ return 1;
126
+ return x * x * x * x;
127
+ }
128
+ exports.quartIn = quartIn;
129
+ function quartOut(x) {
130
+ if (x <= 0)
131
+ return 0;
132
+ if (x >= 1)
133
+ return 1;
134
+ return 1 - Math.pow(1 - x, 4);
135
+ }
136
+ exports.quartOut = quartOut;
137
+ function quartInOut(x) {
138
+ if (x <= 0)
139
+ return 0;
140
+ if (x >= 1)
141
+ return 1;
142
+ if (x < 0.5) {
143
+ return 8 * x * x * x * x;
144
+ }
145
+ else {
146
+ return 1 - Math.pow(-2 * x + 2, 4) / 2;
147
+ }
148
+ }
149
+ exports.quartInOut = quartInOut;
150
+ function quintIn(x) {
151
+ if (x <= 0)
152
+ return 0;
153
+ if (x >= 1)
154
+ return 1;
155
+ return x * x * x * x * x;
156
+ }
157
+ exports.quintIn = quintIn;
158
+ function quintOut(x) {
159
+ if (x <= 0)
160
+ return 0;
161
+ if (x >= 1)
162
+ return 1;
163
+ return 1 - Math.pow(1 - x, 5);
164
+ }
165
+ exports.quintOut = quintOut;
166
+ function quintInOut(x) {
167
+ if (x <= 0)
168
+ return 0;
169
+ if (x >= 1)
170
+ return 1;
171
+ if (x < 0.5) {
172
+ return 16 * x * x * x * x * x;
173
+ }
174
+ else {
175
+ return 1 - Math.pow(-2 * x + 2, 5) / 2;
176
+ }
177
+ }
178
+ exports.quintInOut = quintInOut;
@@ -1,3 +1,4 @@
1
1
  export * from "./degreesToRadians";
2
2
  export * from "./LengthConverters";
3
3
  export * from "./generateUniqueID";
4
+ export * from "./easeFunctions";
@@ -13,3 +13,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./degreesToRadians"), exports);
14
14
  __exportStar(require("./LengthConverters"), exports);
15
15
  __exportStar(require("./generateUniqueID"), exports);
16
+ __exportStar(require("./easeFunctions"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/app",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
4
4
  "description": "Public package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",