@woosh/meep-engine 2.39.40 → 2.39.43
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/core/binary/operations/ceilPowerOfTwo.spec.js +17 -0
- package/core/bvh2/aabb3/AABB3.js +6 -6
- package/core/bvh2/binary/2/BinaryUint32BVH.js +7 -1
- package/core/bvh2/binary/2/BinaryUint32BVH.spec.js +31 -1
- package/core/bvh2/bvh3/query/compute_tight_near_far_clipping_planes.spec.js +2 -2
- package/core/cache/Cache.js +6 -0
- package/core/collection/IteratorUtils.js +1 -0
- package/core/collection/queue/Deque.js +5 -2
- package/core/color/Color.js +22 -4
- package/core/color/hsluv/HSLuv.js +187 -0
- package/core/geom/3d/aabb/aabb3_matrix4_project.js +1 -0
- package/core/geom/3d/topology/simplify/simplifyTopoMesh2.js +1 -1
- package/core/primitives/strings/compareStrings.js +22 -0
- package/editor/Editor.js +2 -0
- package/editor/tools/v2/BlenderCameraOrientationGizmo.js +33 -11
- package/engine/EngineHarness.js +7 -0
- package/engine/asset/loaders/geometry/geometry/computeBufferAttributeHash.js +5 -6
- package/engine/asset/loaders/image/codec/Codec.js +9 -0
- package/engine/asset/loaders/image/codec/CodecWithFallback.js +52 -11
- package/engine/asset/loaders/image/codec/ThreadedImageDecoder.js +12 -0
- package/engine/asset/loaders/image/png/PNGReader.js +2 -1
- package/engine/asset/loaders/image/png/PNG_HEADER_BYTES.js +1 -0
- package/engine/computeStridedIntegerArrayHash.js +19 -0
- package/engine/ecs/EntityBuilder.d.ts +2 -0
- package/engine/ecs/gui/GUIElement.d.ts +3 -1
- package/engine/graphics/ecs/light/binding/fp/FPLightBinding.js +11 -2
- package/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -8
- package/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.d.ts +7 -0
- package/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.js +17 -1
- package/engine/graphics/geometry/optimization/merge/merge_geometry_hierarchy.js +336 -0
- package/engine/graphics/geometry/optimization/merge/prototypeGeometryMerge.js +176 -0
- package/engine/graphics/micron/build/hierarchy/buildAbstractPatchHierarchy.js +7 -3
- package/engine/graphics/micron/build/hierarchy/merge_patches.js +0 -1
- package/engine/graphics/micron/prototypeVirtualGeometry.js +3 -3
- package/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +32 -1
- package/engine/graphics/render/forward_plus/LightManager.js +58 -13
- package/engine/graphics/render/forward_plus/debug/createScreenGrid.js +192 -9
- package/engine/graphics/render/forward_plus/materials/FP_SHADER_CHUNK_ACCUMULATION.js +42 -1
- package/engine/graphics/render/forward_plus/materials/FP_SHADER_CHUNK_PREAMBLE.js +1 -0
- package/engine/graphics/render/forward_plus/materials/ForwardPlusThreeMaterial.js +5 -0
- package/engine/graphics/render/forward_plus/materials/fp_build_fragment_shader.js +1 -4
- package/engine/graphics/render/forward_plus/model/Decal.js +33 -5
- package/engine/graphics/render/forward_plus/model/PointLight.js +1 -1
- package/engine/graphics/render/forward_plus/plugin/MaterialTransformer.js +4 -0
- package/engine/graphics/render/forward_plus/prototype/prototypeLightManager.js +480 -12
- package/engine/graphics/render/forward_plus/query/query_bvh_frustum_from_texture.js +49 -29
- package/engine/graphics/texture/atlas/AbstractTextureAtlas.js +11 -0
- package/engine/graphics/texture/atlas/CachingTextureAtlas.js +34 -0
- package/engine/graphics/texture/atlas/ReferencedTextureAtlas.js +9 -1
- package/engine/graphics/texture/atlas/TextureAtlas.js +29 -16
- package/engine/graphics/texture/atlas/TextureAtlasDebugger.js +75 -19
- package/engine/graphics/texture/sampler/Sampler2D.d.ts +2 -0
- package/engine/graphics/texture/sampler/Sampler2D.js +49 -9
- package/engine/sound/ecs/SoundListenerSystem.js +5 -0
- package/engine/sound/ecs/emitter/SoundEmitter.js +12 -1
- package/package.json +1 -1
- package/samples/terrain/from_image_2.js +8 -2
- package/view/tooltip/TooltipManager.js +0 -95
|
@@ -9,12 +9,18 @@ import { ImageRGBADataLoader } from "../../engine/asset/loaders/image/ImageRGBAD
|
|
|
9
9
|
import TerrainSystem from "../../engine/ecs/terrain/ecs/TerrainSystem.js";
|
|
10
10
|
import WaterSystem from "../../engine/graphics/ecs/water/WaterSystem.js";
|
|
11
11
|
import Water from "../../engine/graphics/ecs/water/Water.js";
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
AmbientOcclusionPostProcessEffect
|
|
14
|
+
} from "../../engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
13
15
|
import { TerrainLayer } from "../../engine/ecs/terrain/ecs/layers/TerrainLayer.js";
|
|
14
16
|
import Mesh from "../../engine/graphics/ecs/mesh/Mesh.js";
|
|
15
17
|
import { Transform } from "../../engine/ecs/transform/Transform.js";
|
|
16
18
|
import { MeshSystem } from "../../engine/graphics/ecs/mesh/MeshSystem.js";
|
|
17
19
|
import { enableEditor } from "../../editor/enableEditor.js";
|
|
20
|
+
import "../../../../../css/main.scss";
|
|
21
|
+
import '../../../../../css/editor/EntityEditorView.scss';
|
|
22
|
+
import '../../../../../css/editor/EditorView.scss';
|
|
23
|
+
import { initializeEditor } from "../../../model/game/initializeEditor.js";
|
|
18
24
|
|
|
19
25
|
const HEIGHT_RANGE = 64;
|
|
20
26
|
|
|
@@ -209,7 +215,7 @@ async function init(harness) {
|
|
|
209
215
|
|
|
210
216
|
await makeConfig(engine).apply(engine);
|
|
211
217
|
|
|
212
|
-
enableEditor(engine);
|
|
218
|
+
enableEditor(engine,initializeEditor);
|
|
213
219
|
|
|
214
220
|
await eh.initialize();
|
|
215
221
|
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @enum {number}
|
|
4
|
-
*/
|
|
5
1
|
import EmptyView from "../elements/EmptyView.js";
|
|
6
2
|
import AABB2 from "../../core/geom/AABB2.js";
|
|
7
3
|
import Task from "../../core/process/task/Task.js";
|
|
@@ -14,97 +10,6 @@ import { assert } from "../../core/assert.js";
|
|
|
14
10
|
import { GMLEngine } from "./gml/GMLEngine.js";
|
|
15
11
|
import { frameThrottle } from "../../engine/graphics/FrameThrottle.js";
|
|
16
12
|
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {Element} node
|
|
20
|
-
* @param {AABB2} result
|
|
21
|
-
*/
|
|
22
|
-
export function readNodeAABB(node, result) {
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @type {ClientRect | DOMRect}
|
|
26
|
-
*/
|
|
27
|
-
const rect = node.getBoundingClientRect();
|
|
28
|
-
|
|
29
|
-
result.set(rect.left, rect.top, rect.right, rect.bottom);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @param {Element} node
|
|
35
|
-
* @param {number} x
|
|
36
|
-
* @param {number} y
|
|
37
|
-
*/
|
|
38
|
-
function pickElementsByPosition(node, x, y) {
|
|
39
|
-
const aabb2 = new AABB2();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const hits = [];
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* @param {Element} node
|
|
47
|
-
* @param {number} level
|
|
48
|
-
*/
|
|
49
|
-
function test(node, level) {
|
|
50
|
-
|
|
51
|
-
let i;
|
|
52
|
-
|
|
53
|
-
readNodeAABB(node, aabb2);
|
|
54
|
-
|
|
55
|
-
if (aabb2.containsPoint(x, y)) {
|
|
56
|
-
hits.push({
|
|
57
|
-
node,
|
|
58
|
-
level
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
const children = node.children;
|
|
62
|
-
|
|
63
|
-
const numChildren = children.length;
|
|
64
|
-
|
|
65
|
-
for (i = 0; i < numChildren; i++) {
|
|
66
|
-
const element = children[i];
|
|
67
|
-
|
|
68
|
-
test(element, level + 1);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
test(node, 0);
|
|
74
|
-
|
|
75
|
-
//sort the elements by their depth
|
|
76
|
-
hits.sort(function (a, b) {
|
|
77
|
-
return a.level - b.level;
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const result = hits.map(function (element) {
|
|
81
|
-
return element.node;
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
return result;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
class Tooltip {
|
|
88
|
-
constructor() {
|
|
89
|
-
this.sourceElement = null;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
*
|
|
93
|
-
* @type {TooltipView|null}
|
|
94
|
-
*/
|
|
95
|
-
this.tipView = null;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @param {Tooltip} other
|
|
101
|
-
*/
|
|
102
|
-
equals(other) {
|
|
103
|
-
return this.sourceElement === other.sourceElement && this.code === other.code;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
13
|
class TooltipManager {
|
|
109
14
|
|
|
110
15
|
constructor() {
|