@mml-io/3d-web-client-core 0.19.0 → 0.20.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.
@@ -1,12 +1,23 @@
1
+ export declare enum Key {
2
+ W = "w",
3
+ A = "a",
4
+ S = "s",
5
+ D = "d",
6
+ SHIFT = "shift",
7
+ SPACE = " ",
8
+ C = "c"
9
+ }
1
10
  export declare class KeyInputManager {
2
11
  private shouldCaptureKeyPress;
3
12
  private keys;
4
13
  private eventHandlerCollection;
14
+ private bindings;
5
15
  constructor(shouldCaptureKeyPress?: () => boolean);
6
16
  private handleUnfocus;
7
17
  private onKeyDown;
8
18
  private onKeyUp;
9
19
  isKeyPressed(key: string): boolean;
20
+ createKeyBinding(key: Key, callback: () => void): void;
10
21
  isMovementKeyPressed(): boolean;
11
22
  private getForward;
12
23
  private getBackward;
@@ -1,8 +1,29 @@
1
- import { LoadingProgressManager } from "mml-web";
1
+ import { LoadingProgressManager } from "@mml-io/mml-web";
2
+ export type LoadingScreenConfig = {
3
+ background?: string;
4
+ backgroundImageUrl?: string;
5
+ backgroundBlurAmount?: number;
6
+ overlayLayers?: Array<{
7
+ overlayImageUrl: string;
8
+ overlayAnchor: "top-left" | "top-right" | "bottom-left" | "bottom-right";
9
+ overlayOffset?: {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ }>;
14
+ title?: string;
15
+ subtitle?: string;
16
+ color?: string;
17
+ };
2
18
  export declare class LoadingScreen {
3
19
  private loadingProgressManager;
20
+ private config?;
4
21
  readonly element: HTMLDivElement;
5
- private loadingBannerText;
22
+ private readonly backgroundBlur;
23
+ private overlayLayers;
24
+ private loadingBanner;
25
+ private loadingBannerTitle;
26
+ private loadingBannerSubtitle;
6
27
  private progressBarBackground;
7
28
  private progressBarHolder;
8
29
  private progressBar;
@@ -15,6 +36,6 @@ export declare class LoadingScreen {
15
36
  private hasCompleted;
16
37
  private loadingCallback;
17
38
  private disposed;
18
- constructor(loadingProgressManager: LoadingProgressManager);
39
+ constructor(loadingProgressManager: LoadingProgressManager, config?: LoadingScreenConfig | undefined);
19
40
  dispose(): void;
20
41
  }
@@ -1,4 +1,5 @@
1
- import { IMMLScene, PositionAndRotation, MMLDocumentTimeManager } from "mml-web";
1
+ import { IMMLScene, MMLDocumentTimeManager, PositionAndRotation } from "@mml-io/mml-web";
2
+ import { ThreeJSGraphicsAdapter } from "@mml-io/mml-web-threejs";
2
3
  import { AudioListener, Group, PerspectiveCamera, Scene, WebGLRenderer } from "three";
3
4
  import { CollisionsManager } from "../collisions/CollisionsManager";
4
5
  type MMLCompositionSceneConfig = {
@@ -13,7 +14,7 @@ type MMLCompositionSceneConfig = {
13
14
  export declare class MMLCompositionScene {
14
15
  private config;
15
16
  group: Group;
16
- readonly mmlScene: IMMLScene;
17
+ readonly mmlScene: IMMLScene<ThreeJSGraphicsAdapter>;
17
18
  readonly documentTimeManager: MMLDocumentTimeManager;
18
19
  private readonly promptManager;
19
20
  private readonly interactionManager;
@@ -1,11 +1,12 @@
1
1
  import { EffectComposer } from "postprocessing";
2
- import { PerspectiveCamera, Scene, Vector2, WebGLRenderer } from "three";
2
+ import { Scene, Vector2, WebGLRenderer } from "three";
3
+ import { CameraManager } from "../camera/CameraManager";
3
4
  import { Sun } from "../sun/Sun";
4
5
  import { TimeManager } from "../time/TimeManager";
5
6
  import { TweakPane } from "../tweakpane/TweakPane";
6
7
  type ComposerContructorArgs = {
7
8
  scene: Scene;
8
- camera: PerspectiveCamera;
9
+ cameraManager: CameraManager;
9
10
  spawnSun: boolean;
10
11
  environmentConfiguration?: EnvironmentConfiguration;
11
12
  };
@@ -43,7 +44,7 @@ export declare class Composer {
43
44
  resolution: Vector2;
44
45
  private readonly scene;
45
46
  postPostScene: Scene;
46
- private readonly camera;
47
+ private readonly cameraManager;
47
48
  readonly renderer: WebGLRenderer;
48
49
  readonly effectComposer: EffectComposer;
49
50
  private readonly renderPass;
@@ -69,7 +70,7 @@ export declare class Composer {
69
70
  private skyboxState;
70
71
  sun: Sun | null;
71
72
  spawnSun: boolean;
72
- constructor({ scene, camera, spawnSun, environmentConfiguration, }: ComposerContructorArgs);
73
+ constructor({ scene, cameraManager, spawnSun, environmentConfiguration, }: ComposerContructorArgs);
73
74
  updateEnvironmentConfiguration(environmentConfiguration: EnvironmentConfiguration): void;
74
75
  setupTweakPane(tweakPane: TweakPane): void;
75
76
  dispose(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mml-io/3d-web-client-core",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,12 +18,13 @@
18
18
  "lint-fix": "eslint \"./{src,test}/**/*.{js,jsx,ts,tsx}\" --fix"
19
19
  },
20
20
  "dependencies": {
21
- "@mml-io/3d-web-avatar": "^0.19.0",
22
- "@mml-io/model-loader": "0.17.1",
21
+ "@mml-io/3d-web-avatar": "^0.20.0",
22
+ "@mml-io/mml-web": "0.19.0",
23
+ "@mml-io/mml-web-threejs": "0.19.0",
24
+ "@mml-io/model-loader": "0.19.0",
23
25
  "@monogrid/gainmap-js": "^3.0.5",
24
26
  "@tweakpane/core": "2.0.4",
25
27
  "@tweakpane/plugin-essentials": "0.2.1",
26
- "mml-web": "0.17.1",
27
28
  "postprocessing": "6.35.6",
28
29
  "three-mesh-bvh": "0.7.6",
29
30
  "tweakpane": "4.0.4"
@@ -34,5 +35,5 @@
34
35
  "devDependencies": {
35
36
  "@types/three": "0.163.0"
36
37
  },
37
- "gitHead": "1d785e68643dd46c63b49d9fcb0fc1d73097a414"
38
+ "gitHead": "8dada83f0324f46a9078f21de64fa58b90bb238d"
38
39
  }