@woosh/meep-engine 2.119.57 → 2.119.59
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/editor/ecs/component/createObjectEditor.js +2 -0
- package/editor/tools/TransformTool.js +6 -5
- package/editor/tools/v2/TransformMode.d.ts +7 -0
- package/editor/tools/v2/TransformMode.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/core/collection/array/array_shift_back.d.ts +9 -0
- package/src/core/collection/array/array_shift_back.d.ts.map +1 -0
- package/src/core/collection/array/array_shift_back.js +20 -0
- package/src/core/events/signal/Signal.d.ts.map +1 -1
- package/src/core/events/signal/Signal.js +55 -1
- package/src/core/events/signal/SignalHandler.d.ts +5 -0
- package/src/core/events/signal/SignalHandler.d.ts.map +1 -1
- package/src/core/events/signal/SignalHandler.js +6 -0
- package/src/core/geom/3d/tetrahedra/delaunay/compute_delaunay_tetrahedral_mesh.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/delaunay/compute_delaunay_tetrahedral_mesh.js +2 -1
- package/src/engine/EngineHarness.d.ts +2 -2
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +1 -1
- package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js +1 -1
- package/src/engine/graphics/material/manager/MaterialManager.d.ts +6 -0
- package/src/engine/graphics/material/manager/MaterialManager.d.ts.map +1 -1
- package/src/engine/graphics/material/manager/MaterialManager.js +9 -0
- package/src/engine/graphics/sh3/gi/material/common.d.ts +1 -1
- package/src/engine/graphics/sh3/gi/material/common.js +1 -1
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.d.ts +7 -1
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.js +60 -0
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +1 -0
- package/src/engine/graphics/sh3/lpv/build_probes_for_scene.d.ts +8 -0
- 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 +38 -27
- package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.js +2 -0
- package/src/engine/graphics/sh3/lpv/util/lpv_visualise_probes.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/util/lpv_visualise_probes.js +6 -2
- package/src/engine/graphics/sh3/lpv_build_editor.d.ts +9 -0
- package/src/engine/graphics/sh3/lpv_build_editor.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv_build_editor.js +695 -0
- package/src/engine/graphics/sh3/prototypeSH3Probe.js +14 -1
- package/src/engine/graphics/sh3/shader/SH3VisualisationMaterial.d.ts +1 -0
- package/src/engine/graphics/sh3/shader/SH3VisualisationMaterial.d.ts.map +1 -1
- package/src/engine/graphics/sh3/shader/SH3VisualisationMaterial.js +9 -0
- package/src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.d.ts +1 -1
- package/src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.d.ts.map +1 -1
- package/src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.js +2 -5
- package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
- package/src/engine/input/devices/KeyboardDevice.js +23 -1
- package/editor/tools/SelectionTool.d.ts +0 -27
|
@@ -53,11 +53,13 @@ import { ShadedGeometrySystem } from "../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
|
53
53
|
import { three_object_to_entity_composition } from "../ecs/mesh-v2/three_object_to_entity_composition.js";
|
|
54
54
|
import { GizmoRenderingPlugin } from "../render/gizmo/GizmoRenderingPlugin.js";
|
|
55
55
|
import { MaterialTransformer } from "./gi/material/MaterialTransformer.js";
|
|
56
|
+
import { lpv_volume_bake_via_task } from "./lpv/build_probes_for_scene.js";
|
|
56
57
|
import { OctahedralDepthDebuggerWidget } from "./lpv/depth/octahedral/OctahedralDepthDebuggerWidget.js";
|
|
57
58
|
import { VLPDepthMapVisualisation } from "./lpv/depth/octahedral/v2/VLPDepthMapVisualisation.js";
|
|
58
59
|
import { LightProbeVolume } from "./lpv/LightProbeVolume.js";
|
|
59
60
|
import { lpv_obtain_storage_cached_volume } from "./lpv/lpv_obtain_storage_cached_volume.js";
|
|
60
61
|
import { lpv_visualize_probes } from "./lpv/util/lpv_visualise_probes.js";
|
|
62
|
+
import { lpv_build_editor } from "./lpv_build_editor.js";
|
|
61
63
|
|
|
62
64
|
/**
|
|
63
65
|
*
|
|
@@ -278,6 +280,7 @@ async function main(engine) {
|
|
|
278
280
|
enableLights: false,
|
|
279
281
|
// enableLights: true,
|
|
280
282
|
cameraFarDistance: 200,
|
|
283
|
+
cameraController: false,
|
|
281
284
|
focus: { x: 0, y: 0, z: 0 },
|
|
282
285
|
pitch: 1,
|
|
283
286
|
yaw: -1.54,
|
|
@@ -456,7 +459,7 @@ async function main(engine) {
|
|
|
456
459
|
});
|
|
457
460
|
|
|
458
461
|
const depth_viz = VLPDepthMapVisualisation.from(volume).build();
|
|
459
|
-
depth_viz.build(ecd);
|
|
462
|
+
// depth_viz.build(ecd);
|
|
460
463
|
|
|
461
464
|
// volume.visualize_mesh({ ecd, opacity: 0.5 });
|
|
462
465
|
|
|
@@ -509,12 +512,22 @@ async function main(engine) {
|
|
|
509
512
|
}
|
|
510
513
|
}, "depth_vis").name("Visualise Depth");
|
|
511
514
|
|
|
515
|
+
gui.add({
|
|
516
|
+
bake(){
|
|
517
|
+
volume.build_mesh();
|
|
518
|
+
|
|
519
|
+
lpv_volume_bake_via_task(volume, ecd, engine);
|
|
520
|
+
}
|
|
521
|
+
},"bake").name("Bake");
|
|
522
|
+
|
|
512
523
|
// makeDebugGizmo(engine, mesh_bounds.getCenter());
|
|
513
524
|
|
|
514
525
|
|
|
515
526
|
// mesh_entity.addEventListener(SGMeshEvents.AssetLoaded, build);
|
|
516
527
|
//
|
|
517
528
|
// mesh_entity.build(ecd);
|
|
529
|
+
|
|
530
|
+
lpv_build_editor({ engine, volume, path_key: path });
|
|
518
531
|
}
|
|
519
532
|
|
|
520
533
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SH3VisualisationMaterial.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/shader/SH3VisualisationMaterial.js"],"names":[],"mappings":"AAIA;IAEI,cAoBC;CAEJ;+
|
|
1
|
+
{"version":3,"file":"SH3VisualisationMaterial.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/shader/SH3VisualisationMaterial.js"],"names":[],"mappings":"AAIA;IAEI,cAoBC;IAED,wCAOC;CAEJ;+BArCuC,OAAO"}
|
|
@@ -26,4 +26,13 @@ export class SH3VisualisationMaterial extends ShaderMaterial {
|
|
|
26
26
|
})
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
fromArray(data, offset){
|
|
30
|
+
|
|
31
|
+
const uniform_value = this.uniforms.sh.value;
|
|
32
|
+
for (let i = 0; i < 9; i++) {
|
|
33
|
+
uniform_value[i].fromArray(data, offset + i * 3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {boolean} shadow
|
|
6
6
|
* @returns {ShadedGeometry}
|
|
7
7
|
*/
|
|
8
|
-
export function sh3_make_shaded_geometry(sh: number[], sh_offset: number, shadow
|
|
8
|
+
export function sh3_make_shaded_geometry(sh: number[], sh_offset: number, shadow?: boolean): ShadedGeometry;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
11
|
* @param {number} [size]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualise_spherical_harmonic_sphere.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,6CALW,MAAM,EAAE,aACR,MAAM,
|
|
1
|
+
{"version":3,"file":"visualise_spherical_harmonic_sphere.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,6CALW,MAAM,EAAE,aACR,MAAM,WACN,OAAO,GACL,cAAc,CAgB1B;AAED;;;;;;;;;;GAUG;AACH,yHATW,MAAM,GAOL,MAAM,CA0BjB;+BAhE8B,kCAAkC;mBAF9C,qBAAqB"}
|
|
@@ -14,13 +14,10 @@ const geometry = new OctahedronBufferGeometry(1, 5);
|
|
|
14
14
|
* @param {boolean} shadow
|
|
15
15
|
* @returns {ShadedGeometry}
|
|
16
16
|
*/
|
|
17
|
-
export function sh3_make_shaded_geometry(sh, sh_offset, shadow) {
|
|
17
|
+
export function sh3_make_shaded_geometry(sh, sh_offset, shadow=true) {
|
|
18
18
|
const mat = new SH3VisualisationMaterial();
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
for (let i = 0; i < 9; i++) {
|
|
22
|
-
uniform_value[i].fromArray(sh, sh_offset + i * 3);
|
|
23
|
-
}
|
|
20
|
+
mat.fromArray(sh,sh_offset);
|
|
24
21
|
|
|
25
22
|
const shadedGeometry = ShadedGeometry.from(geometry, mat);
|
|
26
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/KeyboardDevice.js"],"names":[],"mappings":";AAYA;IAgBI;;;OAGG;IACH,wBAFW,WAAW,GAAC,OAAO,EA+B7B;IA/CD;;OAEG;IACH;;;MAGE;IAEF;;;OAGG;IACH,mBAAU;IAkBN;;;OAGG;IACH,YAFU,WAAW,CAEO;
|
|
1
|
+
{"version":3,"file":"KeyboardDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/KeyboardDevice.js"],"names":[],"mappings":";AAYA;IAgBI;;;OAGG;IACH,wBAFW,WAAW,GAAC,OAAO,EA+B7B;IA/CD;;OAEG;IACH;;;MAGE;IAEF;;;OAGG;IACH,mBAAU;IAkBN;;;OAGG;IACH,YAFU,WAAW,CAEO;IAkFhC,cAGC;IAED,aAGC;;CACJ;mBA3IkB,uCAAuC"}
|
|
@@ -75,6 +75,8 @@ class KeyboardDevice {
|
|
|
75
75
|
|
|
76
76
|
this.on.down.send1(event);
|
|
77
77
|
|
|
78
|
+
let should_prevent_default = false;
|
|
79
|
+
|
|
78
80
|
//hook up dispatch handler for individual keys
|
|
79
81
|
const keyCode = event.keyCode;
|
|
80
82
|
const keyName = codeToKeyNameMap[keyCode];
|
|
@@ -82,7 +84,15 @@ class KeyboardDevice {
|
|
|
82
84
|
if (keyName !== undefined) {
|
|
83
85
|
const button = this.keys[keyName];
|
|
84
86
|
|
|
85
|
-
button.press()
|
|
87
|
+
button.press();
|
|
88
|
+
|
|
89
|
+
if(button.down.hasHandlers()){
|
|
90
|
+
should_prevent_default = true;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if(should_prevent_default){
|
|
95
|
+
event.preventDefault();
|
|
86
96
|
}
|
|
87
97
|
}
|
|
88
98
|
|
|
@@ -94,6 +104,8 @@ class KeyboardDevice {
|
|
|
94
104
|
#handlerKeyUp = (event) => {
|
|
95
105
|
this.on.up.send1(event);
|
|
96
106
|
|
|
107
|
+
let should_prevent_default = false;
|
|
108
|
+
|
|
97
109
|
//hook up dispatch handler for individual keys
|
|
98
110
|
const keyCode = event.keyCode;
|
|
99
111
|
|
|
@@ -103,7 +115,17 @@ class KeyboardDevice {
|
|
|
103
115
|
const button = this.keys[keyName];
|
|
104
116
|
|
|
105
117
|
button.release();
|
|
118
|
+
|
|
119
|
+
if(button.down.hasHandlers()){
|
|
120
|
+
should_prevent_default = true;
|
|
121
|
+
}
|
|
122
|
+
|
|
106
123
|
}
|
|
124
|
+
|
|
125
|
+
if(should_prevent_default){
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
}
|
|
128
|
+
|
|
107
129
|
}
|
|
108
130
|
|
|
109
131
|
start() {
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {Vector2} point
|
|
4
|
-
* @param {Engine} engine
|
|
5
|
-
* @param {THREE.Camera} camera
|
|
6
|
-
* @returns {number[]} entities
|
|
7
|
-
*/
|
|
8
|
-
export function pickingEntitySelection(point: Vector2, engine: Engine, camera: THREE.Camera): number[];
|
|
9
|
-
export default SelectionTool;
|
|
10
|
-
import Vector2 from '../../src/core/geom/Vector2.js';
|
|
11
|
-
import { Camera } from '../../src/engine/graphics/ecs/camera/Camera.js';
|
|
12
|
-
declare class SelectionTool extends Tool {
|
|
13
|
-
name: string;
|
|
14
|
-
anchorPoint: Vector2;
|
|
15
|
-
targetPoint: Vector2;
|
|
16
|
-
box: AABB2;
|
|
17
|
-
selectionMarker: SelectionView;
|
|
18
|
-
readPosition(target: any): void;
|
|
19
|
-
}
|
|
20
|
-
import Tool from './engine/Tool.js';
|
|
21
|
-
import AABB2 from '../../src/core/geom/2d/aabb/AABB2.js';
|
|
22
|
-
declare class SelectionView extends View<HTMLElement> {
|
|
23
|
-
constructor();
|
|
24
|
-
el: HTMLDivElement;
|
|
25
|
-
}
|
|
26
|
-
import View from '../../src/view/View.js';
|
|
27
|
-
//# sourceMappingURL=SelectionTool.d.ts.map
|