abstract-3d 4.0.4 → 4.0.5
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,9 +8,9 @@ const direction = new Vector3(-1, 2, 1.2).normalize();
|
|
|
8
8
|
const intensity = 1.2;
|
|
9
9
|
const mapSize = 1024;
|
|
10
10
|
/** Of the key light kept out of its shadows, so faces under an overhang, e.g. a recessed base frame, aren't black */
|
|
11
|
-
const shadowIntensity = 0.
|
|
11
|
+
const shadowIntensity = 0.55;
|
|
12
12
|
/** The penumbra's reach, in shadow map texels */
|
|
13
|
-
const penumbra =
|
|
13
|
+
const penumbra = 8;
|
|
14
14
|
/** The light and its target, to add to the scene, with or without shadows; undefined for a scene without solids */
|
|
15
15
|
export function createKeyLight(built, shadows) {
|
|
16
16
|
const { bounds } = getShadowCasters(built);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-light.js","sourceRoot":"","sources":["../../../../src/renderers/three/shadow/key-light.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;GAGG;AAEH,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;AACtD,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,qHAAqH;AACrH,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,iDAAiD;AACjD,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"key-light.js","sourceRoot":"","sources":["../../../../src/renderers/three/shadow/key-light.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,M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MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;IAClI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;IAC7C,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3C,iFAAiF;IACjF,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;IACjI,OAAO,IAAI,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAU;IACxC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACvB,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC7B,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;YACtC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -7,8 +7,8 @@ const shadowLayer = 1;
|
|
|
7
7
|
/** Of the texture's longer side */
|
|
8
8
|
const resolution = 512;
|
|
9
9
|
/** The blur's reach, of the solids' height */
|
|
10
|
-
const softness = 0.
|
|
11
|
-
const opacity = 0.
|
|
10
|
+
const softness = 0.16;
|
|
11
|
+
const opacity = 0.9;
|
|
12
12
|
/** A pool of light on the floor the shadow lies in, so it shows on a dark background, which a shadow alone can't darken; on white it's invisible */
|
|
13
13
|
const floorLight = 0.06;
|
|
14
14
|
/** The pool's reach beyond the solids, of their height */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abstract-3d",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "4.0.5",
|
|
4
|
+
"gitHead": "ba67cc768ed01e09c46213a48251222df4be43b9",
|
|
5
5
|
"description": "Abstract 3D",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Divid AB <info@divid.se>",
|
|
@@ -11,9 +11,9 @@ const direction = new Vector3(-1, 2, 1.2).normalize();
|
|
|
11
11
|
const intensity = 1.2;
|
|
12
12
|
const mapSize = 1024;
|
|
13
13
|
/** Of the key light kept out of its shadows, so faces under an overhang, e.g. a recessed base frame, aren't black */
|
|
14
|
-
const shadowIntensity = 0.
|
|
14
|
+
const shadowIntensity = 0.55;
|
|
15
15
|
/** The penumbra's reach, in shadow map texels */
|
|
16
|
-
const penumbra =
|
|
16
|
+
const penumbra = 8;
|
|
17
17
|
|
|
18
18
|
/** The light and its target, to add to the scene, with or without shadows; undefined for a scene without solids */
|
|
19
19
|
export function createKeyLight(built: BuiltScene, shadows: boolean): Group | undefined {
|
|
@@ -37,8 +37,8 @@ const shadowLayer = 1;
|
|
|
37
37
|
/** Of the texture's longer side */
|
|
38
38
|
const resolution = 512;
|
|
39
39
|
/** The blur's reach, of the solids' height */
|
|
40
|
-
const softness = 0.
|
|
41
|
-
const opacity = 0.
|
|
40
|
+
const softness = 0.16;
|
|
41
|
+
const opacity = 0.9;
|
|
42
42
|
/** A pool of light on the floor the shadow lies in, so it shows on a dark background, which a shadow alone can't darken; on white it's invisible */
|
|
43
43
|
const floorLight = 0.06;
|
|
44
44
|
/** The pool's reach beyond the solids, of their height */
|