@mml-io/3d-web-client-core 0.5.0 → 0.6.1
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/character/CharacterTooltip.d.ts +0 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +696 -335
- package/build/index.js.map +4 -4
- package/build/rendering/composer.d.ts +9 -2
- package/build/sun/Sun.d.ts +18 -0
- package/build/tweakpane/TweakPane.d.ts +7 -1
- package/build/tweakpane/envSettings.d.ts +40 -0
- package/build/tweakpane/sunSettings.d.ts +31 -0
- package/package.json +3 -3
@@ -1,4 +1,5 @@
|
|
1
1
|
import { PerspectiveCamera, Scene, Vector2, WebGLRenderer } from "three";
|
2
|
+
import { Sun } from "../sun/Sun";
|
2
3
|
import { TimeManager } from "../time/TimeManager";
|
3
4
|
export declare class Composer {
|
4
5
|
private width;
|
@@ -26,10 +27,16 @@ export declare class Composer {
|
|
26
27
|
private readonly bcsPass;
|
27
28
|
private readonly gaussGrainEffect;
|
28
29
|
private readonly gaussGrainPass;
|
30
|
+
private ambientLight;
|
31
|
+
sun: Sun | null;
|
32
|
+
spawnSun: boolean;
|
29
33
|
private tweakPane;
|
30
|
-
constructor(scene: Scene, camera: PerspectiveCamera);
|
34
|
+
constructor(scene: Scene, camera: PerspectiveCamera, spawnSun?: boolean);
|
31
35
|
private updateProjection;
|
32
36
|
isTweakPaneVisible(): boolean;
|
33
37
|
render(timeManager: TimeManager): void;
|
34
|
-
useHDRI(url: string): void;
|
38
|
+
useHDRI(url: string, fromFile?: boolean): void;
|
39
|
+
setHDRIFromFile(): void;
|
40
|
+
setFog(): void;
|
41
|
+
setAmbientLight(): void;
|
35
42
|
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Group, Vector3 } from "three";
|
2
|
+
export declare class Sun extends Group {
|
3
|
+
private readonly debug;
|
4
|
+
private readonly sunOffset;
|
5
|
+
private readonly shadowResolution;
|
6
|
+
private readonly shadowCamFrustum;
|
7
|
+
private readonly camHelper;
|
8
|
+
private readonly shadowCamera;
|
9
|
+
private readonly directionalLight;
|
10
|
+
target: Vector3 | null;
|
11
|
+
constructor();
|
12
|
+
updateCharacterPosition(position: Vector3 | undefined): void;
|
13
|
+
setAzimuthalAngle(angle: number): void;
|
14
|
+
setPolarAngle(angle: number): void;
|
15
|
+
setIntensity(intensity: number): void;
|
16
|
+
setColor(): void;
|
17
|
+
private setSunPosition;
|
18
|
+
}
|
@@ -1,12 +1,14 @@
|
|
1
1
|
import { BloomEffect, EffectComposer, EffectPass, SSAOEffect, ToneMappingEffect } from "postprocessing";
|
2
2
|
import { Scene, WebGLRenderer } from "three";
|
3
3
|
import { GaussGrainEffect } from "../rendering/post-effects/gauss-grain";
|
4
|
+
import { Sun } from "../sun/Sun";
|
4
5
|
import { TimeManager } from "../time/TimeManager";
|
5
6
|
import { BrightnessContrastSaturation } from "./../rendering/post-effects/bright-contrast-sat";
|
6
7
|
export declare class TweakPane {
|
7
8
|
private renderer;
|
8
9
|
private scene;
|
9
10
|
private composer;
|
11
|
+
private guiStyle;
|
10
12
|
private gui;
|
11
13
|
private render;
|
12
14
|
private stats;
|
@@ -16,12 +18,16 @@ export declare class TweakPane {
|
|
16
18
|
private post;
|
17
19
|
private export;
|
18
20
|
private characterMaterial;
|
21
|
+
private environment;
|
22
|
+
private sun;
|
23
|
+
private sunButton;
|
24
|
+
private ambient;
|
19
25
|
private saveVisibilityInLocalStorage;
|
20
26
|
guiVisible: boolean;
|
21
27
|
constructor(renderer: WebGLRenderer, scene: Scene, composer: EffectComposer);
|
22
28
|
private processKey;
|
23
29
|
private setupGUIListeners;
|
24
|
-
setupRenderPane(ssaoEffect: SSAOEffect, toneMappingEffect: ToneMappingEffect, toneMappingPass: EffectPass, brightnessContrastSaturation: typeof BrightnessContrastSaturation, bloomEffect: BloomEffect, gaussGrainEffect: typeof GaussGrainEffect): void;
|
30
|
+
setupRenderPane(ssaoEffect: SSAOEffect, toneMappingEffect: ToneMappingEffect, toneMappingPass: EffectPass, brightnessContrastSaturation: typeof BrightnessContrastSaturation, bloomEffect: BloomEffect, gaussGrainEffect: typeof GaussGrainEffect, hasLighting: boolean, sun: Sun | null, setHDR: () => void, setAmbientLight: () => void, setFog: () => void): void;
|
25
31
|
private formatDateForFilename;
|
26
32
|
private downloadSettingsAsJSON;
|
27
33
|
private importSettingsFromJSON;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
export declare const envValues: {
|
2
|
+
ambientLight: {
|
3
|
+
ambientLightIntensity: number;
|
4
|
+
ambientLightColor: {
|
5
|
+
r: number;
|
6
|
+
g: number;
|
7
|
+
b: number;
|
8
|
+
};
|
9
|
+
};
|
10
|
+
fog: {
|
11
|
+
fogNear: number;
|
12
|
+
fogFar: number;
|
13
|
+
fogColor: {
|
14
|
+
r: number;
|
15
|
+
g: number;
|
16
|
+
b: number;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export declare const envOptions: {
|
21
|
+
ambientLight: {
|
22
|
+
ambientLightIntensity: {
|
23
|
+
min: number;
|
24
|
+
max: number;
|
25
|
+
step: number;
|
26
|
+
};
|
27
|
+
};
|
28
|
+
fog: {
|
29
|
+
fogNear: {
|
30
|
+
min: number;
|
31
|
+
max: number;
|
32
|
+
step: number;
|
33
|
+
};
|
34
|
+
fogFar: {
|
35
|
+
min: number;
|
36
|
+
max: number;
|
37
|
+
step: number;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export declare const sunValues: {
|
2
|
+
sunPosition: {
|
3
|
+
sunAzimuthalAngle: number;
|
4
|
+
sunPolarAngle: number;
|
5
|
+
};
|
6
|
+
sunIntensity: number;
|
7
|
+
sunColor: {
|
8
|
+
r: number;
|
9
|
+
g: number;
|
10
|
+
b: number;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
export declare const sunOptions: {
|
14
|
+
sunPosition: {
|
15
|
+
sunAzimuthalAngle: {
|
16
|
+
min: number;
|
17
|
+
max: number;
|
18
|
+
step: number;
|
19
|
+
};
|
20
|
+
sunPolarAngle: {
|
21
|
+
min: number;
|
22
|
+
max: number;
|
23
|
+
step: number;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
sunIntensity: {
|
27
|
+
min: number;
|
28
|
+
max: number;
|
29
|
+
step: number;
|
30
|
+
};
|
31
|
+
};
|
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.6.1",
|
4
4
|
"main": "./build/index.js",
|
5
5
|
"types": "./build/index.d.ts",
|
6
6
|
"type": "module",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"lint:fix": "eslint \"./src/**/*.{ts,}\" --fix"
|
16
16
|
},
|
17
17
|
"dependencies": {
|
18
|
-
"mml-web": "0.
|
18
|
+
"mml-web": "0.6.1",
|
19
19
|
"postprocessing": "6.32.1",
|
20
20
|
"three": "^0.153.0",
|
21
21
|
"three-mesh-bvh": "0.6.0",
|
@@ -25,5 +25,5 @@
|
|
25
25
|
"@tweakpane/core": "1.1.9",
|
26
26
|
"@types/three": "^0.152.1"
|
27
27
|
},
|
28
|
-
"gitHead": "
|
28
|
+
"gitHead": "a000246cbe624bc304dd21de766fbceb8c9e0d20"
|
29
29
|
}
|