@vived/app 4.12.0 → 4.14.0
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/Components/HoverLabel/Controllers/StylusHoverLabel.d.ts +2 -2
- package/lib/Components/HoverLabel/Controllers/StylusHoverLabel.js +3 -3
- package/lib/Components/Question/Entities/QuestionAnswerEntity.d.ts +0 -1
- package/lib/Components/Question/Entities/QuestionAnswerEntity.js +2 -6
- package/lib/Components/RequestHandler/UC/StartZSpaceUC.js +12 -1
- package/lib/Components/RequestHandler/UC/StopZSpaceUC.js +20 -7
- package/lib/Components/SceneRoot/Controllers/ScaleSceneRootSC.d.ts +14 -0
- package/lib/Components/SceneRoot/Controllers/ScaleSceneRootSC.js +55 -0
- package/lib/Components/SceneRoot/Controllers/SceneRootMoveSC.d.ts +14 -0
- package/lib/Components/SceneRoot/Controllers/SceneRootMoveSC.js +53 -0
- package/lib/Components/SceneRoot/Controllers/index.d.ts +2 -2
- package/lib/Components/SceneRoot/Controllers/index.js +2 -2
- package/lib/Components/Selection/Controller/HoverOnAppObjectSC.d.ts +11 -0
- package/lib/Components/Selection/Controller/HoverOnAppObjectSC.js +41 -0
- package/lib/Components/Selection/Controller/PressOnAppObjectSC.d.ts +18 -0
- package/lib/Components/Selection/Controller/PressOnAppObjectSC.js +70 -0
- package/lib/Components/Selection/Controller/SelectAppObjectSC.d.ts +11 -0
- package/lib/Components/Selection/Controller/SelectAppObjectSC.js +39 -0
- package/lib/Components/Selection/Controller/index.d.ts +3 -3
- package/lib/Components/Selection/Controller/index.js +3 -3
- package/lib/Components/Stylus/Entity/StylusEntity.d.ts +21 -0
- package/lib/Components/Stylus/Entity/StylusEntity.js +104 -0
- package/lib/Components/Stylus/Entity/index.d.ts +1 -0
- package/lib/Components/Stylus/Entity/index.js +13 -0
- package/lib/Components/Stylus/Mocks/MockEmulateStylusUC.d.ts +10 -0
- package/lib/Components/Stylus/Mocks/MockEmulateStylusUC.js +19 -0
- package/lib/Components/Stylus/Mocks/index.d.ts +1 -0
- package/lib/Components/Stylus/Mocks/index.js +13 -0
- package/lib/Components/Stylus/PMs/StylusColorLengthPM.d.ts +14 -0
- package/lib/Components/Stylus/PMs/StylusColorLengthPM.js +81 -0
- package/lib/Components/Stylus/PMs/StylusIsInUsePM.d.ts +6 -0
- package/lib/Components/Stylus/PMs/StylusIsInUsePM.js +36 -0
- package/lib/Components/Stylus/PMs/index.d.ts +2 -0
- package/lib/Components/Stylus/PMs/index.js +14 -0
- package/lib/Components/Stylus/UCs/EmulateStylusUC.d.ts +9 -0
- package/lib/Components/Stylus/UCs/EmulateStylusUC.js +132 -0
- package/lib/Components/Stylus/UCs/index.d.ts +1 -0
- package/lib/Components/Stylus/UCs/index.js +13 -0
- package/lib/Components/Stylus/index.d.ts +4 -0
- package/lib/Components/Stylus/index.js +16 -0
- package/lib/Components/Transform3D/Controllers/Mouse/DragScaleTransformMC.d.ts +12 -0
- package/lib/Components/Transform3D/Controllers/Mouse/DragScaleTransformMC.js +49 -0
- package/lib/Components/Transform3D/Controllers/Mouse/PanTransformMC.d.ts +12 -0
- package/lib/Components/Transform3D/Controllers/Mouse/PanTransformMC.js +48 -0
- package/lib/Components/Transform3D/Controllers/Mouse/RollScaleTransformMC.d.ts +9 -0
- package/lib/Components/Transform3D/Controllers/Mouse/RollScaleTransformMC.js +37 -0
- package/lib/Components/Transform3D/Controllers/Mouse/index.d.ts +3 -0
- package/lib/Components/Transform3D/Controllers/Mouse/index.js +15 -0
- package/lib/Components/Transform3D/Controllers/Stylus/PanScaleTransformSC.d.ts +13 -0
- package/lib/Components/Transform3D/Controllers/Stylus/PanScaleTransformSC.js +54 -0
- package/lib/Components/Transform3D/Controllers/Stylus/PanTransformSC.d.ts +13 -0
- package/lib/Components/Transform3D/Controllers/Stylus/PanTransformSC.js +54 -0
- package/lib/Components/Transform3D/Controllers/Stylus/ScaleTransformSC.d.ts +13 -0
- package/lib/Components/Transform3D/Controllers/Stylus/ScaleTransformSC.js +54 -0
- package/lib/Components/Transform3D/Controllers/Stylus/index.d.ts +3 -0
- package/lib/Components/Transform3D/Controllers/Stylus/index.js +15 -0
- package/lib/Components/Transform3D/Controllers/Touch/DragScaleTransformTC.d.ts +13 -0
- package/lib/Components/Transform3D/Controllers/Touch/DragScaleTransformTC.js +60 -0
- package/lib/Components/Transform3D/Controllers/Touch/PanTransformTC.d.ts +12 -0
- package/lib/Components/Transform3D/Controllers/Touch/PanTransformTC.js +52 -0
- package/lib/Components/Transform3D/Controllers/Touch/PinchTransformTC.d.ts +13 -0
- package/lib/Components/Transform3D/Controllers/Touch/PinchTransformTC.js +55 -0
- package/lib/Components/Transform3D/Controllers/Touch/index.d.ts +3 -0
- package/lib/Components/Transform3D/Controllers/Touch/index.js +15 -0
- package/lib/Components/Transform3D/Controllers/index.d.ts +3 -0
- package/lib/Components/Transform3D/Controllers/index.js +15 -0
- package/lib/Components/Transform3D/Mocks/MockBumpTransformScaleAboutPixelPoint.d.ts +12 -0
- package/lib/Components/Transform3D/Mocks/MockBumpTransformScaleAboutPixelPoint.js +14 -0
- package/lib/Components/Transform3D/Mocks/MockPanTransformUC.d.ts +18 -0
- package/lib/Components/Transform3D/Mocks/MockPanTransformUC.js +18 -0
- package/lib/Components/Transform3D/Mocks/MockPinchTransformUC.d.ts +13 -0
- package/lib/Components/Transform3D/Mocks/MockPinchTransformUC.js +15 -0
- package/lib/Components/Transform3D/Mocks/MockRayPanScaleTransformUC.d.ts +17 -0
- package/lib/Components/Transform3D/Mocks/MockRayPanScaleTransformUC.js +15 -0
- package/lib/Components/Transform3D/Mocks/MockRayScaleTransform.d.ts +16 -0
- package/lib/Components/Transform3D/Mocks/MockRayScaleTransform.js +18 -0
- package/lib/Components/Transform3D/Mocks/index.d.ts +5 -0
- package/lib/Components/Transform3D/Mocks/index.js +17 -0
- package/lib/Components/Transform3D/UC/BumpTransformScaleAboutPixelPoint.d.ts +12 -0
- package/lib/Components/Transform3D/UC/BumpTransformScaleAboutPixelPoint.js +67 -0
- package/lib/Components/Transform3D/UC/PanTransformUC.d.ts +18 -0
- package/lib/Components/Transform3D/UC/PanTransformUC.js +94 -0
- package/lib/Components/Transform3D/UC/PinchTransform.d.ts +13 -0
- package/lib/Components/Transform3D/UC/PinchTransform.js +90 -0
- package/lib/Components/Transform3D/UC/RayPanScaleTransform.d.ts +17 -0
- package/lib/Components/Transform3D/UC/RayPanScaleTransform.js +108 -0
- package/lib/Components/Transform3D/UC/ScaleTransform.d.ts +16 -0
- package/lib/Components/Transform3D/UC/ScaleTransform.js +104 -0
- package/lib/Components/Transform3D/UC/StylusMoveTransformUC.js +14 -35
- package/lib/Components/Transform3D/UC/index.d.ts +6 -0
- package/lib/Components/Transform3D/UC/index.js +6 -0
- package/lib/Components/Transform3D/index.d.ts +2 -0
- package/lib/Components/Transform3D/index.js +2 -0
- package/lib/Components/index.d.ts +5 -4
- package/lib/Components/index.js +5 -4
- package/lib/Components/zSpace/Entities/ZSpaceEntity.d.ts +0 -2
- package/lib/Components/zSpace/Entities/ZSpaceEntity.js +0 -3
- package/lib/Components/zSpace/Entities/index.d.ts +0 -1
- package/lib/Components/zSpace/Entities/index.js +0 -1
- package/lib/Components/zSpace/PM/index.d.ts +0 -2
- package/lib/Components/zSpace/PM/index.js +0 -2
- package/lib/Components/zSpace/UC/StylusFromGamepadHook.d.ts +2 -3
- package/lib/Components/zSpace/UC/StylusFromGamepadHook.js +14 -13
- package/lib/Components/zSpace/index.d.ts +0 -1
- package/lib/Components/zSpace/index.js +0 -1
- package/lib/Entities/TransformNode.d.ts +0 -55
- package/lib/ValueObjects/Color.js +1 -1
- package/lib/ValueObjects/ParametricLine.d.ts +3 -0
- package/lib/ValueObjects/ParametricLine.js +13 -3
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PanScaleTransformSC = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
+
const Stylus_1 = require("../../../Stylus");
|
|
6
|
+
const UC_1 = require("../../UC");
|
|
7
|
+
class PanScaleTransformSC extends AppObject_1.AppObjectController {
|
|
8
|
+
constructor(appObject) {
|
|
9
|
+
super(appObject, PanScaleTransformSC.type);
|
|
10
|
+
this.doPan = false;
|
|
11
|
+
this.allow = (button) => {
|
|
12
|
+
if (button === 0)
|
|
13
|
+
return true;
|
|
14
|
+
return false;
|
|
15
|
+
};
|
|
16
|
+
this.onButtonDown = (button) => {
|
|
17
|
+
this.doPan = false;
|
|
18
|
+
if (!this.stylus || !this.uc)
|
|
19
|
+
return;
|
|
20
|
+
if (!this.allow(button))
|
|
21
|
+
return;
|
|
22
|
+
this.uc.initialize(this.stylus.pickRay);
|
|
23
|
+
this.doPan = true;
|
|
24
|
+
};
|
|
25
|
+
this.onButtonUp = () => {
|
|
26
|
+
if (!this.doPan)
|
|
27
|
+
return;
|
|
28
|
+
this.doPan = false;
|
|
29
|
+
if (!this.uc)
|
|
30
|
+
return;
|
|
31
|
+
this.uc.finish();
|
|
32
|
+
};
|
|
33
|
+
this.onStylusMove = () => {
|
|
34
|
+
if (!this.stylus || !this.uc)
|
|
35
|
+
return;
|
|
36
|
+
if (!this.doPan)
|
|
37
|
+
return;
|
|
38
|
+
this.uc.update(this.stylus.pickRay);
|
|
39
|
+
};
|
|
40
|
+
this.stylus = Stylus_1.StylusEntity.get(this.appObjects);
|
|
41
|
+
if (!this.stylus) {
|
|
42
|
+
this.error("Unable to find StylusEntity");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.uc = appObject.getComponent(UC_1.RayPanScaleTransformUC.type);
|
|
46
|
+
if (!this.uc) {
|
|
47
|
+
this.error("App Object that does not have a StylusDragScaleTransformUC");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.stylus.registerController(this);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.PanScaleTransformSC = PanScaleTransformSC;
|
|
54
|
+
PanScaleTransformSC.type = "PanScaleTransformSC";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
+
import { StylusController } from "../../../Stylus";
|
|
3
|
+
export declare class PanTransformSC extends AppObjectController implements StylusController {
|
|
4
|
+
static readonly type = "PanTransformSC";
|
|
5
|
+
private stylus?;
|
|
6
|
+
private uc?;
|
|
7
|
+
private doUpdate;
|
|
8
|
+
allow: (button: number) => boolean;
|
|
9
|
+
onButtonDown: (button: number) => void;
|
|
10
|
+
onButtonUp: () => void;
|
|
11
|
+
onStylusMove: () => void;
|
|
12
|
+
constructor(appObject: AppObject);
|
|
13
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PanTransformSC = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
+
const Stylus_1 = require("../../../Stylus");
|
|
6
|
+
const UC_1 = require("../../UC");
|
|
7
|
+
class PanTransformSC extends AppObject_1.AppObjectController {
|
|
8
|
+
constructor(appObject) {
|
|
9
|
+
super(appObject, PanTransformSC.type);
|
|
10
|
+
this.doUpdate = false;
|
|
11
|
+
this.allow = (button) => {
|
|
12
|
+
if (button === 0)
|
|
13
|
+
return true;
|
|
14
|
+
return false;
|
|
15
|
+
};
|
|
16
|
+
this.onButtonDown = (button) => {
|
|
17
|
+
this.doUpdate = false;
|
|
18
|
+
if (!this.stylus || !this.uc)
|
|
19
|
+
return;
|
|
20
|
+
if (!this.allow(button))
|
|
21
|
+
return;
|
|
22
|
+
this.uc.initializeRay(this.stylus.pickRay);
|
|
23
|
+
this.doUpdate = true;
|
|
24
|
+
};
|
|
25
|
+
this.onButtonUp = () => {
|
|
26
|
+
if (!this.doUpdate)
|
|
27
|
+
return;
|
|
28
|
+
this.doUpdate = false;
|
|
29
|
+
if (!this.uc)
|
|
30
|
+
return;
|
|
31
|
+
this.uc.finish();
|
|
32
|
+
};
|
|
33
|
+
this.onStylusMove = () => {
|
|
34
|
+
if (!this.stylus || !this.uc)
|
|
35
|
+
return;
|
|
36
|
+
if (!this.doUpdate)
|
|
37
|
+
return;
|
|
38
|
+
this.uc.updateRay(this.stylus.pickRay);
|
|
39
|
+
};
|
|
40
|
+
this.stylus = Stylus_1.StylusEntity.get(this.appObjects);
|
|
41
|
+
if (!this.stylus) {
|
|
42
|
+
this.error("Unable to find StylusEntity");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.uc = appObject.getComponent(UC_1.PanTransformUC.type);
|
|
46
|
+
if (!this.uc) {
|
|
47
|
+
this.error("App Object that does not have a RayScaleTransformUC");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.stylus.registerController(this);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.PanTransformSC = PanTransformSC;
|
|
54
|
+
PanTransformSC.type = "PanTransformSC";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
+
import { StylusController } from "../../../Stylus";
|
|
3
|
+
export declare class ScaleTransformSC extends AppObjectController implements StylusController {
|
|
4
|
+
static readonly type = "ScaleTransformSC";
|
|
5
|
+
private stylus?;
|
|
6
|
+
private uc?;
|
|
7
|
+
private doUpdate;
|
|
8
|
+
allow: (button: number) => boolean;
|
|
9
|
+
onButtonDown: (button: number) => void;
|
|
10
|
+
onButtonUp: () => void;
|
|
11
|
+
onStylusMove: () => void;
|
|
12
|
+
constructor(appObject: AppObject);
|
|
13
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScaleTransformSC = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
+
const Stylus_1 = require("../../../Stylus");
|
|
6
|
+
const UC_1 = require("../../UC");
|
|
7
|
+
class ScaleTransformSC extends AppObject_1.AppObjectController {
|
|
8
|
+
constructor(appObject) {
|
|
9
|
+
super(appObject, ScaleTransformSC.type);
|
|
10
|
+
this.doUpdate = false;
|
|
11
|
+
this.allow = (button) => {
|
|
12
|
+
if (button === 0)
|
|
13
|
+
return true;
|
|
14
|
+
return false;
|
|
15
|
+
};
|
|
16
|
+
this.onButtonDown = (button) => {
|
|
17
|
+
this.doUpdate = false;
|
|
18
|
+
if (!this.stylus || !this.uc)
|
|
19
|
+
return;
|
|
20
|
+
if (!this.allow(button))
|
|
21
|
+
return;
|
|
22
|
+
this.uc.initializeRay(this.stylus.pickRay);
|
|
23
|
+
this.doUpdate = true;
|
|
24
|
+
};
|
|
25
|
+
this.onButtonUp = () => {
|
|
26
|
+
if (!this.doUpdate)
|
|
27
|
+
return;
|
|
28
|
+
this.doUpdate = false;
|
|
29
|
+
if (!this.uc)
|
|
30
|
+
return;
|
|
31
|
+
this.uc.finish();
|
|
32
|
+
};
|
|
33
|
+
this.onStylusMove = () => {
|
|
34
|
+
if (!this.stylus || !this.uc)
|
|
35
|
+
return;
|
|
36
|
+
if (!this.doUpdate)
|
|
37
|
+
return;
|
|
38
|
+
this.uc.updateRay(this.stylus.pickRay);
|
|
39
|
+
};
|
|
40
|
+
this.stylus = Stylus_1.StylusEntity.get(this.appObjects);
|
|
41
|
+
if (!this.stylus) {
|
|
42
|
+
this.error("Unable to find StylusEntity");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.uc = appObject.getComponent(UC_1.ScaleTransformUC.type);
|
|
46
|
+
if (!this.uc) {
|
|
47
|
+
this.error("App Object that does not have a RayScaleTransformUC");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.stylus.registerController(this);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ScaleTransformSC = ScaleTransformSC;
|
|
54
|
+
ScaleTransformSC.type = "ScaleTransformSC";
|
|
@@ -0,0 +1,15 @@
|
|
|
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("./PanScaleTransformSC"), exports);
|
|
14
|
+
__exportStar(require("./PanTransformSC"), exports);
|
|
15
|
+
__exportStar(require("./ScaleTransformSC"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
+
import { TouchController, TouchInputEvent } from "../../../TouchController";
|
|
3
|
+
import { ScaleTransformUC } from "../../UC";
|
|
4
|
+
export declare class DragScaleTransformTC extends AppObjectController implements TouchController {
|
|
5
|
+
static readonly type = "DragScaleTransformTC";
|
|
6
|
+
private isScaling;
|
|
7
|
+
scaleUC?: ScaleTransformUC;
|
|
8
|
+
allow: (e: TouchInputEvent) => boolean;
|
|
9
|
+
onTouchStart: (e: TouchInputEvent) => void;
|
|
10
|
+
onTouchMove: (e: TouchInputEvent) => void;
|
|
11
|
+
onTouchEnd: () => void;
|
|
12
|
+
constructor(appObject: AppObject);
|
|
13
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DragScaleTransformTC = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
+
const TouchController_1 = require("../../../TouchController");
|
|
6
|
+
const UC_1 = require("../../UC");
|
|
7
|
+
class DragScaleTransformTC extends AppObject_1.AppObjectController {
|
|
8
|
+
constructor(appObject) {
|
|
9
|
+
super(appObject, DragScaleTransformTC.type);
|
|
10
|
+
this.isScaling = false;
|
|
11
|
+
this.allow = (e) => {
|
|
12
|
+
if (e.touches.length !== 1) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
};
|
|
17
|
+
this.onTouchStart = (e) => {
|
|
18
|
+
var _a;
|
|
19
|
+
this.isScaling = false;
|
|
20
|
+
if (e.touches.length !== 1) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (!this.allow(e)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const pixelPosition = e.touches[0].position;
|
|
27
|
+
(_a = this.scaleUC) === null || _a === void 0 ? void 0 : _a.initializePixel(pixelPosition);
|
|
28
|
+
this.isScaling = true;
|
|
29
|
+
};
|
|
30
|
+
this.onTouchMove = (e) => {
|
|
31
|
+
var _a;
|
|
32
|
+
if (!this.isScaling)
|
|
33
|
+
return;
|
|
34
|
+
if (e.touches.length !== 1)
|
|
35
|
+
return;
|
|
36
|
+
const pixelPosition = e.touches[0].position;
|
|
37
|
+
(_a = this.scaleUC) === null || _a === void 0 ? void 0 : _a.updatePixel(pixelPosition);
|
|
38
|
+
};
|
|
39
|
+
this.onTouchEnd = () => {
|
|
40
|
+
var _a;
|
|
41
|
+
this.isScaling = false;
|
|
42
|
+
(_a = this.scaleUC) === null || _a === void 0 ? void 0 : _a.finish();
|
|
43
|
+
};
|
|
44
|
+
const appObjects = appObject.appObjectRepo;
|
|
45
|
+
this.scaleUC = appObject.getComponent(UC_1.ScaleTransformUC.type);
|
|
46
|
+
if (!this.scaleUC) {
|
|
47
|
+
this.error("App Object that does not have ScaleTransformUC");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const touchInput = TouchController_1.TouchInputEntity.get(appObjects);
|
|
51
|
+
if (touchInput) {
|
|
52
|
+
touchInput.registerController(this);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.warn("Unable to find TouchInputEntity");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.DragScaleTransformTC = DragScaleTransformTC;
|
|
60
|
+
DragScaleTransformTC.type = "DragScaleTransformTC";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
+
import { TouchController, TouchInputEvent } from "../../../TouchController";
|
|
3
|
+
export declare class PanTransformTC extends AppObjectController implements TouchController {
|
|
4
|
+
static readonly type = "PanTransformTC";
|
|
5
|
+
private isPanning;
|
|
6
|
+
private panUC?;
|
|
7
|
+
allow: (e: TouchInputEvent) => boolean;
|
|
8
|
+
onTouchStart: (e: TouchInputEvent) => void;
|
|
9
|
+
onTouchMove: (e: TouchInputEvent) => void;
|
|
10
|
+
onTouchEnd: (e: TouchInputEvent) => void;
|
|
11
|
+
constructor(appObject: AppObject);
|
|
12
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PanTransformTC = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
+
const TouchController_1 = require("../../../TouchController");
|
|
6
|
+
const UC_1 = require("../../UC");
|
|
7
|
+
class PanTransformTC extends AppObject_1.AppObjectController {
|
|
8
|
+
constructor(appObject) {
|
|
9
|
+
super(appObject, PanTransformTC.type);
|
|
10
|
+
this.isPanning = false;
|
|
11
|
+
this.allow = (e) => {
|
|
12
|
+
return true;
|
|
13
|
+
};
|
|
14
|
+
this.onTouchStart = (e) => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
if (!this.allow(e)) {
|
|
17
|
+
this.isPanning = false;
|
|
18
|
+
(_a = this.panUC) === null || _a === void 0 ? void 0 : _a.cancelPan();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
(_b = this.panUC) === null || _b === void 0 ? void 0 : _b.initializePixel(e.touchCenter);
|
|
22
|
+
this.isPanning = true;
|
|
23
|
+
};
|
|
24
|
+
this.onTouchMove = (e) => {
|
|
25
|
+
var _a;
|
|
26
|
+
if (!this.isPanning)
|
|
27
|
+
return;
|
|
28
|
+
const pixelPosition = e.touches[0].position;
|
|
29
|
+
(_a = this.panUC) === null || _a === void 0 ? void 0 : _a.updatePixel(pixelPosition);
|
|
30
|
+
};
|
|
31
|
+
this.onTouchEnd = (e) => {
|
|
32
|
+
var _a;
|
|
33
|
+
this.isPanning = false;
|
|
34
|
+
(_a = this.panUC) === null || _a === void 0 ? void 0 : _a.finish();
|
|
35
|
+
};
|
|
36
|
+
const appObjects = appObject.appObjectRepo;
|
|
37
|
+
this.panUC = appObject.getComponent(UC_1.PanTransformUC.type);
|
|
38
|
+
if (!this.panUC) {
|
|
39
|
+
this.warn("Controller has been added to an App Object that does not have PanTransformUC. Add one first.");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const touchInput = TouchController_1.TouchInputEntity.get(appObjects);
|
|
43
|
+
if (touchInput) {
|
|
44
|
+
touchInput.registerController(this);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.warn("Unable to find TouchInputEntity");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.PanTransformTC = PanTransformTC;
|
|
52
|
+
PanTransformTC.type = "PanTransformTC";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
+
import { TouchController, TouchInputEvent } from "../../../TouchController";
|
|
3
|
+
import { PinchTransformUC } from "../../UC";
|
|
4
|
+
export declare class PinchTransformTC extends AppObjectController implements TouchController {
|
|
5
|
+
static readonly type = "PinchTransformTC";
|
|
6
|
+
private isPinching;
|
|
7
|
+
pinchUC?: PinchTransformUC;
|
|
8
|
+
allow: (e: TouchInputEvent) => boolean;
|
|
9
|
+
onTouchStart: (e: TouchInputEvent) => void;
|
|
10
|
+
onTouchMove: (e: TouchInputEvent) => void;
|
|
11
|
+
onTouchEnd: () => void;
|
|
12
|
+
constructor(appObject: AppObject);
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PinchTransformTC = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../../AppObject");
|
|
5
|
+
const TouchController_1 = require("../../../TouchController");
|
|
6
|
+
const UC_1 = require("../../UC");
|
|
7
|
+
class PinchTransformTC extends AppObject_1.AppObjectController {
|
|
8
|
+
constructor(appObject) {
|
|
9
|
+
super(appObject, PinchTransformTC.type);
|
|
10
|
+
this.isPinching = false;
|
|
11
|
+
this.allow = (e) => {
|
|
12
|
+
return true;
|
|
13
|
+
};
|
|
14
|
+
this.onTouchStart = (e) => {
|
|
15
|
+
var _a;
|
|
16
|
+
this.isPinching = false;
|
|
17
|
+
if (e.touches.length !== 2) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (!this.allow(e)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
(_a = this.pinchUC) === null || _a === void 0 ? void 0 : _a.initializePinch(e.touches[0].position, e.touches[1].position);
|
|
24
|
+
this.isPinching = true;
|
|
25
|
+
};
|
|
26
|
+
this.onTouchMove = (e) => {
|
|
27
|
+
var _a;
|
|
28
|
+
if (!this.isPinching)
|
|
29
|
+
return;
|
|
30
|
+
if (e.touches.length !== 2)
|
|
31
|
+
return;
|
|
32
|
+
(_a = this.pinchUC) === null || _a === void 0 ? void 0 : _a.doPinch(e.touches[0].position, e.touches[1].position);
|
|
33
|
+
};
|
|
34
|
+
this.onTouchEnd = () => {
|
|
35
|
+
var _a;
|
|
36
|
+
this.isPinching = false;
|
|
37
|
+
(_a = this.pinchUC) === null || _a === void 0 ? void 0 : _a.finishPinch();
|
|
38
|
+
};
|
|
39
|
+
const appObjects = appObject.appObjectRepo;
|
|
40
|
+
this.pinchUC = appObject.getComponent(UC_1.PinchTransformUC.type);
|
|
41
|
+
if (!this.pinchUC) {
|
|
42
|
+
this.error("App Object does not have PinchTransformUC");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const touchInput = TouchController_1.TouchInputEntity.get(appObjects);
|
|
46
|
+
if (touchInput) {
|
|
47
|
+
touchInput.registerController(this);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.warn("Unable to find TouchInputEntity");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.PinchTransformTC = PinchTransformTC;
|
|
55
|
+
PinchTransformTC.type = "PinchTransformTC";
|
|
@@ -0,0 +1,15 @@
|
|
|
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("./DragScaleTransformTC"), exports);
|
|
14
|
+
__exportStar(require("./PanTransformTC"), exports);
|
|
15
|
+
__exportStar(require("./PinchTransformTC"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
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("./Mouse"), exports);
|
|
14
|
+
__exportStar(require("./Stylus"), exports);
|
|
15
|
+
__exportStar(require("./Touch"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { BumpTransformScaleAboutPixelPointUC } from "../UC";
|
|
4
|
+
export declare class MockBumpTransformScaleAboutPixelPoint extends BumpTransformScaleAboutPixelPointUC {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
minScale?: number | undefined;
|
|
7
|
+
maxScale?: number | undefined;
|
|
8
|
+
sensitivity: number;
|
|
9
|
+
allow: jest.Mock<any, any>;
|
|
10
|
+
bump: jest.Mock<any, any>;
|
|
11
|
+
constructor(appObject: AppObject);
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockBumpTransformScaleAboutPixelPoint = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockBumpTransformScaleAboutPixelPoint extends UC_1.BumpTransformScaleAboutPixelPointUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.BumpTransformScaleAboutPixelPointUC.type);
|
|
8
|
+
this.enabled = true;
|
|
9
|
+
this.sensitivity = 1;
|
|
10
|
+
this.allow = jest.fn();
|
|
11
|
+
this.bump = jest.fn();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.MockBumpTransformScaleAboutPixelPoint = MockBumpTransformScaleAboutPixelPoint;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { PanTransformUC } from "../UC";
|
|
4
|
+
export declare class MockPanTransformUC extends PanTransformUC {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
minX?: number | undefined;
|
|
7
|
+
maxX?: number | undefined;
|
|
8
|
+
minY?: number | undefined;
|
|
9
|
+
maxY?: number | undefined;
|
|
10
|
+
dispatchStateChangeOnComplete: boolean;
|
|
11
|
+
updatePixel: jest.Mock<any, any>;
|
|
12
|
+
initializePixel: jest.Mock<any, any>;
|
|
13
|
+
finish: jest.Mock<any, any>;
|
|
14
|
+
cancelPan: jest.Mock<any, any>;
|
|
15
|
+
updateRay: jest.Mock<any, any>;
|
|
16
|
+
initializeRay: jest.Mock<any, any>;
|
|
17
|
+
constructor(appObject: AppObject);
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockPanTransformUC = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockPanTransformUC extends UC_1.PanTransformUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.PanTransformUC.type);
|
|
8
|
+
this.enabled = true;
|
|
9
|
+
this.dispatchStateChangeOnComplete = false;
|
|
10
|
+
this.updatePixel = jest.fn();
|
|
11
|
+
this.initializePixel = jest.fn();
|
|
12
|
+
this.finish = jest.fn();
|
|
13
|
+
this.cancelPan = jest.fn();
|
|
14
|
+
this.updateRay = jest.fn();
|
|
15
|
+
this.initializeRay = jest.fn();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.MockPanTransformUC = MockPanTransformUC;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { PinchTransformUC } from "../UC";
|
|
4
|
+
export declare class MockPinchTransformUC extends PinchTransformUC {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
sensitivity: number;
|
|
7
|
+
minScale?: number | undefined;
|
|
8
|
+
maxScale?: number | undefined;
|
|
9
|
+
doPinch: jest.Mock<any, any>;
|
|
10
|
+
initializePinch: jest.Mock<any, any>;
|
|
11
|
+
finishPinch: jest.Mock<any, any>;
|
|
12
|
+
constructor(appObject: AppObject);
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockPinchTransformUC = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockPinchTransformUC extends UC_1.PinchTransformUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.PinchTransformUC.type);
|
|
8
|
+
this.enabled = true;
|
|
9
|
+
this.sensitivity = 0;
|
|
10
|
+
this.doPinch = jest.fn();
|
|
11
|
+
this.initializePinch = jest.fn();
|
|
12
|
+
this.finishPinch = jest.fn();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.MockPinchTransformUC = MockPinchTransformUC;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { RayPanScaleTransformUC } from "../UC";
|
|
4
|
+
export declare class MockRayPanScaleTransformUC extends RayPanScaleTransformUC {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
sensitivity: number;
|
|
7
|
+
minScale?: number | undefined;
|
|
8
|
+
maxScale?: number | undefined;
|
|
9
|
+
minX?: number | undefined;
|
|
10
|
+
maxX?: number | undefined;
|
|
11
|
+
minY?: number | undefined;
|
|
12
|
+
maxY?: number | undefined;
|
|
13
|
+
update: jest.Mock<any, any>;
|
|
14
|
+
initialize: jest.Mock<any, any>;
|
|
15
|
+
finish: jest.Mock<any, any>;
|
|
16
|
+
constructor(appObject: AppObject);
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockRayPanScaleTransformUC = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockRayPanScaleTransformUC extends UC_1.RayPanScaleTransformUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.RayPanScaleTransformUC.type);
|
|
8
|
+
this.enabled = true;
|
|
9
|
+
this.sensitivity = 1;
|
|
10
|
+
this.update = jest.fn();
|
|
11
|
+
this.initialize = jest.fn();
|
|
12
|
+
this.finish = jest.fn();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.MockRayPanScaleTransformUC = MockRayPanScaleTransformUC;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { ScaleTransformUC } from "../UC";
|
|
4
|
+
export declare class MockRayScaleTransform extends ScaleTransformUC {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
pixelSensitivity: number;
|
|
7
|
+
raySensitivity: number;
|
|
8
|
+
minScale?: number | undefined;
|
|
9
|
+
maxScale?: number | undefined;
|
|
10
|
+
updateRay: jest.Mock<any, any>;
|
|
11
|
+
initializeRay: jest.Mock<any, any>;
|
|
12
|
+
finish: jest.Mock<any, any>;
|
|
13
|
+
initializePixel: jest.Mock<any, any>;
|
|
14
|
+
updatePixel: jest.Mock<any, any>;
|
|
15
|
+
constructor(appObject: AppObject);
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockRayScaleTransform = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockRayScaleTransform extends UC_1.ScaleTransformUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.ScaleTransformUC.type);
|
|
8
|
+
this.enabled = true;
|
|
9
|
+
this.pixelSensitivity = 1;
|
|
10
|
+
this.raySensitivity = 1;
|
|
11
|
+
this.updateRay = jest.fn();
|
|
12
|
+
this.initializeRay = jest.fn();
|
|
13
|
+
this.finish = jest.fn();
|
|
14
|
+
this.initializePixel = jest.fn();
|
|
15
|
+
this.updatePixel = jest.fn();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.MockRayScaleTransform = MockRayScaleTransform;
|