@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.
Files changed (128) hide show
  1. package/lib/Components/ChannelModel/Adapters/index.d.ts +1 -0
  2. package/lib/Components/ChannelModel/Adapters/index.js +1 -0
  3. package/lib/Components/ChannelModel/Adapters/modelObjectsAreStickableAdapter.d.ts +2 -0
  4. package/lib/Components/ChannelModel/Adapters/modelObjectsAreStickableAdapter.js +27 -0
  5. package/lib/Components/ChannelModel/Controllers/index.d.ts +1 -0
  6. package/lib/Components/ChannelModel/Controllers/index.js +1 -0
  7. package/lib/Components/ChannelModel/Controllers/stickAllActiveObjects.d.ts +2 -0
  8. package/lib/Components/ChannelModel/Controllers/stickAllActiveObjects.js +23 -0
  9. package/lib/Components/ChannelModel/Mocks/ModelObjectsAreStickableMock.d.ts +7 -0
  10. package/lib/Components/ChannelModel/Mocks/ModelObjectsAreStickableMock.js +11 -0
  11. package/lib/Components/ChannelModel/Mocks/StickAllChannelModelObjectsUCMock.d.ts +9 -0
  12. package/lib/Components/ChannelModel/Mocks/StickAllChannelModelObjectsUCMock.js +13 -0
  13. package/lib/Components/ChannelModel/Mocks/index.d.ts +2 -0
  14. package/lib/Components/ChannelModel/Mocks/index.js +2 -0
  15. package/lib/Components/ChannelModel/PMs/ModelObjectsAreStickablePM.d.ts +6 -0
  16. package/lib/Components/ChannelModel/PMs/ModelObjectsAreStickablePM.js +56 -0
  17. package/lib/Components/ChannelModel/PMs/index.d.ts +1 -0
  18. package/lib/Components/ChannelModel/PMs/index.js +1 -0
  19. package/lib/Components/ChannelModel/UC/StickAllChannelModelObjectsUC.d.ts +7 -0
  20. package/lib/Components/ChannelModel/UC/StickAllChannelModelObjectsUC.js +87 -0
  21. package/lib/Components/ChannelModel/UC/index.d.ts +1 -0
  22. package/lib/Components/ChannelModel/UC/index.js +1 -0
  23. package/lib/Components/Environment/Adapters/environmentalIntensityAdapter.d.ts +2 -0
  24. package/lib/Components/Environment/Adapters/environmentalIntensityAdapter.js +19 -0
  25. package/lib/Components/Environment/Adapters/index.d.ts +2 -0
  26. package/lib/Components/Environment/Adapters/index.js +14 -0
  27. package/lib/Components/Environment/Adapters/texturalEnvironmentAdapter.d.ts +3 -0
  28. package/lib/Components/Environment/Adapters/texturalEnvironmentAdapter.js +20 -0
  29. package/lib/Components/Environment/Controllers/index.d.ts +3 -0
  30. package/lib/Components/Environment/Controllers/index.js +15 -0
  31. package/lib/Components/Environment/Controllers/setTexturalEnvironment.d.ts +3 -0
  32. package/lib/Components/Environment/Controllers/setTexturalEnvironment.js +13 -0
  33. package/lib/Components/Environment/Controllers/submitEnvironmentIntensity.d.ts +2 -0
  34. package/lib/Components/Environment/Controllers/submitEnvironmentIntensity.js +13 -0
  35. package/lib/Components/Environment/Controllers/updateEnvironmentIntensity.d.ts +2 -0
  36. package/lib/Components/Environment/Controllers/updateEnvironmentIntensity.js +13 -0
  37. package/lib/Components/Environment/Entities/Environment.d.ts +20 -0
  38. package/lib/Components/Environment/Entities/Environment.js +53 -0
  39. package/lib/Components/Environment/Entities/index.d.ts +1 -0
  40. package/lib/Components/Environment/Entities/index.js +13 -0
  41. package/lib/Components/Environment/Factories/index.d.ts +1 -0
  42. package/lib/Components/Environment/Factories/index.js +13 -0
  43. package/lib/Components/Environment/Factories/setupEnvironmnets.d.ts +2 -0
  44. package/lib/Components/Environment/Factories/setupEnvironmnets.js +19 -0
  45. package/lib/Components/Environment/Mocks/EnvironmentalIntensityPmMock.d.ts +8 -0
  46. package/lib/Components/Environment/Mocks/EnvironmentalIntensityPmMock.js +15 -0
  47. package/lib/Components/Environment/Mocks/SetEnvironmentIntensityUcMock.d.ts +9 -0
  48. package/lib/Components/Environment/Mocks/SetEnvironmentIntensityUcMock.js +16 -0
  49. package/lib/Components/Environment/Mocks/SetTexturalEnvironmentUcMock.d.ts +8 -0
  50. package/lib/Components/Environment/Mocks/SetTexturalEnvironmentUcMock.js +15 -0
  51. package/lib/Components/Environment/Mocks/TexturalEnvironmentPmMock.d.ts +8 -0
  52. package/lib/Components/Environment/Mocks/TexturalEnvironmentPmMock.js +15 -0
  53. package/lib/Components/Environment/Mocks/index.d.ts +4 -0
  54. package/lib/Components/Environment/Mocks/index.js +16 -0
  55. package/lib/Components/Environment/PMs/EnvironmentalIntensityPM.d.ts +6 -0
  56. package/lib/Components/Environment/PMs/EnvironmentalIntensityPM.js +34 -0
  57. package/lib/Components/Environment/PMs/TexturalEnvironmentPM.d.ts +7 -0
  58. package/lib/Components/Environment/PMs/TexturalEnvironmentPM.js +34 -0
  59. package/lib/Components/Environment/PMs/index.d.ts +2 -0
  60. package/lib/Components/Environment/PMs/index.js +14 -0
  61. package/lib/Components/Environment/UCs/SerializeEnvironment.d.ts +23 -0
  62. package/lib/Components/Environment/UCs/SerializeEnvironment.js +73 -0
  63. package/lib/Components/Environment/UCs/SetEnvironmentIntensityUC.d.ts +8 -0
  64. package/lib/Components/Environment/UCs/SetEnvironmentIntensityUC.js +69 -0
  65. package/lib/Components/Environment/UCs/SetTexturalEnvironmentUC.d.ts +8 -0
  66. package/lib/Components/Environment/UCs/SetTexturalEnvironmentUC.js +58 -0
  67. package/lib/Components/Environment/UCs/index.d.ts +3 -0
  68. package/lib/Components/Environment/UCs/index.js +15 -0
  69. package/lib/Components/Environment/index.d.ts +7 -0
  70. package/lib/Components/Environment/index.js +19 -0
  71. package/lib/Components/Stick/Adapters/index.d.ts +1 -0
  72. package/lib/Components/Stick/Adapters/index.js +13 -0
  73. package/lib/Components/Stick/Adapters/stickTargetAdapter.d.ts +3 -0
  74. package/lib/Components/Stick/Adapters/stickTargetAdapter.js +23 -0
  75. package/lib/Components/Stick/Controllers/DoubleClickToStickMC.d.ts +15 -0
  76. package/lib/Components/Stick/Controllers/DoubleClickToStickMC.js +57 -0
  77. package/lib/Components/Stick/Controllers/DoubleTapToStickTC.d.ts +15 -0
  78. package/lib/Components/Stick/Controllers/DoubleTapToStickTC.js +52 -0
  79. package/lib/Components/Stick/Controllers/clickStick.d.ts +2 -0
  80. package/lib/Components/Stick/Controllers/clickStick.js +13 -0
  81. package/lib/Components/Stick/Controllers/index.d.ts +3 -0
  82. package/lib/Components/Stick/Controllers/index.js +15 -0
  83. package/lib/Components/Stick/Entities/Stickable.d.ts +22 -0
  84. package/lib/Components/Stick/Entities/Stickable.js +101 -0
  85. package/lib/Components/Stick/Entities/index.d.ts +1 -0
  86. package/lib/Components/Stick/Entities/index.js +13 -0
  87. package/lib/Components/Stick/Factories/index.d.ts +1 -0
  88. package/lib/Components/Stick/Factories/index.js +13 -0
  89. package/lib/Components/Stick/Factories/setupStick.d.ts +2 -0
  90. package/lib/Components/Stick/Factories/setupStick.js +15 -0
  91. package/lib/Components/Stick/Mocks/StickTargetPmMock.d.ts +7 -0
  92. package/lib/Components/Stick/Mocks/StickTargetPmMock.js +11 -0
  93. package/lib/Components/Stick/Mocks/StickUCMock.d.ts +7 -0
  94. package/lib/Components/Stick/Mocks/StickUCMock.js +11 -0
  95. package/lib/Components/Stick/Mocks/TryStickAppObjectUCMock.d.ts +10 -0
  96. package/lib/Components/Stick/Mocks/TryStickAppObjectUCMock.js +17 -0
  97. package/lib/Components/Stick/Mocks/index.d.ts +3 -0
  98. package/lib/Components/Stick/Mocks/index.js +15 -0
  99. package/lib/Components/Stick/PMs/StickTargetPM.d.ts +11 -0
  100. package/lib/Components/Stick/PMs/StickTargetPM.js +50 -0
  101. package/lib/Components/Stick/PMs/index.d.ts +1 -0
  102. package/lib/Components/Stick/PMs/index.js +13 -0
  103. package/lib/Components/Stick/UCs/PanTransformWithStickUC.d.ts +3 -0
  104. package/lib/Components/Stick/UCs/PanTransformWithStickUC.js +131 -0
  105. package/lib/Components/Stick/UCs/StickUC.d.ts +7 -0
  106. package/lib/Components/Stick/UCs/StickUC.js +71 -0
  107. package/lib/Components/Stick/UCs/TryPickStickTarget.d.ts +8 -0
  108. package/lib/Components/Stick/UCs/TryPickStickTarget.js +26 -0
  109. package/lib/Components/Stick/UCs/TryStickAppObjectUC.d.ts +10 -0
  110. package/lib/Components/Stick/UCs/TryStickAppObjectUC.js +74 -0
  111. package/lib/Components/Stick/UCs/index.d.ts +4 -0
  112. package/lib/Components/Stick/UCs/index.js +16 -0
  113. package/lib/Components/Stick/index.d.ts +7 -0
  114. package/lib/Components/Stick/index.js +19 -0
  115. package/lib/Components/Stylus/Factories/index.d.ts +1 -0
  116. package/lib/Components/Stylus/Factories/index.js +13 -0
  117. package/lib/Components/Stylus/Factories/setupStylus.d.ts +2 -0
  118. package/lib/Components/Stylus/Factories/setupStylus.js +19 -0
  119. package/lib/Components/Stylus/index.d.ts +1 -0
  120. package/lib/Components/Stylus/index.js +1 -0
  121. package/lib/Components/Transform3D/UC/PanTransformUC.d.ts +28 -1
  122. package/lib/Components/Transform3D/UC/PanTransformUC.js +52 -34
  123. package/lib/Components/Transform3D/UC/TryPanTransformUC.d.ts +3 -2
  124. package/lib/Components/Transform3D/UC/index.d.ts +0 -1
  125. package/lib/Components/Transform3D/UC/index.js +0 -1
  126. package/lib/Components/index.d.ts +3 -1
  127. package/lib/Components/index.js +3 -1
  128. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupEnvironments = void 0;
4
+ const Environment_1 = require("../Entities/Environment");
5
+ const EnvironmentalIntensityPM_1 = require("../PMs/EnvironmentalIntensityPM");
6
+ const TexturalEnvironmentPM_1 = require("../PMs/TexturalEnvironmentPM");
7
+ const SerializeEnvironment_1 = require("../UCs/SerializeEnvironment");
8
+ const SetEnvironmentIntensityUC_1 = require("../UCs/SetEnvironmentIntensityUC");
9
+ const SetTexturalEnvironmentUC_1 = require("../UCs/SetTexturalEnvironmentUC");
10
+ function setupEnvironments(appObjects) {
11
+ const ao = appObjects.getOrCreate("Environments");
12
+ Environment_1.makeEnvironmentEntity(ao);
13
+ SetTexturalEnvironmentUC_1.makeSetTexturalEnvironmentUC(ao);
14
+ new SerializeEnvironment_1.SerializeEnvironment(ao);
15
+ SetEnvironmentIntensityUC_1.makeSetEnvironmentIntensityUC(ao);
16
+ TexturalEnvironmentPM_1.makeTexturalEnvironmentPM(ao);
17
+ EnvironmentalIntensityPM_1.makeEnvironmentalIntensityPM(ao);
18
+ }
19
+ exports.setupEnvironments = setupEnvironments;
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { EnvironmentalIntensityPM } from "../PMs/EnvironmentalIntensityPM";
4
+ export declare class EnvironmentalIntensityPmMock extends EnvironmentalIntensityPM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeEnvironmentalIntensityPmMock(appObjects: AppObjectRepo): EnvironmentalIntensityPmMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeEnvironmentalIntensityPmMock = exports.EnvironmentalIntensityPmMock = void 0;
4
+ const EnvironmentalIntensityPM_1 = require("../PMs/EnvironmentalIntensityPM");
5
+ class EnvironmentalIntensityPmMock extends EnvironmentalIntensityPM_1.EnvironmentalIntensityPM {
6
+ constructor(appObject) {
7
+ super(appObject, EnvironmentalIntensityPM_1.EnvironmentalIntensityPM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.EnvironmentalIntensityPmMock = EnvironmentalIntensityPmMock;
12
+ function makeEnvironmentalIntensityPmMock(appObjects) {
13
+ return new EnvironmentalIntensityPmMock(appObjects.getOrCreate("EnvironmentalIntensityPmMock"));
14
+ }
15
+ exports.makeEnvironmentalIntensityPmMock = makeEnvironmentalIntensityPmMock;
@@ -0,0 +1,9 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { SetEnvironmentIntensityUC } from "../UCs/SetEnvironmentIntensityUC";
4
+ export declare class SetEnvironmentIntensityUcMock extends SetEnvironmentIntensityUC {
5
+ submit: jest.Mock<any, any>;
6
+ update: jest.Mock<any, any>;
7
+ constructor(appObject: AppObject);
8
+ }
9
+ export declare function makeSetEnvironmentIntensityUcMock(appObjects: AppObjectRepo): SetEnvironmentIntensityUcMock;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSetEnvironmentIntensityUcMock = exports.SetEnvironmentIntensityUcMock = void 0;
4
+ const SetEnvironmentIntensityUC_1 = require("../UCs/SetEnvironmentIntensityUC");
5
+ class SetEnvironmentIntensityUcMock extends SetEnvironmentIntensityUC_1.SetEnvironmentIntensityUC {
6
+ constructor(appObject) {
7
+ super(appObject, SetEnvironmentIntensityUC_1.SetEnvironmentIntensityUC.type);
8
+ this.submit = jest.fn();
9
+ this.update = jest.fn();
10
+ }
11
+ }
12
+ exports.SetEnvironmentIntensityUcMock = SetEnvironmentIntensityUcMock;
13
+ function makeSetEnvironmentIntensityUcMock(appObjects) {
14
+ return new SetEnvironmentIntensityUcMock(appObjects.getOrCreate("SetEnvironmentIntensityUcMock"));
15
+ }
16
+ exports.makeSetEnvironmentIntensityUcMock = makeSetEnvironmentIntensityUcMock;
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { SetTexturalEnvironmentUC } from "../UCs/SetTexturalEnvironmentUC";
4
+ export declare class SetTexturalEnvironmentUcMock extends SetTexturalEnvironmentUC {
5
+ setEnvironment: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeSetTexturalEnvironmentUcMock(appObjects: AppObjectRepo): SetTexturalEnvironmentUcMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSetTexturalEnvironmentUcMock = exports.SetTexturalEnvironmentUcMock = void 0;
4
+ const SetTexturalEnvironmentUC_1 = require("../UCs/SetTexturalEnvironmentUC");
5
+ class SetTexturalEnvironmentUcMock extends SetTexturalEnvironmentUC_1.SetTexturalEnvironmentUC {
6
+ constructor(appObject) {
7
+ super(appObject, SetTexturalEnvironmentUC_1.SetTexturalEnvironmentUC.type);
8
+ this.setEnvironment = jest.fn();
9
+ }
10
+ }
11
+ exports.SetTexturalEnvironmentUcMock = SetTexturalEnvironmentUcMock;
12
+ function makeSetTexturalEnvironmentUcMock(appObjects) {
13
+ return new SetTexturalEnvironmentUcMock(appObjects.getOrCreate("SetTexturalEnvironmentUcMock"));
14
+ }
15
+ exports.makeSetTexturalEnvironmentUcMock = makeSetTexturalEnvironmentUcMock;
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { TexturalEnvironmentPM } from "../PMs/TexturalEnvironmentPM";
4
+ export declare class TexturalEnvironmentPmMock extends TexturalEnvironmentPM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeTexturalEnvironmentPmMock(appObjects: AppObjectRepo): TexturalEnvironmentPmMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeTexturalEnvironmentPmMock = exports.TexturalEnvironmentPmMock = void 0;
4
+ const TexturalEnvironmentPM_1 = require("../PMs/TexturalEnvironmentPM");
5
+ class TexturalEnvironmentPmMock extends TexturalEnvironmentPM_1.TexturalEnvironmentPM {
6
+ constructor(appObject) {
7
+ super(appObject, TexturalEnvironmentPM_1.TexturalEnvironmentPM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.TexturalEnvironmentPmMock = TexturalEnvironmentPmMock;
12
+ function makeTexturalEnvironmentPmMock(appObjects) {
13
+ return new TexturalEnvironmentPmMock(appObjects.getOrCreate("TexturalEnvironmentPmMock"));
14
+ }
15
+ exports.makeTexturalEnvironmentPmMock = makeTexturalEnvironmentPmMock;
@@ -0,0 +1,4 @@
1
+ export * from "./EnvironmentalIntensityPmMock";
2
+ export * from "./SetEnvironmentIntensityUcMock";
3
+ export * from "./SetTexturalEnvironmentUcMock";
4
+ export * from "./TexturalEnvironmentPmMock";
@@ -0,0 +1,16 @@
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("./EnvironmentalIntensityPmMock"), exports);
14
+ __exportStar(require("./SetEnvironmentIntensityUcMock"), exports);
15
+ __exportStar(require("./SetTexturalEnvironmentUcMock"), exports);
16
+ __exportStar(require("./TexturalEnvironmentPmMock"), exports);
@@ -0,0 +1,6 @@
1
+ import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
2
+ export declare abstract class EnvironmentalIntensityPM extends AppObjectPM<number> {
3
+ static type: string;
4
+ static get: (appObjects: AppObjectRepo) => EnvironmentalIntensityPM | undefined;
5
+ }
6
+ export declare function makeEnvironmentalIntensityPM(appObject: AppObject): EnvironmentalIntensityPM;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeEnvironmentalIntensityPM = exports.EnvironmentalIntensityPM = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Environment_1 = require("../Entities/Environment");
6
+ class EnvironmentalIntensityPM extends AppObject_1.AppObjectPM {
7
+ }
8
+ exports.EnvironmentalIntensityPM = EnvironmentalIntensityPM;
9
+ EnvironmentalIntensityPM.type = "EnvironmentalIntensityPM";
10
+ EnvironmentalIntensityPM.get = (appObjects) => AppObject_1.getSingletonComponent(EnvironmentalIntensityPM.type, appObjects);
11
+ function makeEnvironmentalIntensityPM(appObject) {
12
+ return new EnvironmentalIntensityPMImp(appObject);
13
+ }
14
+ exports.makeEnvironmentalIntensityPM = makeEnvironmentalIntensityPM;
15
+ class EnvironmentalIntensityPMImp extends EnvironmentalIntensityPM {
16
+ constructor(appObject) {
17
+ var _a;
18
+ super(appObject, EnvironmentalIntensityPM.type);
19
+ this.onEntityChange = () => {
20
+ if (!this.entity)
21
+ return;
22
+ this.doUpdateView(this.entity.intensity);
23
+ };
24
+ (_a = this.entity) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onEntityChange);
25
+ this.onEntityChange();
26
+ this.appObjects.registerSingleton(this);
27
+ }
28
+ vmsAreEqual(a, b) {
29
+ return a === b;
30
+ }
31
+ get entity() {
32
+ return this.getCachedSingleton(Environment_1.EnvironmentEntity.type);
33
+ }
34
+ }
@@ -0,0 +1,7 @@
1
+ import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
2
+ import { Environments } from "../Entities/Environment";
3
+ export declare abstract class TexturalEnvironmentPM extends AppObjectPM<Environments> {
4
+ static type: string;
5
+ static get: (appObjects: AppObjectRepo) => TexturalEnvironmentPM | undefined;
6
+ }
7
+ export declare function makeTexturalEnvironmentPM(appObject: AppObject): TexturalEnvironmentPM;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeTexturalEnvironmentPM = exports.TexturalEnvironmentPM = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Environment_1 = require("../Entities/Environment");
6
+ class TexturalEnvironmentPM extends AppObject_1.AppObjectPM {
7
+ }
8
+ exports.TexturalEnvironmentPM = TexturalEnvironmentPM;
9
+ TexturalEnvironmentPM.type = "TexturalEnvironmentPM";
10
+ TexturalEnvironmentPM.get = (appObjects) => AppObject_1.getSingletonComponent(TexturalEnvironmentPM.type, appObjects);
11
+ function makeTexturalEnvironmentPM(appObject) {
12
+ return new TexturalEnvironmentPMImp(appObject);
13
+ }
14
+ exports.makeTexturalEnvironmentPM = makeTexturalEnvironmentPM;
15
+ class TexturalEnvironmentPMImp extends TexturalEnvironmentPM {
16
+ constructor(appObject) {
17
+ var _a;
18
+ super(appObject, TexturalEnvironmentPM.type);
19
+ this.onEntityChange = () => {
20
+ if (!this.entity)
21
+ return;
22
+ this.doUpdateView(this.entity.currentEnvironment);
23
+ };
24
+ (_a = this.entity) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onEntityChange);
25
+ this.onEntityChange();
26
+ this.appObjects.registerSingleton(this);
27
+ }
28
+ vmsAreEqual(a, b) {
29
+ return a === b;
30
+ }
31
+ get entity() {
32
+ return this.getCachedSingleton(Environment_1.EnvironmentEntity.type);
33
+ }
34
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./EnvironmentalIntensityPM";
2
+ export * from "./TexturalEnvironmentPM";
@@ -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("./EnvironmentalIntensityPM"), exports);
14
+ __exportStar(require("./TexturalEnvironmentPM"), exports);
@@ -0,0 +1,23 @@
1
+ import { AppObject, AppObjectUC } from "../../../AppObject";
2
+ import { SerializedSystem } from "../../StateMachine";
3
+ import { Environments } from "../Entities/Environment";
4
+ export declare class SerializeEnvironment extends AppObjectUC implements SerializedSystem {
5
+ static readonly type = "SerializeEnvironment";
6
+ name: string;
7
+ seriliziationVersion: number;
8
+ private get environmentEntity();
9
+ readonly defaultState: SerializedEnvironmentV2;
10
+ getSystemState(): SerializedEnvironmentV2 | undefined;
11
+ applySystemState(state: object, version: number): void;
12
+ private applyStateV1;
13
+ private applyStateV2;
14
+ applyDefaultState(): void;
15
+ constructor(appObject: AppObject);
16
+ }
17
+ export interface SerializedEnvironmentV1 {
18
+ environment: Environments;
19
+ }
20
+ export interface SerializedEnvironmentV2 {
21
+ environment: Environments;
22
+ intensity: number;
23
+ }
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SerializeEnvironment = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const StateMachine_1 = require("../../StateMachine");
6
+ const Environment_1 = require("../Entities/Environment");
7
+ class SerializeEnvironment extends AppObject_1.AppObjectUC {
8
+ constructor(appObject) {
9
+ super(appObject, SerializeEnvironment.type);
10
+ this.name = "textural-environment";
11
+ this.seriliziationVersion = 2;
12
+ this.defaultState = {
13
+ environment: Environment_1.Environments.STUDIO,
14
+ intensity: 0.75,
15
+ };
16
+ const stateMachine = StateMachine_1.StateMachineEntity.get(appObject.appObjectRepo);
17
+ if (stateMachine) {
18
+ stateMachine.registerSerializedSystem(this);
19
+ }
20
+ else {
21
+ this.warn("Unable to find StateMachineEntity");
22
+ }
23
+ }
24
+ get environmentEntity() {
25
+ return this.getCachedSingleton(Environment_1.EnvironmentEntity.type);
26
+ }
27
+ getSystemState() {
28
+ if (!this.environmentEntity)
29
+ return;
30
+ const state = {
31
+ environment: this.environmentEntity.currentEnvironment,
32
+ intensity: this.environmentEntity.intensity,
33
+ };
34
+ return state;
35
+ }
36
+ applySystemState(state, version) {
37
+ if (version === 1) {
38
+ this.applyStateV1(state);
39
+ }
40
+ else if (version === 2) {
41
+ this.applyStateV2(state);
42
+ }
43
+ else {
44
+ this.applyDefaultState();
45
+ }
46
+ }
47
+ applyStateV1(state) {
48
+ if (!this.environmentEntity)
49
+ return;
50
+ if (state.environment === undefined) {
51
+ this.applyDefaultState();
52
+ }
53
+ this.environmentEntity.currentEnvironment = state.environment;
54
+ this.environmentEntity.intensity = this.defaultState.intensity;
55
+ }
56
+ applyStateV2(state) {
57
+ if (!this.environmentEntity)
58
+ return;
59
+ if (state.environment === undefined || state.intensity === undefined) {
60
+ this.applyDefaultState();
61
+ }
62
+ this.environmentEntity.currentEnvironment = state.environment;
63
+ this.environmentEntity.intensity = state.intensity;
64
+ }
65
+ applyDefaultState() {
66
+ if (!this.environmentEntity)
67
+ return;
68
+ this.environmentEntity.currentEnvironment = this.defaultState.environment;
69
+ this.environmentEntity.intensity = this.defaultState.intensity;
70
+ }
71
+ }
72
+ exports.SerializeEnvironment = SerializeEnvironment;
73
+ SerializeEnvironment.type = "SerializeEnvironment";
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ export declare abstract class SetEnvironmentIntensityUC extends AppObjectUC {
3
+ static readonly type = "SetEnvironmentIntensityUC";
4
+ abstract update(intensity: number): void;
5
+ abstract submit(): void;
6
+ static get(appObjects: AppObjectRepo): SetEnvironmentIntensityUC | undefined;
7
+ }
8
+ export declare function makeSetEnvironmentIntensityUC(appObject: AppObject): SetEnvironmentIntensityUC;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSetEnvironmentIntensityUC = exports.SetEnvironmentIntensityUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Dispatcher_1 = require("../../Dispatcher");
6
+ const UndoRedo_1 = require("../../UndoRedo");
7
+ const Environment_1 = require("../Entities/Environment");
8
+ class SetEnvironmentIntensityUC extends AppObject_1.AppObjectUC {
9
+ static get(appObjects) {
10
+ return AppObject_1.getSingletonComponent(SetEnvironmentIntensityUC.type, appObjects);
11
+ }
12
+ }
13
+ exports.SetEnvironmentIntensityUC = SetEnvironmentIntensityUC;
14
+ SetEnvironmentIntensityUC.type = "SetEnvironmentIntensityUC";
15
+ function makeSetEnvironmentIntensityUC(appObject) {
16
+ return new SetEnvironmentIntensityUCImp(appObject);
17
+ }
18
+ exports.makeSetEnvironmentIntensityUC = makeSetEnvironmentIntensityUC;
19
+ class SetEnvironmentIntensityUCImp extends SetEnvironmentIntensityUC {
20
+ constructor(appObject) {
21
+ super(appObject, SetEnvironmentIntensityUC.type);
22
+ this.update = (val) => {
23
+ if (!this.environment)
24
+ return;
25
+ if (!this.initialIntensity) {
26
+ this.initialIntensity = this.environment.intensity;
27
+ }
28
+ this.environment.intensity = val;
29
+ };
30
+ this.appObjects.registerSingleton(this);
31
+ }
32
+ get environment() {
33
+ return this.getCachedSingleton(Environment_1.EnvironmentEntity.type);
34
+ }
35
+ get undo() {
36
+ return this.getCachedSingleton(UndoRedo_1.UndoRedoEntity.type);
37
+ }
38
+ get dispatchStateChange() {
39
+ var _a;
40
+ return (_a = this.getCachedSingleton(Dispatcher_1.DispatchStateChangeUC.type)) === null || _a === void 0 ? void 0 : _a.doDispatch;
41
+ }
42
+ submit() {
43
+ var _a;
44
+ if (!this.initialIntensity)
45
+ return;
46
+ const dispatchStateChange = this.dispatchStateChange;
47
+ const environment = this.environment;
48
+ if (!environment || !dispatchStateChange) {
49
+ this.error("Missing component");
50
+ return;
51
+ }
52
+ const undoIntensity = this.initialIntensity;
53
+ const redoIntensity = environment.intensity;
54
+ if (undoIntensity === redoIntensity)
55
+ return;
56
+ (_a = this.undo) === null || _a === void 0 ? void 0 : _a.submitAction({
57
+ undoAction: () => {
58
+ environment.intensity = undoIntensity;
59
+ dispatchStateChange();
60
+ },
61
+ redoAction: () => {
62
+ environment.intensity = redoIntensity;
63
+ dispatchStateChange();
64
+ },
65
+ });
66
+ dispatchStateChange();
67
+ this.initialIntensity = undefined;
68
+ }
69
+ }
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ import { Environments } from "../Entities/Environment";
3
+ export declare abstract class SetTexturalEnvironmentUC extends AppObjectUC {
4
+ static readonly type = "SetTexturalEnvironmentUC";
5
+ abstract setEnvironment(env: Environments): void;
6
+ static get(appObjects: AppObjectRepo): SetTexturalEnvironmentUC | undefined;
7
+ }
8
+ export declare function makeSetTexturalEnvironmentUC(appObject: AppObject): SetTexturalEnvironmentUC;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSetTexturalEnvironmentUC = exports.SetTexturalEnvironmentUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Dispatcher_1 = require("../../Dispatcher");
6
+ const UndoRedo_1 = require("../../UndoRedo");
7
+ const Environment_1 = require("../Entities/Environment");
8
+ class SetTexturalEnvironmentUC extends AppObject_1.AppObjectUC {
9
+ static get(appObjects) {
10
+ return AppObject_1.getSingletonComponent(SetTexturalEnvironmentUC.type, appObjects);
11
+ }
12
+ }
13
+ exports.SetTexturalEnvironmentUC = SetTexturalEnvironmentUC;
14
+ SetTexturalEnvironmentUC.type = "SetTexturalEnvironmentUC";
15
+ function makeSetTexturalEnvironmentUC(appObject) {
16
+ return new SetTexturalEnvironmentUCImp(appObject);
17
+ }
18
+ exports.makeSetTexturalEnvironmentUC = makeSetTexturalEnvironmentUC;
19
+ class SetTexturalEnvironmentUCImp extends SetTexturalEnvironmentUC {
20
+ constructor(appObject) {
21
+ super(appObject, SetTexturalEnvironmentUC.type);
22
+ this.setEnvironment = (env) => {
23
+ var _a;
24
+ const dispatchStateChange = this.dispatchStateChange;
25
+ const environment = this.environment;
26
+ if (!environment || !dispatchStateChange) {
27
+ this.error("Missing component");
28
+ return;
29
+ }
30
+ if (environment.currentEnvironment === env)
31
+ return;
32
+ const previousEnv = environment.currentEnvironment;
33
+ environment.currentEnvironment = env;
34
+ (_a = this.undo) === null || _a === void 0 ? void 0 : _a.submitAction({
35
+ undoAction: () => {
36
+ environment.currentEnvironment = previousEnv;
37
+ dispatchStateChange();
38
+ },
39
+ redoAction: () => {
40
+ environment.currentEnvironment = env;
41
+ dispatchStateChange();
42
+ },
43
+ });
44
+ dispatchStateChange();
45
+ };
46
+ this.appObjects.registerSingleton(this);
47
+ }
48
+ get environment() {
49
+ return this.getCachedSingleton(Environment_1.EnvironmentEntity.type);
50
+ }
51
+ get undo() {
52
+ return this.getCachedSingleton(UndoRedo_1.UndoRedoEntity.type);
53
+ }
54
+ get dispatchStateChange() {
55
+ var _a;
56
+ return (_a = this.getCachedSingleton(Dispatcher_1.DispatchStateChangeUC.type)) === null || _a === void 0 ? void 0 : _a.doDispatch;
57
+ }
58
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./SerializeEnvironment";
2
+ export * from "./SetEnvironmentIntensityUC";
3
+ export * from "./SetTexturalEnvironmentUC";
@@ -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("./SerializeEnvironment"), exports);
14
+ __exportStar(require("./SetEnvironmentIntensityUC"), exports);
15
+ __exportStar(require("./SetTexturalEnvironmentUC"), exports);
@@ -0,0 +1,7 @@
1
+ export * from "./Adapters";
2
+ export * from "./Controllers";
3
+ export * from "./Entities";
4
+ export * from "./Factories";
5
+ export * from "./Mocks";
6
+ export * from "./PMs";
7
+ export * from "./UCs";
@@ -0,0 +1,19 @@
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("./Adapters"), exports);
14
+ __exportStar(require("./Controllers"), exports);
15
+ __exportStar(require("./Entities"), exports);
16
+ __exportStar(require("./Factories"), exports);
17
+ __exportStar(require("./Mocks"), exports);
18
+ __exportStar(require("./PMs"), exports);
19
+ __exportStar(require("./UCs"), exports);
@@ -0,0 +1 @@
1
+ export * from "./stickTargetAdapter";
@@ -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("./stickTargetAdapter"), exports);
@@ -0,0 +1,3 @@
1
+ import { PmAdapter } from "../../../Types";
2
+ import { StickTargetVM } from "../PMs/StickTargetPM";
3
+ export declare const stickTargetAdapter: PmAdapter<StickTargetVM>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stickTargetAdapter = void 0;
4
+ const StickTargetPM_1 = require("../PMs/StickTargetPM");
5
+ exports.stickTargetAdapter = {
6
+ defaultVM: StickTargetPM_1.defaultStickTargetVM,
7
+ subscribe: (id, appObjects, setVM) => {
8
+ if (!id)
9
+ return;
10
+ const pm = StickTargetPM_1.StickTargetPM.get(id, appObjects);
11
+ if (!pm) {
12
+ appObjects.submitError("stickTargetAdapter", "Unable to find StickTargetPM");
13
+ return;
14
+ }
15
+ pm.addView(setVM);
16
+ },
17
+ unsubscribe: (id, appObjects, setVM) => {
18
+ const pm = StickTargetPM_1.StickTargetPM.get(id, appObjects);
19
+ if (pm) {
20
+ pm.removeView(setVM);
21
+ }
22
+ }
23
+ };
@@ -0,0 +1,15 @@
1
+ import { AppObject, AppObjectController } from "../../../AppObject";
2
+ import { MouseController, MouseInputEvent } from "../../MouseInput";
3
+ export declare class DoubleClickToStickMC extends AppObjectController implements MouseController {
4
+ static type: string;
5
+ readonly maxClickTimeMS = 300;
6
+ readonly maxClickDistancePx = 5;
7
+ private initialClickPos;
8
+ private initialClickTime;
9
+ private clickCount;
10
+ private get mouseInput();
11
+ private get tryStickSceneMesh();
12
+ onClick: (e: MouseInputEvent) => void;
13
+ private cancelDoubleClick;
14
+ constructor(appObject: AppObject);
15
+ }