@mml-io/3d-web-client-core 0.0.0-experimental-ff88de3-20240530 → 0.0.0-experimental-27180bc-20240609
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.
@@ -3,6 +3,35 @@ import { PerspectiveCamera, Scene, Vector2, WebGLRenderer } from "three";
|
|
3
3
|
import { Sun } from "../sun/Sun";
|
4
4
|
import { TimeManager } from "../time/TimeManager";
|
5
5
|
import { TweakPane } from "../tweakpane/TweakPane";
|
6
|
+
type ComposerContructorArgs = {
|
7
|
+
scene: Scene;
|
8
|
+
camera: PerspectiveCamera;
|
9
|
+
spawnSun: boolean;
|
10
|
+
environmentConfiguration?: EnvironmentConfiguration;
|
11
|
+
};
|
12
|
+
export type EnvironmentConfiguration = {
|
13
|
+
groundPlane?: boolean;
|
14
|
+
skybox?: {
|
15
|
+
intensity?: number;
|
16
|
+
blurriness?: number;
|
17
|
+
azimuthalAngle?: number;
|
18
|
+
polarAngle?: number;
|
19
|
+
};
|
20
|
+
envMap?: {
|
21
|
+
intensity?: number;
|
22
|
+
};
|
23
|
+
sun?: {
|
24
|
+
intensity?: number;
|
25
|
+
polarAngle?: number;
|
26
|
+
azimuthalAngle?: number;
|
27
|
+
};
|
28
|
+
postProcessing?: {
|
29
|
+
bloomIntensity?: number;
|
30
|
+
};
|
31
|
+
ambientLight?: {
|
32
|
+
intensity?: number;
|
33
|
+
};
|
34
|
+
};
|
6
35
|
export declare class Composer {
|
7
36
|
private width;
|
8
37
|
private height;
|
@@ -33,18 +62,22 @@ export declare class Composer {
|
|
33
62
|
private readonly gaussGrainEffect;
|
34
63
|
private readonly gaussGrainPass;
|
35
64
|
private ambientLight;
|
65
|
+
private environmentConfiguration?;
|
36
66
|
sun: Sun | null;
|
37
67
|
spawnSun: boolean;
|
38
|
-
constructor(scene
|
68
|
+
constructor({ scene, camera, spawnSun, environmentConfiguration, }: ComposerContructorArgs);
|
39
69
|
setupTweakPane(tweakPane: TweakPane): void;
|
40
70
|
dispose(): void;
|
41
71
|
fitContainer(): void;
|
42
72
|
render(timeManager: TimeManager): void;
|
43
|
-
|
44
|
-
setHDRPolarAngle(polarAngle: number): void;
|
73
|
+
updateSkyboxRotation(): void;
|
45
74
|
useHDRJPG(url: string, fromFile?: boolean): void;
|
46
75
|
useHDRI(url: string, fromFile?: boolean): void;
|
47
76
|
setHDRIFromFile(): void;
|
48
77
|
setFog(): void;
|
49
78
|
setAmbientLight(): void;
|
79
|
+
private updateSunValues;
|
80
|
+
private updateSkyboxAndEnvValues;
|
81
|
+
private updateAmbientLightValues;
|
50
82
|
}
|
83
|
+
export {};
|
@@ -28,7 +28,7 @@ export declare class TweakPane {
|
|
28
28
|
constructor(holderElement: HTMLElement, renderer: WebGLRenderer, scene: Scene, composer: EffectComposer);
|
29
29
|
private setupGUIListeners;
|
30
30
|
private processKey;
|
31
|
-
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,
|
31
|
+
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;
|
32
32
|
setupCamPane(cameraManager: CameraManager): void;
|
33
33
|
setupCharacterController(localController: LocalController): void;
|
34
34
|
updateStats(timeManager: TimeManager): void;
|
@@ -14,10 +14,11 @@ export declare const sunValues: {
|
|
14
14
|
};
|
15
15
|
};
|
16
16
|
export declare const envValues: {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
skyboxAzimuthalAngle: number;
|
18
|
+
skyboxPolarAngle: number;
|
19
|
+
envMapIntensity: number;
|
20
|
+
skyboxIntensity: number;
|
21
|
+
skyboxBlurriness: number;
|
21
22
|
ambientLight: {
|
22
23
|
ambientLightIntensity: number;
|
23
24
|
ambientLightColor: {
|
@@ -39,8 +40,11 @@ export declare const envValues: {
|
|
39
40
|
export declare class EnvironmentFolder {
|
40
41
|
folder: FolderApi;
|
41
42
|
private sun;
|
43
|
+
private envMap;
|
42
44
|
private hdrButton;
|
45
|
+
private skybox;
|
43
46
|
private ambient;
|
47
|
+
private fog;
|
44
48
|
constructor(parentFolder: FolderApi, expand?: boolean);
|
45
|
-
setupChangeEvent(scene: Scene, setHDR: () => void,
|
49
|
+
setupChangeEvent(scene: Scene, setHDR: () => void, setSkyboxAzimuthalAngle: (azimuthalAngle: number) => void, setSkyboxPolarAngle: (polarAngle: number) => void, setAmbientLight: () => void, setFog: () => void, sun: Sun | null): void;
|
46
50
|
}
|
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-
|
3
|
+
"version": "0.0.0-experimental-27180bc-20240609",
|
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-
|
21
|
+
"@mml-io/3d-web-avatar": "0.0.0-experimental-27180bc-20240609",
|
22
22
|
"@mml-io/model-loader": "0.15.0",
|
23
23
|
"@monogrid/gainmap-js": "^3.0.5",
|
24
24
|
"@tweakpane/core": "2.0.3",
|
@@ -34,5 +34,5 @@
|
|
34
34
|
"devDependencies": {
|
35
35
|
"@types/three": "0.163.0"
|
36
36
|
},
|
37
|
-
"gitHead": "
|
37
|
+
"gitHead": "e3e5953b0d6c60c95d192863f9b6e2c9a48f8294"
|
38
38
|
}
|