@vived/app 4.37.0 → 4.38.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.
@@ -7,6 +7,7 @@ function setupAppHandlers(appObjects) {
7
7
  const handlerAO = appObjects.getOrCreate("AppHandlers");
8
8
  const appHandler = Entities_1.makeAppHandler(handlerAO);
9
9
  UC_1.makeDisposeAppUC(handlerAO);
10
+ UC_1.makeEnableFeatureUC(handlerAO);
10
11
  UC_1.makeSetAppStateUC(handlerAO);
11
12
  UC_1.makeSetIsAuthoringUC(handlerAO);
12
13
  UC_1.makeSetThemeColorUC(handlerAO);
@@ -13,6 +13,7 @@ export declare abstract class StylusEntity extends AppObjectEntity {
13
13
  static clickTimeThresholdMS: number;
14
14
  abstract registerController: (controller: StylusController) => void;
15
15
  abstract updateButtonState: (button: number, isPressed: boolean) => void;
16
+ abstract getButtonState(button: number): boolean;
16
17
  abstract readonly transform: Transform3D;
17
18
  abstract get isInUse(): boolean;
18
19
  abstract get pickRay(): ParametricLine;
@@ -52,6 +52,14 @@ class StylusImp extends StylusEntity {
52
52
  this.buttonStates[button] = isPressed;
53
53
  this.notifyOnChange();
54
54
  };
55
+ this.getButtonState = (button) => {
56
+ if (button < 0 || button >= this.buttonStates.length) {
57
+ return false;
58
+ }
59
+ else {
60
+ return this.buttonStates[button];
61
+ }
62
+ };
55
63
  this.isClick = (button) => {
56
64
  const buttonIsCorrect = button === this.lassPressedButton;
57
65
  const movement = ValueObjects_1.Vector3.Subtract(this.transform.localPosition, this.pressPosition).magnitude;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/app",
3
- "version": "4.37.0",
3
+ "version": "4.38.0",
4
4
  "description": "Public package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",