@vived/app 4.21.0 → 4.23.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/App/Adapters/index.d.ts +4 -0
- package/lib/Components/{KeyboardInput/Mocks → App/Adapters}/index.js +4 -1
- package/lib/Components/App/Adapters/isAuthoringAdapter.d.ts +2 -0
- package/lib/Components/App/Adapters/isAuthoringAdapter.js +23 -0
- package/lib/Components/App/Adapters/isReviewingAdapter.d.ts +2 -0
- package/lib/Components/App/Adapters/isReviewingAdapter.js +23 -0
- package/lib/Components/App/Adapters/slideNavigationAdapter.d.ts +3 -0
- package/lib/Components/App/Adapters/slideNavigationAdapter.js +23 -0
- package/lib/Components/App/Adapters/slideTextAdapter.d.ts +2 -0
- package/lib/Components/App/Adapters/slideTextAdapter.js +23 -0
- package/lib/Components/App/Entity/BaseAppState.d.ts +2 -0
- package/lib/Components/App/Entity/BaseAppState.js +7 -0
- package/lib/Components/App/Mocks/IsAuthoringMock.d.ts +8 -0
- package/lib/Components/App/Mocks/IsAuthoringMock.js +15 -0
- package/lib/Components/App/Mocks/IsReviewingMock.d.ts +8 -0
- package/lib/Components/App/Mocks/IsReviewingMock.js +15 -0
- package/lib/Components/App/Mocks/SlideNavigationMock.d.ts +8 -0
- package/lib/Components/App/Mocks/SlideNavigationMock.js +15 -0
- package/lib/Components/App/Mocks/SlideTextMock.d.ts +8 -0
- package/lib/Components/App/Mocks/SlideTextMock.js +15 -0
- package/lib/Components/App/Mocks/index.d.ts +4 -0
- package/lib/Components/App/Mocks/index.js +4 -0
- package/lib/Components/App/PM/IsAuthoringPM.d.ts +2 -6
- package/lib/Components/App/PM/IsAuthoringPM.js +16 -10
- package/lib/Components/App/PM/IsReviewingPM.d.ts +2 -6
- package/lib/Components/App/PM/IsReviewingPM.js +16 -10
- package/lib/Components/App/PM/SlideNavigationPM.d.ts +12 -0
- package/lib/Components/App/PM/SlideNavigationPM.js +49 -0
- package/lib/Components/App/PM/SlideTextPM.d.ts +2 -5
- package/lib/Components/App/PM/SlideTextPM.js +17 -10
- package/lib/Components/App/PM/index.d.ts +1 -1
- package/lib/Components/App/PM/index.js +1 -1
- package/lib/Components/App/index.d.ts +1 -0
- package/lib/Components/App/index.js +1 -0
- package/lib/Components/ChannelModel/Adapters/activeModelAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/activeModelAdapter.js +23 -0
- package/lib/Components/ChannelModel/Adapters/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Adapters/index.js +1 -0
- package/lib/Components/ChannelModel/Entities/ChannelModelRepo.d.ts +2 -2
- package/lib/Components/ChannelModel/Entities/ChannelModelRepo.js +3 -3
- package/lib/Components/ChannelModel/Mocks/ActiveModelMock.d.ts +8 -0
- package/lib/Components/ChannelModel/Mocks/ActiveModelMock.js +15 -0
- package/lib/Components/ChannelModel/Mocks/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Mocks/index.js +1 -0
- package/lib/Components/ChannelModel/PMs/ActiveModelPM.d.ts +13 -0
- package/lib/Components/ChannelModel/PMs/ActiveModelPM.js +36 -0
- package/lib/Components/ChannelModel/PMs/index.d.ts +1 -0
- package/lib/Components/ChannelModel/PMs/index.js +1 -0
- package/lib/Components/ChannelModel/UC/SelectChannelModelUC.js +7 -1
- package/lib/Components/ChannelModel/UC/SerializeActiveModel.d.ts +26 -0
- package/lib/Components/ChannelModel/UC/SerializeActiveModel.js +80 -0
- package/lib/Components/ChannelModel/UC/index.d.ts +1 -0
- package/lib/Components/ChannelModel/UC/index.js +1 -0
- package/lib/Components/RequestHandler/UC/SetAppStateUC.d.ts +9 -2
- package/lib/Components/RequestHandler/UC/SetAppStateUC.js +35 -27
- package/package.json +1 -1
- package/lib/Components/App/PM/HasNextPreviousStatePM.d.ts +0 -15
- package/lib/Components/App/PM/HasNextPreviousStatePM.js +0 -44
- package/lib/Components/ChannelModel/Mocks/ProcessChannelModelUCMock.d.ts +0 -8
- package/lib/Components/ChannelModel/Mocks/ProcessChannelModelUCMock.js +0 -15
- package/lib/Components/ChannelModel/UC/InitializeChannelModelFromGLB.d.ts +0 -0
- package/lib/Components/ChannelModel/UC/InitializeChannelModelFromGLB.js +0 -1
- package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.d.ts +0 -6
- package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.js +0 -9
- package/lib/Components/ChannelModel/UC/SetupChannelModelUC.d.ts +0 -9
- package/lib/Components/ChannelModel/UC/SetupChannelModelUC.js +0 -11
- package/lib/Components/HoverLabel/Mocks/index.d.ts +0 -1
- package/lib/Components/HoverLabel/Mocks/index.js +0 -13
- package/lib/Components/HoverLabel/PM/HoverLabelPM.d.ts +0 -19
- package/lib/Components/HoverLabel/PM/HoverLabelPM.js +0 -65
- package/lib/Components/KeyboardInput/Mocks/index.d.ts +0 -1
- package/lib/Components/Landmarks/Mocks/index.d.ts +0 -1
- package/lib/Components/Landmarks/Mocks/index.js +0 -13
- package/lib/Components/MouseInput/Mocks/index.d.ts +0 -1
- package/lib/Components/MouseInput/Mocks/index.js +0 -13
- package/lib/Components/Question/Mocks/index.d.ts +0 -2
- package/lib/Components/Question/Mocks/index.js +0 -14
- package/lib/Components/RequestHandler/Mocks/index.d.ts +0 -1
- package/lib/Components/RequestHandler/Mocks/index.js +0 -13
- package/lib/Components/SceneRoot/Controllers/StylusMove.d.ts +0 -14
- package/lib/Components/SceneRoot/Controllers/StylusMove.js +0 -56
- package/lib/Components/SceneRoot/Controllers/StylusScale.d.ts +0 -14
- package/lib/Components/SceneRoot/Controllers/StylusScale.js +0 -58
- package/lib/Components/Selection/Controller/StylusHoverOnAppObject.d.ts +0 -11
- package/lib/Components/Selection/Controller/StylusHoverOnAppObject.js +0 -42
- package/lib/Components/Selection/Controller/StylusPressOnAppObject.d.ts +0 -18
- package/lib/Components/Selection/Controller/StylusPressOnAppObject.js +0 -77
- package/lib/Components/Selection/Controller/StylusSelectAppObject.d.ts +0 -11
- package/lib/Components/Selection/Controller/StylusSelectAppObject.js +0 -44
- package/lib/Components/TouchController/Mock/index.d.ts +0 -2
- package/lib/Components/TouchController/Mock/index.js +0 -14
- package/lib/Components/UndoRedo/Mocks/index.d.ts +0 -1
- package/lib/Components/UndoRedo/Mocks/index.js +0 -13
- package/lib/Components/XR/Mocks/index.d.ts +0 -2
- package/lib/Components/XR/Mocks/index.js +0 -14
- package/lib/Components/zSpace/Controllers/EmulateStylus.d.ts +0 -10
- package/lib/Components/zSpace/Controllers/EmulateStylus.js +0 -113
- package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.d.ts +0 -14
- package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.js +0 -57
- package/lib/Components/zSpace/Controllers/index.d.ts +0 -1
- package/lib/Components/zSpace/Controllers/index.js +0 -13
- package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.d.ts +0 -29
- package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.js +0 -115
- package/lib/Components/zSpace/Mocks/index.d.ts +0 -1
- package/lib/Components/zSpace/Mocks/index.js +0 -13
- package/lib/Components/zSpace/PM/StylusColorLengthPM.d.ts +0 -13
- package/lib/Components/zSpace/PM/StylusColorLengthPM.js +0 -77
- package/lib/Components/zSpace/PM/StylusIsInUsePM.d.ts +0 -6
- package/lib/Components/zSpace/PM/StylusIsInUsePM.js +0 -42
- package/lib/Types/ChannelModelData.d.ts +0 -67
- package/lib/Types/ChannelModelData.js +0 -21
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockLandmark"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./MockMouseInput";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockMouseInput"), exports);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockQuestionAnswerEntity"), exports);
|
|
14
|
-
__exportStar(require("./MockValidateQuestion"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./MockAppHandlerEntity";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockAppHandlerEntity"), exports);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusMove extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "StylusMove";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private stylusRootMovementUC?;
|
|
8
|
-
private isMoving;
|
|
9
|
-
allow: (button: ZSpaceStylusButton) => boolean;
|
|
10
|
-
onButtonDown: (button: ZSpaceStylusButton) => void;
|
|
11
|
-
onButtonUp: () => void;
|
|
12
|
-
onStylusMove: () => void;
|
|
13
|
-
constructor(appObject: AppObject);
|
|
14
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusMove = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const ZSpaceStylusEntity_1 = require("../../zSpace/Entities/ZSpaceStylusEntity");
|
|
6
|
-
const StylusMoveTransformUC_1 = require("../../Transform3D/UC/StylusMoveTransformUC");
|
|
7
|
-
const zSpace_1 = require("../../zSpace");
|
|
8
|
-
class StylusMove extends AppObjectController_1.AppObjectController {
|
|
9
|
-
constructor(appObject) {
|
|
10
|
-
super(appObject, StylusMove.type);
|
|
11
|
-
this.isMoving = false;
|
|
12
|
-
this.allow = (button) => {
|
|
13
|
-
if (button === ZSpaceStylusEntity_1.ZSpaceStylusButton.PRIMARY)
|
|
14
|
-
return true;
|
|
15
|
-
return false;
|
|
16
|
-
};
|
|
17
|
-
this.onButtonDown = (button) => {
|
|
18
|
-
var _a;
|
|
19
|
-
this.isMoving = false;
|
|
20
|
-
if (!this.stylus)
|
|
21
|
-
return;
|
|
22
|
-
if (!this.allow(button))
|
|
23
|
-
return;
|
|
24
|
-
(_a = this.stylusRootMovementUC) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
25
|
-
this.isMoving = true;
|
|
26
|
-
};
|
|
27
|
-
this.onButtonUp = () => {
|
|
28
|
-
var _a;
|
|
29
|
-
this.isMoving = true;
|
|
30
|
-
if (!this.stylus)
|
|
31
|
-
return;
|
|
32
|
-
(_a = this.stylusRootMovementUC) === null || _a === void 0 ? void 0 : _a.stop();
|
|
33
|
-
};
|
|
34
|
-
this.onStylusMove = () => {
|
|
35
|
-
var _a;
|
|
36
|
-
if (!this.stylus || !this.isMoving)
|
|
37
|
-
return;
|
|
38
|
-
(_a = this.stylusRootMovementUC) === null || _a === void 0 ? void 0 : _a.move();
|
|
39
|
-
};
|
|
40
|
-
const zSpaceEntity = zSpace_1.ZSpaceEntity.get(this.appObject.appObjectRepo);
|
|
41
|
-
if (!zSpaceEntity) {
|
|
42
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
this.stylus = zSpaceEntity.stylus;
|
|
46
|
-
this.stylusRootMovementUC = appObject.getComponent(StylusMoveTransformUC_1.StylusMoveTransformUC.type);
|
|
47
|
-
if (!this.stylusRootMovementUC) {
|
|
48
|
-
this.warn("StylusMoveSceneRoot has been added to an App Object that does not have a StylusMoveTransformUC");
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.stylus.registerController(this);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.StylusMove = StylusMove;
|
|
56
|
-
StylusMove.type = "StylusMove";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusScale extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "ZSpaceScaleRoot";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private scaleSceneRootWithRay?;
|
|
8
|
-
private isScaling;
|
|
9
|
-
allow: (button: ZSpaceStylusButton) => boolean;
|
|
10
|
-
onButtonDown: (button: ZSpaceStylusButton) => void;
|
|
11
|
-
onStylusMove: () => void;
|
|
12
|
-
onButtonUp: () => void;
|
|
13
|
-
constructor(appObject: AppObject);
|
|
14
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusScale = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const ScaleSceneRootWithRay_1 = require("../UC/ScaleSceneRootWithRay");
|
|
6
|
-
const ZSpaceStylusEntity_1 = require("../../zSpace/Entities/ZSpaceStylusEntity");
|
|
7
|
-
const zSpace_1 = require("../../zSpace");
|
|
8
|
-
class StylusScale extends AppObjectController_1.AppObjectController {
|
|
9
|
-
constructor(appObject) {
|
|
10
|
-
super(appObject, StylusScale.type);
|
|
11
|
-
this.isScaling = false;
|
|
12
|
-
this.allow = (button) => {
|
|
13
|
-
if (button === ZSpaceStylusEntity_1.ZSpaceStylusButton.BACK_RIGHT)
|
|
14
|
-
return true;
|
|
15
|
-
return false;
|
|
16
|
-
};
|
|
17
|
-
this.onButtonDown = (button) => {
|
|
18
|
-
var _a;
|
|
19
|
-
this.isScaling = false;
|
|
20
|
-
if (!this.stylus)
|
|
21
|
-
return;
|
|
22
|
-
if (!this.allow(button))
|
|
23
|
-
return;
|
|
24
|
-
const pointerRay = this.stylus.pickRay;
|
|
25
|
-
const rayStart = this.stylus.transform.localPosition;
|
|
26
|
-
(_a = this.scaleSceneRootWithRay) === null || _a === void 0 ? void 0 : _a.initializeScale(pointerRay, rayStart);
|
|
27
|
-
this.isScaling = true;
|
|
28
|
-
};
|
|
29
|
-
this.onStylusMove = () => {
|
|
30
|
-
var _a;
|
|
31
|
-
if (!this.stylus)
|
|
32
|
-
return;
|
|
33
|
-
if (!this.isScaling)
|
|
34
|
-
return;
|
|
35
|
-
const pointerRay = this.stylus.pickRay;
|
|
36
|
-
const rayStart = this.stylus.transform.localPosition;
|
|
37
|
-
(_a = this.scaleSceneRootWithRay) === null || _a === void 0 ? void 0 : _a.doScale(pointerRay, rayStart);
|
|
38
|
-
};
|
|
39
|
-
this.onButtonUp = () => {
|
|
40
|
-
this.isScaling = false;
|
|
41
|
-
};
|
|
42
|
-
const zSpaceEntity = zSpace_1.ZSpaceEntity.get(this.appObject.appObjectRepo);
|
|
43
|
-
if (!zSpaceEntity) {
|
|
44
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
this.stylus = zSpaceEntity.stylus;
|
|
48
|
-
this.scaleSceneRootWithRay = appObject.getComponent(ScaleSceneRootWithRay_1.ScaleSceneRootWithRay.type);
|
|
49
|
-
if (!this.scaleSceneRootWithRay) {
|
|
50
|
-
this.warn("StylusMoveSceneRoot has been added to an App Object that does not have a scaleSceneRootWithRay");
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
this.stylus.registerController(this);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.StylusScale = StylusScale;
|
|
58
|
-
StylusScale.type = "ZSpaceScaleRoot";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusHoverOnAppObject extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "StylusHoverOnAppObject";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private hoverUC?;
|
|
8
|
-
allow: () => boolean;
|
|
9
|
-
onStylusMove: () => void;
|
|
10
|
-
constructor(appObject: AppObject);
|
|
11
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusHoverOnAppObject = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const ZSpaceEntity_1 = require("../../zSpace/Entities/ZSpaceEntity");
|
|
6
|
-
const HoverAppObjectUC_1 = require("../UC/HoverAppObjectUC");
|
|
7
|
-
class StylusHoverOnAppObject extends AppObjectController_1.AppObjectController {
|
|
8
|
-
constructor(appObject) {
|
|
9
|
-
super(appObject, StylusHoverOnAppObject.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
|
-
const zSpaceEntity = ZSpaceEntity_1.ZSpaceEntity.get(this.appObjects);
|
|
24
|
-
if (!zSpaceEntity) {
|
|
25
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
this.stylus = zSpaceEntity.stylus;
|
|
29
|
-
this.hoverUC = appObject.getComponent(HoverAppObjectUC_1.HoverAppObjectUC.type);
|
|
30
|
-
if (!this.stylus) {
|
|
31
|
-
console.warn("StylusInputPointer Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
32
|
-
}
|
|
33
|
-
else if (!this.hoverUC) {
|
|
34
|
-
console.warn("HoverAppObjectUC has not been found on any objects in the app object repo");
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
this.stylus.registerController(this);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.StylusHoverOnAppObject = StylusHoverOnAppObject;
|
|
42
|
-
StylusHoverOnAppObject.type = "StylusHoverOnAppObject";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusPressOnAppObject extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "StylusPressOnAppObject";
|
|
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: ZSpaceStylusButton) => boolean;
|
|
14
|
-
onButtonDown: (button: ZSpaceStylusButton) => void;
|
|
15
|
-
onButtonUp: (button: ZSpaceStylusButton) => void;
|
|
16
|
-
onStylusMove: () => void;
|
|
17
|
-
constructor(appObject: AppObject);
|
|
18
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusPressOnAppObject = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const Vector3_1 = require("../../../ValueObjects/Vector3");
|
|
6
|
-
const ZSpaceEntity_1 = require("../../zSpace/Entities/ZSpaceEntity");
|
|
7
|
-
const PressAppObjectUC_1 = require("../UC/PressAppObjectUC");
|
|
8
|
-
class StylusPressOnAppObject extends AppObjectController_1.AppObjectController {
|
|
9
|
-
constructor(appObject) {
|
|
10
|
-
super(appObject, StylusPressOnAppObject.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 (button !== 0)
|
|
21
|
-
return;
|
|
22
|
-
if (!this.stylus)
|
|
23
|
-
return;
|
|
24
|
-
if (!this.pressUC)
|
|
25
|
-
return;
|
|
26
|
-
if (!this.allow(button))
|
|
27
|
-
return;
|
|
28
|
-
this.startPosition = this.stylus.transform.localPosition;
|
|
29
|
-
this.endPosition = this.startPosition;
|
|
30
|
-
this.isPressed = true;
|
|
31
|
-
this.pressedID = (_a = this.pressUC) === null || _a === void 0 ? void 0 : _a.tryPressSceneObject(this.stylus.pickRay);
|
|
32
|
-
};
|
|
33
|
-
this.onButtonUp = (button) => {
|
|
34
|
-
this.isPressed = false;
|
|
35
|
-
if (button !== 0)
|
|
36
|
-
return;
|
|
37
|
-
if (!this.pressUC)
|
|
38
|
-
return;
|
|
39
|
-
// Set pressedID to null
|
|
40
|
-
this.pressUC.pressSceneObject(this.pressedID, this.isPressed);
|
|
41
|
-
};
|
|
42
|
-
this.onStylusMove = () => {
|
|
43
|
-
var _a;
|
|
44
|
-
if (!this.pressUC) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (this.isPressed) {
|
|
48
|
-
this.endPosition = (_a = this.stylus) === null || _a === void 0 ? void 0 : _a.transform.localPosition;
|
|
49
|
-
const movement = Vector3_1.Vector3.Subtract(this.startPosition, this.endPosition)
|
|
50
|
-
.magnitude;
|
|
51
|
-
if (movement > StylusPressOnAppObject.maxTapDistancePx) {
|
|
52
|
-
// Set pressedID to null
|
|
53
|
-
this.pressUC.pressSceneObject(null, this.isPressed);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const zSpaceEntity = ZSpaceEntity_1.ZSpaceEntity.get(this.appObjects);
|
|
58
|
-
if (!zSpaceEntity) {
|
|
59
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
this.stylus = zSpaceEntity.stylus;
|
|
63
|
-
this.pressUC = appObject.getComponent(PressAppObjectUC_1.PressAppObjectUC.type);
|
|
64
|
-
if (!this.stylus) {
|
|
65
|
-
console.warn("StylusInputPointer Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
66
|
-
}
|
|
67
|
-
else if (!this.pressUC) {
|
|
68
|
-
console.warn("PressAppObjectUC has not been found on any objects in the app object repo");
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.stylus.registerController(this);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.StylusPressOnAppObject = StylusPressOnAppObject;
|
|
76
|
-
StylusPressOnAppObject.type = "StylusPressOnAppObject";
|
|
77
|
-
StylusPressOnAppObject.maxTapDistancePx = 5;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusSelectAppObject extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "StylusSelectAppObject";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private selectUC?;
|
|
8
|
-
allow: () => boolean;
|
|
9
|
-
onButtonClick: (button: ZSpaceStylusButton) => void;
|
|
10
|
-
constructor(appObject: AppObject);
|
|
11
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusSelectAppObject = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const ZSpaceEntity_1 = require("../../zSpace/Entities/ZSpaceEntity");
|
|
6
|
-
const UC_1 = require("../UC");
|
|
7
|
-
class StylusSelectAppObject extends AppObjectController_1.AppObjectController {
|
|
8
|
-
constructor(appObject) {
|
|
9
|
-
super(appObject, StylusSelectAppObject.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
|
-
const zSpaceEntity = ZSpaceEntity_1.ZSpaceEntity.get(this.appObjects);
|
|
26
|
-
if (!zSpaceEntity) {
|
|
27
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this.stylus = zSpaceEntity.stylus;
|
|
31
|
-
this.selectUC = appObject.getComponent(UC_1.SelectAppObjectUC.type);
|
|
32
|
-
if (!this.stylus) {
|
|
33
|
-
console.warn("StylusInputPointer Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
34
|
-
}
|
|
35
|
-
else if (!this.selectUC) {
|
|
36
|
-
console.warn("SelectAppObjectUC has not been found on any objects in the app object repo");
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
this.stylus.registerController(this);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.StylusSelectAppObject = StylusSelectAppObject;
|
|
44
|
-
StylusSelectAppObject.type = "StylusSelectAppObject";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockTouchInput"), exports);
|
|
14
|
-
__exportStar(require("./mockTouchInputEvent"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./MockUndoRedo";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockUndoRedo"), exports);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockRenderToXR"), exports);
|
|
14
|
-
__exportStar(require("./MockXRSession"), exports);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectController } from "../../../AppObject";
|
|
2
|
-
import { MouseController, MouseInputEvent, MouseWheelEvent } from "../../MouseInput";
|
|
3
|
-
export default abstract class EmulateZSpaceStylus extends AppObjectController implements MouseController {
|
|
4
|
-
static readonly type = "EmulateZSpaceStylus";
|
|
5
|
-
abstract onDown: (e: MouseInputEvent) => void;
|
|
6
|
-
abstract onMove: (e: MouseInputEvent) => void;
|
|
7
|
-
abstract onUp: (e: MouseInputEvent) => void;
|
|
8
|
-
abstract onWheel: (e: MouseWheelEvent) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function makeEmulateZSpaceStylus(appObject: AppObject): EmulateZSpaceStylus;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeEmulateZSpaceStylus = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const ValueObjects_1 = require("../../../ValueObjects");
|
|
6
|
-
const Babylon_1 = require("../../Babylon");
|
|
7
|
-
const MouseInput_1 = require("../../MouseInput");
|
|
8
|
-
const Entities_1 = require("../Entities/");
|
|
9
|
-
const PM_1 = require("../PM");
|
|
10
|
-
class EmulateZSpaceStylus extends AppObject_1.AppObjectController {
|
|
11
|
-
}
|
|
12
|
-
exports.default = EmulateZSpaceStylus;
|
|
13
|
-
EmulateZSpaceStylus.type = "EmulateZSpaceStylus";
|
|
14
|
-
function makeEmulateZSpaceStylus(appObject) {
|
|
15
|
-
return new EmulateZSpaceStylusImp(appObject);
|
|
16
|
-
}
|
|
17
|
-
exports.makeEmulateZSpaceStylus = makeEmulateZSpaceStylus;
|
|
18
|
-
class EmulateZSpaceStylusImp extends EmulateZSpaceStylus {
|
|
19
|
-
constructor(appObject) {
|
|
20
|
-
super(appObject, EmulateZSpaceStylus.type);
|
|
21
|
-
this.emulationIsActive = false;
|
|
22
|
-
this.screenPlane = ValueObjects_1.ParametricPlane.FromPointNormal(ValueObjects_1.Vector3.Zero(), ValueObjects_1.Vector3.Backward());
|
|
23
|
-
this.onDown = (e) => {
|
|
24
|
-
if (!this.emulationIsActive)
|
|
25
|
-
return;
|
|
26
|
-
if (!this.stylus)
|
|
27
|
-
return;
|
|
28
|
-
this.stylus.updateButtonState(e.button, true);
|
|
29
|
-
};
|
|
30
|
-
this.onMove = (e) => {
|
|
31
|
-
if (!this.emulationIsActive)
|
|
32
|
-
return;
|
|
33
|
-
if (!this.stylusTransform)
|
|
34
|
-
return;
|
|
35
|
-
const ray = this.pixelToSceneRay(e.position);
|
|
36
|
-
const hit = this.screenPlane.intersectLine(ray);
|
|
37
|
-
if (!hit) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const direction = ValueObjects_1.Vector3.Subtract(hit, this.stylusTransform.localPosition);
|
|
41
|
-
this.stylusTransform.localRotation = ValueObjects_1.Quaternion.FromDirectionVector(direction);
|
|
42
|
-
};
|
|
43
|
-
this.onUp = (e) => {
|
|
44
|
-
if (!this.emulationIsActive)
|
|
45
|
-
return;
|
|
46
|
-
if (!this.stylus)
|
|
47
|
-
return;
|
|
48
|
-
this.stylus.updateButtonState(e.button, false);
|
|
49
|
-
};
|
|
50
|
-
this.onWheel = (e) => {
|
|
51
|
-
if (!this.emulationIsActive)
|
|
52
|
-
return;
|
|
53
|
-
if (!this.stylus)
|
|
54
|
-
return;
|
|
55
|
-
if (!this.stylusTransform)
|
|
56
|
-
return;
|
|
57
|
-
const bumpAmount = 0.01;
|
|
58
|
-
const bump = e.event.deltaY > 0 ? -bumpAmount : bumpAmount;
|
|
59
|
-
const newPos = this.stylusTransform.localPointToWorld(new ValueObjects_1.Vector3(0, 0, bump));
|
|
60
|
-
this.stylusTransform.worldPosition = newPos;
|
|
61
|
-
console.log(newPos);
|
|
62
|
-
};
|
|
63
|
-
this.onZpsaceEnabledChange = (enabled) => {
|
|
64
|
-
this.emulationIsActive = false;
|
|
65
|
-
if (!enabled)
|
|
66
|
-
return;
|
|
67
|
-
if (!this.zSpaceEntity)
|
|
68
|
-
return;
|
|
69
|
-
if (!this.zSpaceEntity.emulate)
|
|
70
|
-
return;
|
|
71
|
-
this.emulationIsActive = true;
|
|
72
|
-
if (this.stylusTransform) {
|
|
73
|
-
this.stylusTransform.localPosition = new ValueObjects_1.Vector3(0.05, -0.05, -0.5);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
this.zSpaceEntity = Entities_1.ZSpaceEntity.get(this.appObjects);
|
|
77
|
-
if (!this.zSpaceEntity) {
|
|
78
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const pm = this.zSpaceEntity.appObject.getComponent(PM_1.ZSpaceIsEnabledPM.type);
|
|
82
|
-
if (!pm) {
|
|
83
|
-
this.warn("Unable to find ZSpaceIsEnabledPM");
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
this.stylus = appObject.getComponent(Entities_1.ZSpaceStylusEntity.type);
|
|
87
|
-
if (!this.stylus) {
|
|
88
|
-
this.warn("Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
this.stylusTransform = this.stylus.transform;
|
|
92
|
-
const mouseInput = MouseInput_1.MouseInputEntity.get(appObject.appObjectRepo);
|
|
93
|
-
if (mouseInput) {
|
|
94
|
-
mouseInput.registerController(this);
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
this.warn("Unable to find MouseInputEntity");
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
mouseInput.registerController(this);
|
|
101
|
-
pm.addView(this.onZpsaceEnabledChange);
|
|
102
|
-
}
|
|
103
|
-
pixelToSceneRay(pixelPos) {
|
|
104
|
-
if (!this.pixelToSceneRayUC) {
|
|
105
|
-
this.pixelToSceneRayUC = Babylon_1.PixelToSceneRayUC.get(this.appObjects);
|
|
106
|
-
if (!this.pixelToSceneRayUC) {
|
|
107
|
-
this.warn("Unable to find PixelToSceneRayUC");
|
|
108
|
-
return ValueObjects_1.ParametricLine.Forward();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return this.pixelToSceneRayUC.pixelToSceneRay(pixelPos);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class ZSpaceScaleRoot extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "ZSpaceScaleRoot";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private scaleSceneRootWithRay?;
|
|
8
|
-
private isScaling;
|
|
9
|
-
allow: (button: ZSpaceStylusButton) => boolean;
|
|
10
|
-
onButtonDown: (button: ZSpaceStylusButton) => void;
|
|
11
|
-
onStylusMove: () => void;
|
|
12
|
-
onButtonUp: () => void;
|
|
13
|
-
constructor(appObject: AppObject);
|
|
14
|
-
}
|