@woosh/meep-engine 2.116.0 → 2.116.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/bundle-worker-terrain.js +1 -1
- package/build/meep.cjs +60 -33
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +60 -33
- package/package.json +1 -1
- package/src/core/collection/array/array_replace_all.d.ts +2 -1
- package/src/core/collection/array/array_replace_all.d.ts.map +1 -1
- package/src/core/collection/array/array_replace_all.js +3 -0
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/List.js +4 -7
- package/src/core/collection/set/ArraySet.d.ts.map +1 -1
- package/src/core/collection/set/ArraySet.js +11 -1
- package/src/core/math/physics/brdf/brdf_burley.d.ts.map +1 -1
- package/src/core/math/physics/brdf/brdf_burley.js +3 -14
- package/src/core/math/physics/bsdf/bsdf_schlick.js +1 -1
- package/src/core/math/physics/pdf/pdf_normal.d.ts +8 -0
- package/src/core/math/physics/pdf/pdf_normal.d.ts.map +1 -0
- package/src/core/math/physics/pdf/pdf_normal.js +11 -0
- package/src/core/math/physics/reflectivity_to_ior.d.ts.map +1 -1
- package/src/core/math/physics/reflectivity_to_ior.js +3 -1
- package/src/core/primitives/strings/computeStringHash.d.ts +9 -1
- package/src/core/primitives/strings/computeStringHash.d.ts.map +1 -1
- package/src/core/primitives/strings/computeStringHash.js +10 -5
- package/src/engine/graphics/sh3/gi/material/common.glsl +3 -2
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +4 -3
- package/src/engine/graphics/sh3/lpv/build_probes_for_scene.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/build_probes_for_scene.js +6 -3
- package/src/engine/graphics/sh3/prototypeSH3Probe.js +16 -12
- package/src/engine/graphics/shaders/DenoiseShader.d.ts.map +1 -1
- package/src/engine/graphics/shaders/DenoiseShader.js +3 -12
- package/src/engine/input/ecs/components/InputBinding.d.ts.map +1 -1
- package/src/engine/input/ecs/components/InputBinding.js +3 -2
- package/src/engine/input/ecs/components/InputController.d.ts.map +1 -1
- package/src/engine/input/ecs/components/InputController.js +18 -1
- package/src/engine/input/ecs/controllers/KeyboardCameraController.js +9 -9
|
@@ -8,8 +8,9 @@ export class InputBinding {
|
|
|
8
8
|
* @param {boolean} [exclusive=false]
|
|
9
9
|
*/
|
|
10
10
|
constructor({ path, listener, exclusive = false }) {
|
|
11
|
-
assert.
|
|
12
|
-
assert.
|
|
11
|
+
assert.isString(path, 'path');
|
|
12
|
+
assert.isFunction(listener, 'listener');
|
|
13
|
+
assert.isBoolean(exclusive, 'exclusive');
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputController.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/components/InputController.js"],"names":[],"mappings":";AAMA;
|
|
1
|
+
{"version":3,"file":"InputController.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/components/InputController.js"],"names":[],"mappings":";AAMA;IAqCI;;;OAGG;IACH,8CAaC;IArDD;;;;OAIG;IACH,8BAYC;IATG,mBAAyB;IAMzB;;MAEC;IAGL;;;;;OAKG;IACH,WAJW,MAAM,qBAEJ,YAAY,CAWxB;CAoBJ;;;;;iBA5DgB,0CAA0C;mBACxC,0CAA0C;6BAChC,mBAAmB"}
|
|
@@ -7,7 +7,7 @@ import { InputBinding } from "./InputBinding.js";
|
|
|
7
7
|
class InputController {
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
|
-
* @param {Array} bindings
|
|
10
|
+
* @param {Array} [bindings]
|
|
11
11
|
* @constructor
|
|
12
12
|
*/
|
|
13
13
|
constructor(bindings = []) {
|
|
@@ -24,6 +24,23 @@ class InputController {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param {string} path
|
|
30
|
+
* @param {function} action
|
|
31
|
+
* @returns {InputBinding}
|
|
32
|
+
*/
|
|
33
|
+
bind(path, action) {
|
|
34
|
+
assert.isFunction(action, 'action');
|
|
35
|
+
assert.isString(path, 'path');
|
|
36
|
+
|
|
37
|
+
const binding = new InputBinding({ path, listener: action });
|
|
38
|
+
|
|
39
|
+
this.mapping.add(binding);
|
|
40
|
+
|
|
41
|
+
return binding;
|
|
42
|
+
}
|
|
43
|
+
|
|
27
44
|
/**
|
|
28
45
|
*
|
|
29
46
|
* @param {Array} bindings
|
|
@@ -45,19 +45,19 @@ class KeyboardCameraController {
|
|
|
45
45
|
function registerToggle(keys, object, propertyName) {
|
|
46
46
|
keys.forEach((keyName) => {
|
|
47
47
|
|
|
48
|
-
inputController.
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
inputController.bind(
|
|
49
|
+
"keyboard/keys/" + keyName + "/down",
|
|
50
|
+
() => {
|
|
51
51
|
object[propertyName] = true;
|
|
52
52
|
|
|
53
53
|
//send interaction event
|
|
54
54
|
ecd.sendEvent(cameraController.entity, 'user-input');
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
inputController.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
);
|
|
57
|
+
inputController.bind(
|
|
58
|
+
"keyboard/keys/" + keyName + "/up",
|
|
59
|
+
() => object[propertyName] = false
|
|
60
|
+
);
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -89,7 +89,7 @@ class KeyboardCameraController {
|
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
const displacement = cameraPanSpeed.clone().multiplyScalar(keyboardPanSpeed * timeDelta);
|
|
93
93
|
|
|
94
94
|
const camera_transform = ecd.getComponent(cameraController.entity, Transform);
|
|
95
95
|
|