@woosh/meep-engine 2.119.58 → 2.119.60
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/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
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {LightProbeVolume} volume
|
|
4
|
+
* @param {EntityComponentDataset} ecd
|
|
5
|
+
* @param {Engine} engine
|
|
6
|
+
* @return {Promise<void>}
|
|
7
|
+
*/
|
|
8
|
+
export function lpv_volume_bake_via_task(volume: LightProbeVolume, ecd: EntityComponentDataset, engine: Engine): Promise<void>;
|
|
1
9
|
/**
|
|
2
10
|
*
|
|
3
11
|
* @param {LightProbeVolume} volume
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_probes_for_scene.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/build_probes_for_scene.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AACH,iFAPW,gBAAgB,GAKd,QAAQ,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"build_probes_for_scene.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/build_probes_for_scene.js"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH,iDALW,gBAAgB,gDAGf,QAAQ,IAAI,CAAC,CA8BxB;AAED;;;;;;;;GAQG;AACH,iFAPW,gBAAgB,GAKd,QAAQ,gBAAgB,CAAC,CAuErC;iCAtHgC,uBAAuB"}
|
|
@@ -10,6 +10,43 @@ import { makeSimpleTaskProgressView } from "../../../makeSimpleTaskProgressView.
|
|
|
10
10
|
import { LightProbeVolume } from "./LightProbeVolume.js";
|
|
11
11
|
import { LightProbeVolumeBaker } from "./LightProbeVolumeBaker.js";
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param {LightProbeVolume} volume
|
|
16
|
+
* @param {EntityComponentDataset} ecd
|
|
17
|
+
* @param {Engine} engine
|
|
18
|
+
* @return {Promise<void>}
|
|
19
|
+
*/
|
|
20
|
+
export async function lpv_volume_bake_via_task(volume, ecd, engine) {
|
|
21
|
+
const lpv_baker = new LightProbeVolumeBaker();
|
|
22
|
+
const task = lpv_baker.bake(volume, ecd);
|
|
23
|
+
// console.profileEnd('lpv build');
|
|
24
|
+
|
|
25
|
+
const progress = makeSimpleTaskProgressView({
|
|
26
|
+
task,
|
|
27
|
+
localization: engine.localization,
|
|
28
|
+
size: new Vector2(512, 64)
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const progress_entity = new Entity();
|
|
32
|
+
progress_entity
|
|
33
|
+
.add(GUIElement.fromView(progress))
|
|
34
|
+
.add(ViewportPosition.fromJSON({
|
|
35
|
+
position: new Vector2(0, 1),
|
|
36
|
+
anchor: new Vector2(0, 1),
|
|
37
|
+
offset: new Vector2(16, -16)
|
|
38
|
+
}))
|
|
39
|
+
.build(ecd);
|
|
40
|
+
|
|
41
|
+
task.promise().finally(() => progress_entity.destroy())
|
|
42
|
+
|
|
43
|
+
engine.executor.runGroup(task);
|
|
44
|
+
|
|
45
|
+
console.log(volume);
|
|
46
|
+
|
|
47
|
+
await task.promise();
|
|
48
|
+
}
|
|
49
|
+
|
|
13
50
|
/**
|
|
14
51
|
*
|
|
15
52
|
* @param {LightProbeVolume} volume
|
|
@@ -85,33 +122,7 @@ export async function build_probes_for_scene(
|
|
|
85
122
|
|
|
86
123
|
console.timeEnd('Grid Build');
|
|
87
124
|
|
|
88
|
-
|
|
89
|
-
const task = lpv_baker.bake(volume, ecd);
|
|
90
|
-
// console.profileEnd('lpv build');
|
|
91
|
-
|
|
92
|
-
const progress = makeSimpleTaskProgressView({
|
|
93
|
-
task,
|
|
94
|
-
localization: engine.localization,
|
|
95
|
-
size: new Vector2(512, 64)
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
const progress_entity = new Entity();
|
|
99
|
-
progress_entity
|
|
100
|
-
.add(GUIElement.fromView(progress))
|
|
101
|
-
.add(ViewportPosition.fromJSON({
|
|
102
|
-
position: new Vector2(0, 1),
|
|
103
|
-
anchor: new Vector2(0, 1),
|
|
104
|
-
offset: new Vector2(16, -16)
|
|
105
|
-
}))
|
|
106
|
-
.build(ecd);
|
|
107
|
-
|
|
108
|
-
task.promise().finally(() => progress_entity.destroy())
|
|
109
|
-
|
|
110
|
-
engine.executor.runGroup(task);
|
|
111
|
-
|
|
112
|
-
console.log(volume);
|
|
113
|
-
|
|
114
|
-
await task.promise();
|
|
125
|
+
await lpv_volume_bake_via_task(volume, ecd, engine);
|
|
115
126
|
|
|
116
127
|
return volume;
|
|
117
128
|
}
|
package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightProbeVolumeSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.js"],"names":[],"mappings":"AAGA;IAEI,+BAAwB;IAGxB;;;;OAIG;IACH,8BAFW,gBAAgB,QAiB1B;IAED;;;;OAIG;IACH,gCAFW,gBAAgB,
|
|
1
|
+
{"version":3,"file":"LightProbeVolumeSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.js"],"names":[],"mappings":"AAGA;IAEI,+BAAwB;IAGxB;;;;OAIG;IACH,8BAFW,gBAAgB,QAiB1B;IAED;;;;OAIG;IACH,gCAFW,gBAAgB,QAoB1B;CACJ;gDAtD+C,mEAAmE;iCAClF,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lpv_visualise_probes.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/sh3/lpv/util/lpv_visualise_probes.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lpv_visualise_probes.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/sh3/lpv/util/lpv_visualise_probes.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,kFAFa,UAAU,CA0BtB;2BAnC0B,sCAAsC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Tag from "../../../../ecs/components/Tag.js";
|
|
1
2
|
import { EntityNode } from "../../../../ecs/parent/EntityNode.js";
|
|
2
3
|
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
3
4
|
import { sh3_make_shaded_geometry } from "../../visualise_spherical_harmonic_sphere.js";
|
|
@@ -18,10 +19,13 @@ export function lpv_visualize_probes({ volume, size = 0.2, shadow = false }) {
|
|
|
18
19
|
const probe_node = new EntityNode();
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
probe_node.entity
|
|
22
|
-
|
|
22
|
+
const entity = probe_node.entity;
|
|
23
|
+
|
|
24
|
+
entity.add(new Transform());
|
|
25
|
+
entity.add(
|
|
23
26
|
sh3_make_shaded_geometry(volume.harmonics, i * 3 * 9, shadow)
|
|
24
27
|
);
|
|
28
|
+
entity.add(Tag.fromOne('LPV/probe'));
|
|
25
29
|
|
|
26
30
|
probe_node.transform.position.fromArray(volume.points, i * 3);
|
|
27
31
|
probe_node.transform.scale.setScalar(size);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {Engine} engine
|
|
4
|
+
* @param {LightProbeVolume} volume
|
|
5
|
+
* @param {string} [path_key]
|
|
6
|
+
* @param {number} [placement_surface_offset] How far to place new probes away from the surface
|
|
7
|
+
*/
|
|
8
|
+
export function lpv_build_editor({ engine, volume, path_key, placement_surface_offset }: Engine): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=lpv_build_editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lpv_build_editor.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/sh3/lpv_build_editor.js"],"names":[],"mappings":"AAmMA;;;;;;GAMG;AACH,gHA4eC"}
|