@woosh/meep-engine 2.119.104 → 2.119.105
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/package.json +1 -1
- package/src/core/cache/Cache.d.ts.map +1 -1
- package/src/core/cache/Cache.js +13 -6
- package/src/core/collection/map/HashMap.d.ts.map +1 -1
- package/src/core/collection/map/HashMap.js +1 -0
- package/src/core/geom/3d/topology/struct/binary/BinaryTopology.d.ts +4 -0
- package/src/core/geom/3d/topology/struct/binary/BinaryTopology.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/BinaryTopology.js +4 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_disk_edge_remove.d.ts +8 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_disk_edge_remove.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_disk_edge_remove.js +9 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_edge_kill.d.ts +6 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_edge_kill.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_edge_kill.js +26 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_face_kill.d.ts +7 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_face_kill.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_face_kill.js +8 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_index_geometry_to_topology.js +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_edge.d.ts +8 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_edge.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_edge.js +9 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_face.d.ts +8 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_face.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_face.js +9 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_vert.d.ts +7 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_vert.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_kill_only_vert.js +8 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_merge_verts_by_distance.d.ts +18 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_merge_verts_by_distance.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_merge_verts_by_distance.js +83 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_vert_kill.d.ts +7 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_vert_kill.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_vert_kill.js +18 -0
- package/src/core/geom/vec3/v3_array_equals.d.ts +9 -0
- package/src/core/geom/vec3/v3_array_equals.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_array_equals.js +13 -0
- package/src/core/process/worker/OnDemandWorkerManager.d.ts +4 -3
- package/src/core/process/worker/OnDemandWorkerManager.d.ts.map +1 -1
- package/src/core/process/worker/OnDemandWorkerManager.js +12 -5
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../../src/core/cache/Cache.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,mBAHa,GAAG,EAAE,KAAK;IAYnB;;;;;;;;OAQG;IACH,sGARW,MAAM,EAuFhB;IAxDG;;;;OAIG;IACH,mBAA4B;IAE5B;;;;OAIG;IACH,qBAAgC;IAEhC;;;;OAIG;IACH,gBAAmB;IACnB;;;;OAIG;IACH,eAAkB;IAGlB;;;;OAIG;IACH,aAIE;IAEF;;;OAGG;IACH,WAFU,MAAM,CAAC,GAAG,EAAC,KAAK,CAAC,CAEE;IAE7B;;;OAGG;IACH,WAFU,MAAM,CAAC,GAAG,EAAC,KAAK,CAAC,CAEE;IAE7B;;;OAGG;IACH,OAFU,MAAM,CAAC,GAAG,EAAC,KAAK,CAAC,CAEF;IAG7B;;;;;OAKG;IACH,kBAyBC;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;OAEG;IACH,+BAEC;IAUD;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../../src/core/cache/Cache.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,mBAHa,GAAG,EAAE,KAAK;IAYnB;;;;;;;;OAQG;IACH,sGARW,MAAM,EAuFhB;IAxDG;;;;OAIG;IACH,mBAA4B;IAE5B;;;;OAIG;IACH,qBAAgC;IAEhC;;;;OAIG;IACH,gBAAmB;IACnB;;;;OAIG;IACH,eAAkB;IAGlB;;;;OAIG;IACH,aAIE;IAEF;;;OAGG;IACH,WAFU,MAAM,CAAC,GAAG,EAAC,KAAK,CAAC,CAEE;IAE7B;;;OAGG;IACH,WAFU,MAAM,CAAC,GAAG,EAAC,KAAK,CAAC,CAEE;IAE7B;;;OAGG;IACH,OAFU,MAAM,CAAC,GAAG,EAAC,KAAK,CAAC,CAEF;IAG7B;;;;;OAKG;IACH,kBAyBC;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;OAEG;IACH,+BAEC;IAUD;;;OAGG;IACH,sBAFW,MAAM,EAiBhB;IAED,iBAnBW,MAAM,CAqBhB;IA/BD;;;OAGG;IACH,cAFa,MAAM,CAIlB;IA2BD;;;;OAIG;IACH,wBAaC;IAED;;;;;;OAMG;IACH,yBAHW,GAAG,GACD,OAAO,CAgCnB;IAED;;;;;OAKG;IACH,6BAUC;IAED;;;OAGG;IACH,sBAFa,YAAY,CAAC,GAAG,EAAC,KAAK,CAAC,GAAC,IAAI,CAIxC;IAED;;;OAGG;IACH,YAFa,OAAO,CAkBnB;IAED;;;OAGG;IACH,+BAFW,MAAM,QAWhB;IAED;;;;OAIG;IACH,SAHW,GAAG,SACH,KAAK,QAwEf;IAED;;;;OAIG;IACH,cAHW,GAAG,GACD,OAAO,CAInB;IAED;;;;OAIG;IACH,SAHW,GAAG,GACD,KAAK,GAAC,IAAI,CAYtB;IAGD;;;;;;OAMG;IACH,kBALW,GAAG,WACH,CAAS,IAAG,EAAH,GAAG,KAAE,KAAK,oBACnB,GAAC,GACA,KAAK,CAchB;IAED;;;;OAIG;IACH,wBAqBC;IAED;;;;OAIG;IACH,YAHW,GAAG,GACD,OAAO,CAgBnB;IAED;;;;;OAKG;IACH,kBAHW,GAAG,GACD,OAAO,CAanB;IAED;;OAEG;IACH,cAcC;IAED;;;OAGG;IACH,aAOC;IAED;;;;;OAKG;IACH,kCAHW,GAAC,GACC,OAAO,CAMnB;IAGL;;;OAGG;IACH,6CAAmB;IAEnB;;;OAGG;IACH,+BA5FiB,OAAO,CA4FF;IAEtB;;;OAGG;IACH,4BA9KiB,OAAO,CA8KL;;CAlBlB;mBAviBkB,4BAA4B;6BAKlB,mBAAmB"}
|
package/src/core/cache/Cache.js
CHANGED
|
@@ -171,16 +171,23 @@ export class Cache {
|
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
173
|
* Will cause evictions if current weight is smaller than what we're setting
|
|
174
|
-
* @param {number}
|
|
174
|
+
* @param {number} weight
|
|
175
175
|
*/
|
|
176
|
-
set maxWeight(
|
|
177
|
-
if (typeof
|
|
178
|
-
throw new Error(`Weight must be a non-negative number, instead was '${
|
|
176
|
+
set maxWeight(weight) {
|
|
177
|
+
if (typeof weight !== "number" || weight < 0) {
|
|
178
|
+
throw new Error(`Weight must be a non-negative number, instead was '${weight}'`);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
this.#maxWeight
|
|
181
|
+
const old_limit = this.#maxWeight;
|
|
182
182
|
|
|
183
|
-
this
|
|
183
|
+
this.#maxWeight = weight;
|
|
184
|
+
|
|
185
|
+
if (old_limit > weight) {
|
|
186
|
+
|
|
187
|
+
// shrinking, let's make sure we are upholding the constraint
|
|
188
|
+
this.evictUntilWeight(this.#maxWeight);
|
|
189
|
+
|
|
190
|
+
}
|
|
184
191
|
}
|
|
185
192
|
|
|
186
193
|
get maxWeight() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HashMap.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/map/HashMap.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;GAYG;AACH,uFAIC;AA8FD;;;;;;;GAOG;AACH,qBAHa,CAAC,EAAC,CAAC;IAkEZ;;;;;;OAMG;IACH,6EALW,CAAS,IAAC,EAAD,GAAC,KAAE,MAAM,EAsC5B;IAtGD;;;;OAIG;IACH,QAFU,WAAW,CAED;IAEpB;;;OAGG;IACH,WAFU,KAAK,CAAC,YAAY,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,CAET;IAEzB;;;OAGG;IACH,iBAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,iBAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,QAFU,MAAM,CAEL;IAEX,oBAAgB;IAEhB;;;OAGG;IACH,2BAFU,MAAM,CAEc;IAE9B,iCAA6B;IAE7B,qCAAiC;IAEjC;;;OAGG;IACH,kBAFU,MAAM,CAEK;IAErB;;;;OAIG;IACH,sBAAoC;IAEpC;;;OAGG;IACH,WAFU,MAAM,CAEF;IAwBV;;;;;OAKG;IACH,iCAAsC;IACtC;;;;;OAKG;IACH,qCAA8C;IAOlD,mBAEC;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IA2CD;;;;;OAKG;IACH,0BAUC;IAsGD;;;;OAIG;IACH,SAHW,CAAC,SACD,CAAC,QA0EX;IAED;;;;OAIG;IACH,SAHW,CAAC,GACC,CAAC,GAAC,SAAS,CA+BvB;IAED;;;;;;;;OAQG;IACH,kBALW,CAAC,WACD,CAAS,IAAC,EAAD,CAAC,KAAE,CAAC,oBACb,GAAC,GACA,CAAC,CAgBZ;IAED;;;;;OAKG;IACH,cAJW,CAAC,SACD,CAAC,GACA,CAAC,
|
|
1
|
+
{"version":3,"file":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BD,2CA0BC;IAED;;;;OAIG;IACH,SAHW,CAAC,GACC,OAAO,CAInB;IAED;;OAEG;IACH,cA6BC;IA+BD;;;OAGG;IACH,UAFa,QAAQ,CAAC,CAAC,CAAC,CAOvB;IAED;;;OAGG;IACH,QAFa,QAAQ,CAAC,CAAC,CAAC,CAMvB;IAhDD,yDA2BC;;CAsBJ;AAl1BD;;GAEG;AACH,2BAFa,CAAC,EAAC,CAAC;IAGZ;;;;;OAKG;IACH,iBAJW,CAAC,SACD,CAAC,QACD,MAAM,EAsBhB;IAlBG;;;OAGG;IACH,KAFU,CAAC,CAEG;IAEd;;;OAGG;IACH,OAFU,CAAC,CAEO;IAElB;;;OAGG;IACH,MAFU,MAAM,CAEA;CAGvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BinaryTopology.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/geom/3d/topology/struct/binary/BinaryTopology.js"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,2BAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH;IACI;;;;;;;;OAQG;IACH,sBAA4F;IAC5F;;;;;;;;;OASG;IACH,oBAAsD;IACtD;;;;;;;;;;;;OAYG;IACH,oBAAsD;IACtD;;;;;;OAMG;IACH,oBAAsE;IAGtE;;;OAGG;IACH,gBAFY,MAAM,CAQjB;IAED,aAKC;IAED,
|
|
1
|
+
{"version":3,"file":"BinaryTopology.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/geom/3d/topology/struct/binary/BinaryTopology.js"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,2BAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH;IACI;;;;;;;;OAQG;IACH,sBAA4F;IAC5F;;;;;;;;;OASG;IACH,oBAAsD;IACtD;;;;;;;;;;;;OAYG;IACH,oBAAsD;IACtD;;;;;;OAMG;IACH,oBAAsE;IAGtE;;;OAGG;IACH,gBAFY,MAAM,CAQjB;IAED,aAKC;IAED;;;OAGG;IAC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,2BAHW,MAAM,GACJ,MAAM,CAWlB;IAED;;;;OAIG;IACH,4BAFW,MAAM,SADN,MAAM,QAUhB;IAED,sBAMC;IAED;;;OAGG;IACH,oBAFW,MAAM,QAOhB;IAED;;;OAGG;IACH,qBAHW,MAAM,GACJ,MAAM,CAQlB;IAED;;;;OAIG;IACH,sBAFW,MAAM,SADN,MAAM,QAQhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,MAAM,CAOlB;IAED;;;;OAIG;IACH,oBAFW,MAAM,SADN,MAAM,QAQhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,MAAM,CAOlB;IAED;;;;OAIG;IACH,oBAFW,MAAM,SADN,MAAM,QAUhB;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,CAQlB;IAED;;;;OAIG;IACH,2BAFW,MAAM,SADN,MAAM,QAShB;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,CAQlB;IAED;;;;OAIG;IACH,2BAFW,MAAM,SADN,MAAM,QAShB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,MAAM,CAOlB;IAED;;;;OAIG;IACH,oBAFW,MAAM,SADN,MAAM,QAQhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,MAAM,CAOlB;IAED;;;;OAIG;IACH,oBAFW,MAAM,SADN,MAAM,QAQhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,MAAM,CAOlB;IAED;;;;OAIG;IACH,oBAFW,MAAM,SADN,MAAM,QAQhB;CACJ;kCA5mBiC,wBAAwB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://github.com/blender/blender/blob/afb0d411072db51b871607034befe3677f9fd82d/source/blender/bmesh/intern/bmesh_structure.cc#L162
|
|
3
|
+
* @param {BinaryTopology} mesh
|
|
4
|
+
* @param {number} edge
|
|
5
|
+
* @param {number} vertex
|
|
6
|
+
*/
|
|
7
|
+
export function bt_disk_edge_remove(mesh: BinaryTopology, edge: number, vertex: number): void;
|
|
8
|
+
//# sourceMappingURL=bt_disk_edge_remove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_disk_edge_remove.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_disk_edge_remove.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0CAJW,cAAc,QACd,MAAM,UACN,MAAM,QAIhB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://github.com/blender/blender/blob/afb0d411072db51b871607034befe3677f9fd82d/source/blender/bmesh/intern/bmesh_structure.cc#L162
|
|
3
|
+
* @param {BinaryTopology} mesh
|
|
4
|
+
* @param {number} edge
|
|
5
|
+
* @param {number} vertex
|
|
6
|
+
*/
|
|
7
|
+
export function bt_disk_edge_remove(mesh, edge, vertex) {
|
|
8
|
+
throw new Error('Not Implemented');
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_edge_kill.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_edge_kill.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,mCAHW,cAAc,KACd,MAAM,QAkBhB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NULL_POINTER } from "../BinaryTopology.js";
|
|
2
|
+
import { bt_disk_edge_remove } from "./bt_disk_edge_remove.js";
|
|
3
|
+
import { bt_face_kill } from "./bt_face_kill.js";
|
|
4
|
+
import { bt_kill_only_edge } from "./bt_kill_only_edge.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @param {BinaryTopology} mesh
|
|
8
|
+
* @param {number} e
|
|
9
|
+
*/
|
|
10
|
+
export function bt_edge_kill(mesh, e) {
|
|
11
|
+
let l = NULL_POINTER;
|
|
12
|
+
|
|
13
|
+
while ((l = mesh.edge_read_loop(e)) !== NULL_POINTER) {
|
|
14
|
+
const face = mesh.loop_read_face(l);
|
|
15
|
+
|
|
16
|
+
bt_face_kill(mesh, face);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const v1 = mesh.edge_read_vertex1(e);
|
|
20
|
+
const v2 = mesh.edge_read_vertex2(e);
|
|
21
|
+
|
|
22
|
+
bt_disk_edge_remove(mesh, e, v1);
|
|
23
|
+
bt_disk_edge_remove(mesh, e, v2);
|
|
24
|
+
|
|
25
|
+
bt_kill_only_edge(mesh, e);
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_face_kill.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_face_kill.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mCAHW,cAAc,KACd,MAAM,QAIhB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* low level function, only frees the edge,
|
|
3
|
+
* doesn't change or adjust surrounding geometry
|
|
4
|
+
* @param {BinaryTopology} mesh
|
|
5
|
+
* @param {number} e
|
|
6
|
+
*/
|
|
7
|
+
export function bt_kill_only_edge(mesh: BinaryTopology, e: number): void;
|
|
8
|
+
//# sourceMappingURL=bt_kill_only_edge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_kill_only_edge.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_kill_only_edge.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wCAHW,cAAc,KACd,MAAM,QAIhB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* low level function, only frees the face,
|
|
3
|
+
* doesn't change or adjust surrounding geometry
|
|
4
|
+
* @param {BinaryTopology} mesh
|
|
5
|
+
* @param {number} f
|
|
6
|
+
*/
|
|
7
|
+
export function bt_kill_only_face(mesh: BinaryTopology, f: number): void;
|
|
8
|
+
//# sourceMappingURL=bt_kill_only_face.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_kill_only_face.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_kill_only_face.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wCAHW,cAAc,KACd,MAAM,QAIhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_kill_only_vert.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_kill_only_vert.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wCAHW,cAAc,KACd,MAAM,QAIhB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patch mesh structure to make all loops/edges/faces point to this new replacement vertex instead of the victim
|
|
3
|
+
* This effectively removes any usage of the victim from the mesh enabling us to safely remove it
|
|
4
|
+
* @param {BinaryTopology} mesh
|
|
5
|
+
* @param {number} victim
|
|
6
|
+
* @param {number} replacement
|
|
7
|
+
*/
|
|
8
|
+
export function bt_replace_vertex(mesh: BinaryTopology, victim: number, replacement: number): void;
|
|
9
|
+
/**
|
|
10
|
+
* Only considers distance, no other attributes are accounted for
|
|
11
|
+
* Performs operation in-place
|
|
12
|
+
* IMPORTANT: Assumes vertices are compacted, that is - there are no holes in the vertex element pool
|
|
13
|
+
* @param {BinaryTopology} mesh
|
|
14
|
+
* @param {number[]} mesh_bounds bounding box of the mesh, required for quantization
|
|
15
|
+
* @param {number} [max_distance] distance between vertices within which we perform the merge
|
|
16
|
+
*/
|
|
17
|
+
export function bt_merge_verts_by_distance(mesh: BinaryTopology, mesh_bounds: number[], max_distance?: number): void;
|
|
18
|
+
//# sourceMappingURL=bt_merge_verts_by_distance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_merge_verts_by_distance.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_merge_verts_by_distance.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wCAJW,cAAc,UACd,MAAM,eACN,MAAM,QAIhB;AAED;;;;;;;GAOG;AACH,iDAJW,cAAc,eACd,MAAM,EAAE,iBACR,MAAM,QA6DhB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { HashMap } from "../../../../../../collection/map/HashMap.js";
|
|
2
|
+
import { v3_distance_sqr } from "../../../../../vec3/v3_distance_sqr.js";
|
|
3
|
+
import v3_morton_encode from "../../../../morton/v3_morton_encode.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Patch mesh structure to make all loops/edges/faces point to this new replacement vertex instead of the victim
|
|
7
|
+
* This effectively removes any usage of the victim from the mesh enabling us to safely remove it
|
|
8
|
+
* @param {BinaryTopology} mesh
|
|
9
|
+
* @param {number} victim
|
|
10
|
+
* @param {number} replacement
|
|
11
|
+
*/
|
|
12
|
+
export function bt_replace_vertex(mesh, victim, replacement) {
|
|
13
|
+
throw new Error("Not Implemented");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Only considers distance, no other attributes are accounted for
|
|
18
|
+
* Performs operation in-place
|
|
19
|
+
* IMPORTANT: Assumes vertices are compacted, that is - there are no holes in the vertex element pool
|
|
20
|
+
* @param {BinaryTopology} mesh
|
|
21
|
+
* @param {number[]} mesh_bounds bounding box of the mesh, required for quantization
|
|
22
|
+
* @param {number} [max_distance] distance between vertices within which we perform the merge
|
|
23
|
+
*/
|
|
24
|
+
export function bt_merge_verts_by_distance(
|
|
25
|
+
mesh,
|
|
26
|
+
mesh_bounds,
|
|
27
|
+
max_distance = 0.0001
|
|
28
|
+
) {
|
|
29
|
+
const max_distance2 = max_distance * max_distance;
|
|
30
|
+
|
|
31
|
+
const v0 = new Float32Array(3);
|
|
32
|
+
const v1 = new Float32Array(3);
|
|
33
|
+
|
|
34
|
+
// 10 bit quantization
|
|
35
|
+
const e_x = 1023 / (mesh_bounds[3] - mesh_bounds[0]);
|
|
36
|
+
const e_y = 1023 / (mesh_bounds[4] - mesh_bounds[1]);
|
|
37
|
+
const e_z = 1023 / (mesh_bounds[5] - mesh_bounds[2]);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {HashMap<number,number>}
|
|
42
|
+
*/
|
|
43
|
+
const vertex_hash = new HashMap({
|
|
44
|
+
keyHashFunction(vertex_index) {
|
|
45
|
+
mesh.vertex_read_coordinate(v0, 0, vertex_index);
|
|
46
|
+
|
|
47
|
+
return v3_morton_encode(
|
|
48
|
+
Math.round((v0[0] - mesh_bounds[0]) * e_x),
|
|
49
|
+
Math.round((v0[1] - mesh_bounds[1]) * e_y),
|
|
50
|
+
Math.round((v0[2] - mesh_bounds[2]) * e_z)
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
keyEqualityFunction(a, b) {
|
|
54
|
+
mesh.vertex_read_coordinate(v0, 0, a);
|
|
55
|
+
mesh.vertex_read_coordinate(v1, 0, b);
|
|
56
|
+
|
|
57
|
+
const d2 = v3_distance_sqr(
|
|
58
|
+
v0[0], v0[1], v0[2],
|
|
59
|
+
v1[0], v1[1], v1[2],
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
return d2 <= max_distance2;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const vertices = mesh.vertices;
|
|
67
|
+
let vertex_count = vertices.size;
|
|
68
|
+
|
|
69
|
+
for (let vertex = 1; vertex < vertex_count; vertex++) {
|
|
70
|
+
const master_vertex = vertex_hash.getOrSet(vertex, vertex);
|
|
71
|
+
|
|
72
|
+
if (master_vertex === vertex) {
|
|
73
|
+
// no collisions, vertex was hashed
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// got a collision, need to remove the vertex
|
|
78
|
+
// let's take over all data from this vertex
|
|
79
|
+
|
|
80
|
+
bt_replace_vertex(mesh, vertex, master_vertex);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://github.com/blender/blender/blob/afb0d411072db51b871607034befe3677f9fd82d/source/blender/bmesh/intern/bmesh_core.cc#L977
|
|
3
|
+
* @param {BinaryTopology} mesh
|
|
4
|
+
* @param {number} v
|
|
5
|
+
*/
|
|
6
|
+
export function bt_vert_kill(mesh: BinaryTopology, v: number): void;
|
|
7
|
+
//# sourceMappingURL=bt_vert_kill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_vert_kill.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/io/bt_vert_kill.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,mCAHW,cAAc,KACd,MAAM,QAShB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NULL_POINTER } from "../BinaryTopology.js";
|
|
2
|
+
import { bt_edge_kill } from "./bt_edge_kill.js";
|
|
3
|
+
import { bt_kill_only_vert } from "./bt_kill_only_vert.js";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @see https://github.com/blender/blender/blob/afb0d411072db51b871607034befe3677f9fd82d/source/blender/bmesh/intern/bmesh_core.cc#L977
|
|
8
|
+
* @param {BinaryTopology} mesh
|
|
9
|
+
* @param {number} v
|
|
10
|
+
*/
|
|
11
|
+
export function bt_vert_kill(mesh, v) {
|
|
12
|
+
let e = NULL_POINTER;
|
|
13
|
+
while ((e = mesh.vertex_read_edge(v)) !== NULL_POINTER) {
|
|
14
|
+
bt_edge_kill(mesh, e);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
bt_kill_only_vert(mesh, v);
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {number[]|Float32Array} a
|
|
4
|
+
* @param {number} a_offset
|
|
5
|
+
* @param {number[]|Float32Array} b
|
|
6
|
+
* @param {number} b_offset
|
|
7
|
+
*/
|
|
8
|
+
export function v3_array_equals(a: number[] | Float32Array, a_offset: number, b: number[] | Float32Array, b_offset: number): boolean;
|
|
9
|
+
//# sourceMappingURL=v3_array_equals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3_array_equals.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_array_equals.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mCALW,MAAM,EAAE,GAAC,YAAY,YACrB,MAAM,KACN,MAAM,EAAE,GAAC,YAAY,YACrB,MAAM,WAOhB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {number[]|Float32Array} a
|
|
4
|
+
* @param {number} a_offset
|
|
5
|
+
* @param {number[]|Float32Array} b
|
|
6
|
+
* @param {number} b_offset
|
|
7
|
+
*/
|
|
8
|
+
export function v3_array_equals(a, a_offset, b, b_offset) {
|
|
9
|
+
return a[a_offset] === b[b_offset]
|
|
10
|
+
&& a[a_offset + 1] === b[b_offset + 1]
|
|
11
|
+
&& a[a_offset + 2] === b[b_offset + 2]
|
|
12
|
+
;
|
|
13
|
+
}
|
|
@@ -28,10 +28,10 @@ export class OnDemandWorkerManager {
|
|
|
28
28
|
*/
|
|
29
29
|
worker: WorkerProxy;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @param {number}
|
|
31
|
+
* Configure how long to wait after processing a request until deciding to shut down the worker
|
|
32
|
+
* @param {number} delay_ms In milliseconds
|
|
33
33
|
*/
|
|
34
|
-
setTimeout(
|
|
34
|
+
setTimeout(delay_ms: number): void;
|
|
35
35
|
/**
|
|
36
36
|
* @private
|
|
37
37
|
*/
|
|
@@ -54,6 +54,7 @@ export class OnDemandWorkerManager {
|
|
|
54
54
|
*/
|
|
55
55
|
private increment;
|
|
56
56
|
/**
|
|
57
|
+
* Submit request to the worker
|
|
57
58
|
* @template T
|
|
58
59
|
* @param {string} name
|
|
59
60
|
* @param {Array} [parameters]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnDemandWorkerManager.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/worker/OnDemandWorkerManager.js"],"names":[],"mappings":"AAEA;IAwBI;;;OAGG;IACH,oBAFW,WAAW,EAOrB;IA/BD;;;;OAIG;IACH,wBAAoB;IAEpB;;;;;OAKG;IACH,kBAAiB;IAEjB;;;;OAIG;IACH,8BAA2B;IAOvB;;OAEG;IACH,QAFU,WAAW,CAED;IAGxB;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"OnDemandWorkerManager.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/worker/OnDemandWorkerManager.js"],"names":[],"mappings":"AAEA;IAwBI;;;OAGG;IACH,oBAFW,WAAW,EAOrB;IA/BD;;;;OAIG;IACH,wBAAoB;IAEpB;;;;;OAKG;IACH,kBAAiB;IAEjB;;;;OAIG;IACH,8BAA2B;IAOvB;;OAEG;IACH,QAFU,WAAW,CAED;IAGxB;;;OAGG;IACH,qBAFW,MAAM,QAMhB;IAED;;OAEG;IACH,kBAKC;IAED;;OAEG;IACH,mCASC;IAED;;;OAGG;IACH,6BAFW,MAAM,QAMhB;IAED;;OAEG;IACH,kBAMC;IAED;;OAEG;IACH,kBAiBC;IAGD;;;;;;OAMG;IACH,QALa,CAAC,QACH,MAAM,uBAEL,OAAO,CAAC,CAAC,CAAC,CAWrB;CACJ"}
|
|
@@ -36,13 +36,13 @@ export class OnDemandWorkerManager {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @param {number}
|
|
39
|
+
* Configure how long to wait after processing a request until deciding to shut down the worker
|
|
40
|
+
* @param {number} delay_ms In milliseconds
|
|
41
41
|
*/
|
|
42
|
-
setTimeout(
|
|
43
|
-
assert.isNonNegativeInteger(
|
|
42
|
+
setTimeout(delay_ms) {
|
|
43
|
+
assert.isNonNegativeInteger(delay_ms, 'v');
|
|
44
44
|
|
|
45
|
-
this.__timeout =
|
|
45
|
+
this.__timeout = delay_ms;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -97,9 +97,15 @@ export class OnDemandWorkerManager {
|
|
|
97
97
|
this.__request_count++;
|
|
98
98
|
|
|
99
99
|
if (!this.worker.isRunning()) {
|
|
100
|
+
|
|
101
|
+
// worker is down, start it
|
|
102
|
+
|
|
100
103
|
this.worker.start();
|
|
104
|
+
|
|
101
105
|
} else if (this.__pending_termination >= 0) {
|
|
102
106
|
|
|
107
|
+
// worker is up, but we're in the termination timeout period, lets clear that
|
|
108
|
+
|
|
103
109
|
clearInterval(this.__pending_termination);
|
|
104
110
|
this.__pending_termination = -1;
|
|
105
111
|
|
|
@@ -108,6 +114,7 @@ export class OnDemandWorkerManager {
|
|
|
108
114
|
|
|
109
115
|
|
|
110
116
|
/**
|
|
117
|
+
* Submit request to the worker
|
|
111
118
|
* @template T
|
|
112
119
|
* @param {string} name
|
|
113
120
|
* @param {Array} [parameters]
|