@woosh/meep-engine 2.112.1 → 2.113.2
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-image-decoder.js +1 -1
- package/build/bundle-worker-terrain.js +1 -1
- package/build/meep.cjs +5 -2
- package/build/meep.module.js +5 -2
- package/editor/Editor.js +2 -0
- package/package.json +1 -1
- package/src/core/binary/BinaryBuffer.d.ts +7 -1
- package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
- package/src/core/binary/BinaryBuffer.js +17 -2
- package/src/core/binary/platform_compute_endianness.d.ts +8 -0
- package/src/core/binary/platform_compute_endianness.d.ts.map +1 -0
- package/src/core/binary/platform_compute_endianness.js +29 -0
- package/src/core/binary/type/DataTypeIndices.d.ts +1 -0
- package/src/core/binary/type/DataTypeIndices.d.ts.map +1 -1
- package/src/core/binary/type/DataTypeIndices.js +2 -1
- package/src/core/collection/CuckooFilter.d.ts +3 -0
- package/src/core/collection/CuckooFilter.d.ts.map +1 -1
- package/src/core/collection/CuckooFilter.js +8 -5
- package/src/core/collection/SCRATCH_UINT32_TRAVERSAL_STACK.js +1 -1
- package/src/core/collection/queue/Deque.d.ts.map +1 -1
- package/src/core/collection/queue/Deque.js +4 -1
- package/src/core/collection/table/RowFirstTableSpec.d.ts +2 -2
- package/src/core/collection/table/RowFirstTableSpec.d.ts.map +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +11 -7
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +8 -3
- package/src/core/geom/3d/topology/simplify/collapseEdge.d.ts.map +1 -1
- package/src/core/geom/3d/topology/simplify/collapseEdge.js +8 -23
- package/src/core/geom/3d/topology/struct/TopoEdge.d.ts +1 -0
- package/src/core/geom/3d/topology/struct/TopoEdge.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoEdge.js +35 -36
- package/src/core/geom/3d/topology/struct/TopoMesh.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoMesh.js +18 -21
- package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoTriangle.js +24 -26
- package/src/core/geom/3d/topology/struct/TopoVertex.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoVertex.js +37 -70
- package/src/engine/scene/SerializedScene.d.ts.map +1 -1
- package/src/engine/scene/SerializedScene.js +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopoTriangle.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/topology/struct/TopoTriangle.js"],"names":[],"mappings":";AASA;
|
|
1
|
+
{"version":3,"file":"TopoTriangle.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/topology/struct/TopoTriangle.js"],"names":[],"mappings":";AASA;IACI;;;OAGG;IACH,OAFU,MAAM,CAEQ;IACxB;;;OAGG;IACH,UAFU,YAAY,CAER;IACd;;;OAGG;IACH,OAFU,UAAU,CAET;IAEX;;;OAGG;IACH,QAFU,MAAM,EAAE,GAAC,IAAI,CAEJ;IAEnB,uBAEC;IAED;;;OAGG;IACH,YAFW,YAAY,QAQtB;IAED,sBAMC;IAED;;;;OAIG;IACH,+BAFY,OAAO,CA0ClB;IAED;;;OAGG;IACH,YAFY,OAAO,CAKlB;IAED;;;;OAIG;IACH,6DAEC;IAED;;;;OAIG;IACH,mEAIC;IAED;;OAEG;IACH,gCASC;IAED;;OAEG;IACH,eAmBC;IAED;;;OAGG;IACH,2BAIC;IAED;;;;OAIG;IACH,4BAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,8BAMC;IAED;;;;OAIG;IACH,8BAFa,OAAO,CAKnB;IAED,sBAaC;IAGD;;;;OAIG;IACH,mBAHW,MAAM,4BAQhB;IAED;;;;OAIG;IACH,oCAFY,OAAO,CAIlB;IAED;;;;;OAKG;IACH,0BAJW,YAAY,EAAE,iBACd,MAAM,GACJ,MAAM,CA8BlB;IAGL;;;OAGG;IACH,qBAFU,OAAO,CAEgB;CANhC;qBA3RoB,WAAW"}
|
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { array_push_if_unique } from "../../../../collection/array/array_push_if_unique.js";
|
|
1
|
+
import { vec3 } from "gl-matrix";
|
|
3
2
|
import { assert } from "../../../../assert.js";
|
|
3
|
+
import { array_push_if_unique } from "../../../../collection/array/array_push_if_unique.js";
|
|
4
4
|
import { array_remove_first } from "../../../../collection/array/array_remove_first.js";
|
|
5
|
-
import {
|
|
5
|
+
import { array_replace_all } from "../../../../collection/array/array_replace_all.js";
|
|
6
6
|
import { compute_triangle_normal } from "../../compute_triangle_normal.js";
|
|
7
7
|
|
|
8
8
|
let index_counter = 0;
|
|
9
9
|
|
|
10
10
|
export class TopoTriangle {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this.normal = [0, 0, 0];
|
|
33
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* Identifying index, can be used to link back to buffer-geometry face by index or any other useful ID purposes
|
|
13
|
+
* @type {number}
|
|
14
|
+
*/
|
|
15
|
+
index = index_counter++;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type {TopoVertex[]}
|
|
19
|
+
*/
|
|
20
|
+
vertices = [];
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {TopoEdge[]}
|
|
24
|
+
*/
|
|
25
|
+
edges = [];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {number[]|vec3}
|
|
30
|
+
*/
|
|
31
|
+
normal = [0, 0, 0];
|
|
34
32
|
|
|
35
33
|
get byteSize() {
|
|
36
34
|
return 80 + 4 * 4 + 4 + this.vertices.length * 8 + 10 + this.edges.length * 8 + 10 + 8 * 3 + 10;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopoVertex.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/topology/struct/TopoVertex.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopoVertex.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/topology/struct/TopoVertex.js"],"names":[],"mappings":"AAMA;IAEI;;;OAGG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,OAFU,UAAU,CAET;IAEX;;;OAGG;IACH,OAFU,cAAc,CAEb;IAEX;;;OAGG;IACH,GAFU,MAAM,CAEV;IACN;;;OAGG;IACH,GAFU,MAAM,CAEV;IACN;;;OAGG;IACH,GAFU,MAAM,CAEV;IAEN,gBAEC;IAED,gBAEC;IAED,gBAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,YAFW,UAAU,QAYpB;IAED;;OAEG;IACH,SAFa,UAAU,CAQtB;IAED;;;;OAIG;IACH,+BAFY,OAAO,CA8BlB;IAED;;;;OAIG;IACH,kBAHW,UAAU,GACT,MAAM,CAWjB;IAED;;;OAGG;IACH,+BAKC;IAED;;;;OAIG;IACH,gCAFY,OAAO,CAMlB;IAED;;;;OAIG;IACH,kCAFY,OAAO,CAKlB;IAED;;;OAGG;IACH,kCAKC;IAED;;;OAGG;IACH,2BAMC;IAED;;;;OAIG;IACH,4BAFY,OAAO,CAOlB;IAED;;;;OAIG;IACH,2DAaC;IAED;;;;OAIG;IACH,8BAFa,OAAO,CAMnB;IAED;;;;OAIG;IACH,yBAFa,OAAO,CAWnB;IAED;;;;OAIG;IACH,6BAFW,UAAU,QAIpB;IAED;;;;;OAKG;IACH,iCAJW,UAAU,EAAE,iBACZ,MAAM,GACJ,MAAM,CAoBlB;IAGL;;;OAGG;IACH,uBAFU,OAAO,CAEgB;CANhC"}
|
|
@@ -2,43 +2,43 @@ import { assert } from "../../../../assert.js";
|
|
|
2
2
|
import { array_push_if_unique } from "../../../../collection/array/array_push_if_unique.js";
|
|
3
3
|
import { array_remove_first } from "../../../../collection/array/array_remove_first.js";
|
|
4
4
|
import { v3_distance } from "../../../vec3/v3_distance.js";
|
|
5
|
+
import { query_vertex_in_edge } from "../query/query_vertex_in_edge.js";
|
|
5
6
|
|
|
6
7
|
export class TopoVertex {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Identification number, expected to be unique within a given topology
|
|
11
|
+
* @type {number}
|
|
12
|
+
*/
|
|
13
|
+
index = 0;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @type {TopoEdge[]}
|
|
18
|
+
*/
|
|
19
|
+
edges = [];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {TopoTriangle[]}
|
|
24
|
+
*/
|
|
25
|
+
faces = [];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {number}
|
|
30
|
+
*/
|
|
31
|
+
x = 0;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {number}
|
|
35
|
+
*/
|
|
36
|
+
y = 0;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
*/
|
|
41
|
+
z = 0;
|
|
42
42
|
|
|
43
43
|
get 0() {
|
|
44
44
|
return this.x;
|
|
@@ -113,7 +113,7 @@ export class TopoVertex {
|
|
|
113
113
|
for (let i = 0; i < edge_count; i++) {
|
|
114
114
|
const edge = edges[i];
|
|
115
115
|
|
|
116
|
-
if (!edge
|
|
116
|
+
if (!query_vertex_in_edge(edge, this)) {
|
|
117
117
|
error_consumer(`Missing back-link from edge[${i}]`);
|
|
118
118
|
valid = false;
|
|
119
119
|
}
|
|
@@ -258,40 +258,7 @@ export class TopoVertex {
|
|
|
258
258
|
* @param {TopoVertex} victim
|
|
259
259
|
*/
|
|
260
260
|
replaceAnotherVertex(victim) {
|
|
261
|
-
|
|
262
|
-
assert.notNull(victim, 'victim');
|
|
263
|
-
assert.equal(victim.isTopoVertex, true, "victim.isTopoVertex !== true");
|
|
264
|
-
assert.notEqual(this, victim, "cannot replace self");
|
|
265
|
-
|
|
266
|
-
const faces = victim.faces;
|
|
267
|
-
const face_count = faces.length;
|
|
268
|
-
|
|
269
|
-
let i = 0;
|
|
270
|
-
|
|
271
|
-
for (; i < face_count; i++) {
|
|
272
|
-
// take over the victim's faces
|
|
273
|
-
const face = faces[i];
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
// face.computeNormal(); // DEBUG
|
|
277
|
-
face.replaceVertex(victim, this);
|
|
278
|
-
|
|
279
|
-
this.addUniqueFace(face);
|
|
280
|
-
|
|
281
|
-
// face.computeNormal(); // DEBUG
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
const edges = victim.edges;
|
|
285
|
-
const edge_count = edges.length;
|
|
286
|
-
|
|
287
|
-
for (i = 0; i < edge_count; i++) {
|
|
288
|
-
// take over the victim's edges
|
|
289
|
-
const edge = edges[i];
|
|
290
|
-
|
|
291
|
-
edge.replaceVertex(victim, this);
|
|
292
|
-
|
|
293
|
-
this.addUniqueEdge(edge);
|
|
294
|
-
}
|
|
261
|
+
throw new Error(`deprecated, use "tm_vert_splice" instead`)
|
|
295
262
|
}
|
|
296
263
|
|
|
297
264
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerializedScene.d.ts","sourceRoot":"","sources":["../../../../src/engine/scene/SerializedScene.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SerializedScene.d.ts","sourceRoot":"","sources":["../../../../src/engine/scene/SerializedScene.js"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,0CALW,MAAM,gDAGJ,QAAQ,IAAI,CAAC,CASzB;AAED;;;;;;GAMG;AACH,qDALW,MAAM,gDAGJ,aAAa,CAyBzB;AAED;IACI;;;;OAIG;IACH,4BAHW,MAAM,EAOhB;IADG,UAAgB;IAIpB,gHAcC;CACJ;yBApFwB,2CAA2C"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { GameAssetType } from "../asset/GameAssetType.js";
|
|
2
|
-
import BinaryBufferDeSerializer from "../ecs/storage/BinaryBufferDeSerializer.js";
|
|
3
|
-
import { EncodingBinaryBuffer } from "../../core/binary/EncodingBinaryBuffer.js";
|
|
4
|
-
import { assert } from "../../core/assert.js";
|
|
5
1
|
import { MirScene } from "../../../../model/game/scenes/MirScene.js";
|
|
2
|
+
import { assert } from "../../core/assert.js";
|
|
3
|
+
import { EncodingBinaryBuffer } from "../../core/binary/EncodingBinaryBuffer.js";
|
|
4
|
+
import { EndianType } from "../../core/binary/EndianType.js";
|
|
6
5
|
import { emptyTask } from "../../core/process/task/util/emptyTask.js";
|
|
6
|
+
import { GameAssetType } from "../asset/GameAssetType.js";
|
|
7
|
+
import BinaryBufferDeSerializer from "../ecs/storage/BinaryBufferDeSerializer.js";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -44,6 +45,8 @@ export async function createSceneDeserializationTask(path, ecd, engine) {
|
|
|
44
45
|
|
|
45
46
|
const binaryBuffer = new EncodingBinaryBuffer();
|
|
46
47
|
|
|
48
|
+
binaryBuffer.endianness = EndianType.BigEndian;
|
|
49
|
+
|
|
47
50
|
binaryBuffer.fromArrayBuffer(buffer);
|
|
48
51
|
|
|
49
52
|
const task = deSerializer.process(binaryBuffer, engine, ecd);
|