@woosh/meep-engine 2.120.0 → 2.120.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/README.md +1 -1
- package/package.json +1 -1
- package/src/core/binary/FLOAT32_MAX.d.ts +2 -0
- package/src/core/binary/FLOAT32_MAX.d.ts.map +1 -0
- package/src/core/binary/FLOAT32_MAX.js +1 -0
- package/src/core/collection/RingBuffer.d.ts +2 -3
- package/src/core/collection/RingBuffer.d.ts.map +1 -1
- package/src/core/collection/RingBuffer.js +9 -4
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/color/Color.js +15 -1
- package/src/core/geom/2d/circle/Circle.d.ts +7 -5
- package/src/core/geom/2d/circle/Circle.d.ts.map +1 -1
- package/src/core/geom/2d/circle/Circle.js +7 -5
- package/src/core/geom/2d/circle/circle_area.d.ts +7 -0
- package/src/core/geom/2d/circle/circle_area.d.ts.map +1 -0
- package/src/core/geom/2d/circle/circle_area.js +8 -0
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Quaternion.js +57 -23
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +32 -0
- package/src/core/geom/mat2/M2_IDENTITY.d.ts +6 -0
- package/src/core/geom/mat2/M2_IDENTITY.d.ts.map +1 -0
- package/src/core/geom/mat2/M2_IDENTITY.js +8 -0
- package/src/core/geom/mat2/m2_is_diagonal.d.ts +8 -0
- package/src/core/geom/mat2/m2_is_diagonal.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_is_diagonal.js +9 -0
- package/src/core/geom/mat2/m2_is_orthogonal.d.ts +8 -0
- package/src/core/geom/mat2/m2_is_orthogonal.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_is_orthogonal.js +23 -0
- package/src/core/geom/mat2/m2_transpose.d.ts +9 -0
- package/src/core/geom/mat2/m2_transpose.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_transpose.js +17 -0
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts +7 -5
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts.map +1 -1
- package/src/core/graph/graph_compute_adjacency_matrix.js +11 -5
- package/src/core/graph/graph_compute_distance_matrix.d.ts.map +1 -1
- package/src/core/graph/graph_compute_distance_matrix.js +30 -56
- package/src/core/graph/graph_compute_laplacian_matrix.d.ts +6 -6
- package/src/core/graph/graph_compute_laplacian_matrix.js +6 -6
- package/src/core/json/abstractJSONDeserializer.d.ts.map +1 -1
- package/src/core/json/abstractJSONDeserializer.js +7 -1
- package/src/core/math/bell_membership_function.d.ts.map +1 -1
- package/src/core/math/bell_membership_function.js +6 -1
- package/src/core/math/linalg/m2/m2_polar_decomp.d.ts +19 -0
- package/src/core/math/linalg/m2/m2_polar_decomp.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_polar_decomp.js +27 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.d.ts +15 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.js +32 -0
- package/src/core/math/linalg/m2/m2_svd.d.ts +19 -0
- package/src/core/math/linalg/m2/m2_svd.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_svd.js +96 -0
- package/src/core/math/linalg/solve_linear_system_GEPP_2x2.d.ts +1 -1
- package/src/core/math/linalg/solve_linear_system_GEPP_2x2.js +1 -1
- package/src/core/model/node-graph/node/NodeDescription.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeDescription.js +14 -0
- package/src/core/model/node-graph/type/DataType.d.ts.map +1 -1
- package/src/core/model/node-graph/type/DataType.js +4 -0
- package/src/core/process/WatchDog.d.ts +41 -12
- package/src/core/process/WatchDog.d.ts.map +1 -1
- package/src/core/process/WatchDog.js +47 -16
- package/src/engine/development/performance/RingBufferMetric.d.ts +1 -1
- package/src/engine/development/performance/RingBufferMetric.d.ts.map +1 -1
- package/src/engine/ecs/Entity.js +2 -2
- package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +31 -13
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +10 -1
- package/src/engine/ecs/EntityObserver.d.ts.map +1 -1
- package/src/engine/ecs/EntityObserver.js +2 -10
- package/src/engine/ecs/EntityReference.d.ts +10 -2
- package/src/engine/ecs/EntityReference.d.ts.map +1 -1
- package/src/engine/ecs/EntityReference.js +24 -6
- package/src/engine/ecs/terrain/ecs/Terrain.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationAdapter.js +3 -3
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.d.ts +4 -0
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.js +24 -0
- package/src/engine/ecs/terrain/ecs/splat/SplatMapping.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/splat/SplatMapping.js +3 -9
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.d.ts.map +1 -1
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +14 -8
- package/src/engine/ecs/transform/Transform.d.ts +5 -1
- package/src/engine/ecs/transform/Transform.d.ts.map +1 -1
- package/src/engine/ecs/transform/Transform.js +5 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +349 -50
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts +3 -0
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/DieBehavior.js +4 -0
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts +17 -0
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts.map +1 -0
- package/src/engine/intelligence/behavior/ecs/KillBehavior.js +47 -0
- package/src/engine/intelligence/blackboard/BlackboardStack.d.ts +1 -1
- package/src/engine/intelligence/blackboard/BlackboardStack.js +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.js +3 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.js +3 -7
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.d.ts +5 -0
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.d.ts.map +1 -0
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.js +19 -0
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts +1 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.js +9 -114
- package/src/engine/physics/mls-mpm/README.md +5 -0
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts +7 -6
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.js +51 -43
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts +0 -48
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts.map +0 -1
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts.map +0 -1
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts.map +0 -1
- package/editor/actions/concrete/SelectionAddAction.d.ts.map +0 -1
- package/editor/actions/concrete/SelectionClearAction.d.ts.map +0 -1
- package/editor/actions/concrete/SelectionRemoveAction.d.ts.map +0 -1
- package/editor/actions/concrete/TransformModifyAction.d.ts.map +0 -1
- package/editor/actions/concrete/WriteGridValueAction.d.ts.map +0 -1
- package/src/engine/ecs/read_entity_reference.d.ts +0 -9
- package/src/engine/ecs/read_entity_reference.d.ts.map +0 -1
- package/src/engine/ecs/read_entity_reference.js +0 -15
- package/src/engine/physics/ammo/Body.js +0 -103
- package/src/engine/physics/ammo/PhysicsWorker.d.ts +0 -72
- package/src/engine/physics/ammo/PhysicsWorker.d.ts.map +0 -1
- package/src/engine/physics/ammo/PhysicsWorker.js +0 -437
- package/src/engine/physics/ammo/World.d.ts +0 -68
- package/src/engine/physics/ammo/World.d.ts.map +0 -1
- package/src/engine/physics/ammo/World.js +0 -336
- package/src/engine/physics/ammo/shapes/BoxShape.d.ts +0 -10
- package/src/engine/physics/ammo/shapes/BoxShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/BoxShape.js +0 -11
- package/src/engine/physics/ammo/shapes/CapsuleShape.d.ts +0 -9
- package/src/engine/physics/ammo/shapes/CapsuleShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/CapsuleShape.js +0 -10
- package/src/engine/physics/ammo/shapes/MeshShape.d.ts +0 -8
- package/src/engine/physics/ammo/shapes/MeshShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/MeshShape.js +0 -9
- package/src/engine/physics/ammo/shapes/PlaneShape.d.ts +0 -11
- package/src/engine/physics/ammo/shapes/PlaneShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/PlaneShape.js +0 -14
- package/src/engine/physics/ammo/shapes/Shape.d.ts +0 -7
- package/src/engine/physics/ammo/shapes/Shape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/Shape.js +0 -9
- package/src/engine/physics/ammo/shapes/SphereShape.d.ts +0 -8
- package/src/engine/physics/ammo/shapes/SphereShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/SphereShape.js +0 -9
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.d.ts +0 -15
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.d.ts.map +0 -1
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.js +0 -196
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if m * m^T is close to the identity matrix.
|
|
3
|
+
* @param {number[]} m
|
|
4
|
+
* @param {number} [tolerance]
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
export function m2_is_orthogonal(m: number[], tolerance?: number): boolean;
|
|
8
|
+
//# sourceMappingURL=m2_is_orthogonal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m2_is_orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/mat2/m2_is_orthogonal.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,oCAJW,MAAM,EAAE,cACR,MAAM,GACJ,OAAO,CAenB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { m2_multiply } from "./m2_multiply.js";
|
|
2
|
+
import { m2_transpose } from "./m2_transpose.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Check if m * m^T is close to the identity matrix.
|
|
6
|
+
* @param {number[]} m
|
|
7
|
+
* @param {number} [tolerance]
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export function m2_is_orthogonal(m, tolerance = 1e-6) {
|
|
11
|
+
|
|
12
|
+
const mt = m2_transpose([], m);
|
|
13
|
+
const m_mt = [];
|
|
14
|
+
|
|
15
|
+
m2_multiply(m_mt, m, mt);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
Math.abs(m_mt[0] - 1) < tolerance &&
|
|
19
|
+
Math.abs(m_mt[1]) < tolerance &&
|
|
20
|
+
Math.abs(m_mt[2]) < tolerance &&
|
|
21
|
+
Math.abs(m_mt[3] - 1) < tolerance
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transposes a 2x2 matrix, stored in a flattened array.
|
|
3
|
+
*
|
|
4
|
+
* @param {number[]} out Output: The transposed matrix. Can be the same array as `m`.
|
|
5
|
+
* @param {number[]} m Input: The 2x2 matrix to transpose, stored as a flattened array [a, b, c, d], representing [[a, c], [b, d]].
|
|
6
|
+
* @returns {number[]} The `out` parameter.
|
|
7
|
+
*/
|
|
8
|
+
export function m2_transpose(out: number[], m: number[]): number[];
|
|
9
|
+
//# sourceMappingURL=m2_transpose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m2_transpose.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/mat2/m2_transpose.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,kCAJW,MAAM,EAAE,KACR,MAAM,EAAE,GACN,MAAM,EAAE,CAWpB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transposes a 2x2 matrix, stored in a flattened array.
|
|
3
|
+
*
|
|
4
|
+
* @param {number[]} out Output: The transposed matrix. Can be the same array as `m`.
|
|
5
|
+
* @param {number[]} m Input: The 2x2 matrix to transpose, stored as a flattened array [a, b, c, d], representing [[a, c], [b, d]].
|
|
6
|
+
* @returns {number[]} The `out` parameter.
|
|
7
|
+
*/
|
|
8
|
+
export function m2_transpose(out, m) {
|
|
9
|
+
const b = m[1]; // Cache m[1] (which becomes m[2] after the swap)
|
|
10
|
+
|
|
11
|
+
out[0] = m[0];
|
|
12
|
+
out[1] = m[2];
|
|
13
|
+
out[2] = b; // Use the cached value
|
|
14
|
+
out[3] = m[3];
|
|
15
|
+
|
|
16
|
+
return out;
|
|
17
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @
|
|
6
|
-
* @param {
|
|
2
|
+
* Computes the adjacency matrix of a graph.
|
|
3
|
+
* Writes 1 to matrix elements where nodes are connected, leaves existing values where there are no connections.
|
|
4
|
+
* Does NOT zero-fill the matrix before writing.
|
|
5
|
+
* @template T Type of the graph's nodes.
|
|
6
|
+
* @param {Graph<T>} graph Input graph.
|
|
7
|
+
* @param {SquareMatrix} result Output: Adjacency matrix (modified in-place).
|
|
8
|
+
* @param {Map<T,number>} node_indices Map from graph nodes to matrix indices.
|
|
7
9
|
*/
|
|
8
10
|
export function graph_compute_adjacency_matrix<T>(graph: Graph<T>, result: SquareMatrix, node_indices: Map<T, number>): void;
|
|
9
11
|
//# sourceMappingURL=graph_compute_adjacency_matrix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_compute_adjacency_matrix.d.ts","sourceRoot":"","sources":["../../../../src/core/graph/graph_compute_adjacency_matrix.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_compute_adjacency_matrix.d.ts","sourceRoot":"","sources":["../../../../src/core/graph/graph_compute_adjacency_matrix.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,+CALa,CAAC,SACH,KAAK,CAAC,CAAC,CAAC,UACR,YAAY,gBACZ,GAAG,CAAC,CAAC,EAAC,MAAM,CAAC,QAevB"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { assert } from "../assert.js";
|
|
1
2
|
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @
|
|
8
|
-
* @param {
|
|
5
|
+
* Computes the adjacency matrix of a graph.
|
|
6
|
+
* Writes 1 to matrix elements where nodes are connected, leaves existing values where there are no connections.
|
|
7
|
+
* Does NOT zero-fill the matrix before writing.
|
|
8
|
+
* @template T Type of the graph's nodes.
|
|
9
|
+
* @param {Graph<T>} graph Input graph.
|
|
10
|
+
* @param {SquareMatrix} result Output: Adjacency matrix (modified in-place).
|
|
11
|
+
* @param {Map<T,number>} node_indices Map from graph nodes to matrix indices.
|
|
9
12
|
*/
|
|
10
13
|
export function graph_compute_adjacency_matrix(graph, result, node_indices) {
|
|
11
14
|
const edges = graph.getEdges();
|
|
@@ -14,6 +17,9 @@ export function graph_compute_adjacency_matrix(graph, result, node_indices) {
|
|
|
14
17
|
const a = node_indices.get(edge.first);
|
|
15
18
|
const b = node_indices.get(edge.second);
|
|
16
19
|
|
|
20
|
+
assert.isNonNegativeInteger(a, 'a');
|
|
21
|
+
assert.isNonNegativeInteger(b, 'b');
|
|
22
|
+
|
|
17
23
|
result.setCellValue(a, b, 1);
|
|
18
24
|
result.setCellValue(b, a, 1);
|
|
19
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_compute_distance_matrix.d.ts","sourceRoot":"","sources":["../../../../src/core/graph/graph_compute_distance_matrix.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_compute_distance_matrix.d.ts","sourceRoot":"","sources":["../../../../src/core/graph/graph_compute_distance_matrix.js"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,8CAPa,CAAC,SACH,KAAK,CAAC,CAAC,CAAC,cACR,CAAC,EAAE,WACH,MAAM,EAAE,kBACR,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GACZ,YAAY,CAgExB;6BA1E4B,gCAAgC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { BitSet } from "../binary/BitSet.js";
|
|
2
1
|
import { BinaryDataType } from "../binary/type/BinaryDataType.js";
|
|
3
|
-
import
|
|
2
|
+
import { Deque } from "../collection/queue/Deque.js";
|
|
4
3
|
import { SquareMatrix } from "../math/matrix/SquareMatrix.js";
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -18,86 +17,61 @@ export function graph_compute_distance_matrix(graph, node_array, targets, node_i
|
|
|
18
17
|
|
|
19
18
|
const m_distances = new SquareMatrix(node_count, BinaryDataType.Float32);
|
|
20
19
|
|
|
21
|
-
const flags = BitSet.fixedSize(node_count);
|
|
22
|
-
|
|
23
20
|
// initialize distances
|
|
24
21
|
m_distances.fill(Number.POSITIVE_INFINITY);
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
// fill diagonal
|
|
24
|
+
for (let i = 0; i < node_count; i++) {
|
|
25
|
+
// Distance to self is 0
|
|
26
|
+
m_distances.setCellValue(i, i, 0);
|
|
27
|
+
}
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
*
|
|
30
|
-
* @
|
|
31
|
-
* @returns {number}
|
|
31
|
+
* @type {Deque<number>}
|
|
32
32
|
*/
|
|
33
|
-
|
|
34
|
-
return m_distances.getCellValue(source_node, other_node);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
for (let i = 0; i < targets.length; i++) {
|
|
38
|
-
source_node = targets[i];
|
|
39
|
-
|
|
40
|
-
// distance to self is always 0
|
|
41
|
-
m_distances.setCellValue(source_node, source_node, 0);
|
|
33
|
+
const queue = new Deque();
|
|
42
34
|
|
|
43
|
-
|
|
44
|
-
heap.push(source_node);
|
|
35
|
+
for (const target_index of targets) {
|
|
45
36
|
|
|
46
|
-
|
|
47
|
-
const t = heap.pop();
|
|
37
|
+
queue.addLast(target_index);
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
for (let v = 0; v < node_count; v++) {
|
|
53
|
-
const shortcut_distance = distance_to_this_node + m_distances.getCellValue(t, v);
|
|
39
|
+
while (!queue.isEmpty()) {
|
|
40
|
+
const index_1 = queue.removeFirst();
|
|
41
|
+
const node_1 = node_array[index_1];
|
|
54
42
|
|
|
55
|
-
|
|
56
|
-
m_distances.setCellValue(source_node, v, shortcut_distance)
|
|
57
|
-
}
|
|
43
|
+
const node_1_container = graph.getNodeContainer(node_1);
|
|
58
44
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// not visited yet
|
|
62
|
-
const t_node = node_array[t];
|
|
63
|
-
|
|
64
|
-
const t_node_container = graph.getNodeContainer(t_node);
|
|
45
|
+
const edges = node_1_container.getEdges();
|
|
46
|
+
const edge_count = edges.length;
|
|
65
47
|
|
|
66
|
-
|
|
67
|
-
const node_edge_count = node_edges.length;
|
|
48
|
+
for (let i = 0; i < edge_count; i++) {
|
|
68
49
|
|
|
69
|
-
|
|
50
|
+
const edge = edges[i];
|
|
70
51
|
|
|
71
|
-
|
|
72
|
-
*
|
|
73
|
-
* @type {WeightedEdge<N>}
|
|
74
|
-
*/
|
|
75
|
-
const node_edge = node_edges[i1];
|
|
52
|
+
const node_0 = edge.other(node_1);
|
|
76
53
|
|
|
77
|
-
|
|
54
|
+
if (!edge.validateTransition(node_0, node_1)) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
78
57
|
|
|
79
|
-
|
|
58
|
+
const index_0 = node_index_map.get(node_0);
|
|
80
59
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
60
|
+
// If we haven't visited this neighbor yet, its distance is the current distance + 1
|
|
61
|
+
if (m_distances.getCellValue(index_0, target_index) === Number.POSITIVE_INFINITY) {
|
|
85
62
|
|
|
86
|
-
const transition_cost =
|
|
63
|
+
const transition_cost = edge.weight;
|
|
87
64
|
|
|
88
|
-
const
|
|
65
|
+
const new_distance = m_distances.getCellValue(index_1, target_index) + transition_cost;
|
|
89
66
|
|
|
90
|
-
|
|
91
|
-
m_distances.setCellValue(source_node, neighbour_node_index, distance_to_neighbour);
|
|
67
|
+
m_distances.setCellValue(index_0, target_index, new_distance);
|
|
92
68
|
|
|
93
|
-
|
|
94
|
-
}
|
|
69
|
+
queue.addLast(index_0);
|
|
95
70
|
}
|
|
96
71
|
}
|
|
97
72
|
}
|
|
98
|
-
|
|
99
|
-
flags.set(source_node, true);
|
|
100
73
|
}
|
|
101
74
|
|
|
75
|
+
|
|
102
76
|
return m_distances;
|
|
103
77
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Laplacian matrix
|
|
3
|
-
*
|
|
4
|
-
* @template T
|
|
5
|
-
* @param {Graph<T>} graph
|
|
6
|
-
* @param {SquareMatrix} result
|
|
7
|
-
* @param {Map<T,number>} node_indices
|
|
2
|
+
* Computes the Laplacian matrix of a graph.
|
|
3
|
+
* Does NOT clear the matrix before writing.
|
|
4
|
+
* @template T Type of graph nodes.
|
|
5
|
+
* @param {Graph<T>} graph Input graph.
|
|
6
|
+
* @param {SquareMatrix} result Output: Laplacian matrix (modified in-place).
|
|
7
|
+
* @param {Map<T,number>} node_indices Map from graph nodes to matrix indices.
|
|
8
8
|
*/
|
|
9
9
|
export function graph_compute_laplacian_matrix<T>(graph: Graph<T>, result: SquareMatrix, node_indices: Map<T, number>): void;
|
|
10
10
|
import { SquareMatrix } from "../math/matrix/SquareMatrix.js";
|
|
@@ -4,12 +4,12 @@ import { graph_compute_adjacency_matrix } from "./graph_compute_adjacency_matrix
|
|
|
4
4
|
import { graph_compute_degree_matrix } from "./graph_compute_degree_matrix.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Laplacian matrix
|
|
8
|
-
*
|
|
9
|
-
* @template T
|
|
10
|
-
* @param {Graph<T>} graph
|
|
11
|
-
* @param {SquareMatrix} result
|
|
12
|
-
* @param {Map<T,number>} node_indices
|
|
7
|
+
* Computes the Laplacian matrix of a graph.
|
|
8
|
+
* Does NOT clear the matrix before writing.
|
|
9
|
+
* @template T Type of graph nodes.
|
|
10
|
+
* @param {Graph<T>} graph Input graph.
|
|
11
|
+
* @param {SquareMatrix} result Output: Laplacian matrix (modified in-place).
|
|
12
|
+
* @param {Map<T,number>} node_indices Map from graph nodes to matrix indices.
|
|
13
13
|
*/
|
|
14
14
|
export function graph_compute_laplacian_matrix(graph, result, node_indices) {
|
|
15
15
|
const degree = new SquareMatrix(result.size, BinaryDataType.Uint8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractJSONDeserializer.d.ts","sourceRoot":"","sources":["../../../../src/core/json/abstractJSONDeserializer.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,yCAJa,CAAC,QACH,CAAC,iBACD,GAAG,CAAC,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"abstractJSONDeserializer.d.ts","sourceRoot":"","sources":["../../../../src/core/json/abstractJSONDeserializer.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,yCAJa,CAAC,QACH,CAAC,iBACD,GAAG,CAAC,MAAM,WAAW,OA2B/B"}
|
|
@@ -21,5 +21,11 @@ export function abstractJSONDeserializer(json, deserializers) {
|
|
|
21
21
|
throw new Error(`No deserializer found for type '${typeName}'`);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
const payload = json.data;
|
|
25
|
+
|
|
26
|
+
if (payload === undefined) {
|
|
27
|
+
console.warn(`No serialized payload for type '${typeName}'`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return deserializer(payload);
|
|
25
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bell_membership_function.d.ts","sourceRoot":"","sources":["../../../../src/core/math/bell_membership_function.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,4CANW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"bell_membership_function.d.ts","sourceRoot":"","sources":["../../../../src/core/math/bell_membership_function.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,4CANW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAclB"}
|
|
@@ -10,8 +10,13 @@
|
|
|
10
10
|
* @returns {number}
|
|
11
11
|
*/
|
|
12
12
|
export function bell_membership_function(v, a, b, c) {
|
|
13
|
+
if(a === 0){
|
|
14
|
+
// avoid division by 0
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
13
17
|
|
|
14
|
-
const
|
|
18
|
+
const vc = v - c;
|
|
19
|
+
const N = vc / a;
|
|
15
20
|
|
|
16
21
|
const d = 1 + Math.pow(N, b * 2);
|
|
17
22
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs a polar decomposition of a 2x2 matrix.
|
|
3
|
+
* This function decomposes a 2x2 matrix `m` into two matrices, `R` and `S`,
|
|
4
|
+
* such that m = S * R, where:
|
|
5
|
+
* - R is a 2x2 orthogonal matrix (representing a rotation).
|
|
6
|
+
* - S is a 2x2 symmetric positive semi-definite matrix.
|
|
7
|
+
* The input matrix `m` and output matrices `R` and `S` are stored in a flattened,
|
|
8
|
+
* transposed format (consistent with the Taichi programming language convention).
|
|
9
|
+
*
|
|
10
|
+
* @param {number[]} R Output: 2x2 orthogonal matrix (rotation), stored as a flattened
|
|
11
|
+
* array [c, s, -s, c], where 'c' is the cosine and 's' is the sine of the rotation
|
|
12
|
+
* angle. Modified in-place.
|
|
13
|
+
* @param {number[]} S Output: 2x2 symmetric positive semi-definite matrix,
|
|
14
|
+
* stored as a flattened array. Modified in-place.
|
|
15
|
+
* @param {number[]} m Input: 2x2 matrix, stored as a flattened, *transposed* array [a, b, c, d],
|
|
16
|
+
* representing the matrix [[a, c], [b, d]]. Will be read from, but NOT modified.
|
|
17
|
+
*/
|
|
18
|
+
export function m2_polar_decomp(R: number[], S: number[], m: number[]): void;
|
|
19
|
+
//# sourceMappingURL=m2_polar_decomp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m2_polar_decomp.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/linalg/m2/m2_polar_decomp.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,mCARW,MAAM,EAAE,KAGR,MAAM,EAAE,KAER,MAAM,EAAE,QASlB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { m2_multiply } from "../../../geom/mat2/m2_multiply.js";
|
|
2
|
+
import { m2_polar_decomp_noS } from "./m2_polar_decomp_noS.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Performs a polar decomposition of a 2x2 matrix.
|
|
6
|
+
* This function decomposes a 2x2 matrix `m` into two matrices, `R` and `S`,
|
|
7
|
+
* such that m = S * R, where:
|
|
8
|
+
* - R is a 2x2 orthogonal matrix (representing a rotation).
|
|
9
|
+
* - S is a 2x2 symmetric positive semi-definite matrix.
|
|
10
|
+
* The input matrix `m` and output matrices `R` and `S` are stored in a flattened,
|
|
11
|
+
* transposed format (consistent with the Taichi programming language convention).
|
|
12
|
+
*
|
|
13
|
+
* @param {number[]} R Output: 2x2 orthogonal matrix (rotation), stored as a flattened
|
|
14
|
+
* array [c, s, -s, c], where 'c' is the cosine and 's' is the sine of the rotation
|
|
15
|
+
* angle. Modified in-place.
|
|
16
|
+
* @param {number[]} S Output: 2x2 symmetric positive semi-definite matrix,
|
|
17
|
+
* stored as a flattened array. Modified in-place.
|
|
18
|
+
* @param {number[]} m Input: 2x2 matrix, stored as a flattened, *transposed* array [a, b, c, d],
|
|
19
|
+
* representing the matrix [[a, c], [b, d]]. Will be read from, but NOT modified.
|
|
20
|
+
*/
|
|
21
|
+
export function m2_polar_decomp(R, S, m) {
|
|
22
|
+
// transposed as in taichi
|
|
23
|
+
|
|
24
|
+
m2_polar_decomp_noS(R, m);
|
|
25
|
+
|
|
26
|
+
m2_multiply(S, m, R);
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs a polar decomposition of a 2x2 matrix, returning only the rotation matrix (R).
|
|
3
|
+
* This function is optimized for speed and assumes the input matrix `m` is stored in a flattened,
|
|
4
|
+
* transposed format (consistent with the Taichi programming language convention).
|
|
5
|
+
* It decomposes `m` into R, such that m = R * S, where R is a 2x2 rotation matrix.
|
|
6
|
+
* The symmetric matrix S is *not* computed. This version is optimized
|
|
7
|
+
* for cases where only the rotational component (R) is needed.
|
|
8
|
+
*
|
|
9
|
+
* @param {number[]} R Output: 2x2 rotation matrix, stored as a flattened array [c, s, -s, c],
|
|
10
|
+
* where 'c' is the cosine and 's' is the sine of the rotation angle. Modified in-place.
|
|
11
|
+
* @param {number[]} m Input: 2x2 matrix, stored as a flattened, *transposed* array [a, b, c, d],
|
|
12
|
+
* representing the matrix [[a, c], [b, d]].
|
|
13
|
+
*/
|
|
14
|
+
export function m2_polar_decomp_noS(R: number[], m: number[]): void;
|
|
15
|
+
//# sourceMappingURL=m2_polar_decomp_noS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m2_polar_decomp_noS.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/linalg/m2/m2_polar_decomp_noS.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,uCALW,MAAM,EAAE,KAER,MAAM,EAAE,QAqBlB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs a polar decomposition of a 2x2 matrix, returning only the rotation matrix (R).
|
|
3
|
+
* This function is optimized for speed and assumes the input matrix `m` is stored in a flattened,
|
|
4
|
+
* transposed format (consistent with the Taichi programming language convention).
|
|
5
|
+
* It decomposes `m` into R, such that m = R * S, where R is a 2x2 rotation matrix.
|
|
6
|
+
* The symmetric matrix S is *not* computed. This version is optimized
|
|
7
|
+
* for cases where only the rotational component (R) is needed.
|
|
8
|
+
*
|
|
9
|
+
* @param {number[]} R Output: 2x2 rotation matrix, stored as a flattened array [c, s, -s, c],
|
|
10
|
+
* where 'c' is the cosine and 's' is the sine of the rotation angle. Modified in-place.
|
|
11
|
+
* @param {number[]} m Input: 2x2 matrix, stored as a flattened, *transposed* array [a, b, c, d],
|
|
12
|
+
* representing the matrix [[a, c], [b, d]].
|
|
13
|
+
*/
|
|
14
|
+
export function m2_polar_decomp_noS(
|
|
15
|
+
R,
|
|
16
|
+
m
|
|
17
|
+
) {
|
|
18
|
+
// transposed as in taichi
|
|
19
|
+
const x = m[0] + m[3];
|
|
20
|
+
const y = m[2] - m[1];
|
|
21
|
+
|
|
22
|
+
const scale = 1.0 / Math.sqrt(x * x + y * y);
|
|
23
|
+
|
|
24
|
+
const c = x * scale;
|
|
25
|
+
const s = y * scale;
|
|
26
|
+
|
|
27
|
+
R[0] = c;
|
|
28
|
+
R[1] = s;
|
|
29
|
+
R[2] = -s;
|
|
30
|
+
R[3] = c;
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs Singular Value Decomposition (SVD) on a 2x2 matrix, optimized for MLS-MPM.
|
|
3
|
+
*
|
|
4
|
+
* This function computes the SVD of a 2x2 matrix `m` such that m = U * Σ * V^T, where:
|
|
5
|
+
*
|
|
6
|
+
* - U is a 2x2 orthogonal matrix (rotation).
|
|
7
|
+
* - Σ (sig) is a 2x2 diagonal matrix containing the singular values.
|
|
8
|
+
* - V is a 2x2 orthogonal matrix (rotation).
|
|
9
|
+
*
|
|
10
|
+
* The function modifies U, sig, and V in-place. The input matrix `m` and the intermediate matrix `S` are overwritten during the computation.
|
|
11
|
+
* The algorithm uses a closed-form solution and optimizations specific to 2x2 matrices, making it very fast. It also handles the case where the off-diagonal elements of the intermediate matrix S are close to zero, simplifying calculations. The results are transposed, consistent with the Taichi programming language.
|
|
12
|
+
* @param {number[]} U Output: 2x2 orthogonal matrix (rotation), stored as a flattened array [c, s, -s, c]. Modified in-place.
|
|
13
|
+
* @param {number[]} S Output: Intermediate 2x2 matrix, overwritten during calculation. Modified in-place.
|
|
14
|
+
* @param {number[]} V Output: 2x2 orthogonal matrix (rotation), stored as a flattened array. Modified in-place.
|
|
15
|
+
* @param {number[]} sig Output: 2x2 diagonal matrix containing singular values, stored as a flattened array [σ1, 0, 0, σ2]. Modified in-place.
|
|
16
|
+
* @param {number[]} m Input: 2x2 matrix, stored as a flattened array [a, b, c, d], representing [[a, c], [b, d]]. Will be overwritten.
|
|
17
|
+
*/
|
|
18
|
+
export function m2_svd(U: number[], S: number[], V: number[], sig: number[], m: number[]): void;
|
|
19
|
+
//# sourceMappingURL=m2_svd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m2_svd.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/linalg/m2/m2_svd.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,0BANW,MAAM,EAAE,KACR,MAAM,EAAE,KACR,MAAM,EAAE,OACR,MAAM,EAAE,KACR,MAAM,EAAE,QA6ElB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { m2_multiply } from "../../../geom/mat2/m2_multiply.js";
|
|
2
|
+
import { m2_polar_decomp } from "./m2_polar_decomp.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Performs Singular Value Decomposition (SVD) on a 2x2 matrix, optimized for MLS-MPM.
|
|
6
|
+
*
|
|
7
|
+
* This function computes the SVD of a 2x2 matrix `m` such that m = U * Σ * V^T, where:
|
|
8
|
+
*
|
|
9
|
+
* - U is a 2x2 orthogonal matrix (rotation).
|
|
10
|
+
* - Σ (sig) is a 2x2 diagonal matrix containing the singular values.
|
|
11
|
+
* - V is a 2x2 orthogonal matrix (rotation).
|
|
12
|
+
*
|
|
13
|
+
* The function modifies U, sig, and V in-place. The input matrix `m` and the intermediate matrix `S` are overwritten during the computation.
|
|
14
|
+
* The algorithm uses a closed-form solution and optimizations specific to 2x2 matrices, making it very fast. It also handles the case where the off-diagonal elements of the intermediate matrix S are close to zero, simplifying calculations. The results are transposed, consistent with the Taichi programming language.
|
|
15
|
+
* @param {number[]} U Output: 2x2 orthogonal matrix (rotation), stored as a flattened array [c, s, -s, c]. Modified in-place.
|
|
16
|
+
* @param {number[]} S Output: Intermediate 2x2 matrix, overwritten during calculation. Modified in-place.
|
|
17
|
+
* @param {number[]} V Output: 2x2 orthogonal matrix (rotation), stored as a flattened array. Modified in-place.
|
|
18
|
+
* @param {number[]} sig Output: 2x2 diagonal matrix containing singular values, stored as a flattened array [σ1, 0, 0, σ2]. Modified in-place.
|
|
19
|
+
* @param {number[]} m Input: 2x2 matrix, stored as a flattened array [a, b, c, d], representing [[a, c], [b, d]]. Will be overwritten.
|
|
20
|
+
*/
|
|
21
|
+
export function m2_svd(
|
|
22
|
+
U,
|
|
23
|
+
S,
|
|
24
|
+
V,
|
|
25
|
+
sig,
|
|
26
|
+
m
|
|
27
|
+
) {
|
|
28
|
+
// transposed as in taichi
|
|
29
|
+
|
|
30
|
+
m2_polar_decomp(U, S, m);
|
|
31
|
+
|
|
32
|
+
let c, s;
|
|
33
|
+
|
|
34
|
+
if (Math.abs(S[1]) < 1e-6) {
|
|
35
|
+
// If the off-diagonal element of S is close to zero,
|
|
36
|
+
// S is already diagonal. No rotation needed for V.
|
|
37
|
+
|
|
38
|
+
sig[0] = S[0];
|
|
39
|
+
sig[1] = 0; // Ensure off-diagonal is exactly zero
|
|
40
|
+
sig[2] = 0; // Ensure off-diagonal is exactly zero
|
|
41
|
+
sig[3] = S[3];
|
|
42
|
+
|
|
43
|
+
c = 1;
|
|
44
|
+
s = 0;
|
|
45
|
+
|
|
46
|
+
} else {
|
|
47
|
+
const tao = 0.5 * (S[0] - S[3]);
|
|
48
|
+
|
|
49
|
+
const w = Math.sqrt(tao * tao + S[1] * S[1]);
|
|
50
|
+
|
|
51
|
+
// Numerical Methods for Engineers, Chapra, Canale, 6th Ed., p. 292
|
|
52
|
+
const t = tao > 0 ? S[1] / (tao + w) : S[1] / (tao - w);
|
|
53
|
+
|
|
54
|
+
c = 1.0 / Math.sqrt(t * t + 1);
|
|
55
|
+
|
|
56
|
+
s = -t * c;
|
|
57
|
+
|
|
58
|
+
const s2 = s * s;
|
|
59
|
+
const c2 = c * c;
|
|
60
|
+
|
|
61
|
+
const cs_2 = 2 * c * s;
|
|
62
|
+
|
|
63
|
+
sig[0] = c2 * S[0] - cs_2 * S[1] + s2 * S[3];
|
|
64
|
+
sig[1] = 0;
|
|
65
|
+
sig[2] = 0;
|
|
66
|
+
sig[3] = s2 * S[0] + cs_2 * S[1] + c2 * S[3];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (sig[0] < sig[3]) {
|
|
70
|
+
|
|
71
|
+
// Swap singular values if they are not in descending order.
|
|
72
|
+
const tmp = sig[0];
|
|
73
|
+
|
|
74
|
+
sig[0] = sig[3];
|
|
75
|
+
sig[3] = tmp;
|
|
76
|
+
|
|
77
|
+
// Correspondingly swap columns of V (remember, V is transposed here).
|
|
78
|
+
|
|
79
|
+
V[0] = -s;
|
|
80
|
+
V[1] = c;
|
|
81
|
+
V[2] = -c;
|
|
82
|
+
V[3] = -s;
|
|
83
|
+
|
|
84
|
+
} else {
|
|
85
|
+
|
|
86
|
+
// If already in descending order
|
|
87
|
+
|
|
88
|
+
V[0] = c;
|
|
89
|
+
V[1] = s;
|
|
90
|
+
V[2] = -s;
|
|
91
|
+
V[3] = c;
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
m2_multiply(U, U, V);
|
|
96
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param {number[]} A
|
|
5
5
|
* @param {number[]} x
|
|
6
6
|
* @param {number[]} b
|
|
7
|
-
* @returns {boolean}
|
|
7
|
+
* @returns {boolean} `true` iff solution is found, false otherwise
|
|
8
8
|
*/
|
|
9
9
|
export function solve_linear_system_GEPP_2x2(A: number[], x: number[], b: number[]): boolean;
|
|
10
10
|
//# sourceMappingURL=solve_linear_system_GEPP_2x2.d.ts.map
|
|
@@ -11,7 +11,7 @@ const epsilon = 256 * FLT_EPSILON_64;
|
|
|
11
11
|
* @param {number[]} A
|
|
12
12
|
* @param {number[]} x
|
|
13
13
|
* @param {number[]} b
|
|
14
|
-
* @returns {boolean}
|
|
14
|
+
* @returns {boolean} `true` iff solution is found, false otherwise
|
|
15
15
|
*/
|
|
16
16
|
export function solve_linear_system_GEPP_2x2(A, x, b) {
|
|
17
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/node-graph/node/NodeDescription.js"],"names":[],"mappings":"AAwCA;
|
|
1
|
+
{"version":3,"file":"NodeDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/node-graph/node/NodeDescription.js"],"names":[],"mappings":"AAwCA;IAsXI;;;;;OAKG;IACH,kCAHW,YAAY,GACV,eAAe,CAQ3B;IAjYD;;;OAGG;IACH,MAFU,MAAM,CAEN;IAEV;;;;;;OAMG;IACH,IAFU,MAAM,CAEO;IAEvB;;;OAGG;IACH,iBAFU,IAAI,EAAE,CAEL;IAEX;;;OAGG;IACH,YAFU,wBAAwB,EAAE,CAEpB;IAEhB;;OAEG;IACH;QACI;;;WAGG;4BADO,MAAM,CAAC,IAAI,CAAC;QAGtB;;;WAGG;8BADO,MAAM,CAAC,IAAI,CAAC;MAGxB;IAEF;;;;OAIG;IACH,wBAFW,YAAY,QAItB;IAED;;;OAGG;IACH,gBAFa,IAAI,EAAE,CAIlB;IAED;;;OAGG;IACH,eAFa,IAAI,EAAE,CAIlB;IAED;;;;;;OAMG;IACH,sBALW,MAAM,QACN,qBAAqB,iBACrB,MAAM,GAAC,OAAO,GAAC,MAAM,GACnB,MAAM,CA0ClB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,wBAAwB,GAAC,IAAI,CAiBzC;IAGD;;;;;;OAMG;IACH,iBALW,QAAQ,2BAER,aAAa,GACX,MAAM,CA2BlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,OAAO,CAuBnB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,IAAI,GAAC,IAAI,CAgBrB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACL,IAAI,EAAE,CAwBjB;IAED;;;;;OAKG;IACH,+BAHW,aAAa,GACZ,OAAO,CAiBlB;IAED;;;;OAIG;IACH,+BAHW,aAAa,GACZ,IAAI,EAAE,CAuBjB;IAED;;;;;OAKG;IACH,iCAJW,MAAM,aACN,aAAa,GACZ,IAAI,GAAC,SAAS,CAmBzB;IAED;;;OAGG;IACH,YAFa,IAAI,EAAE,CAIlB;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACb,OAAO,CAYnB;IAED,mBAEC;IAED;;;;MAMC;IAgBD;;;;;;OAMG;IACH,8BALW,EAAE,YAGF,YAAY,QAUtB;IAKL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAR1C;;;;qBArboB,WAAW;yCADS,yCAAyC;mBAH/D,kCAAkC;sCAEf,sCAAsC;8BAG9C,oBAAoB"}
|
|
@@ -412,6 +412,20 @@ export class NodeDescription {
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
/**
|
|
416
|
+
*
|
|
417
|
+
* @param j
|
|
418
|
+
* @param {NodeRegistry} registry
|
|
419
|
+
* @returns {NodeDescription}
|
|
420
|
+
*/
|
|
421
|
+
static fromJSON(j, registry){
|
|
422
|
+
const r = new NodeDescription();
|
|
423
|
+
|
|
424
|
+
r.fromJSON(j,registry);
|
|
425
|
+
|
|
426
|
+
return r;
|
|
427
|
+
}
|
|
428
|
+
|
|
415
429
|
/**
|
|
416
430
|
*
|
|
417
431
|
* @param {[]} ports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataType.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/node-graph/type/DataType.js"],"names":[],"mappings":"AAEA;IAyDI;;;;OAIG;IACH,mBAHW,GAAC,GACC,QAAQ,CAQpB;IAGD;;;;;OAKG;IACH,gBAJW,MAAM,QACN,MAAM,GACJ,QAAQ,CAQpB;IAjFD;;;OAGG;IACH,IAFU,MAAM,CAET;IAEP;;;OAGG;IACH,MAFU,MAAM,CAEN;IAEV,mBAEC;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,QAAQ,GACN,OAAO,CAKnB;IAED;;;;OAIG;IACH,QAHW,MAAM,QACN,MAAM,QAQhB;IAED;;;MAEC;IAED;;;aAEC;IAgCL;;;OAGG;IACH,qBAFU,OAAO,CAEY;CAP5B"}
|
|
1
|
+
{"version":3,"file":"DataType.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/node-graph/type/DataType.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IAyDI;;;;OAIG;IACH,mBAHW,GAAC,GACC,QAAQ,CAQpB;IAGD;;;;;OAKG;IACH,gBAJW,MAAM,QACN,MAAM,GACJ,QAAQ,CAQpB;IAjFD;;;OAGG;IACH,IAFU,MAAM,CAET;IAEP;;;OAGG;IACH,MAFU,MAAM,CAEN;IAEV,mBAEC;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,QAAQ,GACN,OAAO,CAKnB;IAED;;;;OAIG;IACH,QAHW,MAAM,QACN,MAAM,QAQhB;IAED;;;MAEC;IAED;;;aAEC;IAgCL;;;OAGG;IACH,qBAFU,OAAO,CAEY;CAP5B"}
|