@vived/app 4.34.11 → 4.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AppObject/AppObjectComponent.d.ts +9 -0
- package/lib/AppObject/AppObjectComponent.js +11 -1
- package/lib/AppObject/AppObjectController.d.ts +2 -1
- package/lib/AppObject/AppObjectController.js +4 -0
- package/lib/AppObject/AppObjectEntity.d.ts +2 -1
- package/lib/AppObject/AppObjectEntity.js +1 -0
- package/lib/AppObject/AppObjectPM.d.ts +2 -1
- package/lib/AppObject/AppObjectPM.js +1 -0
- package/lib/AppObject/AppObjectUC.d.ts +2 -1
- package/lib/AppObject/AppObjectUC.js +4 -0
- package/lib/AppObject/AppObjectView.d.ts +2 -1
- package/lib/AppObject/AppObjectView.js +4 -0
- package/lib/Components/ChannelModel/Entities/ChannelModel.js +1 -1
- package/lib/Components/FramedScreen/Factories/setupStandardFramedScreen.d.ts +4 -1
- package/lib/Components/FramedScreen/Factories/setupStandardFramedScreen.js +4 -2
- package/lib/Components/HoverLabel/Factories/setupHoverLabel.d.ts +16 -2
- package/lib/Components/HoverLabel/Factories/setupHoverLabel.js +8 -2
- package/lib/Components/LabelDrop/UseCases/DragLabelDropUC.js +3 -3
- package/lib/Utilities/LerpNumber.d.ts +56 -0
- package/lib/Utilities/LerpNumber.js +85 -0
- package/lib/Utilities/LerpNumberX.d.ts +56 -0
- package/lib/Utilities/LerpNumberX.js +85 -0
- package/lib/Utilities/index.d.ts +2 -0
- package/lib/Utilities/index.js +2 -0
- package/lib/Utilities/interpolateNumber.d.ts +1 -0
- package/lib/Utilities/{lerpNumber.js → interpolateNumber.js} +3 -3
- package/lib/ValueObjects/Vector3.js +4 -4
- package/package.json +1 -1
- package/lib/Components/App/Adapters/index.d.ts +0 -4
- package/lib/Components/App/Adapters/index.js +0 -16
- package/lib/Components/App/Adapters/isAuthoringAdapter.d.ts +0 -2
- package/lib/Components/App/Adapters/isAuthoringAdapter.js +0 -23
- package/lib/Components/App/Adapters/isReviewingAdapter.d.ts +0 -2
- package/lib/Components/App/Adapters/isReviewingAdapter.js +0 -23
- package/lib/Components/App/Adapters/slideNavigationAdapter.d.ts +0 -3
- package/lib/Components/App/Adapters/slideNavigationAdapter.js +0 -23
- package/lib/Components/App/Adapters/slideTextAdapter.d.ts +0 -2
- package/lib/Components/App/Adapters/slideTextAdapter.js +0 -23
- package/lib/Components/App/Controller/clickContinue.d.ts +0 -2
- package/lib/Components/App/Controller/clickContinue.js +0 -13
- package/lib/Components/App/Controller/clickEditSlideText.d.ts +0 -2
- package/lib/Components/App/Controller/clickEditSlideText.js +0 -13
- package/lib/Components/App/Controller/index.d.ts +0 -5
- package/lib/Components/App/Controller/index.js +0 -17
- package/lib/Components/App/Controller/removeRenderCanvas.d.ts +0 -2
- package/lib/Components/App/Controller/removeRenderCanvas.js +0 -13
- package/lib/Components/App/Controller/submitRenderCanvas.d.ts +0 -2
- package/lib/Components/App/Controller/submitRenderCanvas.js +0 -13
- package/lib/Components/App/Controller/updateContentSize.d.ts +0 -2
- package/lib/Components/App/Controller/updateContentSize.js +0 -13
- package/lib/Components/App/Entity/BaseAppState.d.ts +0 -20
- package/lib/Components/App/Entity/BaseAppState.js +0 -68
- package/lib/Components/App/Entity/index.d.ts +0 -1
- package/lib/Components/App/Entity/index.js +0 -13
- package/lib/Components/App/Mocks/IsAuthoringMock.d.ts +0 -8
- package/lib/Components/App/Mocks/IsAuthoringMock.js +0 -15
- package/lib/Components/App/Mocks/IsReviewingMock.d.ts +0 -8
- package/lib/Components/App/Mocks/IsReviewingMock.js +0 -15
- package/lib/Components/App/Mocks/MockAppRenderingUC.d.ts +0 -10
- package/lib/Components/App/Mocks/MockAppRenderingUC.js +0 -16
- package/lib/Components/App/Mocks/MockRenderCanvasUC.d.ts +0 -10
- package/lib/Components/App/Mocks/MockRenderCanvasUC.js +0 -16
- package/lib/Components/App/Mocks/MockUpdateContentSizeUC.d.ts +0 -9
- package/lib/Components/App/Mocks/MockUpdateContentSizeUC.js +0 -15
- package/lib/Components/App/Mocks/SlideNavigationMock.d.ts +0 -8
- package/lib/Components/App/Mocks/SlideNavigationMock.js +0 -15
- package/lib/Components/App/Mocks/SlideTextMock.d.ts +0 -8
- package/lib/Components/App/Mocks/SlideTextMock.js +0 -15
- package/lib/Components/App/Mocks/index.d.ts +0 -7
- package/lib/Components/App/Mocks/index.js +0 -19
- package/lib/Components/App/PM/IsAuthoringPM.d.ts +0 -6
- package/lib/Components/App/PM/IsAuthoringPM.js +0 -39
- package/lib/Components/App/PM/IsReviewingPM.d.ts +0 -6
- package/lib/Components/App/PM/IsReviewingPM.js +0 -39
- package/lib/Components/App/PM/SlideNavigationPM.d.ts +0 -12
- package/lib/Components/App/PM/SlideNavigationPM.js +0 -49
- package/lib/Components/App/PM/SlideTextPM.d.ts +0 -6
- package/lib/Components/App/PM/SlideTextPM.js +0 -34
- package/lib/Components/App/PM/index.d.ts +0 -4
- package/lib/Components/App/PM/index.js +0 -16
- package/lib/Components/App/UC/AppRenderingUC.d.ts +0 -7
- package/lib/Components/App/UC/AppRenderingUC.js +0 -9
- package/lib/Components/App/UC/EditSlideTextUC.d.ts +0 -10
- package/lib/Components/App/UC/EditSlideTextUC.js +0 -57
- package/lib/Components/App/UC/RenderCanvasUC.d.ts +0 -10
- package/lib/Components/App/UC/RenderCanvasUC.js +0 -88
- package/lib/Components/App/UC/SerializeBaseAppState.d.ts +0 -17
- package/lib/Components/App/UC/SerializeBaseAppState.js +0 -59
- package/lib/Components/App/UC/UndoRedoEditSlideText.d.ts +0 -11
- package/lib/Components/App/UC/UndoRedoEditSlideText.js +0 -43
- package/lib/Components/App/UC/UpdateContentSizeUC.d.ts +0 -7
- package/lib/Components/App/UC/UpdateContentSizeUC.js +0 -33
- package/lib/Components/App/UC/index.d.ts +0 -7
- package/lib/Components/App/UC/index.js +0 -19
- package/lib/Components/App/index.d.ts +0 -6
- package/lib/Components/App/index.js +0 -18
- package/lib/Components/Callouts/Controller/MouseCalloutRoll.d.ts +0 -9
- package/lib/Components/Callouts/Controller/MouseCalloutRoll.js +0 -27
- package/lib/Components/Callouts/Mocks/MoveCalloutToCamUcMock.d.ts +0 -7
- package/lib/Components/Callouts/Mocks/MoveCalloutToCamUcMock.js +0 -11
- package/lib/Components/Callouts/Mocks/TryBumpLabelUcMock.d.ts +0 -9
- package/lib/Components/Callouts/Mocks/TryBumpLabelUcMock.js +0 -13
- package/lib/Components/Callouts/UC/MoveCalloutToCamUC.d.ts +0 -14
- package/lib/Components/Callouts/UC/MoveCalloutToCamUC.js +0 -35
- package/lib/Components/Callouts/UC/TryBumpLabelUC.d.ts +0 -9
- package/lib/Components/Callouts/UC/TryBumpLabelUC.js +0 -61
- package/lib/Components/Challenge/React/challengeAuthorHelpHookAdapter.d.ts +0 -3
- package/lib/Components/Challenge/React/challengeAuthorHelpHookAdapter.js +0 -23
- package/lib/Components/Challenge/React/challengeConsumerHelpHookAdapter.d.ts +0 -3
- package/lib/Components/Challenge/React/challengeConsumerHelpHookAdapter.js +0 -23
- package/lib/Components/Challenge/React/index.d.ts +0 -3
- package/lib/Components/Challenge/React/index.js +0 -15
- package/lib/Components/Challenge/React/selectedChallengeHookAdapter.d.ts +0 -3
- package/lib/Components/Challenge/React/selectedChallengeHookAdapter.js +0 -29
- package/lib/Components/Challenge/UCs/SetChallengeUndo.d.ts +0 -11
- package/lib/Components/Challenge/UCs/SetChallengeUndo.js +0 -37
- package/lib/Components/ChannelModel/Controllers/setModelObjectLabel.d.ts +0 -2
- package/lib/Components/ChannelModel/Controllers/setModelObjectLabel.js +0 -14
- package/lib/Components/ChannelModel/Mocks/ValidateObjectPickUcMock.d.ts +0 -8
- package/lib/Components/ChannelModel/Mocks/ValidateObjectPickUcMock.js +0 -15
- package/lib/Components/Enablement/Entities/EnablablementEntity.d.ts +0 -16
- package/lib/Components/Enablement/Entities/EnablablementEntity.js +0 -28
- package/lib/Components/Enablement/PM/EnablableStatePM.d.ts +0 -14
- package/lib/Components/Enablement/PM/EnablableStatePM.js +0 -41
- package/lib/Components/FramedScreen/Factories/setupFramedScreen.d.ts +0 -2
- package/lib/Components/FramedScreen/Factories/setupFramedScreen.js +0 -35
- package/lib/Components/FramedScreen/PM/FramedScreenContainerPM.d.ts +0 -18
- package/lib/Components/FramedScreen/PM/FramedScreenContainerPM.js +0 -55
- package/lib/Components/HoverLabel/Controllers/ToggleAllowHoverLabelController.d.ts +0 -2
- package/lib/Components/HoverLabel/Controllers/ToggleAllowHoverLabelController.js +0 -13
- package/lib/Components/HoverLabel/Entities/HoverLabel.d.ts +0 -23
- package/lib/Components/HoverLabel/Entities/HoverLabel.js +0 -102
- package/lib/Components/Label/Entities/Label.d.ts +0 -18
- package/lib/Components/Label/Entities/Label.js +0 -64
- package/lib/Components/Landmarks/Controller/SetSelectedLandmarkColor.d.ts +0 -3
- package/lib/Components/Landmarks/Controller/SetSelectedLandmarkColor.js +0 -24
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.d.ts +0 -2
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.js +0 -19
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.d.ts +0 -2
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.js +0 -19
- package/lib/Components/Landmarks/UseCases/AddLandmarkUC.d.ts +0 -8
- package/lib/Components/Landmarks/UseCases/AddLandmarkUC.js +0 -67
- package/lib/Components/Question/UC/registerQuestionChallenge.d.ts +0 -2
- package/lib/Components/Question/UC/registerQuestionChallenge.js +0 -20
- package/lib/Components/SceneRoot/Mocks/DragScaleSceneRootUcMock.d.ts +0 -9
- package/lib/Components/SceneRoot/Mocks/DragScaleSceneRootUcMock.js +0 -13
- package/lib/Components/SceneRoot/Mocks/OrbitSceneRootUcMock.d.ts +0 -11
- package/lib/Components/SceneRoot/Mocks/OrbitSceneRootUcMock.js +0 -15
- package/lib/Components/SceneRoot/Mocks/PanSceneRootUcMock.d.ts +0 -10
- package/lib/Components/SceneRoot/Mocks/PanSceneRootUcMock.js +0 -14
- package/lib/Components/Selection/Controller/HoverOnAppObjectSC.d.ts +0 -11
- package/lib/Components/Selection/Controller/HoverOnAppObjectSC.js +0 -41
- package/lib/Components/Selection/Controller/PressOnAppObjectSC.d.ts +0 -18
- package/lib/Components/Selection/Controller/PressOnAppObjectSC.js +0 -70
- package/lib/Components/Selection/Controller/SelectAppObjectSC.d.ts +0 -11
- package/lib/Components/Selection/Controller/SelectAppObjectSC.js +0 -39
- package/lib/Components/Transform3D/Controllers/Mouse/TryMousePanTransformMC.d.ts +0 -13
- package/lib/Components/Transform3D/Controllers/Mouse/TryMousePanTransformMC.js +0 -51
- package/lib/Components/Transform3D/Controllers/Touch/TryTouchPanTransformTC.d.ts +0 -12
- package/lib/Components/Transform3D/Controllers/Touch/TryTouchPanTransformTC.js +0 -53
- package/lib/Components/Transform3D/UC/DragTransformUC.d.ts +0 -11
- package/lib/Components/Transform3D/UC/DragTransformUC.js +0 -108
- package/lib/Components/Transform3D/UC/StickTransformUC.d.ts +0 -12
- package/lib/Components/Transform3D/UC/StickTransformUC.js +0 -72
- package/lib/Utilities/lerpNumber.d.ts +0 -1
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeHoverLabel = exports.HoverLabelEntity = exports.HoverLabelMode = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const Entities_1 = require("../../../Entities");
|
|
6
|
-
const ValueObjects_1 = require("../../../ValueObjects");
|
|
7
|
-
const Transform3D_1 = require("../../Transform3D");
|
|
8
|
-
var HoverLabelMode;
|
|
9
|
-
(function (HoverLabelMode) {
|
|
10
|
-
HoverLabelMode[HoverLabelMode["NONE"] = 0] = "NONE";
|
|
11
|
-
HoverLabelMode[HoverLabelMode["SCREEN"] = 1] = "SCREEN";
|
|
12
|
-
HoverLabelMode[HoverLabelMode["WORLD"] = 2] = "WORLD";
|
|
13
|
-
})(HoverLabelMode = exports.HoverLabelMode || (exports.HoverLabelMode = {}));
|
|
14
|
-
class HoverLabelEntity extends AppObject_1.AppObjectEntity {
|
|
15
|
-
static get(appObjects) {
|
|
16
|
-
return AppObject_1.getSingletonComponent(HoverLabelEntity.type, appObjects);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.HoverLabelEntity = HoverLabelEntity;
|
|
20
|
-
HoverLabelEntity.type = "HoverLabelEntity";
|
|
21
|
-
function makeHoverLabel(appObject) {
|
|
22
|
-
Transform3D_1.Transform3D.addIfMissing(appObject);
|
|
23
|
-
return new HoverLabelImp(appObject);
|
|
24
|
-
}
|
|
25
|
-
exports.makeHoverLabel = makeHoverLabel;
|
|
26
|
-
class HoverLabelImp extends HoverLabelEntity {
|
|
27
|
-
constructor(appObject) {
|
|
28
|
-
super(appObject, HoverLabelEntity.type);
|
|
29
|
-
this._mode = HoverLabelMode.NONE;
|
|
30
|
-
this._pixelPosition = ValueObjects_1.Vector2.Zero();
|
|
31
|
-
this._show = false;
|
|
32
|
-
this._label = "";
|
|
33
|
-
this.memoizedAllow = new Entities_1.MemoizedBoolean(true, this.notifyOnChange);
|
|
34
|
-
this.showScreenHoverLabel = (label, pixelPosition) => {
|
|
35
|
-
if (!this.allowHoverLabel) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (this.mode === HoverLabelMode.SCREEN &&
|
|
39
|
-
label === this._label &&
|
|
40
|
-
ValueObjects_1.Vector2.Equal(pixelPosition, this._pixelPosition) &&
|
|
41
|
-
this.show) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this._label = label;
|
|
45
|
-
this._pixelPosition = pixelPosition;
|
|
46
|
-
this._show = true;
|
|
47
|
-
this._mode = HoverLabelMode.SCREEN;
|
|
48
|
-
this.notifyOnChange();
|
|
49
|
-
};
|
|
50
|
-
this.showWorldHoverLabel = (label, worldPosition) => {
|
|
51
|
-
if (!this.allowHoverLabel) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (this.mode === HoverLabelMode.WORLD &&
|
|
55
|
-
label === this._label &&
|
|
56
|
-
ValueObjects_1.Vector3.Equal(worldPosition, this.transform.worldPosition) &&
|
|
57
|
-
this.show) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
this._label = label;
|
|
61
|
-
this.transform.worldPosition = worldPosition;
|
|
62
|
-
this._show = true;
|
|
63
|
-
this._mode = HoverLabelMode.WORLD;
|
|
64
|
-
this.notifyOnChange();
|
|
65
|
-
};
|
|
66
|
-
this.hideHoverLabel = () => {
|
|
67
|
-
if (!this._show)
|
|
68
|
-
return;
|
|
69
|
-
this._show = false;
|
|
70
|
-
this._label = "";
|
|
71
|
-
this._pixelPosition = ValueObjects_1.Vector2.Zero();
|
|
72
|
-
this.transform.localPosition = ValueObjects_1.Vector3.Zero();
|
|
73
|
-
this._mode = HoverLabelMode.NONE;
|
|
74
|
-
this.notifyOnChange();
|
|
75
|
-
};
|
|
76
|
-
this.transform = Transform3D_1.Transform3D.addIfMissing(appObject);
|
|
77
|
-
}
|
|
78
|
-
get mode() {
|
|
79
|
-
return this._mode;
|
|
80
|
-
}
|
|
81
|
-
get pixelPosition() {
|
|
82
|
-
return this._pixelPosition;
|
|
83
|
-
}
|
|
84
|
-
get show() {
|
|
85
|
-
return this._show;
|
|
86
|
-
}
|
|
87
|
-
get label() {
|
|
88
|
-
return this._label;
|
|
89
|
-
}
|
|
90
|
-
get allowHoverLabel() {
|
|
91
|
-
return this.memoizedAllow.val;
|
|
92
|
-
}
|
|
93
|
-
set allowHoverLabel(allow) {
|
|
94
|
-
if (allow === this.memoizedAllow.val) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
this.memoizedAllow.val = allow;
|
|
98
|
-
if (allow === false) {
|
|
99
|
-
this.hideHoverLabel();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectEntity, AppObjectRepo } from "../../../AppObject";
|
|
2
|
-
export declare class Label extends AppObjectEntity {
|
|
3
|
-
static maxLabelLength: number;
|
|
4
|
-
static readonly type = "LABEL";
|
|
5
|
-
static addIfMissing(appObj: AppObject): Label;
|
|
6
|
-
static get(appObj: AppObject): Label | undefined;
|
|
7
|
-
static getByID(id: string, appObjects: AppObjectRepo): Label | undefined;
|
|
8
|
-
private memoizedDefault;
|
|
9
|
-
get default(): string;
|
|
10
|
-
set default(val: string);
|
|
11
|
-
private memoizedCustom;
|
|
12
|
-
get custom(): string;
|
|
13
|
-
set custom(val: string);
|
|
14
|
-
get display(): string;
|
|
15
|
-
get hasCustomLabel(): boolean;
|
|
16
|
-
get labelValidationMessage(): string | null;
|
|
17
|
-
constructor(appObject: AppObject);
|
|
18
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Label = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const Entities_1 = require("../../../Entities");
|
|
6
|
-
class Label extends AppObject_1.AppObjectEntity {
|
|
7
|
-
constructor(appObject) {
|
|
8
|
-
super(appObject, Label.type);
|
|
9
|
-
this.memoizedDefault = new Entities_1.MemoizedString("", this.notifyOnChange);
|
|
10
|
-
this.memoizedCustom = new Entities_1.MemoizedString("", this.notifyOnChange);
|
|
11
|
-
}
|
|
12
|
-
static addIfMissing(appObj) {
|
|
13
|
-
const existing = appObj.getComponent(this.type);
|
|
14
|
-
if (existing) {
|
|
15
|
-
return existing;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return new Label(appObj);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
static get(appObj) {
|
|
22
|
-
return appObj.getComponent(this.type);
|
|
23
|
-
}
|
|
24
|
-
static getByID(id, appObjects) {
|
|
25
|
-
const appObj = appObjects.get(id);
|
|
26
|
-
if (!appObj)
|
|
27
|
-
return;
|
|
28
|
-
return appObj.getComponent(this.type);
|
|
29
|
-
}
|
|
30
|
-
get default() {
|
|
31
|
-
return this.memoizedDefault.val;
|
|
32
|
-
}
|
|
33
|
-
set default(val) {
|
|
34
|
-
this.memoizedDefault.val = val;
|
|
35
|
-
}
|
|
36
|
-
get custom() {
|
|
37
|
-
return this.memoizedCustom.val;
|
|
38
|
-
}
|
|
39
|
-
set custom(val) {
|
|
40
|
-
this.memoizedCustom.val = val;
|
|
41
|
-
}
|
|
42
|
-
get display() {
|
|
43
|
-
if (this.memoizedCustom.val) {
|
|
44
|
-
return this.memoizedCustom.val;
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return this.memoizedDefault.val;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
get hasCustomLabel() {
|
|
51
|
-
return this.memoizedCustom.val ? true : false;
|
|
52
|
-
}
|
|
53
|
-
get labelValidationMessage() {
|
|
54
|
-
if (this.memoizedCustom.val.length > Label.maxLabelLength) {
|
|
55
|
-
return `Label is limited to ${Label.maxLabelLength} characters.`;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.Label = Label;
|
|
63
|
-
Label.maxLabelLength = 40;
|
|
64
|
-
Label.type = "LABEL";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setSelectedLandmarkColor = void 0;
|
|
4
|
-
const OverlayColor_1 = require("../../OverlayColor");
|
|
5
|
-
const Selection_1 = require("../../Selection");
|
|
6
|
-
function setSelectedLandmarkColor(color, appObjects) {
|
|
7
|
-
const selection = appObjects.getSingleton(Selection_1.Selection.type);
|
|
8
|
-
if (!selection) {
|
|
9
|
-
appObjects.submitWarning("SetSelectedLandmarkColorController", "Selection App Object was not added.");
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const selectedObjectID = selection.selectedObjectId;
|
|
13
|
-
if (!selectedObjectID) {
|
|
14
|
-
appObjects.submitWarning("SetSelectedLandmarkColorController", "There is no selected object.");
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const setOverlayColorUC = appObjects.getAppObjectComponent(selectedObjectID, OverlayColor_1.SetOverlayColorUC.type);
|
|
18
|
-
if (!setOverlayColorUC) {
|
|
19
|
-
appObjects.submitWarning("SetSelectedLandmarkColorController", "SetOverlayColorUC App Object was not added.");
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
setOverlayColorUC.setOverlayColor(color);
|
|
23
|
-
}
|
|
24
|
-
exports.setSelectedLandmarkColor = setSelectedLandmarkColor;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitLandmarkSize = void 0;
|
|
4
|
-
const LandmarkEntity_1 = require("../Entities/LandmarkEntity");
|
|
5
|
-
const SetLandmarkSizeUC_1 = require("../UseCases/SetLandmarkSizeUC");
|
|
6
|
-
function submitLandmarkSize(size, appObjectId, appObjects) {
|
|
7
|
-
const landmarkEntity = appObjects.getAppObjectComponent(appObjectId, LandmarkEntity_1.LandmarkEntity.type);
|
|
8
|
-
if (!landmarkEntity) {
|
|
9
|
-
appObjects.submitWarning("SubmitLandmarkSizeController", "LandmarkEntity App Object was not added.");
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const setLandmarkSizeUC = appObjects.getAppObjectComponent(appObjectId, SetLandmarkSizeUC_1.SetLandmarkSizeUC.type);
|
|
13
|
-
if (!setLandmarkSizeUC) {
|
|
14
|
-
appObjects.submitWarning("SubmitLandmarkSizeController", "SetLandmarkSizeUC App Object was not added.");
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
setLandmarkSizeUC.submitSize(size);
|
|
18
|
-
}
|
|
19
|
-
exports.submitLandmarkSize = submitLandmarkSize;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateLandmarkSize = void 0;
|
|
4
|
-
const LandmarkEntity_1 = require("../Entities/LandmarkEntity");
|
|
5
|
-
const SetLandmarkSizeUC_1 = require("../UseCases/SetLandmarkSizeUC");
|
|
6
|
-
function updateLandmarkSize(size, appObjectId, appObjects) {
|
|
7
|
-
const landmarkEntity = appObjects.getAppObjectComponent(appObjectId, LandmarkEntity_1.LandmarkEntity.type);
|
|
8
|
-
if (!landmarkEntity) {
|
|
9
|
-
appObjects.submitWarning("UpdateLandmarkSizeController", "LandmarkEntity App Object was not added.");
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const setLandmarkSizeUC = appObjects.getAppObjectComponent(appObjectId, SetLandmarkSizeUC_1.SetLandmarkSizeUC.type);
|
|
13
|
-
if (!setLandmarkSizeUC) {
|
|
14
|
-
appObjects.submitWarning("UpdateLandmarkSizeController", "SetLandmarkSizeUC App Object was not added.");
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
setLandmarkSizeUC.updateSize(size);
|
|
18
|
-
}
|
|
19
|
-
exports.updateLandmarkSize = updateLandmarkSize;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
|
-
import { LandmarkDTO, LandmarkEntity } from "../Entities/LandmarkEntity";
|
|
3
|
-
export declare abstract class AddLandmarkUC extends AppObjectUC {
|
|
4
|
-
static readonly type = "AddLandmarkUC";
|
|
5
|
-
abstract addFromData(data: LandmarkDTO): LandmarkEntity | undefined;
|
|
6
|
-
abstract addNew(): LandmarkEntity | undefined;
|
|
7
|
-
}
|
|
8
|
-
export declare function makeAddLandmarkUC(appObject: AppObject): AddLandmarkUC;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeAddLandmarkUC = exports.AddLandmarkUC = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const Utilities_1 = require("../../../Utilities");
|
|
6
|
-
const Label_1 = require("../../Label");
|
|
7
|
-
const Transform3D_1 = require("../../Transform3D");
|
|
8
|
-
const LandmarkGlobals_1 = require("../Entities/LandmarkGlobals");
|
|
9
|
-
const LandmarkRepo_1 = require("../Entities/LandmarkRepo");
|
|
10
|
-
class AddLandmarkUC extends AppObject_1.AppObjectUC {
|
|
11
|
-
}
|
|
12
|
-
exports.AddLandmarkUC = AddLandmarkUC;
|
|
13
|
-
AddLandmarkUC.type = "AddLandmarkUC";
|
|
14
|
-
function makeAddLandmarkUC(appObject) {
|
|
15
|
-
return new AddLandmarkUCImp(appObject);
|
|
16
|
-
}
|
|
17
|
-
exports.makeAddLandmarkUC = makeAddLandmarkUC;
|
|
18
|
-
class AddLandmarkUCImp extends AddLandmarkUC {
|
|
19
|
-
constructor(appObject) {
|
|
20
|
-
super(appObject, AddLandmarkUC.type);
|
|
21
|
-
this.landmarkRepo = appObject.getComponent(LandmarkRepo_1.LandmarkRepo.type);
|
|
22
|
-
if (!this.landmarkRepo) {
|
|
23
|
-
this.warn("LandmarkRepo App Object has not been added. Add to the LandmarkRepo App Object before Adding Landmark.");
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this.transform3D = appObject.getComponent(Transform3D_1.Transform3D.type);
|
|
27
|
-
if (!this.transform3D) {
|
|
28
|
-
this.warn("Transform3D App Object has not been added. Add to the Transform3D App Object before Adding Landmark.");
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
this.label = appObject.getComponent(Label_1.LabelEntity.type); // Not required
|
|
32
|
-
}
|
|
33
|
-
addFromData(data) {
|
|
34
|
-
if (!this.landmarkRepo || !this.transform3D)
|
|
35
|
-
return;
|
|
36
|
-
if (data.parentID !== this.appObject.id)
|
|
37
|
-
return;
|
|
38
|
-
const existingLandmark = this.landmarkRepo.getForAppObject(data.id);
|
|
39
|
-
if (existingLandmark) {
|
|
40
|
-
existingLandmark.data = data;
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const globals = this.appObjects.getSingleton(LandmarkGlobals_1.LandmarkGlobals.type);
|
|
44
|
-
if (!globals)
|
|
45
|
-
return;
|
|
46
|
-
const newLandmark = globals.landmarkFactory(data.id, this.appObject.id);
|
|
47
|
-
if (!newLandmark)
|
|
48
|
-
return;
|
|
49
|
-
newLandmark.transform.parent = this.transform3D;
|
|
50
|
-
newLandmark.data = data;
|
|
51
|
-
this.landmarkRepo.add(newLandmark);
|
|
52
|
-
return newLandmark;
|
|
53
|
-
}
|
|
54
|
-
addNew() {
|
|
55
|
-
if (!this.landmarkRepo || !this.transform3D)
|
|
56
|
-
return;
|
|
57
|
-
const globals = this.appObjects.getSingleton(LandmarkGlobals_1.LandmarkGlobals.type);
|
|
58
|
-
if (!globals)
|
|
59
|
-
return;
|
|
60
|
-
const newLandmark = globals.landmarkFactory(Utilities_1.generateUniqueID(), this.appObject.id);
|
|
61
|
-
if (!newLandmark)
|
|
62
|
-
return;
|
|
63
|
-
newLandmark.transform.parent = this.transform3D;
|
|
64
|
-
this.landmarkRepo.add(newLandmark);
|
|
65
|
-
return newLandmark;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerQuestionChallenge = void 0;
|
|
4
|
-
const ChallengeEntity_1 = require("../../Challenge/Entities/ChallengeEntity");
|
|
5
|
-
function registerQuestionChallenge(appObjects) {
|
|
6
|
-
const entity = ChallengeEntity_1.ChallengeEntity.get(appObjects);
|
|
7
|
-
if (!entity) {
|
|
8
|
-
appObjects.submitError("registerQuestionChallenge", "Unable to find ChallengeEntity");
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
const challengeDetails = {
|
|
12
|
-
authorHelpText: "Challenge the user to answer a multiple choice question.",
|
|
13
|
-
consumerHelpText: "You are being challenged to answer a question. Read the question and select the answer you think is correct.",
|
|
14
|
-
helpHeading: "Question Challenge Help",
|
|
15
|
-
id: "QUESTION",
|
|
16
|
-
name: "Question",
|
|
17
|
-
};
|
|
18
|
-
entity === null || entity === void 0 ? void 0 : entity.registerChallenge(challengeDetails);
|
|
19
|
-
}
|
|
20
|
-
exports.registerQuestionChallenge = registerQuestionChallenge;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject";
|
|
3
|
-
import { DragScaleSceneRootUC } from "../UC";
|
|
4
|
-
export declare class DragScaleSceneRootUcMock 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
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DragScaleSceneRootUcMock = void 0;
|
|
4
|
-
const UC_1 = require("../UC");
|
|
5
|
-
class DragScaleSceneRootUcMock 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.DragScaleSceneRootUcMock = DragScaleSceneRootUcMock;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject";
|
|
3
|
-
import { OrbitSceneRootUC } from "../UC/OrbitSceneRoot";
|
|
4
|
-
export declare class OrbitSceneRootUcMock 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
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrbitSceneRootUcMock = void 0;
|
|
4
|
-
const OrbitSceneRoot_1 = require("../UC/OrbitSceneRoot");
|
|
5
|
-
class OrbitSceneRootUcMock 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.OrbitSceneRootUcMock = OrbitSceneRootUcMock;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject";
|
|
3
|
-
import { PanSceneRootUC } from "../UC/PanSceneRoot";
|
|
4
|
-
export declare class PanSceneRootUcMock 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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PanSceneRootUcMock = void 0;
|
|
4
|
-
const PanSceneRoot_1 = require("../UC/PanSceneRoot");
|
|
5
|
-
class PanSceneRootUcMock 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.PanSceneRootUcMock = PanSceneRootUcMock;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { StylusController } from "../../Stylus";
|
|
4
|
-
export declare class HoverOnAppObjectSC extends AppObjectController implements StylusController {
|
|
5
|
-
static readonly type = "HoverOnAppObjectSC";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private hoverUC?;
|
|
8
|
-
allow: () => boolean;
|
|
9
|
-
onStylusMove: () => void;
|
|
10
|
-
constructor(appObject: AppObject);
|
|
11
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HoverOnAppObjectSC = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const Stylus_1 = require("../../Stylus");
|
|
6
|
-
const HoverAppObjectUC_1 = require("../UC/HoverAppObjectUC");
|
|
7
|
-
class HoverOnAppObjectSC extends AppObjectController_1.AppObjectController {
|
|
8
|
-
constructor(appObject) {
|
|
9
|
-
super(appObject, HoverOnAppObjectSC.type);
|
|
10
|
-
this.allow = () => {
|
|
11
|
-
return true;
|
|
12
|
-
};
|
|
13
|
-
this.onStylusMove = () => {
|
|
14
|
-
if (!this.stylus)
|
|
15
|
-
return;
|
|
16
|
-
if (!this.hoverUC)
|
|
17
|
-
return;
|
|
18
|
-
if (!this.allow())
|
|
19
|
-
return;
|
|
20
|
-
const pointerRay = this.stylus.pickRay;
|
|
21
|
-
this.hoverUC.tryHoverSceneObject(pointerRay);
|
|
22
|
-
};
|
|
23
|
-
this.stylus = Stylus_1.StylusEntity.get(this.appObjects);
|
|
24
|
-
if (!this.stylus) {
|
|
25
|
-
this.warn("Unable to find StylusEntity");
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
this.hoverUC = appObject.getComponent(HoverAppObjectUC_1.HoverAppObjectUC.type);
|
|
29
|
-
if (!this.stylus) {
|
|
30
|
-
console.warn("StylusInputPointer Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
31
|
-
}
|
|
32
|
-
else if (!this.hoverUC) {
|
|
33
|
-
console.warn("HoverAppObjectUC has not been found on any objects in the app object repo");
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this.stylus.registerController(this);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.HoverOnAppObjectSC = HoverOnAppObjectSC;
|
|
41
|
-
HoverOnAppObjectSC.type = "HoverOnAppObjectSC";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { StylusController } from "../../Stylus";
|
|
4
|
-
export declare class PressOnAppObjectSC extends AppObjectController implements StylusController {
|
|
5
|
-
static readonly type = "PressOnAppObjectSC";
|
|
6
|
-
static readonly maxTapDistancePx = 5;
|
|
7
|
-
private stylus?;
|
|
8
|
-
private pressUC?;
|
|
9
|
-
private startPosition;
|
|
10
|
-
private endPosition;
|
|
11
|
-
private pressedID;
|
|
12
|
-
private isPressed;
|
|
13
|
-
allow: (button: number) => boolean;
|
|
14
|
-
onButtonDown: (button: number) => void;
|
|
15
|
-
onButtonUp: (button: number) => void;
|
|
16
|
-
onStylusMove: () => void;
|
|
17
|
-
constructor(appObject: AppObject);
|
|
18
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PressOnAppObjectSC = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const Vector3_1 = require("../../../ValueObjects/Vector3");
|
|
6
|
-
const Stylus_1 = require("../../Stylus");
|
|
7
|
-
const PressAppObjectUC_1 = require("../UC/PressAppObjectUC");
|
|
8
|
-
class PressOnAppObjectSC extends AppObjectController_1.AppObjectController {
|
|
9
|
-
constructor(appObject) {
|
|
10
|
-
super(appObject, PressOnAppObjectSC.type);
|
|
11
|
-
this.startPosition = Vector3_1.Vector3.Zero();
|
|
12
|
-
this.endPosition = Vector3_1.Vector3.Zero();
|
|
13
|
-
this.pressedID = null;
|
|
14
|
-
this.isPressed = false;
|
|
15
|
-
this.allow = (button) => {
|
|
16
|
-
return true;
|
|
17
|
-
};
|
|
18
|
-
this.onButtonDown = (button) => {
|
|
19
|
-
var _a;
|
|
20
|
-
if (!this.stylus)
|
|
21
|
-
return;
|
|
22
|
-
if (!this.pressUC)
|
|
23
|
-
return;
|
|
24
|
-
if (!this.allow(button))
|
|
25
|
-
return;
|
|
26
|
-
this.startPosition = this.stylus.transform.localPosition;
|
|
27
|
-
this.endPosition = this.startPosition;
|
|
28
|
-
this.isPressed = true;
|
|
29
|
-
this.pressedID = (_a = this.pressUC) === null || _a === void 0 ? void 0 : _a.tryPressSceneObject(this.stylus.pickRay);
|
|
30
|
-
};
|
|
31
|
-
this.onButtonUp = (button) => {
|
|
32
|
-
this.isPressed = false;
|
|
33
|
-
if (button !== 0)
|
|
34
|
-
return;
|
|
35
|
-
if (!this.pressUC)
|
|
36
|
-
return;
|
|
37
|
-
// Set pressedID to null
|
|
38
|
-
this.pressUC.pressSceneObject(this.pressedID, this.isPressed);
|
|
39
|
-
};
|
|
40
|
-
this.onStylusMove = () => {
|
|
41
|
-
var _a;
|
|
42
|
-
if (!this.pressUC) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (this.isPressed) {
|
|
46
|
-
this.endPosition = (_a = this.stylus) === null || _a === void 0 ? void 0 : _a.transform.localPosition;
|
|
47
|
-
const movement = Vector3_1.Vector3.Subtract(this.startPosition, this.endPosition)
|
|
48
|
-
.magnitude;
|
|
49
|
-
if (movement > PressOnAppObjectSC.maxTapDistancePx) {
|
|
50
|
-
// Set pressedID to null
|
|
51
|
-
this.pressUC.pressSceneObject(null, this.isPressed);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
this.stylus = Stylus_1.StylusEntity.get(this.appObjects);
|
|
56
|
-
if (!this.stylus) {
|
|
57
|
-
this.error("Unable to find StylusEntity");
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
this.pressUC = appObject.getComponent(PressAppObjectUC_1.PressAppObjectUC.type);
|
|
61
|
-
if (!this.pressUC) {
|
|
62
|
-
this.error("Unable to get PressAppObjectUC from the App Object");
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
this.stylus.registerController(this);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.PressOnAppObjectSC = PressOnAppObjectSC;
|
|
69
|
-
PressOnAppObjectSC.type = "PressOnAppObjectSC";
|
|
70
|
-
PressOnAppObjectSC.maxTapDistancePx = 5;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { StylusController } from "../../Stylus";
|
|
4
|
-
export declare class SelectAppObjectSC extends AppObjectController implements StylusController {
|
|
5
|
-
static readonly type = "SelectAppObjectSC";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private selectUC?;
|
|
8
|
-
allow: () => boolean;
|
|
9
|
-
onButtonClick: (button: number) => void;
|
|
10
|
-
constructor(appObject: AppObject);
|
|
11
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectAppObjectSC = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const Stylus_1 = require("../../Stylus");
|
|
6
|
-
const UC_1 = require("../UC");
|
|
7
|
-
class SelectAppObjectSC extends AppObjectController_1.AppObjectController {
|
|
8
|
-
constructor(appObject) {
|
|
9
|
-
super(appObject, SelectAppObjectSC.type);
|
|
10
|
-
this.allow = () => {
|
|
11
|
-
return true;
|
|
12
|
-
};
|
|
13
|
-
this.onButtonClick = (button) => {
|
|
14
|
-
if (button !== 0)
|
|
15
|
-
return;
|
|
16
|
-
if (!this.stylus)
|
|
17
|
-
return;
|
|
18
|
-
if (!this.selectUC)
|
|
19
|
-
return;
|
|
20
|
-
if (!this.allow())
|
|
21
|
-
return;
|
|
22
|
-
const pointerRay = this.stylus.pickRay;
|
|
23
|
-
this.selectUC.trySelectSceneObject(pointerRay);
|
|
24
|
-
};
|
|
25
|
-
this.stylus = Stylus_1.StylusEntity.get(this.appObjects);
|
|
26
|
-
if (!this.stylus) {
|
|
27
|
-
this.error("Unable to find StylusEntity");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this.selectUC = appObject.getComponent(UC_1.SelectAppObjectUC.type);
|
|
31
|
-
if (!this.selectUC) {
|
|
32
|
-
this.error("Added to an App Object that does not have SelectAppObjectUC");
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
this.stylus.registerController(this);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.SelectAppObjectSC = SelectAppObjectSC;
|
|
39
|
-
SelectAppObjectSC.type = "SelectAppObjectSC";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectController } from "../../../../AppObject";
|
|
2
|
-
import { MouseController, MouseInputEvent } from "../../../MouseInput";
|
|
3
|
-
export declare class TryMousePanTransformMC extends AppObjectController implements MouseController {
|
|
4
|
-
static readonly type = "TryMousePanTransformMC";
|
|
5
|
-
allow: (e: MouseInputEvent) => boolean;
|
|
6
|
-
private get mouseInput();
|
|
7
|
-
private get tryScreenDragUC();
|
|
8
|
-
private isDragging;
|
|
9
|
-
onDown: (e: MouseInputEvent) => void;
|
|
10
|
-
onMove: (e: MouseInputEvent) => void;
|
|
11
|
-
onUp: () => void;
|
|
12
|
-
constructor(appObject: AppObject);
|
|
13
|
-
}
|