@mml-io/3d-web-client-core 0.18.0 → 0.19.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/build/camera/CameraManager.d.ts +16 -18
- package/build/character/LocalController.d.ts +1 -9
- package/build/index.js +470 -418
- package/build/index.js.map +3 -3
- package/build/input/KeyInputManager.d.ts +11 -8
- package/build/input/VirtualJoystick.d.ts +28 -36
- package/build/mml/MMLCompositionScene.d.ts +2 -1
- package/build/rendering/composer.d.ts +11 -3
- package/build/tweakpane/TweakPane.d.ts +1 -1
- package/build/tweakpane/blades/cameraFolder.d.ts +0 -6
- package/package.json +5 -5
@@ -8,13 +8,16 @@ export declare class KeyInputManager {
|
|
8
8
|
private onKeyUp;
|
9
9
|
isKeyPressed(key: string): boolean;
|
10
10
|
isMovementKeyPressed(): boolean;
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
1
|
+
interface VirtualJoyStickConfig {
|
2
2
|
radius?: number;
|
3
|
-
|
4
|
-
|
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
|
16
|
-
private
|
17
|
-
private
|
18
|
-
private
|
19
|
-
private
|
20
|
-
private
|
21
|
-
private
|
22
|
-
private
|
23
|
-
private
|
24
|
-
|
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
|
22
|
+
private createBase;
|
23
|
+
private createCenter;
|
24
|
+
private createJumpButton;
|
34
25
|
private bindEvents;
|
35
|
-
private
|
36
|
-
private
|
37
|
-
private
|
38
|
-
private
|
39
|
-
private
|
40
|
-
private
|
26
|
+
private preventDefaultAndStopPropagation;
|
27
|
+
private onJumpPointerDown;
|
28
|
+
private onJoystickPointerDown;
|
29
|
+
private onPointerMove;
|
30
|
+
private onPointerUp;
|
31
|
+
private clearJoystickState;
|
41
32
|
private updateControlAndDirection;
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
33
|
+
getOutput(): {
|
34
|
+
direction: number | null;
|
35
|
+
isSprinting: boolean;
|
36
|
+
jump: boolean;
|
37
|
+
} | null;
|
46
38
|
}
|
47
39
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IMMLScene, PositionAndRotation } from "mml-web";
|
1
|
+
import { IMMLScene, PositionAndRotation, MMLDocumentTimeManager } from "mml-web";
|
2
2
|
import { AudioListener, Group, PerspectiveCamera, Scene, WebGLRenderer } from "three";
|
3
3
|
import { CollisionsManager } from "../collisions/CollisionsManager";
|
4
4
|
type MMLCompositionSceneConfig = {
|
@@ -14,6 +14,7 @@ export declare class MMLCompositionScene {
|
|
14
14
|
private config;
|
15
15
|
group: Group;
|
16
16
|
readonly mmlScene: IMMLScene;
|
17
|
+
readonly documentTimeManager: MMLDocumentTimeManager;
|
17
18
|
private readonly promptManager;
|
18
19
|
private readonly interactionManager;
|
19
20
|
private readonly interactionListener;
|
@@ -16,7 +16,11 @@ export type EnvironmentConfiguration = {
|
|
16
16
|
blurriness?: number;
|
17
17
|
azimuthalAngle?: number;
|
18
18
|
polarAngle?: number;
|
19
|
-
}
|
19
|
+
} & ({
|
20
|
+
hdrJpgUrl: string;
|
21
|
+
} | {
|
22
|
+
hdrUrl: string;
|
23
|
+
});
|
20
24
|
envMap?: {
|
21
25
|
intensity?: number;
|
22
26
|
};
|
@@ -37,7 +41,6 @@ export declare class Composer {
|
|
37
41
|
private height;
|
38
42
|
private resizeListener;
|
39
43
|
resolution: Vector2;
|
40
|
-
private isEnvHDRI;
|
41
44
|
private readonly scene;
|
42
45
|
postPostScene: Scene;
|
43
46
|
private readonly camera;
|
@@ -63,21 +66,26 @@ export declare class Composer {
|
|
63
66
|
private readonly gaussGrainPass;
|
64
67
|
private ambientLight;
|
65
68
|
private environmentConfiguration?;
|
69
|
+
private skyboxState;
|
66
70
|
sun: Sun | null;
|
67
71
|
spawnSun: boolean;
|
68
72
|
constructor({ scene, camera, spawnSun, environmentConfiguration, }: ComposerContructorArgs);
|
73
|
+
updateEnvironmentConfiguration(environmentConfiguration: EnvironmentConfiguration): void;
|
69
74
|
setupTweakPane(tweakPane: TweakPane): void;
|
70
75
|
dispose(): void;
|
71
76
|
fitContainer(): void;
|
72
77
|
render(timeManager: TimeManager): void;
|
73
78
|
updateSkyboxRotation(): void;
|
79
|
+
private loadHDRJPG;
|
80
|
+
private loadHDRi;
|
74
81
|
useHDRJPG(url: string, fromFile?: boolean): void;
|
75
|
-
useHDRI(url: string
|
82
|
+
useHDRI(url: string): void;
|
76
83
|
setHDRIFromFile(): void;
|
77
84
|
setFog(): void;
|
78
85
|
setAmbientLight(): void;
|
79
86
|
private updateSunValues;
|
80
87
|
private updateSkyboxAndEnvValues;
|
81
88
|
private updateAmbientLightValues;
|
89
|
+
private applyEnvMap;
|
82
90
|
}
|
83
91
|
export {};
|
@@ -26,8 +26,8 @@ export declare class TweakPane {
|
|
26
26
|
private saveVisibilityInLocalStorage;
|
27
27
|
guiVisible: boolean;
|
28
28
|
private tweakPaneWrapper;
|
29
|
+
private eventHandlerCollection;
|
29
30
|
constructor(holderElement: HTMLElement, renderer: WebGLRenderer, scene: Scene, composer: EffectComposer);
|
30
|
-
private setupGUIListeners;
|
31
31
|
private processKey;
|
32
32
|
setupRenderPane(composer: EffectComposer, normalPass: NormalPass, ppssaoEffect: SSAOEffect, ppssaoPass: EffectPass, n8aopass: any, toneMappingEffect: ToneMappingEffect, toneMappingPass: EffectPass, brightnessContrastSaturation: typeof BrightnessContrastSaturation, bloomEffect: BloomEffect, gaussGrainEffect: typeof GaussGrainEffect, hasLighting: boolean, sun: Sun | null, setHDR: () => void, setSkyboxAzimuthalAngle: (azimuthalAngle: number) => void, setSkyboxPolarAngle: (azimuthalAngle: number) => void, setAmbientLight: () => void, setFog: () => void): void;
|
33
33
|
dispose(): void;
|
@@ -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.
|
3
|
+
"version": "0.19.0",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -18,12 +18,12 @@
|
|
18
18
|
"lint-fix": "eslint \"./{src,test}/**/*.{js,jsx,ts,tsx}\" --fix"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@mml-io/3d-web-avatar": "^0.
|
22
|
-
"@mml-io/model-loader": "0.
|
21
|
+
"@mml-io/3d-web-avatar": "^0.19.0",
|
22
|
+
"@mml-io/model-loader": "0.17.1",
|
23
23
|
"@monogrid/gainmap-js": "^3.0.5",
|
24
24
|
"@tweakpane/core": "2.0.4",
|
25
25
|
"@tweakpane/plugin-essentials": "0.2.1",
|
26
|
-
"mml-web": "0.
|
26
|
+
"mml-web": "0.17.1",
|
27
27
|
"postprocessing": "6.35.6",
|
28
28
|
"three-mesh-bvh": "0.7.6",
|
29
29
|
"tweakpane": "4.0.4"
|
@@ -34,5 +34,5 @@
|
|
34
34
|
"devDependencies": {
|
35
35
|
"@types/three": "0.163.0"
|
36
36
|
},
|
37
|
-
"gitHead": "
|
37
|
+
"gitHead": "1d785e68643dd46c63b49d9fcb0fc1d73097a414"
|
38
38
|
}
|