@vived/app 4.31.0 → 4.32.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/BaseApp/Factories/setupBaseApp.d.ts +2 -2
- package/lib/Components/BaseApp/Factories/setupBaseApp.js +1 -0
- package/lib/Components/ChannelModel/UC/SelectChannelModelUC.js +7 -0
- package/lib/Components/InspectorTab/Controllers/KeyboardToSetTab.d.ts +10 -0
- package/lib/Components/InspectorTab/Controllers/KeyboardToSetTab.js +45 -0
- package/lib/Components/InspectorTab/Controllers/index.d.ts +1 -0
- package/lib/Components/InspectorTab/Controllers/index.js +1 -0
- package/lib/Components/InspectorTab/Factories/setupInspectorTabs.js +5 -0
- package/lib/Components/MouseInput/index.d.ts +1 -0
- package/lib/Components/MouseInput/index.js +1 -0
- package/lib/Components/SceneRoot/Controllers/DoubleTapToFocus.d.ts +1 -1
- package/lib/Components/SceneRoot/Controllers/DoubleTapToFocus.js +3 -5
- package/lib/Components/SceneRoot/Controllers/MouseClickToFocus.d.ts +1 -1
- package/lib/Components/SceneRoot/Controllers/MouseClickToFocus.js +6 -5
- package/lib/Components/SceneRoot/Controllers/MouseDoubleClickToRecenter.d.ts +1 -1
- package/lib/Components/SceneRoot/Controllers/MouseDoubleClickToRecenter.js +3 -5
- package/lib/Components/SceneRoot/Controllers/MouseOrbit.d.ts +2 -1
- package/lib/Components/SceneRoot/Controllers/MouseOrbit.js +19 -6
- package/lib/Components/SceneRoot/Controllers/MousePan.d.ts +2 -1
- package/lib/Components/SceneRoot/Controllers/MousePan.js +19 -6
- package/lib/Components/SceneRoot/Controllers/MouseRoll.d.ts +1 -1
- package/lib/Components/SceneRoot/Controllers/MouseRoll.js +3 -5
- package/lib/Components/SceneRoot/Controllers/MouseScale.d.ts +2 -1
- package/lib/Components/SceneRoot/Controllers/MouseScale.js +16 -6
- package/lib/Components/SceneRoot/Controllers/ScaleSceneRootSC.d.ts +2 -2
- package/lib/Components/SceneRoot/Controllers/ScaleSceneRootSC.js +8 -11
- package/lib/Components/SceneRoot/Controllers/SceneRootMoveSC.d.ts +2 -2
- package/lib/Components/SceneRoot/Controllers/SceneRootMoveSC.js +9 -12
- package/lib/Components/SceneRoot/Controllers/TouchOrbit.d.ts +3 -1
- package/lib/Components/SceneRoot/Controllers/TouchOrbit.js +24 -6
- package/lib/Components/SceneRoot/Controllers/TouchPan.d.ts +3 -1
- package/lib/Components/SceneRoot/Controllers/TouchPan.js +24 -6
- package/lib/Components/SceneRoot/Controllers/TouchPinch.d.ts +2 -2
- package/lib/Components/SceneRoot/Controllers/TouchPinch.js +12 -6
- package/lib/Components/SceneRoot/Controllers/TouchScale.d.ts +2 -2
- package/lib/Components/SceneRoot/Controllers/TouchScale.js +16 -5
- package/lib/Components/SceneRoot/Factories/index.d.ts +1 -0
- package/lib/Components/SceneRoot/Factories/index.js +13 -0
- package/lib/Components/SceneRoot/Factories/setupSceneRoot.d.ts +3 -0
- package/lib/Components/SceneRoot/Factories/setupSceneRoot.js +45 -0
- package/lib/Components/SceneRoot/Mocks/MockDragScaleSceneRootUC.d.ts +9 -0
- package/lib/Components/SceneRoot/Mocks/MockDragScaleSceneRootUC.js +13 -0
- package/lib/Components/SceneRoot/Mocks/MockFocusOnPixelUC.d.ts +10 -0
- package/lib/Components/SceneRoot/Mocks/MockFocusOnPixelUC.js +15 -0
- package/lib/Components/SceneRoot/Mocks/MockOrbitSceneRootUC.d.ts +11 -0
- package/lib/Components/SceneRoot/Mocks/MockOrbitSceneRootUC.js +15 -0
- package/lib/Components/SceneRoot/Mocks/MockPanSceneRootUC.d.ts +10 -0
- package/lib/Components/SceneRoot/Mocks/MockPanSceneRootUC.js +14 -0
- package/lib/Components/SceneRoot/Mocks/MockPinchSceneRootUC.d.ts +10 -0
- package/lib/Components/SceneRoot/Mocks/MockPinchSceneRootUC.js +14 -0
- package/lib/Components/SceneRoot/Mocks/index.d.ts +5 -2
- package/lib/Components/SceneRoot/Mocks/index.js +5 -2
- package/lib/Components/SceneRoot/UC/CenterSceneRootOnPixelPick.js +1 -1
- package/lib/Components/SceneRoot/UC/FocusOnPixel.js +1 -1
- package/lib/Components/SceneRoot/index.d.ts +3 -1
- package/lib/Components/SceneRoot/index.js +3 -1
- package/lib/Components/Selection/Controller/index.d.ts +1 -0
- package/lib/Components/Selection/Controller/index.js +1 -0
- package/lib/Components/Selection/index.d.ts +1 -0
- package/lib/Components/Selection/index.js +1 -0
- package/lib/Components/Stick/UCs/TryStickAppObjectUC.js +10 -0
- package/lib/Components/StoredView/PM/HasStoredViewPM.js +7 -9
- package/lib/Components/StoredView/UC/ClearStoredViewUC.d.ts +0 -1
- package/lib/Components/StoredView/UC/ClearStoredViewUC.js +4 -15
- package/lib/Components/StoredView/UC/RestoreStoredViewUC.d.ts +0 -1
- package/lib/Components/StoredView/UC/RestoreStoredViewUC.js +8 -22
- package/lib/Components/StoredView/UC/SerializeStoredView.js +3 -6
- package/lib/Components/StoredView/UC/SetInXRUC.d.ts +0 -1
- package/lib/Components/StoredView/UC/SetInXRUC.js +4 -15
- package/lib/Components/StoredView/UC/StoreCurrentViewUC.d.ts +0 -1
- package/lib/Components/StoredView/UC/StoreCurrentViewUC.js +7 -19
- package/lib/Components/StoredView/index.d.ts +3 -0
- package/lib/Components/StoredView/index.js +3 -0
- package/lib/Components/Tools/Adapters/toolAdapter.d.ts +1 -1
- package/lib/Components/Tools/Adapters/toolAdapter.js +16 -23
- package/lib/Components/Tools/Controller/ToolHotkeys.d.ts +1 -1
- package/lib/Components/Tools/Controller/triggerTool.d.ts +1 -1
- package/lib/Components/Tools/Entities/ToolEntity.d.ts +7 -7
- package/lib/Components/Tools/Entities/ToolEntity.js +1 -2
- package/lib/Components/Tools/Entities/ToolRepository.d.ts +12 -11
- package/lib/Components/Tools/Entities/ToolRepository.js +30 -26
- package/lib/Components/Tools/Mocks/MockToolRepo.d.ts +17 -0
- package/lib/Components/Tools/Mocks/MockToolRepo.js +28 -0
- package/lib/Components/Tools/Mocks/ToolPMMock.d.ts +2 -2
- package/lib/Components/Tools/Mocks/index.d.ts +1 -0
- package/lib/Components/Tools/Mocks/index.js +1 -0
- package/lib/Components/Tools/PM/ToolPM.d.ts +6 -6
- package/lib/Components/Tools/index.d.ts +1 -0
- package/lib/Components/Tools/index.js +1 -0
- package/lib/Components/TouchController/index.d.ts +1 -0
- package/lib/Components/TouchController/index.js +1 -0
- package/lib/Components/UndoRedo/index.d.ts +3 -1
- package/lib/Components/UndoRedo/index.js +3 -1
- package/lib/Components/index.d.ts +1 -0
- package/lib/Components/index.js +1 -0
- package/package.json +1 -1
|
@@ -2,14 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TouchPan = void 0;
|
|
4
4
|
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
+
const ValueObjects_1 = require("../../../ValueObjects");
|
|
6
|
+
const Tools_1 = require("../../Tools");
|
|
5
7
|
const TouchController_1 = require("../../TouchController");
|
|
6
8
|
const PanSceneRoot_1 = require("../UC/PanSceneRoot");
|
|
7
9
|
class TouchPan extends AppObjectController_1.AppObjectController {
|
|
8
10
|
constructor(appObject) {
|
|
9
11
|
super(appObject, TouchPan.type);
|
|
12
|
+
this.PAN_FINGER_DISTANCE_PX = 80;
|
|
10
13
|
this.isPanning = false;
|
|
11
14
|
this.allow = (e) => {
|
|
12
|
-
|
|
15
|
+
var _a;
|
|
16
|
+
const panTool = (_a = this.toolRepo) === null || _a === void 0 ? void 0 : _a.getTool("PAN");
|
|
17
|
+
if (!panTool)
|
|
18
|
+
return false;
|
|
19
|
+
const panToolIsAcvtive = panTool.state === Tools_1.ToolState.ACTIVE;
|
|
20
|
+
if (e.touches.length === 1 && panToolIsAcvtive) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
else if (e.touches.length === 2) {
|
|
24
|
+
const dist = ValueObjects_1.Vector2.Subtract(e.touches[0].position, e.touches[1].position).magnitued;
|
|
25
|
+
if (dist > this.PAN_FINGER_DISTANCE_PX) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
13
30
|
};
|
|
14
31
|
this.onTouchStart = (e) => {
|
|
15
32
|
var _a, _b;
|
|
@@ -34,11 +51,6 @@ class TouchPan extends AppObjectController_1.AppObjectController {
|
|
|
34
51
|
(_a = this.panRootUC) === null || _a === void 0 ? void 0 : _a.finishPan();
|
|
35
52
|
};
|
|
36
53
|
const appObjects = appObject.appObjectRepo;
|
|
37
|
-
this.panRootUC = appObject.getComponent(PanSceneRoot_1.PanSceneRootUC.type);
|
|
38
|
-
if (!this.panRootUC) {
|
|
39
|
-
this.warn("Controller has been added to an App Object that does not have PanSceneRootUC. Add one first.");
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
54
|
const touchInput = TouchController_1.TouchInputEntity.get(appObjects);
|
|
43
55
|
if (touchInput) {
|
|
44
56
|
touchInput.registerController(this);
|
|
@@ -47,6 +59,12 @@ class TouchPan extends AppObjectController_1.AppObjectController {
|
|
|
47
59
|
this.warn("Unable to find TouchInputEntity");
|
|
48
60
|
}
|
|
49
61
|
}
|
|
62
|
+
get panRootUC() {
|
|
63
|
+
return this.getCachedLocalComponent(PanSceneRoot_1.PanSceneRootUC.type);
|
|
64
|
+
}
|
|
65
|
+
get toolRepo() {
|
|
66
|
+
return this.getCachedSingleton(Tools_1.ToolRepository.type);
|
|
67
|
+
}
|
|
50
68
|
}
|
|
51
69
|
exports.TouchPan = TouchPan;
|
|
52
70
|
TouchPan.type = "TouchPan";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
2
|
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
3
|
import { TouchController, TouchInputEvent } from "../../TouchController";
|
|
4
|
-
import { PinchSceneRootUC } from "../UC/PinchSceneRoot";
|
|
5
4
|
export declare class TouchPinch extends AppObjectController implements TouchController {
|
|
6
5
|
static readonly type = "TouchPinch";
|
|
7
6
|
private isPinching;
|
|
8
|
-
|
|
7
|
+
PAN_FINGER_DISTANCE_PX: number;
|
|
8
|
+
private get pinchRootUC();
|
|
9
9
|
allow: (e: TouchInputEvent) => boolean;
|
|
10
10
|
onTouchStart: (e: TouchInputEvent) => void;
|
|
11
11
|
onTouchMove: (e: TouchInputEvent) => void;
|
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TouchPinch = void 0;
|
|
4
4
|
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
+
const ValueObjects_1 = require("../../../ValueObjects");
|
|
5
6
|
const TouchController_1 = require("../../TouchController");
|
|
6
7
|
const PinchSceneRoot_1 = require("../UC/PinchSceneRoot");
|
|
7
8
|
class TouchPinch extends AppObjectController_1.AppObjectController {
|
|
8
9
|
constructor(appObject) {
|
|
9
10
|
super(appObject, TouchPinch.type);
|
|
10
11
|
this.isPinching = false;
|
|
12
|
+
this.PAN_FINGER_DISTANCE_PX = 80;
|
|
11
13
|
this.allow = (e) => {
|
|
12
|
-
|
|
14
|
+
if (e.touches.length === 2) {
|
|
15
|
+
const dist = ValueObjects_1.Vector2.Subtract(e.touches[0].position, e.touches[1].position).magnitued;
|
|
16
|
+
if (dist > this.PAN_FINGER_DISTANCE_PX) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
13
21
|
};
|
|
14
22
|
this.onTouchStart = (e) => {
|
|
15
23
|
var _a;
|
|
@@ -37,11 +45,6 @@ class TouchPinch extends AppObjectController_1.AppObjectController {
|
|
|
37
45
|
(_a = this.pinchRootUC) === null || _a === void 0 ? void 0 : _a.finishPinch();
|
|
38
46
|
};
|
|
39
47
|
const appObjects = appObject.appObjectRepo;
|
|
40
|
-
this.pinchRootUC = appObject.getComponent(PinchSceneRoot_1.PinchSceneRootUC.type);
|
|
41
|
-
if (!this.pinchRootUC) {
|
|
42
|
-
this.warn("Controller has been added to an App Object that does not have PinchSceneRootUC. Add one first.");
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
48
|
const touchInput = TouchController_1.TouchInputEntity.get(appObjects);
|
|
46
49
|
if (touchInput) {
|
|
47
50
|
touchInput.registerController(this);
|
|
@@ -50,6 +53,9 @@ class TouchPinch extends AppObjectController_1.AppObjectController {
|
|
|
50
53
|
this.warn("Unable to find TouchInputEntity");
|
|
51
54
|
}
|
|
52
55
|
}
|
|
56
|
+
get pinchRootUC() {
|
|
57
|
+
return this.getCachedLocalComponent(PinchSceneRoot_1.PinchSceneRootUC.type);
|
|
58
|
+
}
|
|
53
59
|
}
|
|
54
60
|
exports.TouchPinch = TouchPinch;
|
|
55
61
|
TouchPinch.type = "TouchPinch";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
2
|
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
3
|
import { TouchController, TouchInputEvent } from "../../TouchController";
|
|
4
|
-
import { DragScaleSceneRootUC } from "../UC/DragScaleSceneRoot";
|
|
5
4
|
export declare class TouchScale extends AppObjectController implements TouchController {
|
|
6
5
|
static readonly type = "TouchScale";
|
|
7
6
|
private isScaling;
|
|
8
|
-
dragScaleRootUC
|
|
7
|
+
private get dragScaleRootUC();
|
|
8
|
+
private get toolRepo();
|
|
9
9
|
allow: (e: TouchInputEvent) => boolean;
|
|
10
10
|
onTouchStart: (e: TouchInputEvent) => void;
|
|
11
11
|
onTouchMove: (e: TouchInputEvent) => void;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TouchScale = void 0;
|
|
4
4
|
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
+
const Tools_1 = require("../../Tools");
|
|
5
6
|
const TouchController_1 = require("../../TouchController");
|
|
6
7
|
const DragScaleSceneRoot_1 = require("../UC/DragScaleSceneRoot");
|
|
7
8
|
class TouchScale extends AppObjectController_1.AppObjectController {
|
|
@@ -9,7 +10,15 @@ class TouchScale extends AppObjectController_1.AppObjectController {
|
|
|
9
10
|
super(appObject, TouchScale.type);
|
|
10
11
|
this.isScaling = false;
|
|
11
12
|
this.allow = (e) => {
|
|
12
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
const zoomTool = (_a = this.toolRepo) === null || _a === void 0 ? void 0 : _a.getTool("ZOOM");
|
|
15
|
+
if (!zoomTool)
|
|
16
|
+
return false;
|
|
17
|
+
const zoomToolIsActive = zoomTool.state === Tools_1.ToolState.ACTIVE;
|
|
18
|
+
if (e.touches.length === 1 && zoomToolIsActive) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
13
22
|
};
|
|
14
23
|
this.onTouchStart = (e) => {
|
|
15
24
|
var _a;
|
|
@@ -39,10 +48,6 @@ class TouchScale extends AppObjectController_1.AppObjectController {
|
|
|
39
48
|
(_a = this.dragScaleRootUC) === null || _a === void 0 ? void 0 : _a.finishScaling();
|
|
40
49
|
};
|
|
41
50
|
const appObjects = appObject.appObjectRepo;
|
|
42
|
-
this.dragScaleRootUC = DragScaleSceneRoot_1.DragScaleSceneRootUC.get(appObjects);
|
|
43
|
-
if (!this.dragScaleRootUC) {
|
|
44
|
-
this.warn("Unable to finde DragScaleSceneRootUC");
|
|
45
|
-
}
|
|
46
51
|
const touchInput = TouchController_1.TouchInputEntity.get(appObjects);
|
|
47
52
|
if (touchInput) {
|
|
48
53
|
touchInput.registerController(this);
|
|
@@ -51,6 +56,12 @@ class TouchScale extends AppObjectController_1.AppObjectController {
|
|
|
51
56
|
this.warn("Unable to find TouchInputEntity");
|
|
52
57
|
}
|
|
53
58
|
}
|
|
59
|
+
get dragScaleRootUC() {
|
|
60
|
+
return this.getCachedLocalComponent(DragScaleSceneRoot_1.DragScaleSceneRootUC.type);
|
|
61
|
+
}
|
|
62
|
+
get toolRepo() {
|
|
63
|
+
return this.getCachedSingleton(Tools_1.ToolRepository.type);
|
|
64
|
+
}
|
|
54
65
|
}
|
|
55
66
|
exports.TouchScale = TouchScale;
|
|
56
67
|
TouchScale.type = "TouchScale";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./setupSceneRoot";
|
|
@@ -0,0 +1,13 @@
|
|
|
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("./setupSceneRoot"), exports);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupSceneRoot = void 0;
|
|
4
|
+
const Transform3D_1 = require("../../Transform3D");
|
|
5
|
+
const Controllers_1 = require("../Controllers");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
const UC_1 = require("../UC");
|
|
8
|
+
function setupSceneRoot(appObjects, defaultData) {
|
|
9
|
+
const ao = appObjects.getOrCreate("SceneRoot");
|
|
10
|
+
const entity = Entities_1.makeSceneRootEntity(ao);
|
|
11
|
+
if (defaultData) {
|
|
12
|
+
entity.applyDefaultData(defaultData);
|
|
13
|
+
}
|
|
14
|
+
// UCs
|
|
15
|
+
UC_1.makeBumpSceneRootScaleAboutPixelPointUC(ao);
|
|
16
|
+
UC_1.makeCenterSceneRootOnPixelPickUC(ao);
|
|
17
|
+
UC_1.makeDragScaleSceneRootUC(ao);
|
|
18
|
+
UC_1.makeFocusOnPixelUC(ao);
|
|
19
|
+
UC_1.makeOrbitSceneRootUC(ao);
|
|
20
|
+
UC_1.makePanSceneRootUC(ao);
|
|
21
|
+
UC_1.makePinchSceneRootUC(ao);
|
|
22
|
+
new UC_1.ScaleSceneRootWithRay(ao);
|
|
23
|
+
UC_1.makeSerializeSceneRoot(ao);
|
|
24
|
+
Transform3D_1.makeStylusMoveTransformUC(ao);
|
|
25
|
+
const scaleUC = Transform3D_1.makeScaleTransformUC(ao);
|
|
26
|
+
scaleUC.raySensitivity = 10;
|
|
27
|
+
scaleUC.pixelSensitivity = 0.01;
|
|
28
|
+
// PMs
|
|
29
|
+
Transform3D_1.makeTransform3DPM(ao);
|
|
30
|
+
// Controllers
|
|
31
|
+
new Controllers_1.MouseClickToFocus(ao);
|
|
32
|
+
new Controllers_1.MouseOrbit(ao);
|
|
33
|
+
new Controllers_1.MousePan(ao);
|
|
34
|
+
new Controllers_1.MouseRoll(ao);
|
|
35
|
+
new Controllers_1.MouseScale(ao);
|
|
36
|
+
new Controllers_1.DoubleTapToFocus(ao);
|
|
37
|
+
new Controllers_1.TouchOrbit(ao);
|
|
38
|
+
new Controllers_1.TouchPan(ao);
|
|
39
|
+
new Controllers_1.TouchPinch(ao);
|
|
40
|
+
new Controllers_1.TouchScale(ao);
|
|
41
|
+
new Controllers_1.SceneRootMoveSC(ao);
|
|
42
|
+
new Controllers_1.ScaleSceneRootSC(ao);
|
|
43
|
+
return ao;
|
|
44
|
+
}
|
|
45
|
+
exports.setupSceneRoot = setupSceneRoot;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { DragScaleSceneRootUC } from "../UC";
|
|
4
|
+
export declare class MockDragScaleSceneRootUC extends DragScaleSceneRootUC {
|
|
5
|
+
doScale: jest.Mock<any, any>;
|
|
6
|
+
initializeScale: jest.Mock<any, any>;
|
|
7
|
+
finishScaling: jest.Mock<any, any>;
|
|
8
|
+
constructor(appObject: AppObject);
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockDragScaleSceneRootUC = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockDragScaleSceneRootUC extends UC_1.DragScaleSceneRootUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.DragScaleSceneRootUC.type);
|
|
8
|
+
this.doScale = jest.fn();
|
|
9
|
+
this.initializeScale = jest.fn();
|
|
10
|
+
this.finishScaling = jest.fn();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MockDragScaleSceneRootUC = MockDragScaleSceneRootUC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { EaseFn } from "../../../Types";
|
|
4
|
+
import { FocusOnPixelUC } from "../UC";
|
|
5
|
+
export declare class MockFocusOnPixelUC extends FocusOnPixelUC {
|
|
6
|
+
durationMS: number;
|
|
7
|
+
easeFn: EaseFn;
|
|
8
|
+
centerOnPixel: jest.Mock<any, any>;
|
|
9
|
+
constructor(appObject: AppObject);
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockFocusOnPixelUC = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockFocusOnPixelUC extends UC_1.FocusOnPixelUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.FocusOnPixelUC.type);
|
|
8
|
+
this.durationMS = 500;
|
|
9
|
+
this.easeFn = (val) => {
|
|
10
|
+
return val;
|
|
11
|
+
};
|
|
12
|
+
this.centerOnPixel = jest.fn();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.MockFocusOnPixelUC = MockFocusOnPixelUC;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { OrbitSceneRootUC } from "../UC/OrbitSceneRoot";
|
|
4
|
+
export declare class MockOrbitSceneRootUC extends OrbitSceneRootUC {
|
|
5
|
+
sensitivity: number;
|
|
6
|
+
doOrbit: jest.Mock<any, any>;
|
|
7
|
+
initializeOrbit: jest.Mock<any, any>;
|
|
8
|
+
finishOrbit: jest.Mock<any, any>;
|
|
9
|
+
cancelOrbit: jest.Mock<any, any>;
|
|
10
|
+
constructor(appObject: AppObject);
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockOrbitSceneRootUC = void 0;
|
|
4
|
+
const OrbitSceneRoot_1 = require("../UC/OrbitSceneRoot");
|
|
5
|
+
class MockOrbitSceneRootUC extends OrbitSceneRoot_1.OrbitSceneRootUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, OrbitSceneRoot_1.OrbitSceneRootUC.type);
|
|
8
|
+
this.sensitivity = 1;
|
|
9
|
+
this.doOrbit = jest.fn();
|
|
10
|
+
this.initializeOrbit = jest.fn();
|
|
11
|
+
this.finishOrbit = jest.fn();
|
|
12
|
+
this.cancelOrbit = jest.fn();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.MockOrbitSceneRootUC = MockOrbitSceneRootUC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { PanSceneRootUC } from "../UC/PanSceneRoot";
|
|
4
|
+
export declare class MockPanSceneRootUC extends PanSceneRootUC {
|
|
5
|
+
doPan: jest.Mock<any, any>;
|
|
6
|
+
initializePan: jest.Mock<any, any>;
|
|
7
|
+
finishPan: jest.Mock<any, any>;
|
|
8
|
+
cancelPan: jest.Mock<any, any>;
|
|
9
|
+
constructor(appObject: AppObject);
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockPanSceneRootUC = void 0;
|
|
4
|
+
const PanSceneRoot_1 = require("../UC/PanSceneRoot");
|
|
5
|
+
class MockPanSceneRootUC extends PanSceneRoot_1.PanSceneRootUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, PanSceneRoot_1.PanSceneRootUC.type);
|
|
8
|
+
this.doPan = jest.fn();
|
|
9
|
+
this.initializePan = jest.fn();
|
|
10
|
+
this.finishPan = jest.fn();
|
|
11
|
+
this.cancelPan = jest.fn();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.MockPanSceneRootUC = MockPanSceneRootUC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { PinchSceneRootUC } from "../UC";
|
|
4
|
+
export declare class MockPinchSceneRootUC extends PinchSceneRootUC {
|
|
5
|
+
sensitivity: number;
|
|
6
|
+
doPinch: jest.Mock<any, any>;
|
|
7
|
+
initializePinch: jest.Mock<any, any>;
|
|
8
|
+
finishPinch: jest.Mock<any, any>;
|
|
9
|
+
constructor(appObject: AppObject);
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockPinchSceneRootUC = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockPinchSceneRootUC extends UC_1.PinchSceneRootUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.PinchSceneRootUC.type);
|
|
8
|
+
this.sensitivity = 1;
|
|
9
|
+
this.doPinch = jest.fn();
|
|
10
|
+
this.initializePinch = jest.fn();
|
|
11
|
+
this.finishPinch = jest.fn();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.MockPinchSceneRootUC = MockPinchSceneRootUC;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./MockDragScaleSceneRootUC";
|
|
2
|
+
export * from "./MockFocusOnPixelUC";
|
|
3
|
+
export * from "./MockOrbitSceneRootUC";
|
|
4
|
+
export * from "./MockPanSceneRootUC";
|
|
5
|
+
export * from "./MockPinchSceneRootUC";
|
|
@@ -10,5 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./
|
|
13
|
+
__exportStar(require("./MockDragScaleSceneRootUC"), exports);
|
|
14
|
+
__exportStar(require("./MockFocusOnPixelUC"), exports);
|
|
15
|
+
__exportStar(require("./MockOrbitSceneRootUC"), exports);
|
|
16
|
+
__exportStar(require("./MockPanSceneRootUC"), exports);
|
|
17
|
+
__exportStar(require("./MockPinchSceneRootUC"), exports);
|
|
@@ -20,7 +20,7 @@ class CenterSceneRootOnPixelPickImp extends CenterSceneRootOnPixelPickUC {
|
|
|
20
20
|
constructor(appObject) {
|
|
21
21
|
super(appObject, CenterSceneRootOnPixelPickUC.type);
|
|
22
22
|
this.durationMS = 500;
|
|
23
|
-
this.easeFn = Utilities_1.
|
|
23
|
+
this.easeFn = Utilities_1.cubicInOut;
|
|
24
24
|
this.centerOnPixel = (pixel) => {
|
|
25
25
|
if (!this.sceneRoot)
|
|
26
26
|
return;
|
|
@@ -20,7 +20,7 @@ class FocusOnPixelImp extends FocusOnPixelUC {
|
|
|
20
20
|
constructor(appObject) {
|
|
21
21
|
super(appObject, FocusOnPixelUC.type);
|
|
22
22
|
this.durationMS = 500;
|
|
23
|
-
this.easeFn = Utilities_1.
|
|
23
|
+
this.easeFn = Utilities_1.cubicInOut;
|
|
24
24
|
this.centerOnPixel = (pixel) => {
|
|
25
25
|
if (!this.sceneRoot)
|
|
26
26
|
return;
|
|
@@ -10,6 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Controllers"), exports);
|
|
13
14
|
__exportStar(require("./Entities"), exports);
|
|
15
|
+
__exportStar(require("./Factories"), exports);
|
|
16
|
+
__exportStar(require("./Mocks"), exports);
|
|
14
17
|
__exportStar(require("./UC"), exports);
|
|
15
|
-
__exportStar(require("./Controllers"), exports);
|
|
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./KeyboardToClearSelection"), exports);
|
|
13
14
|
__exportStar(require("./MouseHoverOnAppObject"), exports);
|
|
14
15
|
__exportStar(require("./MousePressOnAppObject"), exports);
|
|
15
16
|
__exportStar(require("./MouseSelectAppObject"), exports);
|
|
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
__exportStar(require("./Adapters"), exports);
|
|
14
14
|
__exportStar(require("./Controller"), exports);
|
|
15
15
|
__exportStar(require("./Entities"), exports);
|
|
16
|
+
__exportStar(require("./Factories"), exports);
|
|
16
17
|
__exportStar(require("./Mocks"), exports);
|
|
17
18
|
__exportStar(require("./PM"), exports);
|
|
18
19
|
__exportStar(require("./UC"), exports);
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeTryStickAppObjectUC = exports.TryStickAppObjectUC = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const UC_1 = require("../../Babylon/UC");
|
|
6
|
+
const Tools_1 = require("../../Tools");
|
|
6
7
|
const StickUC_1 = require("./StickUC");
|
|
7
8
|
class TryStickAppObjectUC extends AppObject_1.AppObjectUC {
|
|
8
9
|
static get(appObjects) {
|
|
@@ -19,6 +20,12 @@ class TryStickAppObjectUCImp extends TryStickAppObjectUC {
|
|
|
19
20
|
constructor(appObject) {
|
|
20
21
|
super(appObject, TryStickAppObjectUC.type);
|
|
21
22
|
this.allow = () => {
|
|
23
|
+
var _a;
|
|
24
|
+
const peelTool = (_a = this.toolRepo) === null || _a === void 0 ? void 0 : _a.getTool("PEEL");
|
|
25
|
+
if (!peelTool)
|
|
26
|
+
return false;
|
|
27
|
+
if (peelTool.state !== Tools_1.ToolState.ACTIVE)
|
|
28
|
+
return false;
|
|
22
29
|
return true;
|
|
23
30
|
};
|
|
24
31
|
this.tryWithPixel = (pixel) => {
|
|
@@ -49,6 +56,9 @@ class TryStickAppObjectUCImp extends TryStickAppObjectUC {
|
|
|
49
56
|
};
|
|
50
57
|
this.appObjects.registerSingleton(this);
|
|
51
58
|
}
|
|
59
|
+
get toolRepo() {
|
|
60
|
+
return this.getCachedSingleton(Tools_1.ToolRepository.type);
|
|
61
|
+
}
|
|
52
62
|
get pixelPick() {
|
|
53
63
|
var _a;
|
|
54
64
|
return (_a = this.getCachedSingleton(UC_1.ScenePixelPickUC.type)) === null || _a === void 0 ? void 0 : _a.scenePixelPick;
|
|
@@ -14,6 +14,7 @@ function makeHasStoredViewPM(appObject) {
|
|
|
14
14
|
exports.makeHasStoredViewPM = makeHasStoredViewPM;
|
|
15
15
|
class HasStoredViewPMImp extends HasStoredViewPM {
|
|
16
16
|
constructor(appObject) {
|
|
17
|
+
var _a;
|
|
17
18
|
super(appObject, HasStoredViewPM.type);
|
|
18
19
|
this.onRepoChange = () => {
|
|
19
20
|
if (!this.storedView)
|
|
@@ -26,15 +27,12 @@ class HasStoredViewPMImp extends HasStoredViewPM {
|
|
|
26
27
|
(_a = this.storedView) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onRepoChange);
|
|
27
28
|
(_b = this.storedView) === null || _b === void 0 ? void 0 : _b.removeOnDisposeObserver(this.dispose);
|
|
28
29
|
};
|
|
29
|
-
this.storedView
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
else {
|
|
36
|
-
console.warn("[HasStoredViewPMImp] App Object does not have a StoredView Entity");
|
|
37
|
-
}
|
|
30
|
+
(_a = this.storedView) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onRepoChange);
|
|
31
|
+
this.onRepoChange();
|
|
32
|
+
this.appObjects.registerSingleton(this);
|
|
33
|
+
}
|
|
34
|
+
get storedView() {
|
|
35
|
+
return this.getCachedSingleton(Entities_1.StoredView.type);
|
|
38
36
|
}
|
|
39
37
|
vmsAreEqual(a, b) {
|
|
40
38
|
return a === b;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.makeClearStoredViewUC = exports.ClearStoredViewUC = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const ValueObjects_1 = require("../../../ValueObjects");
|
|
6
6
|
const Dispatcher_1 = require("../../Dispatcher");
|
|
@@ -14,16 +14,6 @@ function makeClearStoredViewUC(appObject) {
|
|
|
14
14
|
return new ClearStoredViewUCImp(appObject);
|
|
15
15
|
}
|
|
16
16
|
exports.makeClearStoredViewUC = makeClearStoredViewUC;
|
|
17
|
-
function clearStoredView(appObjects) {
|
|
18
|
-
const uc = ClearStoredViewUC.get(appObjects);
|
|
19
|
-
if (uc) {
|
|
20
|
-
uc.clearStoredView();
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
appObjects.submitWarning("clearStoredView", "Can't find ClearStoredViewUC");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.clearStoredView = clearStoredView;
|
|
27
17
|
class ClearStoredViewUCImp extends ClearStoredViewUC {
|
|
28
18
|
constructor(appObject) {
|
|
29
19
|
super(appObject, ClearStoredViewUC.type);
|
|
@@ -36,9 +26,8 @@ class ClearStoredViewUCImp extends ClearStoredViewUC {
|
|
|
36
26
|
this.storedView.hasStoredView = false;
|
|
37
27
|
Dispatcher_1.dispatchStateChange(this.appObject.appObjectRepo);
|
|
38
28
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
29
|
+
}
|
|
30
|
+
get storedView() {
|
|
31
|
+
return this.getCachedSingleton(Entities_1.StoredView.type);
|
|
43
32
|
}
|
|
44
33
|
}
|