@vived/app 4.28.2 → 4.30.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/ChannelModel/Adapters/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Adapters/index.js +1 -0
- package/lib/Components/ChannelModel/Adapters/modelObjectsAreStickableAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/modelObjectsAreStickableAdapter.js +27 -0
- package/lib/Components/ChannelModel/Controllers/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Controllers/index.js +1 -0
- package/lib/Components/ChannelModel/Controllers/stickAllActiveObjects.d.ts +2 -0
- package/lib/Components/ChannelModel/Controllers/stickAllActiveObjects.js +23 -0
- package/lib/Components/ChannelModel/Mocks/ModelObjectsAreStickableMock.d.ts +7 -0
- package/lib/Components/ChannelModel/Mocks/ModelObjectsAreStickableMock.js +11 -0
- package/lib/Components/ChannelModel/Mocks/StickAllChannelModelObjectsUCMock.d.ts +9 -0
- package/lib/Components/ChannelModel/Mocks/StickAllChannelModelObjectsUCMock.js +13 -0
- package/lib/Components/ChannelModel/Mocks/index.d.ts +2 -0
- package/lib/Components/ChannelModel/Mocks/index.js +2 -0
- package/lib/Components/ChannelModel/PMs/ModelObjectsAreStickablePM.d.ts +6 -0
- package/lib/Components/ChannelModel/PMs/ModelObjectsAreStickablePM.js +56 -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/StickAllChannelModelObjectsUC.d.ts +7 -0
- package/lib/Components/ChannelModel/UC/StickAllChannelModelObjectsUC.js +87 -0
- package/lib/Components/ChannelModel/UC/index.d.ts +1 -0
- package/lib/Components/ChannelModel/UC/index.js +1 -0
- package/lib/Components/Environment/Adapters/environmentalIntensityAdapter.d.ts +2 -0
- package/lib/Components/Environment/Adapters/environmentalIntensityAdapter.js +19 -0
- package/lib/Components/Environment/Adapters/index.d.ts +2 -0
- package/lib/Components/Environment/Adapters/index.js +14 -0
- package/lib/Components/Environment/Adapters/texturalEnvironmentAdapter.d.ts +3 -0
- package/lib/Components/Environment/Adapters/texturalEnvironmentAdapter.js +20 -0
- package/lib/Components/Environment/Controllers/index.d.ts +3 -0
- package/lib/Components/Environment/Controllers/index.js +15 -0
- package/lib/Components/Environment/Controllers/setTexturalEnvironment.d.ts +3 -0
- package/lib/Components/Environment/Controllers/setTexturalEnvironment.js +13 -0
- package/lib/Components/Environment/Controllers/submitEnvironmentIntensity.d.ts +2 -0
- package/lib/Components/Environment/Controllers/submitEnvironmentIntensity.js +13 -0
- package/lib/Components/Environment/Controllers/updateEnvironmentIntensity.d.ts +2 -0
- package/lib/Components/Environment/Controllers/updateEnvironmentIntensity.js +13 -0
- package/lib/Components/Environment/Entities/Environment.d.ts +20 -0
- package/lib/Components/Environment/Entities/Environment.js +53 -0
- package/lib/Components/Environment/Entities/index.d.ts +1 -0
- package/lib/Components/Environment/Entities/index.js +13 -0
- package/lib/Components/Environment/Factories/index.d.ts +1 -0
- package/lib/Components/Environment/Factories/index.js +13 -0
- package/lib/Components/Environment/Factories/setupEnvironmnets.d.ts +2 -0
- package/lib/Components/Environment/Factories/setupEnvironmnets.js +19 -0
- package/lib/Components/Environment/Mocks/EnvironmentalIntensityPmMock.d.ts +8 -0
- package/lib/Components/Environment/Mocks/EnvironmentalIntensityPmMock.js +15 -0
- package/lib/Components/Environment/Mocks/SetEnvironmentIntensityUcMock.d.ts +9 -0
- package/lib/Components/Environment/Mocks/SetEnvironmentIntensityUcMock.js +16 -0
- package/lib/Components/Environment/Mocks/SetTexturalEnvironmentUcMock.d.ts +8 -0
- package/lib/Components/Environment/Mocks/SetTexturalEnvironmentUcMock.js +15 -0
- package/lib/Components/Environment/Mocks/TexturalEnvironmentPmMock.d.ts +8 -0
- package/lib/Components/Environment/Mocks/TexturalEnvironmentPmMock.js +15 -0
- package/lib/Components/Environment/Mocks/index.d.ts +4 -0
- package/lib/Components/Environment/Mocks/index.js +16 -0
- package/lib/Components/Environment/PMs/EnvironmentalIntensityPM.d.ts +6 -0
- package/lib/Components/Environment/PMs/EnvironmentalIntensityPM.js +34 -0
- package/lib/Components/Environment/PMs/TexturalEnvironmentPM.d.ts +7 -0
- package/lib/Components/Environment/PMs/TexturalEnvironmentPM.js +34 -0
- package/lib/Components/Environment/PMs/index.d.ts +2 -0
- package/lib/Components/Environment/PMs/index.js +14 -0
- package/lib/Components/Environment/UCs/SerializeEnvironment.d.ts +23 -0
- package/lib/Components/Environment/UCs/SerializeEnvironment.js +73 -0
- package/lib/Components/Environment/UCs/SetEnvironmentIntensityUC.d.ts +8 -0
- package/lib/Components/Environment/UCs/SetEnvironmentIntensityUC.js +69 -0
- package/lib/Components/Environment/UCs/SetTexturalEnvironmentUC.d.ts +8 -0
- package/lib/Components/Environment/UCs/SetTexturalEnvironmentUC.js +58 -0
- package/lib/Components/Environment/UCs/index.d.ts +3 -0
- package/lib/Components/Environment/UCs/index.js +15 -0
- package/lib/Components/Environment/index.d.ts +7 -0
- package/lib/Components/Environment/index.js +19 -0
- package/lib/Components/Stick/Adapters/index.d.ts +1 -0
- package/lib/Components/Stick/Adapters/index.js +13 -0
- package/lib/Components/Stick/Adapters/stickTargetAdapter.d.ts +3 -0
- package/lib/Components/Stick/Adapters/stickTargetAdapter.js +23 -0
- package/lib/Components/Stick/Controllers/DoubleClickToStickMC.d.ts +15 -0
- package/lib/Components/Stick/Controllers/DoubleClickToStickMC.js +57 -0
- package/lib/Components/Stick/Controllers/DoubleTapToStickTC.d.ts +15 -0
- package/lib/Components/Stick/Controllers/DoubleTapToStickTC.js +52 -0
- package/lib/Components/Stick/Controllers/clickStick.d.ts +2 -0
- package/lib/Components/Stick/Controllers/clickStick.js +13 -0
- package/lib/Components/Stick/Controllers/index.d.ts +3 -0
- package/lib/Components/Stick/Controllers/index.js +15 -0
- package/lib/Components/Stick/Entities/Stickable.d.ts +22 -0
- package/lib/Components/Stick/Entities/Stickable.js +101 -0
- package/lib/Components/Stick/Entities/index.d.ts +1 -0
- package/lib/Components/Stick/Entities/index.js +13 -0
- package/lib/Components/Stick/Factories/index.d.ts +1 -0
- package/lib/Components/Stick/Factories/index.js +13 -0
- package/lib/Components/Stick/Factories/setupStick.d.ts +2 -0
- package/lib/Components/Stick/Factories/setupStick.js +15 -0
- package/lib/Components/Stick/Mocks/StickTargetPmMock.d.ts +7 -0
- package/lib/Components/Stick/Mocks/StickTargetPmMock.js +11 -0
- package/lib/Components/Stick/Mocks/StickUCMock.d.ts +7 -0
- package/lib/Components/Stick/Mocks/StickUCMock.js +11 -0
- package/lib/Components/Stick/Mocks/TryStickAppObjectUCMock.d.ts +10 -0
- package/lib/Components/Stick/Mocks/TryStickAppObjectUCMock.js +17 -0
- package/lib/Components/Stick/Mocks/index.d.ts +3 -0
- package/lib/Components/Stick/Mocks/index.js +15 -0
- package/lib/Components/Stick/PMs/StickTargetPM.d.ts +11 -0
- package/lib/Components/Stick/PMs/StickTargetPM.js +50 -0
- package/lib/Components/Stick/PMs/index.d.ts +1 -0
- package/lib/Components/Stick/PMs/index.js +13 -0
- package/lib/Components/Stick/UCs/PanTransformWithStickUC.d.ts +3 -0
- package/lib/Components/Stick/UCs/PanTransformWithStickUC.js +131 -0
- package/lib/Components/Stick/UCs/StickUC.d.ts +7 -0
- package/lib/Components/Stick/UCs/StickUC.js +71 -0
- package/lib/Components/Stick/UCs/TryPickStickTarget.d.ts +8 -0
- package/lib/Components/Stick/UCs/TryPickStickTarget.js +26 -0
- package/lib/Components/Stick/UCs/TryStickAppObjectUC.d.ts +10 -0
- package/lib/Components/Stick/UCs/TryStickAppObjectUC.js +74 -0
- package/lib/Components/Stick/UCs/index.d.ts +4 -0
- package/lib/Components/Stick/UCs/index.js +16 -0
- package/lib/Components/Stick/index.d.ts +7 -0
- package/lib/Components/Stick/index.js +19 -0
- package/lib/Components/Stylus/Factories/index.d.ts +1 -0
- package/lib/Components/Stylus/Factories/index.js +13 -0
- package/lib/Components/Stylus/Factories/setupStylus.d.ts +2 -0
- package/lib/Components/Stylus/Factories/setupStylus.js +19 -0
- package/lib/Components/Stylus/index.d.ts +1 -0
- package/lib/Components/Stylus/index.js +1 -0
- package/lib/Components/Transform3D/UC/PanTransformUC.d.ts +28 -1
- package/lib/Components/Transform3D/UC/PanTransformUC.js +52 -34
- package/lib/Components/Transform3D/UC/TryPanTransformUC.d.ts +3 -2
- package/lib/Components/Transform3D/UC/index.d.ts +0 -1
- package/lib/Components/Transform3D/UC/index.js +0 -1
- package/lib/Components/index.d.ts +3 -1
- package/lib/Components/index.js +3 -1
- package/package.json +1 -1
|
@@ -5,4 +5,5 @@ export * from "./channelModelObjectAdapter";
|
|
|
5
5
|
export * from "./modelHasCalloutsAdapter";
|
|
6
6
|
export * from "./modelHasLandmarksAdapter";
|
|
7
7
|
export * from "./modelObjectsAreHiddenAdapter";
|
|
8
|
+
export * from "./modelObjectsAreStickableAdapter";
|
|
8
9
|
export * from "./modelObjectsHaveOverlayAdapter";
|
|
@@ -17,4 +17,5 @@ __exportStar(require("./channelModelObjectAdapter"), exports);
|
|
|
17
17
|
__exportStar(require("./modelHasCalloutsAdapter"), exports);
|
|
18
18
|
__exportStar(require("./modelHasLandmarksAdapter"), exports);
|
|
19
19
|
__exportStar(require("./modelObjectsAreHiddenAdapter"), exports);
|
|
20
|
+
__exportStar(require("./modelObjectsAreStickableAdapter"), exports);
|
|
20
21
|
__exportStar(require("./modelObjectsHaveOverlayAdapter"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.modelObjectsAreStickableAdapter = void 0;
|
|
4
|
+
const ModelObjectsAreStickablePM_1 = require("../PMs/ModelObjectsAreStickablePM");
|
|
5
|
+
exports.modelObjectsAreStickableAdapter = {
|
|
6
|
+
defaultVM: false,
|
|
7
|
+
subscribe: (id, appObjects, setVM) => {
|
|
8
|
+
if (!id)
|
|
9
|
+
return;
|
|
10
|
+
const pm = ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM.get(id, appObjects);
|
|
11
|
+
if (!pm) {
|
|
12
|
+
appObjects.submitError("modelObjectsAreStickableAdapter", "Unable to find ModelObjectsAreStickablePM");
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
pm.addView(setVM);
|
|
16
|
+
},
|
|
17
|
+
unsubscribe: (id, appObjects, setVM) => {
|
|
18
|
+
if (!id)
|
|
19
|
+
return;
|
|
20
|
+
const pm = ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM.get(id, appObjects);
|
|
21
|
+
if (!pm) {
|
|
22
|
+
appObjects.submitError("modelObjectsAreStickableAdapter", "Unable to find ModelObjectsAreStickablePM");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
pm.removeView(setVM);
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -12,4 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./clearActiveObjectsOverlays"), exports);
|
|
14
14
|
__exportStar(require("./clickSelectChannelModel"), exports);
|
|
15
|
+
__exportStar(require("./stickAllActiveObjects"), exports);
|
|
15
16
|
__exportStar(require("./unhideAllActiveObjects"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stickAllActiveObjects = void 0;
|
|
4
|
+
const Entities_1 = require("../Entities");
|
|
5
|
+
const UC_1 = require("../UC");
|
|
6
|
+
function stickAllActiveObjects(appObjects) {
|
|
7
|
+
const repo = Entities_1.ChannelModelRepo.get(appObjects);
|
|
8
|
+
if (!repo) {
|
|
9
|
+
appObjects.submitError("stickAllActiveObjects", "Unable to find ChannelModelRepo");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (!repo.activeModel) {
|
|
13
|
+
appObjects.submitWarning("stickAllActiveObjects", "No Model is Active");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const uc = UC_1.StickAllChannelModelObjectsUC.get(repo.activeModel, appObjects);
|
|
17
|
+
if (!uc) {
|
|
18
|
+
appObjects.submitError("stickAllActiveObjects", "Unable to find StickAllChannelModelObjectsUC");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
uc.stickAll();
|
|
22
|
+
}
|
|
23
|
+
exports.stickAllActiveObjects = stickAllActiveObjects;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { ModelObjectsAreStickablePM } from "../PMs/ModelObjectsAreStickablePM";
|
|
4
|
+
export declare class ModelObjectsAreStickablePMMock extends ModelObjectsAreStickablePM {
|
|
5
|
+
vmsAreEqual: jest.Mock<any, any>;
|
|
6
|
+
constructor(appObject: AppObject);
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelObjectsAreStickablePMMock = void 0;
|
|
4
|
+
const ModelObjectsAreStickablePM_1 = require("../PMs/ModelObjectsAreStickablePM");
|
|
5
|
+
class ModelObjectsAreStickablePMMock extends ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM.type);
|
|
8
|
+
this.vmsAreEqual = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ModelObjectsAreStickablePMMock = ModelObjectsAreStickablePMMock;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { StickAllChannelModelObjectsUC } from "../UC";
|
|
4
|
+
export declare class StickAllChannelModelObjectsUCMock extends StickAllChannelModelObjectsUC {
|
|
5
|
+
easeFn: jest.Mock<any, any>;
|
|
6
|
+
stickDurationMS: number;
|
|
7
|
+
stickAll: 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.StickAllChannelModelObjectsUCMock = void 0;
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class StickAllChannelModelObjectsUCMock extends UC_1.StickAllChannelModelObjectsUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UC_1.StickAllChannelModelObjectsUC.type);
|
|
8
|
+
this.easeFn = jest.fn();
|
|
9
|
+
this.stickDurationMS = 0;
|
|
10
|
+
this.stickAll = jest.fn();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.StickAllChannelModelObjectsUCMock = StickAllChannelModelObjectsUCMock;
|
|
@@ -8,7 +8,9 @@ export * from "./LoadChannelModelMock";
|
|
|
8
8
|
export * from "./ModelHasCalloutsPmMock";
|
|
9
9
|
export * from "./ModelHasLandmarksPmMock";
|
|
10
10
|
export * from "./ModelObjectsAreHiddenPMMock";
|
|
11
|
+
export * from "./ModelObjectsAreStickableMock";
|
|
11
12
|
export * from "./ModelObjectsHaveOverlayPMMock";
|
|
12
13
|
export * from "./SelectChannelModelUCMock";
|
|
14
|
+
export * from "./StickAllChannelModelObjectsUCMock";
|
|
13
15
|
export * from "./UnhideAllChannelModelObjectsUCMock";
|
|
14
16
|
export * from "./ValidateChannelModelMock";
|
|
@@ -20,7 +20,9 @@ __exportStar(require("./LoadChannelModelMock"), exports);
|
|
|
20
20
|
__exportStar(require("./ModelHasCalloutsPmMock"), exports);
|
|
21
21
|
__exportStar(require("./ModelHasLandmarksPmMock"), exports);
|
|
22
22
|
__exportStar(require("./ModelObjectsAreHiddenPMMock"), exports);
|
|
23
|
+
__exportStar(require("./ModelObjectsAreStickableMock"), exports);
|
|
23
24
|
__exportStar(require("./ModelObjectsHaveOverlayPMMock"), exports);
|
|
24
25
|
__exportStar(require("./SelectChannelModelUCMock"), exports);
|
|
26
|
+
__exportStar(require("./StickAllChannelModelObjectsUCMock"), exports);
|
|
25
27
|
__exportStar(require("./UnhideAllChannelModelObjectsUCMock"), exports);
|
|
26
28
|
__exportStar(require("./ValidateChannelModelMock"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
|
|
2
|
+
export declare abstract class ModelObjectsAreStickablePM extends AppObjectPM<boolean> {
|
|
3
|
+
static readonly type = "ModelObjectsAreStickablePM";
|
|
4
|
+
static get(appObjID: string, appObjects: AppObjectRepo): ModelObjectsAreStickablePM | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare function makeModelObjectsAreStickablePM(appObject: AppObject): ModelObjectsAreStickablePM;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeModelObjectsAreStickablePM = exports.ModelObjectsAreStickablePM = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../AppObject");
|
|
5
|
+
const Stickable_1 = require("../../Stick/Entities/Stickable");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
class ModelObjectsAreStickablePM extends AppObject_1.AppObjectPM {
|
|
8
|
+
static get(appObjID, appObjects) {
|
|
9
|
+
var _a;
|
|
10
|
+
return (_a = appObjects
|
|
11
|
+
.get(appObjID)) === null || _a === void 0 ? void 0 : _a.getComponent(ModelObjectsAreStickablePM.type);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ModelObjectsAreStickablePM = ModelObjectsAreStickablePM;
|
|
15
|
+
ModelObjectsAreStickablePM.type = "ModelObjectsAreStickablePM";
|
|
16
|
+
function makeModelObjectsAreStickablePM(appObject) {
|
|
17
|
+
return new ModelObjectsAreStickablePMImp(appObject);
|
|
18
|
+
}
|
|
19
|
+
exports.makeModelObjectsAreStickablePM = makeModelObjectsAreStickablePM;
|
|
20
|
+
class ModelObjectsAreStickablePMImp extends ModelObjectsAreStickablePM {
|
|
21
|
+
constructor(appObject) {
|
|
22
|
+
super(appObject, ModelObjectsAreStickablePM.type);
|
|
23
|
+
this.onRepoChange = () => {
|
|
24
|
+
if (!this.channelModel)
|
|
25
|
+
return;
|
|
26
|
+
let stickable = false;
|
|
27
|
+
this.channelModel.modelObjects().forEach((obj) => {
|
|
28
|
+
var _a;
|
|
29
|
+
if (stickable)
|
|
30
|
+
return;
|
|
31
|
+
if ((_a = obj.appObject.getComponent(Stickable_1.StickableEntity.type)) === null || _a === void 0 ? void 0 : _a.canBeStuck) {
|
|
32
|
+
stickable = true;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
this.doUpdateView(stickable);
|
|
36
|
+
};
|
|
37
|
+
this.dispose = () => {
|
|
38
|
+
var _a;
|
|
39
|
+
super.dispose();
|
|
40
|
+
(_a = this.channelModel) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onRepoChange);
|
|
41
|
+
};
|
|
42
|
+
if (this.channelModel) {
|
|
43
|
+
this.channelModel.addChangeObserver(this.onRepoChange);
|
|
44
|
+
this.onRepoChange();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.error("App Object does not have a ChannelModelEntity");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
get channelModel() {
|
|
51
|
+
return this.getCachedLocalComponent(Entities_1.ChannelModelEntity.type);
|
|
52
|
+
}
|
|
53
|
+
vmsAreEqual(a, b) {
|
|
54
|
+
return a === b;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -17,4 +17,5 @@ __exportStar(require("./ChannelModelPM"), exports);
|
|
|
17
17
|
__exportStar(require("./ModelHasCalloutsPM"), exports);
|
|
18
18
|
__exportStar(require("./ModelHasLandmarksPM"), exports);
|
|
19
19
|
__exportStar(require("./ModelObjectsAreHiddenPM"), exports);
|
|
20
|
+
__exportStar(require("./ModelObjectsAreStickablePM"), exports);
|
|
20
21
|
__exportStar(require("./ModelObjectsHaveOverlayPM"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
|
|
2
|
+
export declare abstract class StickAllChannelModelObjectsUC extends AppObjectUC {
|
|
3
|
+
static readonly type = "StickAllChannelModelObjectsUC";
|
|
4
|
+
abstract stickAll(): void;
|
|
5
|
+
static get(id: string, appObjects: AppObjectRepo): StickAllChannelModelObjectsUC | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare function makeStickAllChannelModelObjectsUC(appObject: AppObject): StickAllChannelModelObjectsUC;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeStickAllChannelModelObjectsUC = exports.StickAllChannelModelObjectsUC = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../AppObject");
|
|
5
|
+
const ValueObjects_1 = require("../../../ValueObjects");
|
|
6
|
+
const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
|
|
7
|
+
const Stickable_1 = require("../../Stick/Entities/Stickable");
|
|
8
|
+
const Transform3D_1 = require("../../Transform3D/Entities/Transform3D");
|
|
9
|
+
const UndoRedoEntity_1 = require("../../UndoRedo/Entities/UndoRedoEntity");
|
|
10
|
+
const Entities_1 = require("../Entities");
|
|
11
|
+
class StickAllChannelModelObjectsUC extends AppObject_1.AppObjectUC {
|
|
12
|
+
static get(id, appObjects) {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = appObjects
|
|
15
|
+
.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(StickAllChannelModelObjectsUC.type);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.StickAllChannelModelObjectsUC = StickAllChannelModelObjectsUC;
|
|
19
|
+
StickAllChannelModelObjectsUC.type = "StickAllChannelModelObjectsUC";
|
|
20
|
+
function makeStickAllChannelModelObjectsUC(appObject) {
|
|
21
|
+
return new StickAllChannelModelObjectsUCImp(appObject);
|
|
22
|
+
}
|
|
23
|
+
exports.makeStickAllChannelModelObjectsUC = makeStickAllChannelModelObjectsUC;
|
|
24
|
+
class StickAllChannelModelObjectsUCImp extends StickAllChannelModelObjectsUC {
|
|
25
|
+
constructor(appObject) {
|
|
26
|
+
super(appObject, StickAllChannelModelObjectsUC.type);
|
|
27
|
+
this.stickAll = () => {
|
|
28
|
+
var _a;
|
|
29
|
+
if (!this.model)
|
|
30
|
+
return;
|
|
31
|
+
const dispatch = this.dispatchStateChange;
|
|
32
|
+
if (!dispatch)
|
|
33
|
+
return;
|
|
34
|
+
const stuckObjects = [];
|
|
35
|
+
this.model.modelObjects().forEach((modelObj) => {
|
|
36
|
+
const appObj = modelObj.appObject;
|
|
37
|
+
const stick = Stickable_1.StickableEntity.get(modelObj.id, this.appObjects);
|
|
38
|
+
if (!stick || stick.canBeStuck !== true)
|
|
39
|
+
return;
|
|
40
|
+
const transform = Transform3D_1.Transform3D.get(appObj);
|
|
41
|
+
if (!transform)
|
|
42
|
+
return;
|
|
43
|
+
const undoDTO = {
|
|
44
|
+
transform,
|
|
45
|
+
undoPos: transform.localPosition,
|
|
46
|
+
undoRot: transform.localRotation,
|
|
47
|
+
undoScale: transform.localScale,
|
|
48
|
+
redoPos: stick.stickPosition,
|
|
49
|
+
redoRot: stick.stickRotation,
|
|
50
|
+
redoScale: new ValueObjects_1.Vector3(stick.stickScale, stick.stickScale, stick.stickScale)
|
|
51
|
+
};
|
|
52
|
+
stick.doStick(dispatch);
|
|
53
|
+
stuckObjects.push(undoDTO);
|
|
54
|
+
});
|
|
55
|
+
if (stuckObjects.length === 0)
|
|
56
|
+
return;
|
|
57
|
+
(_a = this.undo) === null || _a === void 0 ? void 0 : _a.submitAction({
|
|
58
|
+
undoAction: () => {
|
|
59
|
+
stuckObjects.forEach((po) => {
|
|
60
|
+
po.transform.localPosition = po.undoPos;
|
|
61
|
+
po.transform.localRotation = po.undoRot;
|
|
62
|
+
po.transform.localScale = po.undoScale;
|
|
63
|
+
});
|
|
64
|
+
dispatch();
|
|
65
|
+
},
|
|
66
|
+
redoAction: () => {
|
|
67
|
+
stuckObjects.forEach((po) => {
|
|
68
|
+
po.transform.localPosition = po.redoPos;
|
|
69
|
+
po.transform.localRotation = po.redoRot;
|
|
70
|
+
po.transform.localScale = po.redoScale;
|
|
71
|
+
});
|
|
72
|
+
dispatch();
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
get model() {
|
|
78
|
+
return this.getCachedLocalComponent(Entities_1.ChannelModelEntity.type);
|
|
79
|
+
}
|
|
80
|
+
get dispatchStateChange() {
|
|
81
|
+
var _a;
|
|
82
|
+
return (_a = this.getCachedSingleton(DispatchStateChangeUC_1.DispatchStateChangeUC.type)) === null || _a === void 0 ? void 0 : _a.doDispatch;
|
|
83
|
+
}
|
|
84
|
+
get undo() {
|
|
85
|
+
return this.getCachedSingleton(UndoRedoEntity_1.UndoRedoEntity.type);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -4,6 +4,7 @@ export * from "./ClearModelObjectOverlaysUC";
|
|
|
4
4
|
export * from "./LoadChannelModelUC";
|
|
5
5
|
export * from "./SelectChannelModelUC";
|
|
6
6
|
export * from "./SerializeActiveModel";
|
|
7
|
+
export * from "./StickAllChannelModelObjectsUC";
|
|
7
8
|
export * from "./UnhideAllAppObjectsUndoRedo";
|
|
8
9
|
export * from "./UnhideAllChannelModelObjectsUC";
|
|
9
10
|
export * from "./ValidateChannelModel";
|
|
@@ -16,6 +16,7 @@ __exportStar(require("./ClearModelObjectOverlaysUC"), exports);
|
|
|
16
16
|
__exportStar(require("./LoadChannelModelUC"), exports);
|
|
17
17
|
__exportStar(require("./SelectChannelModelUC"), exports);
|
|
18
18
|
__exportStar(require("./SerializeActiveModel"), exports);
|
|
19
|
+
__exportStar(require("./StickAllChannelModelObjectsUC"), exports);
|
|
19
20
|
__exportStar(require("./UnhideAllAppObjectsUndoRedo"), exports);
|
|
20
21
|
__exportStar(require("./UnhideAllChannelModelObjectsUC"), exports);
|
|
21
22
|
__exportStar(require("./ValidateChannelModel"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.environmentalIntensityAdapter = void 0;
|
|
4
|
+
const EnvironmentalIntensityPM_1 = require("../PMs/EnvironmentalIntensityPM");
|
|
5
|
+
exports.environmentalIntensityAdapter = {
|
|
6
|
+
defaultVM: 0.75,
|
|
7
|
+
subscribe: (appObjects, setVM) => {
|
|
8
|
+
const pm = EnvironmentalIntensityPM_1.EnvironmentalIntensityPM.get(appObjects);
|
|
9
|
+
if (!pm) {
|
|
10
|
+
appObjects.submitError("environmentalIntensityAdapter", "Unable to find TexturalEnvironmentPM");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
pm.addView(setVM);
|
|
14
|
+
},
|
|
15
|
+
unsubscribe: (appObjects, setVM) => {
|
|
16
|
+
var _a;
|
|
17
|
+
(_a = EnvironmentalIntensityPM_1.EnvironmentalIntensityPM.get(appObjects)) === null || _a === void 0 ? void 0 : _a.removeView(setVM);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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("./environmentalIntensityAdapter"), exports);
|
|
14
|
+
__exportStar(require("./texturalEnvironmentAdapter"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.texturalEnvironmentAdapter = void 0;
|
|
4
|
+
const Environment_1 = require("../Entities/Environment");
|
|
5
|
+
const TexturalEnvironmentPM_1 = require("../PMs/TexturalEnvironmentPM");
|
|
6
|
+
exports.texturalEnvironmentAdapter = {
|
|
7
|
+
defaultVM: Environment_1.Environments.STUDIO,
|
|
8
|
+
subscribe: (appObjects, setVM) => {
|
|
9
|
+
const pm = TexturalEnvironmentPM_1.TexturalEnvironmentPM.get(appObjects);
|
|
10
|
+
if (!pm) {
|
|
11
|
+
appObjects.submitError("texturalEnvironmentAdapter", "Unable to find TexturalEnvironmentPM");
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
pm.addView(setVM);
|
|
15
|
+
},
|
|
16
|
+
unsubscribe: (appObjects, setVM) => {
|
|
17
|
+
var _a;
|
|
18
|
+
(_a = TexturalEnvironmentPM_1.TexturalEnvironmentPM.get(appObjects)) === null || _a === void 0 ? void 0 : _a.removeView(setVM);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./setTexturalEnvironment"), exports);
|
|
14
|
+
__exportStar(require("./submitEnvironmentIntensity"), exports);
|
|
15
|
+
__exportStar(require("./updateEnvironmentIntensity"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setTexturalEnvironment = void 0;
|
|
4
|
+
const SetTexturalEnvironmentUC_1 = require("../UCs/SetTexturalEnvironmentUC");
|
|
5
|
+
function setTexturalEnvironment(environment, appObjects) {
|
|
6
|
+
const uc = SetTexturalEnvironmentUC_1.SetTexturalEnvironmentUC.get(appObjects);
|
|
7
|
+
if (!uc) {
|
|
8
|
+
appObjects.submitError("setTexturalEnvironment", "Unable to find SetTexturalEnvironmentUC");
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
uc.setEnvironment(environment);
|
|
12
|
+
}
|
|
13
|
+
exports.setTexturalEnvironment = setTexturalEnvironment;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.submitEnvironmentIntensity = void 0;
|
|
4
|
+
const SetEnvironmentIntensityUC_1 = require("../UCs/SetEnvironmentIntensityUC");
|
|
5
|
+
function submitEnvironmentIntensity(appObjects) {
|
|
6
|
+
const uc = SetEnvironmentIntensityUC_1.SetEnvironmentIntensityUC.get(appObjects);
|
|
7
|
+
if (!uc) {
|
|
8
|
+
appObjects.submitError("submitEnvironmentIntensity", "Unable to find SetTexturalEnvironmentUC");
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
uc.submit();
|
|
12
|
+
}
|
|
13
|
+
exports.submitEnvironmentIntensity = submitEnvironmentIntensity;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateEnvironmentIntensity = void 0;
|
|
4
|
+
const SetEnvironmentIntensityUC_1 = require("../UCs/SetEnvironmentIntensityUC");
|
|
5
|
+
function updateEnvironmentIntensity(intensity, appObjects) {
|
|
6
|
+
const uc = SetEnvironmentIntensityUC_1.SetEnvironmentIntensityUC.get(appObjects);
|
|
7
|
+
if (!uc) {
|
|
8
|
+
appObjects.submitError("updateEnvironmentIntensity", "Unable to find SetTexturalEnvironmentUC");
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
uc.update(intensity);
|
|
12
|
+
}
|
|
13
|
+
exports.updateEnvironmentIntensity = updateEnvironmentIntensity;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AppObject, AppObjectEntity, AppObjectRepo } from "../../../AppObject";
|
|
2
|
+
import { RangedNumber } from "../../../Entities";
|
|
3
|
+
export declare enum Environments {
|
|
4
|
+
FOREST = "Forest",
|
|
5
|
+
NIGHT = "Night",
|
|
6
|
+
PARKING = "Parking",
|
|
7
|
+
ROOM = "Room",
|
|
8
|
+
STUDIO = "Studio"
|
|
9
|
+
}
|
|
10
|
+
export declare abstract class EnvironmentEntity extends AppObjectEntity {
|
|
11
|
+
static type: string;
|
|
12
|
+
abstract get currentEnvironment(): Environments;
|
|
13
|
+
abstract set currentEnvironment(env: Environments);
|
|
14
|
+
abstract rangedIntensity: RangedNumber;
|
|
15
|
+
abstract get intensity(): number;
|
|
16
|
+
abstract set intensity(val: number);
|
|
17
|
+
abstract setToDefault: () => void;
|
|
18
|
+
static get: (appObjects: AppObjectRepo) => EnvironmentEntity | undefined;
|
|
19
|
+
}
|
|
20
|
+
export declare function makeEnvironmentEntity(appObject: AppObject): EnvironmentEntity;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeEnvironmentEntity = exports.EnvironmentEntity = exports.Environments = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../AppObject");
|
|
5
|
+
const Entities_1 = require("../../../Entities");
|
|
6
|
+
var Environments;
|
|
7
|
+
(function (Environments) {
|
|
8
|
+
Environments["FOREST"] = "Forest";
|
|
9
|
+
Environments["NIGHT"] = "Night";
|
|
10
|
+
Environments["PARKING"] = "Parking";
|
|
11
|
+
Environments["ROOM"] = "Room";
|
|
12
|
+
Environments["STUDIO"] = "Studio";
|
|
13
|
+
})(Environments = exports.Environments || (exports.Environments = {}));
|
|
14
|
+
class EnvironmentEntity extends AppObject_1.AppObjectEntity {
|
|
15
|
+
}
|
|
16
|
+
exports.EnvironmentEntity = EnvironmentEntity;
|
|
17
|
+
EnvironmentEntity.type = "EnvironmentEntity";
|
|
18
|
+
EnvironmentEntity.get = (appObjects) => AppObject_1.getSingletonComponent(EnvironmentEntity.type, appObjects);
|
|
19
|
+
function makeEnvironmentEntity(appObject) {
|
|
20
|
+
return new EnvironmentEntityImp(appObject);
|
|
21
|
+
}
|
|
22
|
+
exports.makeEnvironmentEntity = makeEnvironmentEntity;
|
|
23
|
+
class EnvironmentEntityImp extends EnvironmentEntity {
|
|
24
|
+
constructor(appObject) {
|
|
25
|
+
super(appObject, EnvironmentEntity.type);
|
|
26
|
+
this.rangedIntensity = new Entities_1.RangedNumber({
|
|
27
|
+
initialValue: 0.75,
|
|
28
|
+
max: 1.5,
|
|
29
|
+
min: 0.5,
|
|
30
|
+
}, this.notifyOnChange);
|
|
31
|
+
this._defaultEnv = Environments.STUDIO;
|
|
32
|
+
this._memoizedCurEnv = new Entities_1.MemoizedString(Environments.STUDIO, this.notifyOnChange);
|
|
33
|
+
this.setToDefault = () => {
|
|
34
|
+
if (this._memoizedCurEnv.val !== this._defaultEnv) {
|
|
35
|
+
this._memoizedCurEnv.val = this._defaultEnv;
|
|
36
|
+
this.notifyOnChange();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
this.appObjects.registerSingleton(this);
|
|
40
|
+
}
|
|
41
|
+
get intensity() {
|
|
42
|
+
return this.rangedIntensity.val;
|
|
43
|
+
}
|
|
44
|
+
set intensity(val) {
|
|
45
|
+
this.rangedIntensity.val = val;
|
|
46
|
+
}
|
|
47
|
+
get currentEnvironment() {
|
|
48
|
+
return this._memoizedCurEnv.val;
|
|
49
|
+
}
|
|
50
|
+
set currentEnvironment(curEnv) {
|
|
51
|
+
this._memoizedCurEnv.val = curEnv;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Environment";
|
|
@@ -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("./Environment"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./setupEnvironmnets";
|
|
@@ -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("./setupEnvironmnets"), exports);
|