@woosh/meep-engine 2.138.9 → 2.138.11
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/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.138.
|
|
8
|
+
"version": "2.138.11",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -363,7 +363,7 @@ export class EngineHarness {
|
|
|
363
363
|
castShadow = true,
|
|
364
364
|
sun = DEFAULT_SUNLIGHT_COLOR,
|
|
365
365
|
sunIntensity = 0.9,
|
|
366
|
-
sunDirection = new Vector3(0.
|
|
366
|
+
sunDirection = new Vector3(0.17, -1, 0.17),
|
|
367
367
|
ambient = Color.white,
|
|
368
368
|
ambientIntensity = 0.1
|
|
369
369
|
}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/light/LightSystem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LightSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/light/LightSystem.js"],"names":[],"mappings":"AA6QA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,2DARW,YAAY,SACZ,WAAW,oBACX,MAAM,qCA6EhB;;uBA7WsB,qBAAqB;sBAEtB,YAAY;AASlC;IACI;;;;;OAKG;IACH,2CAsFC;IA1EG,kDAAsC;IAGtC,6DAEC;IAGD,eAAoB;IACpB,WAA2B;IAC3B,aAAwB;IAExB;;;;OAIG;IACH,mBAA0B;IAE1B;;;;OAIG;IACH,wBAA2B;IAE3B,gBAAkB;IAElB;;;;OAIG;IACH,kBAAoC;IAGpC;;;;OAIG;IACH,2BAA8B;IAC9B;;;;OAIG;IACH,iBAAoB;IAGpB;;;;OAIG;IACH,4BAAgD;IAqBpD,mCAEC;IAED;;;;OAIG;IACH,uBAHW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,OAAO,QAkB/B;IAED;;;;OAIG;IACH,4BAHW,KAAK,UACL,MAAM,QAMhB;IAED,2CAOC;IAED,4CASC;IAGD,4CAOC;IAED;;;;;OAKG;IACH,wCAwCC;IAED;;;;;;OAMG;IACH,sCAwBC;CACJ;sCAjQqC,8CAA8C;0BAC1D,qCAAqC;4CAFnB,uDAAuD"}
|
|
@@ -213,7 +213,12 @@ class LightSystem extends AbstractContextSystem {
|
|
|
213
213
|
|
|
214
214
|
l.castShadow = true;
|
|
215
215
|
|
|
216
|
-
three_update_shadow_camera_extents(
|
|
216
|
+
three_update_shadow_camera_extents(
|
|
217
|
+
this.__camera_object,
|
|
218
|
+
l,
|
|
219
|
+
this.settings.shadowDistance ?? DEFAULT_SHADOW_DISTANCE,
|
|
220
|
+
this.__graphics.layers
|
|
221
|
+
);
|
|
217
222
|
|
|
218
223
|
} else {
|
|
219
224
|
|
|
@@ -260,7 +265,7 @@ class LightSystem extends AbstractContextSystem {
|
|
|
260
265
|
const scratch_aabb3 = new AABB3();
|
|
261
266
|
const scratch_view_projection = new ThreeMatrix4();
|
|
262
267
|
|
|
263
|
-
const DEFAULT_SHADOW_DISTANCE =
|
|
268
|
+
const DEFAULT_SHADOW_DISTANCE = Infinity;
|
|
264
269
|
|
|
265
270
|
/**
|
|
266
271
|
* Fit the shadow camera's orthographic frustum to the main view frustum by
|
|
@@ -296,6 +301,9 @@ const DEFAULT_SHADOW_DISTANCE = 100;
|
|
|
296
301
|
* casters outside the view frustum. Omit to use receiver-only fit.
|
|
297
302
|
*/
|
|
298
303
|
export function three_update_shadow_camera_extents(camera, light, shadow_distance = DEFAULT_SHADOW_DISTANCE, layers = null) {
|
|
304
|
+
assert.isNumber(shadow_distance, 'shadow_distance');
|
|
305
|
+
assert.greaterThan(shadow_distance, 0, 'shadow_distance');
|
|
306
|
+
|
|
299
307
|
|
|
300
308
|
const shadow = light.shadow;
|
|
301
309
|
if (shadow === undefined) {
|