@vived/app 4.8.1 → 4.8.3
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.
- package/lib/Utilities/easeFunctions.d.ts +23 -19
- package/lib/Utilities/easeFunctions.js +68 -39
- package/package.json +1 -1
- package/lib/Components/App/UC/submitError.d.ts +0 -2
- package/lib/Components/App/UC/submitError.js +0 -28
- package/lib/Components/App/UC/submitFatal.d.ts +0 -2
- package/lib/Components/App/UC/submitFatal.js +0 -28
- package/lib/Components/App/UC/submitLog.d.ts +0 -2
- package/lib/Components/App/UC/submitLog.js +0 -28
- package/lib/Components/App/UC/submitWarning.d.ts +0 -2
- package/lib/Components/App/UC/submitWarning.js +0 -28
- package/lib/Components/Camera/Factory/CameraFactoryImp.d.ts +0 -4
- package/lib/Components/Camera/Factory/CameraFactoryImp.js +0 -25
- package/lib/Components/Dispatcher/Mocks/MockLogUC.d.ts +0 -10
- package/lib/Components/Dispatcher/Mocks/MockLogUC.js +0 -14
- package/lib/Components/Ease/Entites/AllLinearEase.d.ts +0 -22
- package/lib/Components/Ease/Entites/AllLinearEase.js +0 -29
- package/lib/Components/Ease/Entites/EaseEntity.d.ts +0 -21
- package/lib/Components/Ease/Entites/EaseEntity.js +0 -8
- package/lib/Components/Ease/index.d.ts +0 -2
- package/lib/Components/Ease/index.js +0 -14
- package/lib/Components/Landmarks/Controller/Mouse/MouseLandmark.d.ts +0 -22
- package/lib/Components/Landmarks/Controller/Mouse/MouseLandmark.js +0 -91
- package/lib/Components/Landmarks/Controller/Touch/TouchLandmark.d.ts +0 -20
- package/lib/Components/Landmarks/Controller/Touch/TouchLandmark.js +0 -84
- package/lib/Components/Landmarks/UseCases/SetOverlayColorUC.d.ts +0 -11
- package/lib/Components/Landmarks/UseCases/SetOverlayColorUC.js +0 -46
- package/lib/Components/Landmarks/UseCases/SetOverlayColorUndoRedo.d.ts +0 -12
- package/lib/Components/Landmarks/UseCases/SetOverlayColorUndoRedo.js +0 -37
- package/lib/Components/Tools/Factory/index.d.ts +0 -2
- package/lib/Components/Tools/Factory/index.js +0 -14
- package/lib/Components/Tools/Factory/setupTool.d.ts +0 -3
- package/lib/Components/Tools/Factory/setupTool.js +0 -12
- package/lib/Components/Tools/Factory/setupToolRepo.d.ts +0 -4
- package/lib/Components/Tools/Factory/setupToolRepo.js +0 -13
- package/lib/ValueObjects/Result.d.ts +0 -30
- package/lib/ValueObjects/Result.js +0 -45
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
7
|
-
export declare
|
|
8
|
-
export declare
|
|
9
|
-
export declare
|
|
10
|
-
export declare
|
|
11
|
-
export declare
|
|
12
|
-
export declare
|
|
13
|
-
export declare
|
|
14
|
-
export declare
|
|
15
|
-
export declare
|
|
16
|
-
export declare
|
|
17
|
-
export declare
|
|
18
|
-
export declare
|
|
19
|
-
export declare
|
|
1
|
+
import { EaseFn } from "../Types";
|
|
2
|
+
export declare const easeLinear: EaseFn;
|
|
3
|
+
export declare const quadIn: EaseFn;
|
|
4
|
+
export declare const quadOut: EaseFn;
|
|
5
|
+
export declare const quadInOut: EaseFn;
|
|
6
|
+
export declare const cubicIn: EaseFn;
|
|
7
|
+
export declare const cubicOut: EaseFn;
|
|
8
|
+
export declare const cubicInOut: EaseFn;
|
|
9
|
+
export declare const expoIn: EaseFn;
|
|
10
|
+
export declare const expoOut: EaseFn;
|
|
11
|
+
export declare const expoInOut: EaseFn;
|
|
12
|
+
export declare const sinIn: EaseFn;
|
|
13
|
+
export declare const sinOut: EaseFn;
|
|
14
|
+
export declare const sinInOut: EaseFn;
|
|
15
|
+
export declare const quartIn: EaseFn;
|
|
16
|
+
export declare const quartOut: EaseFn;
|
|
17
|
+
export declare const quartInOut: EaseFn;
|
|
18
|
+
export declare const quintIn: EaseFn;
|
|
19
|
+
export declare const quintOut: EaseFn;
|
|
20
|
+
export declare const quintInOut: EaseFn;
|
|
21
|
+
export declare const circIn: EaseFn;
|
|
22
|
+
export declare const circOut: EaseFn;
|
|
23
|
+
export declare const circInOut: EaseFn;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
-
|
|
3
|
+
exports.circInOut = exports.circOut = exports.circIn = 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
|
+
const easeLinear = (x) => {
|
|
5
5
|
if (x <= 0)
|
|
6
6
|
return 0;
|
|
7
7
|
if (x >= 1)
|
|
8
8
|
return 1;
|
|
9
9
|
return x;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
exports.easeLinear = easeLinear;
|
|
12
|
-
|
|
12
|
+
const quadIn = (x) => {
|
|
13
13
|
if (x <= 0)
|
|
14
14
|
return 0;
|
|
15
15
|
if (x >= 1)
|
|
16
16
|
return 1;
|
|
17
17
|
return x * x;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
exports.quadIn = quadIn;
|
|
20
|
-
|
|
20
|
+
const quadOut = (x) => {
|
|
21
21
|
if (x <= 0)
|
|
22
22
|
return 0;
|
|
23
23
|
if (x >= 1)
|
|
24
24
|
return 1;
|
|
25
25
|
return x * (2 - x);
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
exports.quadOut = quadOut;
|
|
28
|
-
|
|
28
|
+
const quadInOut = (x) => {
|
|
29
29
|
if (x <= 0)
|
|
30
30
|
return 0;
|
|
31
31
|
if (x >= 1)
|
|
@@ -36,25 +36,25 @@ function quadInOut(x) {
|
|
|
36
36
|
else {
|
|
37
37
|
return 1 - Math.pow(-2 * x + 2, 2) / 2;
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
};
|
|
40
40
|
exports.quadInOut = quadInOut;
|
|
41
|
-
|
|
41
|
+
const cubicIn = (x) => {
|
|
42
42
|
if (x <= 0)
|
|
43
43
|
return 0;
|
|
44
44
|
if (x >= 1)
|
|
45
45
|
return 1;
|
|
46
46
|
return x * x * x;
|
|
47
|
-
}
|
|
47
|
+
};
|
|
48
48
|
exports.cubicIn = cubicIn;
|
|
49
|
-
|
|
49
|
+
const cubicOut = (x) => {
|
|
50
50
|
if (x <= 0)
|
|
51
51
|
return 0;
|
|
52
52
|
if (x >= 1)
|
|
53
53
|
return 1;
|
|
54
54
|
return --x * x * x + 1;
|
|
55
|
-
}
|
|
55
|
+
};
|
|
56
56
|
exports.cubicOut = cubicOut;
|
|
57
|
-
|
|
57
|
+
const cubicInOut = (x) => {
|
|
58
58
|
if (x <= 0)
|
|
59
59
|
return 0;
|
|
60
60
|
if (x >= 1)
|
|
@@ -66,25 +66,25 @@ function cubicInOut(x) {
|
|
|
66
66
|
else {
|
|
67
67
|
return ((x -= 2) * x * x + 2) / 2;
|
|
68
68
|
}
|
|
69
|
-
}
|
|
69
|
+
};
|
|
70
70
|
exports.cubicInOut = cubicInOut;
|
|
71
|
-
|
|
71
|
+
const expoIn = (x) => {
|
|
72
72
|
if (x <= 0)
|
|
73
73
|
return 0;
|
|
74
74
|
if (x >= 1)
|
|
75
75
|
return 1;
|
|
76
76
|
return Math.pow(2, 10 * x - 10);
|
|
77
|
-
}
|
|
77
|
+
};
|
|
78
78
|
exports.expoIn = expoIn;
|
|
79
|
-
|
|
79
|
+
const expoOut = (x) => {
|
|
80
80
|
if (x <= 0)
|
|
81
81
|
return 0;
|
|
82
82
|
if (x >= 1)
|
|
83
83
|
return 1;
|
|
84
84
|
return 1 - Math.pow(2, -10 * x);
|
|
85
|
-
}
|
|
85
|
+
};
|
|
86
86
|
exports.expoOut = expoOut;
|
|
87
|
-
|
|
87
|
+
const expoInOut = (x) => {
|
|
88
88
|
if (x <= 0)
|
|
89
89
|
return 0;
|
|
90
90
|
if (x >= 1)
|
|
@@ -92,49 +92,49 @@ function expoInOut(x) {
|
|
|
92
92
|
return x < 0.5
|
|
93
93
|
? Math.pow(2, 20 * x - 10) / 2
|
|
94
94
|
: (2 - Math.pow(2, -20 * x + 10)) / 2;
|
|
95
|
-
}
|
|
95
|
+
};
|
|
96
96
|
exports.expoInOut = expoInOut;
|
|
97
|
-
|
|
97
|
+
const sinIn = (x) => {
|
|
98
98
|
if (x <= 0)
|
|
99
99
|
return 0;
|
|
100
100
|
if (x >= 1)
|
|
101
101
|
return 1;
|
|
102
102
|
return 1 - Math.cos((x * Math.PI) / 2);
|
|
103
|
-
}
|
|
103
|
+
};
|
|
104
104
|
exports.sinIn = sinIn;
|
|
105
|
-
|
|
105
|
+
const sinOut = (x) => {
|
|
106
106
|
if (x <= 0)
|
|
107
107
|
return 0;
|
|
108
108
|
if (x >= 1)
|
|
109
109
|
return 1;
|
|
110
110
|
return Math.sin((x * Math.PI) / 2);
|
|
111
|
-
}
|
|
111
|
+
};
|
|
112
112
|
exports.sinOut = sinOut;
|
|
113
|
-
|
|
113
|
+
const sinInOut = (x) => {
|
|
114
114
|
if (x <= 0)
|
|
115
115
|
return 0;
|
|
116
116
|
if (x >= 1)
|
|
117
117
|
return 1;
|
|
118
118
|
return -(Math.cos(Math.PI * x) - 1) / 2;
|
|
119
|
-
}
|
|
119
|
+
};
|
|
120
120
|
exports.sinInOut = sinInOut;
|
|
121
|
-
|
|
121
|
+
const quartIn = (x) => {
|
|
122
122
|
if (x <= 0)
|
|
123
123
|
return 0;
|
|
124
124
|
if (x >= 1)
|
|
125
125
|
return 1;
|
|
126
126
|
return x * x * x * x;
|
|
127
|
-
}
|
|
127
|
+
};
|
|
128
128
|
exports.quartIn = quartIn;
|
|
129
|
-
|
|
129
|
+
const quartOut = (x) => {
|
|
130
130
|
if (x <= 0)
|
|
131
131
|
return 0;
|
|
132
132
|
if (x >= 1)
|
|
133
133
|
return 1;
|
|
134
134
|
return 1 - Math.pow(1 - x, 4);
|
|
135
|
-
}
|
|
135
|
+
};
|
|
136
136
|
exports.quartOut = quartOut;
|
|
137
|
-
|
|
137
|
+
const quartInOut = (x) => {
|
|
138
138
|
if (x <= 0)
|
|
139
139
|
return 0;
|
|
140
140
|
if (x >= 1)
|
|
@@ -145,25 +145,25 @@ function quartInOut(x) {
|
|
|
145
145
|
else {
|
|
146
146
|
return 1 - Math.pow(-2 * x + 2, 4) / 2;
|
|
147
147
|
}
|
|
148
|
-
}
|
|
148
|
+
};
|
|
149
149
|
exports.quartInOut = quartInOut;
|
|
150
|
-
|
|
150
|
+
const quintIn = (x) => {
|
|
151
151
|
if (x <= 0)
|
|
152
152
|
return 0;
|
|
153
153
|
if (x >= 1)
|
|
154
154
|
return 1;
|
|
155
155
|
return x * x * x * x * x;
|
|
156
|
-
}
|
|
156
|
+
};
|
|
157
157
|
exports.quintIn = quintIn;
|
|
158
|
-
|
|
158
|
+
const quintOut = (x) => {
|
|
159
159
|
if (x <= 0)
|
|
160
160
|
return 0;
|
|
161
161
|
if (x >= 1)
|
|
162
162
|
return 1;
|
|
163
163
|
return 1 - Math.pow(1 - x, 5);
|
|
164
|
-
}
|
|
164
|
+
};
|
|
165
165
|
exports.quintOut = quintOut;
|
|
166
|
-
|
|
166
|
+
const quintInOut = (x) => {
|
|
167
167
|
if (x <= 0)
|
|
168
168
|
return 0;
|
|
169
169
|
if (x >= 1)
|
|
@@ -174,5 +174,34 @@ function quintInOut(x) {
|
|
|
174
174
|
else {
|
|
175
175
|
return 1 - Math.pow(-2 * x + 2, 5) / 2;
|
|
176
176
|
}
|
|
177
|
-
}
|
|
177
|
+
};
|
|
178
178
|
exports.quintInOut = quintInOut;
|
|
179
|
+
const circIn = (x) => {
|
|
180
|
+
if (x <= 0)
|
|
181
|
+
return 0;
|
|
182
|
+
if (x >= 1)
|
|
183
|
+
return 1;
|
|
184
|
+
return 1 - Math.sqrt(1 - Math.pow(x, 2));
|
|
185
|
+
};
|
|
186
|
+
exports.circIn = circIn;
|
|
187
|
+
const circOut = (x) => {
|
|
188
|
+
if (x <= 0)
|
|
189
|
+
return 0;
|
|
190
|
+
if (x >= 1)
|
|
191
|
+
return 1;
|
|
192
|
+
return Math.sqrt(1 - Math.pow(x - 1, 2));
|
|
193
|
+
};
|
|
194
|
+
exports.circOut = circOut;
|
|
195
|
+
const circInOut = (x) => {
|
|
196
|
+
if (x <= 0)
|
|
197
|
+
return 0;
|
|
198
|
+
if (x >= 1)
|
|
199
|
+
return 1;
|
|
200
|
+
if (x < 0.5) {
|
|
201
|
+
return (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
return (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
exports.circInOut = circInOut;
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitError = void 0;
|
|
4
|
-
const Dispatcher_1 = require("../../Dispatcher");
|
|
5
|
-
const LogUC_1 = require("../../Dispatcher/UC/LogUC");
|
|
6
|
-
function submitError(sender, message, appObjects, showAlert = true) {
|
|
7
|
-
const logUC = LogUC_1.LogUC.get(appObjects);
|
|
8
|
-
if (logUC) {
|
|
9
|
-
logUC.error(sender, message);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
console.error(`[${sender}]: ${message}`);
|
|
13
|
-
}
|
|
14
|
-
if (!showAlert)
|
|
15
|
-
return;
|
|
16
|
-
const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
|
|
17
|
-
if (!alert)
|
|
18
|
-
return;
|
|
19
|
-
alert.showAlert({
|
|
20
|
-
title: "Error",
|
|
21
|
-
closeButtonLabel: "Close",
|
|
22
|
-
closeCallback: () => {
|
|
23
|
-
// done
|
|
24
|
-
},
|
|
25
|
-
message: `[${sender}]: ${message}`
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
exports.submitError = submitError;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitFatal = void 0;
|
|
4
|
-
const Dispatcher_1 = require("../../Dispatcher");
|
|
5
|
-
const LogUC_1 = require("../../Dispatcher/UC/LogUC");
|
|
6
|
-
function submitFatal(sender, message, appObjects, showAlert = true) {
|
|
7
|
-
const logUC = LogUC_1.LogUC.get(appObjects);
|
|
8
|
-
if (logUC) {
|
|
9
|
-
logUC.fatal(sender, message);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
console.error(`[${sender}]: ${message}`);
|
|
13
|
-
}
|
|
14
|
-
if (!showAlert)
|
|
15
|
-
return;
|
|
16
|
-
const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
|
|
17
|
-
if (!alert)
|
|
18
|
-
return;
|
|
19
|
-
alert.showAlert({
|
|
20
|
-
title: "Fatal Error",
|
|
21
|
-
closeButtonLabel: "Close",
|
|
22
|
-
closeCallback: () => {
|
|
23
|
-
// done
|
|
24
|
-
},
|
|
25
|
-
message: `[${sender}]: ${message}`
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
exports.submitFatal = submitFatal;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitLog = void 0;
|
|
4
|
-
const Dispatcher_1 = require("../../Dispatcher");
|
|
5
|
-
const LogUC_1 = require("../../Dispatcher/UC/LogUC");
|
|
6
|
-
function submitLog(sender, message, appObjects, showAlert = false) {
|
|
7
|
-
const logUC = LogUC_1.LogUC.get(appObjects);
|
|
8
|
-
if (logUC) {
|
|
9
|
-
logUC.log(sender, message);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
console.log(`[${sender}]: ${message}`);
|
|
13
|
-
}
|
|
14
|
-
if (!showAlert)
|
|
15
|
-
return;
|
|
16
|
-
const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
|
|
17
|
-
if (!alert)
|
|
18
|
-
return;
|
|
19
|
-
alert.showAlert({
|
|
20
|
-
title: "Log",
|
|
21
|
-
closeButtonLabel: "Close",
|
|
22
|
-
closeCallback: () => {
|
|
23
|
-
// done
|
|
24
|
-
},
|
|
25
|
-
message: `[${sender}]: ${message}`
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
exports.submitLog = submitLog;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitWarning = void 0;
|
|
4
|
-
const Dispatcher_1 = require("../../Dispatcher");
|
|
5
|
-
const LogUC_1 = require("../../Dispatcher/UC/LogUC");
|
|
6
|
-
function submitWarning(sender, message, appObjects, showAlert = false) {
|
|
7
|
-
const logUC = LogUC_1.LogUC.get(appObjects);
|
|
8
|
-
if (logUC) {
|
|
9
|
-
logUC.warn(sender, message);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
console.warn(`[${sender}]: ${message}`);
|
|
13
|
-
}
|
|
14
|
-
if (!showAlert)
|
|
15
|
-
return;
|
|
16
|
-
const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
|
|
17
|
-
if (!alert)
|
|
18
|
-
return;
|
|
19
|
-
alert.showAlert({
|
|
20
|
-
title: "Warning",
|
|
21
|
-
closeButtonLabel: "Close",
|
|
22
|
-
closeCallback: () => {
|
|
23
|
-
// done
|
|
24
|
-
},
|
|
25
|
-
message: `[${sender}]: ${message}`
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
exports.submitWarning = submitWarning;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeCameraFactory = void 0;
|
|
4
|
-
const AppObjectComponents_1 = require("@vived/app/lib/AppObjectComponents");
|
|
5
|
-
const CameraEntity_1 = require("../Entities/CameraEntity");
|
|
6
|
-
const CameraFactory_1 = require("../Entities/CameraFactory");
|
|
7
|
-
const CameraPM_1 = require("../PM/CameraPM");
|
|
8
|
-
function makeCameraFactory(appObject, entities) {
|
|
9
|
-
return new CameraFactoryImp(appObject, entities);
|
|
10
|
-
}
|
|
11
|
-
exports.makeCameraFactory = makeCameraFactory;
|
|
12
|
-
class CameraFactoryImp extends CameraFactory_1.CameraFactory {
|
|
13
|
-
constructor(appObject, entities) {
|
|
14
|
-
super(appObject, CameraFactory_1.CameraFactory.type);
|
|
15
|
-
this.entities = entities;
|
|
16
|
-
this.setupCamera = () => {
|
|
17
|
-
const appObjects = this.entities.appObjects;
|
|
18
|
-
const cameraEntityAo = appObjects.getOrCreate(CameraFactory_1.CameraFactory.entityAppObjectId);
|
|
19
|
-
new AppObjectComponents_1.Transform3D(cameraEntityAo);
|
|
20
|
-
const cameraEntity = CameraEntity_1.makeCameraEntity(cameraEntityAo);
|
|
21
|
-
CameraPM_1.makeCameraPM(cameraEntityAo);
|
|
22
|
-
return cameraEntity;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
3
|
-
import { LogUC } from "../UC/LogUC";
|
|
4
|
-
export declare class MockLogUC extends LogUC {
|
|
5
|
-
log: jest.Mock<any, any>;
|
|
6
|
-
warn: jest.Mock<any, any>;
|
|
7
|
-
error: jest.Mock<any, any>;
|
|
8
|
-
fatal: jest.Mock<any, any>;
|
|
9
|
-
constructor(appObject: AppObject);
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MockLogUC = void 0;
|
|
4
|
-
const LogUC_1 = require("../UC/LogUC");
|
|
5
|
-
class MockLogUC extends LogUC_1.LogUC {
|
|
6
|
-
constructor(appObject) {
|
|
7
|
-
super(appObject, LogUC_1.LogUC.type);
|
|
8
|
-
this.log = jest.fn();
|
|
9
|
-
this.warn = jest.fn();
|
|
10
|
-
this.error = jest.fn();
|
|
11
|
-
this.fatal = jest.fn();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.MockLogUC = MockLogUC;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject";
|
|
2
|
-
import { EaseEntity } from "./EaseEntity";
|
|
3
|
-
export declare class AllLinearEase extends EaseEntity {
|
|
4
|
-
linearFn: (val: number) => number;
|
|
5
|
-
linear: (val: number) => number;
|
|
6
|
-
quadIn: (val: number) => number;
|
|
7
|
-
quadOut: (val: number) => number;
|
|
8
|
-
quadInOut: (val: number) => number;
|
|
9
|
-
cubicIn: (val: number) => number;
|
|
10
|
-
cubicOut: (val: number) => number;
|
|
11
|
-
cubicInOut: (val: number) => number;
|
|
12
|
-
sinIn: (val: number) => number;
|
|
13
|
-
sinOut: (val: number) => number;
|
|
14
|
-
sinInOut: (val: number) => number;
|
|
15
|
-
expIn: (val: number) => number;
|
|
16
|
-
expOut: (val: number) => number;
|
|
17
|
-
expInOut: (val: number) => number;
|
|
18
|
-
circleIn: (val: number) => number;
|
|
19
|
-
circleOut: (val: number) => number;
|
|
20
|
-
circleInOut: (val: number) => number;
|
|
21
|
-
constructor(appObject: AppObject);
|
|
22
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AllLinearEase = void 0;
|
|
4
|
-
const EaseEntity_1 = require("./EaseEntity");
|
|
5
|
-
class AllLinearEase extends EaseEntity_1.EaseEntity {
|
|
6
|
-
constructor(appObject) {
|
|
7
|
-
super(appObject, EaseEntity_1.EaseEntity.type);
|
|
8
|
-
this.linearFn = (val) => {
|
|
9
|
-
return val;
|
|
10
|
-
};
|
|
11
|
-
this.linear = this.linearFn;
|
|
12
|
-
this.quadIn = this.linearFn;
|
|
13
|
-
this.quadOut = this.linearFn;
|
|
14
|
-
this.quadInOut = this.linearFn;
|
|
15
|
-
this.cubicIn = this.linearFn;
|
|
16
|
-
this.cubicOut = this.linearFn;
|
|
17
|
-
this.cubicInOut = this.linearFn;
|
|
18
|
-
this.sinIn = this.linearFn;
|
|
19
|
-
this.sinOut = this.linearFn;
|
|
20
|
-
this.sinInOut = this.linearFn;
|
|
21
|
-
this.expIn = this.linearFn;
|
|
22
|
-
this.expOut = this.linearFn;
|
|
23
|
-
this.expInOut = this.linearFn;
|
|
24
|
-
this.circleIn = this.linearFn;
|
|
25
|
-
this.circleOut = this.linearFn;
|
|
26
|
-
this.circleInOut = this.linearFn;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.AllLinearEase = AllLinearEase;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AppObjectEntity } from "../../../AppObject";
|
|
2
|
-
import { EaseFn } from "../../../Types";
|
|
3
|
-
export declare abstract class EaseEntity extends AppObjectEntity {
|
|
4
|
-
static type: string;
|
|
5
|
-
abstract linear: EaseFn;
|
|
6
|
-
abstract quadIn: EaseFn;
|
|
7
|
-
abstract quadOut: EaseFn;
|
|
8
|
-
abstract quadInOut: EaseFn;
|
|
9
|
-
abstract cubicIn: EaseFn;
|
|
10
|
-
abstract cubicOut: EaseFn;
|
|
11
|
-
abstract cubicInOut: EaseFn;
|
|
12
|
-
abstract sinIn: EaseFn;
|
|
13
|
-
abstract sinOut: EaseFn;
|
|
14
|
-
abstract sinInOut: EaseFn;
|
|
15
|
-
abstract expIn: EaseFn;
|
|
16
|
-
abstract expOut: EaseFn;
|
|
17
|
-
abstract expInOut: EaseFn;
|
|
18
|
-
abstract circleIn: EaseFn;
|
|
19
|
-
abstract circleOut: EaseFn;
|
|
20
|
-
abstract circleInOut: EaseFn;
|
|
21
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EaseEntity = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
class EaseEntity extends AppObject_1.AppObjectEntity {
|
|
6
|
-
}
|
|
7
|
-
exports.EaseEntity = EaseEntity;
|
|
8
|
-
EaseEntity.type = "EaseEntity";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./Entites/EaseEntity"), exports);
|
|
14
|
-
__exportStar(require("./Entites/AllLinearEase"), exports);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
-
import { MouseController, MouseInputEvent } from "../../../MouseInput";
|
|
3
|
-
export declare abstract class MouseLandmark extends AppObjectController implements MouseController {
|
|
4
|
-
static type: string;
|
|
5
|
-
addingLandmark: boolean;
|
|
6
|
-
pressed: boolean;
|
|
7
|
-
abstract onMove: (e: MouseInputEvent) => void;
|
|
8
|
-
abstract onDown: (e: MouseInputEvent) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function makeMouseLandmark(appObject: AppObject): MouseLandmarkImp;
|
|
11
|
-
declare class MouseLandmarkImp extends MouseLandmark {
|
|
12
|
-
addingLandmark: boolean;
|
|
13
|
-
pressed: boolean;
|
|
14
|
-
private tryPreviewLandmarkUc?;
|
|
15
|
-
private tryAddLandmarkUc?;
|
|
16
|
-
allow: (e: MouseInputEvent) => boolean;
|
|
17
|
-
onMove: (e: MouseInputEvent) => void;
|
|
18
|
-
onDown: (e: MouseInputEvent) => void;
|
|
19
|
-
onUp: (e: MouseInputEvent) => void;
|
|
20
|
-
constructor(appObject: AppObject);
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeMouseLandmark = exports.MouseLandmark = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
-
const Babylon_1 = require("../../../Babylon");
|
|
6
|
-
const MouseInput_1 = require("../../../MouseInput");
|
|
7
|
-
const LandmarkGlobals_1 = require("../../Entities/LandmarkGlobals");
|
|
8
|
-
const TryAddNewLandmarkUC_1 = require("../../UseCases/TryAddNewLandmarkUC");
|
|
9
|
-
const TryPreviewLandmarkUC_1 = require("../../UseCases/TryPreviewLandmarkUC");
|
|
10
|
-
class MouseLandmark extends AppObject_1.AppObjectController {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.addingLandmark = false;
|
|
14
|
-
this.pressed = false;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.MouseLandmark = MouseLandmark;
|
|
18
|
-
MouseLandmark.type = "Mouse_Landmark_Controller";
|
|
19
|
-
function makeMouseLandmark(appObject) {
|
|
20
|
-
return new MouseLandmarkImp(appObject);
|
|
21
|
-
}
|
|
22
|
-
exports.makeMouseLandmark = makeMouseLandmark;
|
|
23
|
-
class MouseLandmarkImp extends MouseLandmark {
|
|
24
|
-
constructor(appObject) {
|
|
25
|
-
super(appObject, MouseLandmark.type);
|
|
26
|
-
this.addingLandmark = false;
|
|
27
|
-
this.pressed = false;
|
|
28
|
-
this.allow = (e) => {
|
|
29
|
-
return true;
|
|
30
|
-
};
|
|
31
|
-
this.onMove = (e) => {
|
|
32
|
-
if (!this.allow(e))
|
|
33
|
-
return;
|
|
34
|
-
if (!this.tryPreviewLandmarkUc) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
|
|
38
|
-
this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, this.pressed);
|
|
39
|
-
};
|
|
40
|
-
this.onDown = (e) => {
|
|
41
|
-
this.addingLandmark = false;
|
|
42
|
-
if (e.button !== 0)
|
|
43
|
-
return;
|
|
44
|
-
if (!this.allow(e))
|
|
45
|
-
return;
|
|
46
|
-
if (!this.tryPreviewLandmarkUc) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
|
|
50
|
-
const pressed = true;
|
|
51
|
-
this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, pressed);
|
|
52
|
-
this.addingLandmark = true;
|
|
53
|
-
this.pressed = true;
|
|
54
|
-
};
|
|
55
|
-
this.onUp = (e) => {
|
|
56
|
-
var _a;
|
|
57
|
-
if (!this.allow(e))
|
|
58
|
-
return;
|
|
59
|
-
if (!this.addingLandmark)
|
|
60
|
-
return;
|
|
61
|
-
if (!this.tryAddLandmarkUc)
|
|
62
|
-
return;
|
|
63
|
-
const landmarkPreview = (_a = this.appObject.getComponent(LandmarkGlobals_1.LandmarkGlobals.type)) === null || _a === void 0 ? void 0 : _a.previewLandmark;
|
|
64
|
-
if (!landmarkPreview) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
|
|
68
|
-
this.tryAddLandmarkUc.addFromRay(ray);
|
|
69
|
-
landmarkPreview.hideable.isHidden = true;
|
|
70
|
-
this.addingLandmark = false;
|
|
71
|
-
this.pressed = false;
|
|
72
|
-
};
|
|
73
|
-
this.tryPreviewLandmarkUc = TryPreviewLandmarkUC_1.TryPreviewLandmarkUC.get(appObject);
|
|
74
|
-
if (!this.tryPreviewLandmarkUc) {
|
|
75
|
-
this.warn("Unable to find TryPreviewLandmarkUC");
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
this.tryAddLandmarkUc = TryAddNewLandmarkUC_1.TryAddNewLandmarkUC.get(appObject);
|
|
79
|
-
if (!this.tryAddLandmarkUc) {
|
|
80
|
-
this.warn("Unable to find TryAddNewLandmarkUC");
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const mouseInput = MouseInput_1.MouseInputEntity.get(this.appObjects);
|
|
84
|
-
if (mouseInput) {
|
|
85
|
-
mouseInput.registerController(this);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
this.warn("Unable to find MouseInputEntity");
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
-
import { TouchController, TouchInputEvent } from "../../../TouchController";
|
|
3
|
-
export declare abstract class TouchLandmark extends AppObjectController implements TouchController {
|
|
4
|
-
static type: string;
|
|
5
|
-
abstract onTouchStart(e: TouchInputEvent): void;
|
|
6
|
-
abstract onTouchMove(e: TouchInputEvent): void;
|
|
7
|
-
abstract onTouchEnd(e: TouchInputEvent): void;
|
|
8
|
-
}
|
|
9
|
-
export declare function makeTouchLandmark(appObject: AppObject): TouchLandmarkImp;
|
|
10
|
-
declare class TouchLandmarkImp extends TouchLandmark {
|
|
11
|
-
private lastTouch;
|
|
12
|
-
private tryPreviewLandmarkUc?;
|
|
13
|
-
private tryAddLandmarkUc?;
|
|
14
|
-
allow: (e: TouchInputEvent) => boolean;
|
|
15
|
-
onTouchStart: (e: TouchInputEvent) => void;
|
|
16
|
-
onTouchMove: (e: TouchInputEvent) => void;
|
|
17
|
-
onTouchEnd: (e: TouchInputEvent) => void;
|
|
18
|
-
constructor(appObject: AppObject);
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeTouchLandmark = exports.TouchLandmark = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
-
const ValueObjects_1 = require("../../../../ValueObjects");
|
|
6
|
-
const Babylon_1 = require("../../../Babylon");
|
|
7
|
-
const TouchController_1 = require("../../../TouchController");
|
|
8
|
-
const LandmarkGlobals_1 = require("../../Entities/LandmarkGlobals");
|
|
9
|
-
const TryAddNewLandmarkUC_1 = require("../../UseCases/TryAddNewLandmarkUC");
|
|
10
|
-
const TryPreviewLandmarkUC_1 = require("../../UseCases/TryPreviewLandmarkUC");
|
|
11
|
-
class TouchLandmark extends AppObject_1.AppObjectController {
|
|
12
|
-
}
|
|
13
|
-
exports.TouchLandmark = TouchLandmark;
|
|
14
|
-
TouchLandmark.type = "TOUCH_LANDMARK_CONTROLLER";
|
|
15
|
-
function makeTouchLandmark(appObject) {
|
|
16
|
-
return new TouchLandmarkImp(appObject);
|
|
17
|
-
}
|
|
18
|
-
exports.makeTouchLandmark = makeTouchLandmark;
|
|
19
|
-
class TouchLandmarkImp extends TouchLandmark {
|
|
20
|
-
constructor(appObject) {
|
|
21
|
-
super(appObject, TouchLandmark.type);
|
|
22
|
-
this.lastTouch = ValueObjects_1.Vector2.Zero();
|
|
23
|
-
this.allow = (e) => {
|
|
24
|
-
return true;
|
|
25
|
-
};
|
|
26
|
-
this.onTouchStart = (e) => {
|
|
27
|
-
if (!this.allow(e))
|
|
28
|
-
return;
|
|
29
|
-
if (e.touchCount > 1)
|
|
30
|
-
return;
|
|
31
|
-
if (!this.tryPreviewLandmarkUc)
|
|
32
|
-
return;
|
|
33
|
-
const position = e.touches[0].position;
|
|
34
|
-
this.lastTouch = position;
|
|
35
|
-
const ray = Babylon_1.pixelToSceneRay(position, this.appObjects);
|
|
36
|
-
this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, true);
|
|
37
|
-
};
|
|
38
|
-
this.onTouchMove = (e) => {
|
|
39
|
-
if (!this.allow(e))
|
|
40
|
-
return;
|
|
41
|
-
if (e.touchCount > 1)
|
|
42
|
-
return;
|
|
43
|
-
if (!this.tryPreviewLandmarkUc)
|
|
44
|
-
return;
|
|
45
|
-
const position = e.touches[0].position;
|
|
46
|
-
this.lastTouch = position;
|
|
47
|
-
const ray = Babylon_1.pixelToSceneRay(position, this.appObjects);
|
|
48
|
-
this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, true);
|
|
49
|
-
};
|
|
50
|
-
this.onTouchEnd = (e) => {
|
|
51
|
-
var _a;
|
|
52
|
-
if (!this.allow(e))
|
|
53
|
-
return;
|
|
54
|
-
if (e.touchCount > 1)
|
|
55
|
-
return;
|
|
56
|
-
if (!this.tryAddLandmarkUc)
|
|
57
|
-
return;
|
|
58
|
-
const landmarkPreview = (_a = this.appObject.getComponent(LandmarkGlobals_1.LandmarkGlobals.type)) === null || _a === void 0 ? void 0 : _a.previewLandmark;
|
|
59
|
-
if (!landmarkPreview) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const ray = Babylon_1.pixelToSceneRay(this.lastTouch, this.appObjects);
|
|
63
|
-
this.tryAddLandmarkUc.addFromRay(ray);
|
|
64
|
-
landmarkPreview.hideable.isHidden = true;
|
|
65
|
-
};
|
|
66
|
-
this.tryPreviewLandmarkUc = TryPreviewLandmarkUC_1.TryPreviewLandmarkUC.get(appObject);
|
|
67
|
-
if (!this.tryPreviewLandmarkUc) {
|
|
68
|
-
this.warn("Unable to find TryPreviewLandmarkUC");
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
this.tryAddLandmarkUc = TryAddNewLandmarkUC_1.TryAddNewLandmarkUC.get(appObject);
|
|
72
|
-
if (!this.tryAddLandmarkUc) {
|
|
73
|
-
this.warn("Unable to find TryAddNewLandmarkUC");
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const touchInput = TouchController_1.TouchInputEntity.get(this.appObjects);
|
|
77
|
-
if (touchInput) {
|
|
78
|
-
touchInput.registerController(this);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
this.warn("Unable to find TouchInputEntity");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
|
-
import { OverlayColorEnums } from "../../OverlayColor";
|
|
3
|
-
export declare class SetOverlayColorUC extends AppObjectUC {
|
|
4
|
-
static readonly type = "SetOverlayColorUC";
|
|
5
|
-
private overlayColor?;
|
|
6
|
-
private landmarkGlobals?;
|
|
7
|
-
setOverlayColor: (color: OverlayColorEnums) => void;
|
|
8
|
-
dispose: () => void;
|
|
9
|
-
constructor(appObject: AppObject);
|
|
10
|
-
static get(appObj: AppObject): SetOverlayColorUC | undefined;
|
|
11
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SetOverlayColorUC = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const Dispatcher_1 = require("../../Dispatcher");
|
|
6
|
-
const OverlayColor_1 = require("../../OverlayColor");
|
|
7
|
-
const LandmarkGlobals_1 = require("../Entities/LandmarkGlobals");
|
|
8
|
-
const SetOverlayColorUndoRedo_1 = require("./SetOverlayColorUndoRedo");
|
|
9
|
-
class SetOverlayColorUC extends AppObject_1.AppObjectUC {
|
|
10
|
-
constructor(appObject) {
|
|
11
|
-
super(appObject, SetOverlayColorUC.type);
|
|
12
|
-
this.setOverlayColor = (color) => {
|
|
13
|
-
if (!this.overlayColor)
|
|
14
|
-
return;
|
|
15
|
-
if (!this.landmarkGlobals)
|
|
16
|
-
return;
|
|
17
|
-
if (this.overlayColor.overlayColor === color)
|
|
18
|
-
return;
|
|
19
|
-
const prevColor = this.overlayColor.overlayColor;
|
|
20
|
-
this.overlayColor.overlayColor = color;
|
|
21
|
-
Dispatcher_1.dispatchStateChange(this.appObjects);
|
|
22
|
-
new SetOverlayColorUndoRedo_1.SetOverlayColorUndoRedo(color, prevColor, this.appObject);
|
|
23
|
-
this.landmarkGlobals.lastColor = color;
|
|
24
|
-
};
|
|
25
|
-
this.dispose = () => {
|
|
26
|
-
var _a;
|
|
27
|
-
super.dispose();
|
|
28
|
-
(_a = this.overlayColor) === null || _a === void 0 ? void 0 : _a.removeOnDisposeObserver(this.dispose);
|
|
29
|
-
};
|
|
30
|
-
this.landmarkGlobals = LandmarkGlobals_1.LandmarkGlobals.get(this.appObjects);
|
|
31
|
-
if (!this.landmarkGlobals) {
|
|
32
|
-
this.warn("SetOverlayColorUC has been added to an App Object but LandmarkGlobals Entity was not added. Add a LandmarkGlobals Entity");
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
this.overlayColor = appObject.getComponent(OverlayColor_1.OverlayColor.type);
|
|
36
|
-
if (!this.overlayColor) {
|
|
37
|
-
this.warn("SetOverlayColorUC has been added to an App Object that does not have a Overlay Color Entity. Add a Overlay Color Entity before adding the UC");
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
static get(appObj) {
|
|
42
|
-
return appObj.getComponent(this.type);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.SetOverlayColorUC = SetOverlayColorUC;
|
|
46
|
-
SetOverlayColorUC.type = "SetOverlayColorUC";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject";
|
|
2
|
-
import { OverlayColorEnums } from "../../OverlayColor";
|
|
3
|
-
import { UndoRedoAction } from "../../UndoRedo/Entities/UndoRedoEntity";
|
|
4
|
-
export declare class SetOverlayColorUndoRedo implements UndoRedoAction {
|
|
5
|
-
private color;
|
|
6
|
-
private preColor;
|
|
7
|
-
private appObject;
|
|
8
|
-
private overlayColor?;
|
|
9
|
-
undoAction: () => void;
|
|
10
|
-
redoAction: () => void;
|
|
11
|
-
constructor(color: OverlayColorEnums, preColor: OverlayColorEnums, appObject: AppObject);
|
|
12
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SetOverlayColorUndoRedo = void 0;
|
|
4
|
-
const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
|
|
5
|
-
const OverlayColor_1 = require("../../OverlayColor");
|
|
6
|
-
const UndoRedoEntity_1 = require("../../UndoRedo/Entities/UndoRedoEntity");
|
|
7
|
-
class SetOverlayColorUndoRedo {
|
|
8
|
-
constructor(color, preColor, appObject) {
|
|
9
|
-
this.color = color;
|
|
10
|
-
this.preColor = preColor;
|
|
11
|
-
this.appObject = appObject;
|
|
12
|
-
this.undoAction = () => {
|
|
13
|
-
if (!this.overlayColor)
|
|
14
|
-
return;
|
|
15
|
-
this.overlayColor.overlayColor = this.preColor;
|
|
16
|
-
DispatchStateChangeUC_1.dispatchStateChange(this.appObject.appObjectRepo);
|
|
17
|
-
};
|
|
18
|
-
this.redoAction = () => {
|
|
19
|
-
if (!this.overlayColor)
|
|
20
|
-
return;
|
|
21
|
-
this.overlayColor.overlayColor = this.color;
|
|
22
|
-
DispatchStateChangeUC_1.dispatchStateChange(this.appObject.appObjectRepo);
|
|
23
|
-
};
|
|
24
|
-
this.overlayColor = OverlayColor_1.OverlayColor.get(this.appObject);
|
|
25
|
-
if (!this.overlayColor) {
|
|
26
|
-
appObject.appObjectRepo.submitWarning("SetOverlayColorUndoRedo", "Unable to find OverlayColorEntity");
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const undoRedo = UndoRedoEntity_1.UndoRedoEntity.get(appObject.appObjectRepo);
|
|
30
|
-
if (!undoRedo) {
|
|
31
|
-
appObject.appObjectRepo.submitWarning("SetOverlayColorUndoRedo", "Unable to find UndoRedoEntity");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
undoRedo.submitAction(this);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.SetOverlayColorUndoRedo = SetOverlayColorUndoRedo;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./setupTool"), exports);
|
|
14
|
-
__exportStar(require("./setupToolRepo"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupTool = void 0;
|
|
4
|
-
const ToolEntity_1 = require("../Entities/ToolEntity");
|
|
5
|
-
const ToolPM_1 = require("../PM/ToolPM");
|
|
6
|
-
function setupTool(toolData, appObjects) {
|
|
7
|
-
const tool = appObjects.getOrCreate(toolData.label);
|
|
8
|
-
const toolEntity = ToolEntity_1.makeToolEntity(toolData, tool);
|
|
9
|
-
const pm = new ToolPM_1.ToolPM(tool);
|
|
10
|
-
return toolEntity;
|
|
11
|
-
}
|
|
12
|
-
exports.setupTool = setupTool;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
|
|
2
|
-
import { ToolData } from "../Entities/ToolEntity";
|
|
3
|
-
import { ToolRepository } from "../Entities/ToolRepository";
|
|
4
|
-
export declare function setupToolRepo<ToolTypes>(data: ToolData<ToolTypes>[], appObjects: AppObjectRepo): ToolRepository<ToolTypes>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupToolRepo = void 0;
|
|
4
|
-
const ToolHotkeys_1 = require("../Controller/ToolHotkeys");
|
|
5
|
-
const ToolRepository_1 = require("../Entities/ToolRepository");
|
|
6
|
-
function setupToolRepo(data, appObjects) {
|
|
7
|
-
const toolRepo = appObjects.getOrCreate("ToolRepo");
|
|
8
|
-
const entity = ToolRepository_1.makeToolRepo(toolRepo);
|
|
9
|
-
entity.setupToolsFromData(data);
|
|
10
|
-
new ToolHotkeys_1.ToolHotkeys(toolRepo);
|
|
11
|
-
return entity;
|
|
12
|
-
}
|
|
13
|
-
exports.setupToolRepo = setupToolRepo;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare type Result<T, E> = Resolved<T, E> | Rejected<T, E>;
|
|
2
|
-
export declare const resolve: <T, E = never>(value: T) => Resolved<T, E>;
|
|
3
|
-
export declare const reject: <T = never, E = unknown>(err: E) => Rejected<T, E>;
|
|
4
|
-
interface IResult<T, E> {
|
|
5
|
-
isResolved: boolean;
|
|
6
|
-
isRejected: boolean;
|
|
7
|
-
value?: T;
|
|
8
|
-
error?: E;
|
|
9
|
-
then<A>(f: (t: T) => A): Result<A, E>;
|
|
10
|
-
catch<U>(f: (e: E) => U): Result<T, U>;
|
|
11
|
-
}
|
|
12
|
-
export declare class Rejected<T, E> implements IResult<T, E> {
|
|
13
|
-
readonly error: E;
|
|
14
|
-
readonly value: undefined;
|
|
15
|
-
get isResolved(): boolean;
|
|
16
|
-
get isRejected(): boolean;
|
|
17
|
-
then<A>(_f: (t: T) => A): Result<A, E>;
|
|
18
|
-
catch<U>(f: (e: E) => U): Result<T, U>;
|
|
19
|
-
constructor(error: E);
|
|
20
|
-
}
|
|
21
|
-
export declare class Resolved<T, E> implements IResult<T, E> {
|
|
22
|
-
readonly value: T;
|
|
23
|
-
readonly error: undefined;
|
|
24
|
-
get isResolved(): boolean;
|
|
25
|
-
get isRejected(): boolean;
|
|
26
|
-
then<A>(f: (t: T) => A): Result<A, E>;
|
|
27
|
-
catch<U>(_f: (e: E) => U): Result<T, U>;
|
|
28
|
-
constructor(value: T);
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Resolved = exports.Rejected = exports.reject = exports.resolve = void 0;
|
|
4
|
-
const resolve = (value) => new Resolved(value);
|
|
5
|
-
exports.resolve = resolve;
|
|
6
|
-
const reject = (err) => new Rejected(err);
|
|
7
|
-
exports.reject = reject;
|
|
8
|
-
class Rejected {
|
|
9
|
-
constructor(error) {
|
|
10
|
-
this.value = undefined;
|
|
11
|
-
this.error = error;
|
|
12
|
-
}
|
|
13
|
-
get isResolved() {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
get isRejected() {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
then(_f) {
|
|
20
|
-
return exports.reject(this.error);
|
|
21
|
-
}
|
|
22
|
-
catch(f) {
|
|
23
|
-
return exports.reject(f(this.error));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.Rejected = Rejected;
|
|
27
|
-
class Resolved {
|
|
28
|
-
constructor(value) {
|
|
29
|
-
this.error = undefined;
|
|
30
|
-
this.value = value;
|
|
31
|
-
}
|
|
32
|
-
get isResolved() {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
get isRejected() {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
then(f) {
|
|
39
|
-
return exports.resolve(f(this.value));
|
|
40
|
-
}
|
|
41
|
-
catch(_f) {
|
|
42
|
-
return exports.resolve(this.value);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.Resolved = Resolved;
|