@mml-io/3d-web-client-core 0.0.0-experimental-42d909b-20240717 → 0.0.0-experimental-c5bc6e3-20240723

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.
@@ -8,13 +8,16 @@ export declare class KeyInputManager {
8
8
  private onKeyUp;
9
9
  isKeyPressed(key: string): boolean;
10
10
  isMovementKeyPressed(): boolean;
11
- get forward(): boolean;
12
- get backward(): boolean;
13
- get left(): boolean;
14
- get right(): boolean;
15
- get run(): boolean;
16
- get jump(): boolean;
17
- get anyDirection(): boolean;
18
- get conflictingDirection(): boolean;
11
+ private getForward;
12
+ private getBackward;
13
+ private getLeft;
14
+ private getRight;
15
+ private getRun;
16
+ private getJump;
17
+ getOutput(): {
18
+ direction: number | null;
19
+ isSprinting: boolean;
20
+ jump: boolean;
21
+ } | null;
19
22
  dispose(): void;
20
23
  }
@@ -1,47 +1,39 @@
1
- interface JoyStickAttributes {
1
+ interface VirtualJoyStickConfig {
2
2
  radius?: number;
3
- inner_radius?: number;
4
- x?: number;
5
- y?: number;
6
- width?: number;
7
- height?: number;
8
- mouse_support?: boolean;
9
- visible?: boolean;
10
- anchor?: "left" | "right";
3
+ innerRadius?: number;
4
+ mouseSupport?: boolean;
11
5
  }
12
6
  export declare class VirtualJoystick {
13
7
  private holderElement;
8
+ private config;
14
9
  private radius;
15
- private inner_radius;
16
- private anchor;
17
- private x;
18
- private y;
19
- private width;
20
- private height;
21
- private mouse_support;
22
- private div;
23
- private base;
24
- private control;
25
- left: boolean;
26
- right: boolean;
27
- up: boolean;
28
- down: boolean;
29
- hasDirection: boolean;
30
- constructor(holderElement: HTMLElement, attrs: JoyStickAttributes);
10
+ private innerRadius;
11
+ private mouseSupport;
12
+ private element;
13
+ private joystickBaseElement;
14
+ private joystickCenterElement;
15
+ private joystickPointerId;
16
+ private joystickOutput;
17
+ private jumpButton;
18
+ private jumpPointerId;
19
+ constructor(holderElement: HTMLElement, config: VirtualJoyStickConfig);
31
20
  static checkForTouch(): boolean;
32
21
  private checkTouch;
33
- private setupBaseAndControl;
22
+ private createBase;
23
+ private createCenter;
24
+ private createJumpButton;
34
25
  private bindEvents;
35
- private handleTouchStart;
36
- private handleTouchMove;
37
- private handleMouseDown;
38
- private handleMouseMove;
39
- private handleMouseUp;
40
- private clearFlags;
26
+ private preventDefaultAndStopPropagation;
27
+ private onJumpPointerDown;
28
+ private onJoystickPointerDown;
29
+ private onPointerMove;
30
+ private onPointerUp;
31
+ private clearJoystickState;
41
32
  private updateControlAndDirection;
42
- private isUp;
43
- private isDown;
44
- private isLeft;
45
- private isRight;
33
+ getOutput(): {
34
+ direction: number | null;
35
+ isSprinting: boolean;
36
+ jump: boolean;
37
+ } | null;
46
38
  }
47
39
  export {};
@@ -9,7 +9,6 @@ export declare const camValues: {
9
9
  minFOV: number;
10
10
  invertFOVMapping: boolean;
11
11
  damping: number;
12
- dampingScale: number;
13
12
  zoomScale: number;
14
13
  zoomDamping: number;
15
14
  };
@@ -49,11 +48,6 @@ export declare const camOptions: {
49
48
  max: number;
50
49
  step: number;
51
50
  };
52
- dampingScale: {
53
- min: number;
54
- max: number;
55
- step: number;
56
- };
57
51
  zoomScale: {
58
52
  min: number;
59
53
  max: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mml-io/3d-web-client-core",
3
- "version": "0.0.0-experimental-42d909b-20240717",
3
+ "version": "0.0.0-experimental-c5bc6e3-20240723",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,7 +18,7 @@
18
18
  "lint-fix": "eslint \"./{src,test}/**/*.{js,jsx,ts,tsx}\" --fix"
19
19
  },
20
20
  "dependencies": {
21
- "@mml-io/3d-web-avatar": "0.0.0-experimental-42d909b-20240717",
21
+ "@mml-io/3d-web-avatar": "0.0.0-experimental-c5bc6e3-20240723",
22
22
  "@mml-io/model-loader": "0.17.0",
23
23
  "@monogrid/gainmap-js": "^3.0.5",
24
24
  "@tweakpane/core": "2.0.4",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@types/three": "0.163.0"
36
36
  },
37
- "gitHead": "adb8ee3f8ccff4ff2a8b04dadb97e656021a01e9"
37
+ "gitHead": "43f5fb684e3c7287256ee08bbe8394afa88e4343"
38
38
  }