nodi-modular 0.0.27 → 0.0.29
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/index.d.ts +376 -376
- package/index.js +6 -6
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,122 +1,27 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function do_nothing_just_tell_wasm_bindgen_to_generate_types(): void;
|
|
4
|
-
export interface GeometryTransformInterop {
|
|
5
|
-
geometry: GeometryProxy;
|
|
6
|
-
transform: TransformInterop;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type NodeOutput = (Map<string, Item[]> | undefined)[];
|
|
10
|
-
|
|
11
4
|
/**
|
|
12
5
|
* Evaluation item interoperability type.
|
|
13
6
|
*/
|
|
14
7
|
export type Item = { variant: "Bool"; data: boolean } | { variant: "String"; data: string } | { variant: "Number"; data: number } | { variant: "Domain"; data: Domain } | { variant: "Vector3"; data: Vector3<number> } | { variant: "Matrix4"; data: Matrix4<number> } | { variant: "Complex"; data: Complex<number> } | { variant: "Point3"; data: Point3<number> } | { variant: "Plane"; data: Plane } | { variant: "GeometryTransform"; data: GeometryTransformInterop } | { variant: "MeshFace"; data: MeshTriangleFace };
|
|
15
8
|
|
|
16
|
-
export
|
|
17
|
-
objects: GeometryInteropHandleProxy[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Interop struct for transform
|
|
22
|
-
* Represents a 4x4 matrix as a 16-element array
|
|
23
|
-
*/
|
|
24
|
-
export type TransformInterop = number[];
|
|
25
|
-
|
|
26
|
-
export interface IndicesInteropHandle {
|
|
27
|
-
count: number;
|
|
28
|
-
indices: number;
|
|
29
|
-
}
|
|
9
|
+
export type NodeOutput = (Map<string, Item[]> | undefined)[];
|
|
30
10
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export interface EvaluationInterop {
|
|
35
|
-
/**
|
|
36
|
-
* Processed nodes in the latest evaluation
|
|
37
|
-
*/
|
|
38
|
-
processedNodes: GraphNodeSet[];
|
|
39
|
-
/**
|
|
40
|
-
* Geometry identifiers in the latest evaluation
|
|
41
|
-
*/
|
|
42
|
-
geometryIdentifiers: GeometryIdentifier[];
|
|
11
|
+
export interface GeometryTransformInterop {
|
|
12
|
+
geometry: GeometryProxy;
|
|
13
|
+
transform: TransformInterop;
|
|
43
14
|
}
|
|
44
15
|
|
|
45
|
-
|
|
46
|
-
* Interop struct for node
|
|
47
|
-
*/
|
|
48
|
-
export interface NodeInterop {
|
|
49
|
-
/**
|
|
50
|
-
* Node variant
|
|
51
|
-
*/
|
|
52
|
-
variant: string;
|
|
53
|
-
/**
|
|
54
|
-
* Node identifier
|
|
55
|
-
*/
|
|
56
|
-
id: string;
|
|
57
|
-
name: string;
|
|
58
|
-
label: string | undefined;
|
|
59
|
-
description: string;
|
|
60
|
-
/**
|
|
61
|
-
* Input parameters
|
|
62
|
-
*/
|
|
63
|
-
inputs: IOInterop[];
|
|
64
|
-
/**
|
|
65
|
-
* Input variables
|
|
66
|
-
*/
|
|
67
|
-
inputVariables: IOVariables | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* Output parameters
|
|
70
|
-
*/
|
|
71
|
-
outputs: IOInterop[];
|
|
72
|
-
/**
|
|
73
|
-
* Output variables
|
|
74
|
-
*/
|
|
75
|
-
outputVariables: IOVariables | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Node properties
|
|
78
|
-
*/
|
|
79
|
-
properties: NodePropertyInterop[];
|
|
80
|
-
enabled: boolean;
|
|
81
|
-
visible: boolean;
|
|
82
|
-
meta: NodeMetaInterop;
|
|
83
|
-
}
|
|
16
|
+
export type GeometryInteropVec = GeometryInterop[];
|
|
84
17
|
|
|
85
|
-
export
|
|
86
|
-
variant: string;
|
|
87
|
-
id: string;
|
|
88
|
-
name: string;
|
|
89
|
-
label: string | undefined;
|
|
90
|
-
inputs: string[];
|
|
91
|
-
outputs: string[];
|
|
92
|
-
enabled: boolean;
|
|
93
|
-
visible: boolean;
|
|
94
|
-
}
|
|
18
|
+
export type NodeConnectionInteropVec = NodeConnectionInterop[];
|
|
95
19
|
|
|
96
|
-
|
|
97
|
-
* Interop struct for node meta
|
|
98
|
-
*/
|
|
99
|
-
export interface NodeMetaInterop {
|
|
100
|
-
/**
|
|
101
|
-
* Error message
|
|
102
|
-
*/
|
|
103
|
-
error: string | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* Node\' output has geometry or not
|
|
106
|
-
*/
|
|
107
|
-
hasGeometry: boolean;
|
|
108
|
-
}
|
|
20
|
+
export type NodePropertyInteropVec = NodePropertyInterop[];
|
|
109
21
|
|
|
110
|
-
export
|
|
111
|
-
source: EdgeUnitInterop<OutputId>;
|
|
112
|
-
destination: EdgeUnitInterop<InputId>;
|
|
113
|
-
empty: boolean;
|
|
114
|
-
}
|
|
22
|
+
export type NodeInteropVec = NodeInterop[];
|
|
115
23
|
|
|
116
|
-
export
|
|
117
|
-
node: NodeId;
|
|
118
|
-
io: IO;
|
|
119
|
-
}
|
|
24
|
+
export type EdgeInteropVec = EdgeInterop[];
|
|
120
25
|
|
|
121
26
|
export interface IOInterop {
|
|
122
27
|
id: string;
|
|
@@ -134,14 +39,15 @@ export interface DataTreeFormatInterop {
|
|
|
134
39
|
outputs: IndexMap<string, string>;
|
|
135
40
|
}
|
|
136
41
|
|
|
137
|
-
export
|
|
42
|
+
export interface GeometrySpreadsheet {
|
|
43
|
+
points: Point3<number>[];
|
|
44
|
+
curves: CurveProxy[];
|
|
45
|
+
surfaces: SurfaceProxy[];
|
|
46
|
+
meshes: MeshInterop[];
|
|
47
|
+
}
|
|
138
48
|
|
|
139
|
-
export interface
|
|
140
|
-
|
|
141
|
-
vertices: number;
|
|
142
|
-
normals: number;
|
|
143
|
-
indices: IndicesInteropHandle | undefined;
|
|
144
|
-
transform: TransformInterop | undefined;
|
|
49
|
+
export interface GroupInteropHandle {
|
|
50
|
+
objects: GeometryInteropHandleProxy[];
|
|
145
51
|
}
|
|
146
52
|
|
|
147
53
|
export interface NodeCreationSetting {
|
|
@@ -178,6 +84,115 @@ export interface NodePropertyInterop {
|
|
|
178
84
|
disabled?: boolean;
|
|
179
85
|
}
|
|
180
86
|
|
|
87
|
+
export interface NodeConnectionInterop {
|
|
88
|
+
outputNodeId: string;
|
|
89
|
+
outputIndex: number;
|
|
90
|
+
inputNodeId: string;
|
|
91
|
+
inputIndex: number;
|
|
92
|
+
inputConnectionIndex: number | undefined;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface IndicesInteropHandle {
|
|
96
|
+
count: number;
|
|
97
|
+
indices: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
/// Manually added types due to limitations in the `wasm-bindgen` & `tsify` crates.
|
|
102
|
+
export type ID<T = any> = string;
|
|
103
|
+
export type NodeId = ID;
|
|
104
|
+
export type InputId = ID;
|
|
105
|
+
export type OutputId = ID;
|
|
106
|
+
export type SubGraphId = ID;
|
|
107
|
+
export type SubGraphInstanceId = ID;
|
|
108
|
+
|
|
109
|
+
export type IndexMap<K, V> = Map<K, V>;
|
|
110
|
+
|
|
111
|
+
export type U1 = 1;
|
|
112
|
+
export type U2 = 2;
|
|
113
|
+
export type U3 = 3;
|
|
114
|
+
|
|
115
|
+
/// Define vector & point types with FixedLengthArray
|
|
116
|
+
type BuildTuple<L extends number, T, R extends any[] = []> = R['length'] extends L ? R : BuildTuple<L, T, [T, ...R]>;
|
|
117
|
+
type FixedLengthArray<T, L extends number> = BuildTuple<L, T>;
|
|
118
|
+
export type OPoint<T, D extends number> = FixedLengthArray<T, D>;
|
|
119
|
+
export type OVector<T, D extends number> = FixedLengthArray<T, D>;
|
|
120
|
+
export type Point<T, D extends number> = OPoint<T, D>;
|
|
121
|
+
export type SVector<T, D extends number> = OVector<T, D>;
|
|
122
|
+
export type Point2<T = number> = Point<T, 2>;
|
|
123
|
+
export type Vector2<T = number> = SVector<T, 2>;
|
|
124
|
+
export type Point3<T = number> = Point<T, 3>;
|
|
125
|
+
export type Vector3<T = number> = SVector<T, 3>;
|
|
126
|
+
export type Point4<T = number> = Point<T, 4>;
|
|
127
|
+
export type Vector4<T = number> = SVector<T, 4>;
|
|
128
|
+
export type Transform3<T = number> = FixedLengthArray<T, 16>;
|
|
129
|
+
export type Matrix4<T = number> = FixedLengthArray<FixedLengthArray<T, 4>, 4>;
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Geometry identifier
|
|
134
|
+
*/
|
|
135
|
+
export interface GeometryIdentifier {
|
|
136
|
+
/**
|
|
137
|
+
* Parent node ID
|
|
138
|
+
*/
|
|
139
|
+
graphNodeSet?: GraphNodeSet;
|
|
140
|
+
/**
|
|
141
|
+
* Output ID that the geometry is belonged to
|
|
142
|
+
*/
|
|
143
|
+
outputId: OutputId;
|
|
144
|
+
/**
|
|
145
|
+
* Geometry ID
|
|
146
|
+
*/
|
|
147
|
+
geometryId: ID<GeometryProxy>;
|
|
148
|
+
/**
|
|
149
|
+
* Transform matrix in interop format
|
|
150
|
+
*/
|
|
151
|
+
transform: TransformInterop;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type NodeSectionInterop = { type: "section"; content: NodeFolderInterop } | { type: "item"; content: NodeItemInterop };
|
|
155
|
+
|
|
156
|
+
export interface NodeItemInterop {
|
|
157
|
+
key: string;
|
|
158
|
+
name: string;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type NodeFolderInterop = IndexMap<string, NodeSectionInterop>;
|
|
162
|
+
|
|
163
|
+
export interface NodeMapInterop {
|
|
164
|
+
folder: NodeFolderInterop;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Curve interop handle for wasm interop
|
|
169
|
+
* stride = 3 (x, y, z)
|
|
170
|
+
*/
|
|
171
|
+
export interface CurveInteropHandle {
|
|
172
|
+
count: number;
|
|
173
|
+
vertices: number;
|
|
174
|
+
transform: TransformInterop | undefined;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface MeshInteropHandle {
|
|
178
|
+
count: number;
|
|
179
|
+
vertices: number;
|
|
180
|
+
normals: number;
|
|
181
|
+
indices: IndicesInteropHandle | undefined;
|
|
182
|
+
transform: TransformInterop | undefined;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface EdgeInterop {
|
|
186
|
+
source: EdgeUnitInterop<OutputId>;
|
|
187
|
+
destination: EdgeUnitInterop<InputId>;
|
|
188
|
+
empty: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface EdgeUnitInterop<IO> {
|
|
192
|
+
node: NodeId;
|
|
193
|
+
io: IO;
|
|
194
|
+
}
|
|
195
|
+
|
|
181
196
|
/**
|
|
182
197
|
* Options for adaptive tessellation to create geometry interoperability
|
|
183
198
|
*/
|
|
@@ -208,13 +223,7 @@ export interface AdaptiveTessellationOptions {
|
|
|
208
223
|
maxDepth: number;
|
|
209
224
|
}
|
|
210
225
|
|
|
211
|
-
export
|
|
212
|
-
outputNodeId: string;
|
|
213
|
-
outputIndex: number;
|
|
214
|
-
inputNodeId: string;
|
|
215
|
-
inputIndex: number;
|
|
216
|
-
inputConnectionIndex: number | undefined;
|
|
217
|
-
}
|
|
226
|
+
export type GeometryInteropHandleProxy = { variant: "Mesh"; data: MeshInteropHandle } | { variant: "Curve"; data: CurveInteropHandle } | { variant: "Group"; data: GroupInteropHandle };
|
|
218
227
|
|
|
219
228
|
export interface PointListHandleUnit {
|
|
220
229
|
count: number;
|
|
@@ -240,102 +249,111 @@ export interface VectorDisplayHandle {
|
|
|
240
249
|
|
|
241
250
|
export type DisplayProxyHandle = { variant: "Vector"; data: VectorDisplayHandle } | { variant: "PointList"; data: PointListDisplayHandle };
|
|
242
251
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export type GeometryInteropVec = GeometryInterop[];
|
|
251
|
-
|
|
252
|
-
export type NodeConnectionInteropVec = NodeConnectionInterop[];
|
|
253
|
-
|
|
254
|
-
export type NodePropertyInteropVec = NodePropertyInterop[];
|
|
255
|
-
|
|
256
|
-
export type NodeInteropVec = NodeInterop[];
|
|
257
|
-
|
|
258
|
-
export type EdgeInteropVec = EdgeInterop[];
|
|
259
|
-
|
|
260
|
-
export type NodeSectionInterop = { type: "section"; content: NodeFolderInterop } | { type: "item"; content: NodeItemInterop };
|
|
252
|
+
/**
|
|
253
|
+
* Interop struct for transform
|
|
254
|
+
* Represents a 4x4 matrix as a 16-element array
|
|
255
|
+
*/
|
|
256
|
+
export type TransformInterop = number[];
|
|
261
257
|
|
|
262
|
-
|
|
263
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Interop struct for node
|
|
260
|
+
*/
|
|
261
|
+
export interface NodeInterop {
|
|
262
|
+
/**
|
|
263
|
+
* Node variant
|
|
264
|
+
*/
|
|
265
|
+
variant: string;
|
|
266
|
+
/**
|
|
267
|
+
* Node identifier
|
|
268
|
+
*/
|
|
269
|
+
id: string;
|
|
264
270
|
name: string;
|
|
271
|
+
label: string | undefined;
|
|
272
|
+
description: string;
|
|
273
|
+
/**
|
|
274
|
+
* Input parameters
|
|
275
|
+
*/
|
|
276
|
+
inputs: IOInterop[];
|
|
277
|
+
/**
|
|
278
|
+
* Input variables
|
|
279
|
+
*/
|
|
280
|
+
inputVariables: IOVariables | undefined;
|
|
281
|
+
/**
|
|
282
|
+
* Output parameters
|
|
283
|
+
*/
|
|
284
|
+
outputs: IOInterop[];
|
|
285
|
+
/**
|
|
286
|
+
* Output variables
|
|
287
|
+
*/
|
|
288
|
+
outputVariables: IOVariables | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* Node properties
|
|
291
|
+
*/
|
|
292
|
+
properties: NodePropertyInterop[];
|
|
293
|
+
enabled: boolean;
|
|
294
|
+
visible: boolean;
|
|
295
|
+
meta: NodeMetaInterop;
|
|
265
296
|
}
|
|
266
297
|
|
|
267
|
-
export
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
export type NodeId = ID;
|
|
277
|
-
export type InputId = ID;
|
|
278
|
-
export type OutputId = ID;
|
|
279
|
-
export type SubGraphId = ID;
|
|
280
|
-
export type SubGraphInstanceId = ID;
|
|
281
|
-
|
|
282
|
-
export type IndexMap<K, V> = Map<K, V>;
|
|
283
|
-
|
|
284
|
-
export type U1 = 1;
|
|
285
|
-
export type U2 = 2;
|
|
286
|
-
export type U3 = 3;
|
|
287
|
-
|
|
288
|
-
/// Define vector & point types with FixedLengthArray
|
|
289
|
-
type BuildTuple<L extends number, T, R extends any[] = []> = R['length'] extends L ? R : BuildTuple<L, T, [T, ...R]>;
|
|
290
|
-
type FixedLengthArray<T, L extends number> = BuildTuple<L, T>;
|
|
291
|
-
export type OPoint<T, D extends number> = FixedLengthArray<T, D>;
|
|
292
|
-
export type OVector<T, D extends number> = FixedLengthArray<T, D>;
|
|
293
|
-
export type Point<T, D extends number> = OPoint<T, D>;
|
|
294
|
-
export type SVector<T, D extends number> = OVector<T, D>;
|
|
295
|
-
export type Point2<T = number> = Point<T, 2>;
|
|
296
|
-
export type Vector2<T = number> = SVector<T, 2>;
|
|
297
|
-
export type Point3<T = number> = Point<T, 3>;
|
|
298
|
-
export type Vector3<T = number> = SVector<T, 3>;
|
|
299
|
-
export type Point4<T = number> = Point<T, 4>;
|
|
300
|
-
export type Vector4<T = number> = SVector<T, 4>;
|
|
301
|
-
export type Transform3<T = number> = FixedLengthArray<T, 16>;
|
|
302
|
-
export type Matrix4<T = number> = FixedLengthArray<FixedLengthArray<T, 4>, 4>;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Curve interop handle for wasm interop
|
|
307
|
-
* stride = 3 (x, y, z)
|
|
308
|
-
*/
|
|
309
|
-
export interface CurveInteropHandle {
|
|
310
|
-
count: number;
|
|
311
|
-
vertices: number;
|
|
312
|
-
transform: TransformInterop | undefined;
|
|
298
|
+
export interface NodeEntityInterop {
|
|
299
|
+
variant: string;
|
|
300
|
+
id: string;
|
|
301
|
+
name: string;
|
|
302
|
+
label: string | undefined;
|
|
303
|
+
inputs: string[];
|
|
304
|
+
outputs: string[];
|
|
305
|
+
enabled: boolean;
|
|
306
|
+
visible: boolean;
|
|
313
307
|
}
|
|
314
308
|
|
|
315
309
|
/**
|
|
316
|
-
*
|
|
310
|
+
* Interop struct for node meta
|
|
317
311
|
*/
|
|
318
|
-
export interface
|
|
312
|
+
export interface NodeMetaInterop {
|
|
319
313
|
/**
|
|
320
|
-
*
|
|
314
|
+
* Error message
|
|
321
315
|
*/
|
|
322
|
-
|
|
316
|
+
error: string | undefined;
|
|
323
317
|
/**
|
|
324
|
-
*
|
|
318
|
+
* Node\' output has geometry or not
|
|
325
319
|
*/
|
|
326
|
-
|
|
320
|
+
hasGeometry: boolean;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Interop struct for evaluation results
|
|
325
|
+
*/
|
|
326
|
+
export interface EvaluationInterop {
|
|
327
327
|
/**
|
|
328
|
-
*
|
|
328
|
+
* Processed nodes in the latest evaluation
|
|
329
329
|
*/
|
|
330
|
-
|
|
330
|
+
processedNodes: GraphNodeSet[];
|
|
331
331
|
/**
|
|
332
|
-
*
|
|
332
|
+
* Geometry identifiers in the latest evaluation
|
|
333
333
|
*/
|
|
334
|
-
|
|
334
|
+
geometryIdentifiers: GeometryIdentifier[];
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
export type GraphMappingTypes = "None" | "Bezier" | "Linear" | "Sine";
|
|
338
338
|
|
|
339
|
+
export type TypeHint = Internal;
|
|
340
|
+
|
|
341
|
+
export interface NodePropertyCategoryValue {
|
|
342
|
+
candidates: IndexMap<string, number>;
|
|
343
|
+
selected: number;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface NodePropertyRangeValue {
|
|
347
|
+
value: number;
|
|
348
|
+
min: number | undefined;
|
|
349
|
+
max: number | undefined;
|
|
350
|
+
step: number | undefined;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export type NodePropertyValue = { type: "Number"; content: number } | { type: "Range"; content: NodePropertyRangeValue } | { type: "Range2d"; content: [NodePropertyRangeValue, NodePropertyRangeValue] } | { type: "String"; content: string } | { type: "Bool"; content: boolean } | { type: "NumberVector"; content: number[] } | { type: "Category"; content: NodePropertyCategoryValue } | { type: "Vector2d"; content: [number, number] } | { type: "Vector3d"; content: [number, number, number] } | { type: "Point2d"; content: [number, number] } | { type: "Point3d"; content: [number, number, number] } | { type: "Points2d"; content: [number, number][] } | { type: "Buffer"; content: number[] };
|
|
354
|
+
|
|
355
|
+
export type AccessTypes = "Item" | "List" | "Tree";
|
|
356
|
+
|
|
339
357
|
export interface Node<T> {
|
|
340
358
|
id: NodeId;
|
|
341
359
|
name: string;
|
|
@@ -351,6 +369,8 @@ export type OutputIOManager = IOManager<OutputId, InputId>;
|
|
|
351
369
|
|
|
352
370
|
export type InputIOManager = IOManager<InputId, OutputId>;
|
|
353
371
|
|
|
372
|
+
export type GraphVariant = "Root" | { SubGraph: SubGraphId };
|
|
373
|
+
|
|
354
374
|
/**
|
|
355
375
|
* Graph structure
|
|
356
376
|
*/
|
|
@@ -365,24 +385,53 @@ export interface Graph<T, U> {
|
|
|
365
385
|
sub_graphs?: IndexMap<SubGraphId, SubGraph<T, U>>;
|
|
366
386
|
}
|
|
367
387
|
|
|
368
|
-
export interface
|
|
369
|
-
|
|
370
|
-
|
|
388
|
+
export interface Prune<T, U> {
|
|
389
|
+
connectedComponents: ConnectedComponents<T, U>[];
|
|
390
|
+
bypass: Connection[] | undefined;
|
|
371
391
|
}
|
|
372
392
|
|
|
373
|
-
export interface
|
|
374
|
-
|
|
375
|
-
|
|
393
|
+
export interface ConnectedComponentNode {
|
|
394
|
+
sources: NodeId[];
|
|
395
|
+
destinations: NodeId[];
|
|
376
396
|
}
|
|
377
397
|
|
|
378
|
-
export interface
|
|
379
|
-
|
|
380
|
-
min: number | undefined;
|
|
381
|
-
max: number | undefined;
|
|
382
|
-
step: number | undefined;
|
|
398
|
+
export interface ConnectedComponents<T, U> {
|
|
399
|
+
nodes: IndexMap<NodeId, ConnectedComponentNode<T, U>>;
|
|
383
400
|
}
|
|
384
401
|
|
|
385
|
-
|
|
402
|
+
/**
|
|
403
|
+
* A parameter for an input or output of a node.
|
|
404
|
+
*/
|
|
405
|
+
export interface IOParameter<T, U> {
|
|
406
|
+
id: T;
|
|
407
|
+
name: string;
|
|
408
|
+
access_type: AccessTypes;
|
|
409
|
+
hint?: TypeHint;
|
|
410
|
+
connections: U[];
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* A sub graph is a graph that is a part of a larger graph
|
|
415
|
+
*/
|
|
416
|
+
export interface SubGraph<T, U> {
|
|
417
|
+
/**
|
|
418
|
+
* The id of the sub graph
|
|
419
|
+
*/
|
|
420
|
+
id: SubGraphId;
|
|
421
|
+
/**
|
|
422
|
+
* The graph of the sub graph
|
|
423
|
+
*/
|
|
424
|
+
graph: Graph<T, U>;
|
|
425
|
+
/**
|
|
426
|
+
* The instances of the sub graph
|
|
427
|
+
*/
|
|
428
|
+
instances: SubGraphInstanceId[];
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export interface SubGraphIdSet {
|
|
432
|
+
subGraphId: SubGraphId;
|
|
433
|
+
instanceId: SubGraphInstanceId;
|
|
434
|
+
}
|
|
386
435
|
|
|
387
436
|
/**
|
|
388
437
|
* Defines the dynamics of an IO parameter.
|
|
@@ -403,26 +452,6 @@ export interface GraphNodeSet {
|
|
|
403
452
|
nodeId: NodeId;
|
|
404
453
|
}
|
|
405
454
|
|
|
406
|
-
export interface Prune<T, U> {
|
|
407
|
-
connectedComponents: ConnectedComponents<T, U>[];
|
|
408
|
-
bypass: Connection[] | undefined;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* A parameter for an input or output of a node.
|
|
413
|
-
*/
|
|
414
|
-
export interface IOParameter<T, U> {
|
|
415
|
-
id: T;
|
|
416
|
-
name: string;
|
|
417
|
-
access_type: AccessTypes;
|
|
418
|
-
hint?: TypeHint;
|
|
419
|
-
connections: U[];
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export interface IOManager<T, U> {
|
|
423
|
-
parameters: IOParameter<T, U>[];
|
|
424
|
-
}
|
|
425
|
-
|
|
426
455
|
export interface Connection {
|
|
427
456
|
source: NodeParameter<OutputId>;
|
|
428
457
|
destination: NodeParameter<InputId>;
|
|
@@ -434,37 +463,58 @@ export interface NodeParameter<T> {
|
|
|
434
463
|
parameterIndex: number;
|
|
435
464
|
}
|
|
436
465
|
|
|
437
|
-
export interface
|
|
438
|
-
|
|
439
|
-
destinations: NodeId[];
|
|
466
|
+
export interface IOManager<T, U> {
|
|
467
|
+
parameters: IOParameter<T, U>[];
|
|
440
468
|
}
|
|
441
469
|
|
|
442
|
-
|
|
443
|
-
|
|
470
|
+
|
|
471
|
+
export type NurbsSurface3D<T = number> = {
|
|
472
|
+
control_points: Point4<T>[][];
|
|
473
|
+
u_knots: T[];
|
|
474
|
+
v_knots: T[];
|
|
475
|
+
u_degree: T;
|
|
476
|
+
v_degree: T;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* An oriented box in 3D space
|
|
481
|
+
*/
|
|
482
|
+
export interface OrientedBox {
|
|
483
|
+
/**
|
|
484
|
+
* The plane that the box is aligned to
|
|
485
|
+
*/
|
|
486
|
+
plane: Plane;
|
|
487
|
+
/**
|
|
488
|
+
* The bounding box in the local coordinate system
|
|
489
|
+
*/
|
|
490
|
+
bounds: BoundingBox3D;
|
|
444
491
|
}
|
|
445
492
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
export type AccessTypes = "Item" | "List" | "Tree";
|
|
493
|
+
/**
|
|
494
|
+
* A NURBS surface container
|
|
495
|
+
*/
|
|
496
|
+
export type NurbsSurface = NurbsSurface3D<number>;
|
|
451
497
|
|
|
452
498
|
/**
|
|
453
|
-
*
|
|
499
|
+
* An arc curve in 3D space
|
|
454
500
|
*/
|
|
455
|
-
export interface
|
|
501
|
+
export interface ArcCurve {
|
|
456
502
|
/**
|
|
457
|
-
* The
|
|
503
|
+
* The base plane of the arc
|
|
458
504
|
*/
|
|
459
|
-
|
|
505
|
+
plane: Plane;
|
|
460
506
|
/**
|
|
461
|
-
* The
|
|
507
|
+
* The start angle of the arc
|
|
462
508
|
*/
|
|
463
|
-
|
|
509
|
+
startAngle: number;
|
|
464
510
|
/**
|
|
465
|
-
* The
|
|
511
|
+
* The end angle of the arc
|
|
466
512
|
*/
|
|
467
|
-
|
|
513
|
+
endAngle: number;
|
|
514
|
+
/**
|
|
515
|
+
* The radius of the arc
|
|
516
|
+
*/
|
|
517
|
+
radius: number;
|
|
468
518
|
}
|
|
469
519
|
|
|
470
520
|
|
|
@@ -475,9 +525,9 @@ export type NurbsCurve3D<T = number> = {
|
|
|
475
525
|
};
|
|
476
526
|
|
|
477
527
|
/**
|
|
478
|
-
*
|
|
528
|
+
* A collection of geometry objects
|
|
479
529
|
*/
|
|
480
|
-
export type
|
|
530
|
+
export type Group = GeometryTransform[];
|
|
481
531
|
|
|
482
532
|
/**
|
|
483
533
|
* A geometry object with a transformation
|
|
@@ -497,35 +547,6 @@ export type PolyCurve = CompoundCurve<number, U4>;
|
|
|
497
547
|
|
|
498
548
|
export type NurbsCurve = NurbsCurve3D<number>;
|
|
499
549
|
|
|
500
|
-
/**
|
|
501
|
-
* A collection of geometry objects
|
|
502
|
-
*/
|
|
503
|
-
export type Group = GeometryTransform[];
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* A face of a mesh with three vertices
|
|
507
|
-
*/
|
|
508
|
-
export interface MeshTriangleFace {
|
|
509
|
-
a: number;
|
|
510
|
-
b: number;
|
|
511
|
-
c: number;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Geometry proxy for various geometry types
|
|
516
|
-
*/
|
|
517
|
-
export type GeometryProxy = { variant: "Curve"; data: CurveProxy } | { variant: "Surface"; data: SurfaceProxy } | { variant: "Brep"; data: Brep } | { variant: "Mesh"; data: Mesh } | { variant: "BBox"; data: OrientedBox } | { variant: "Group"; data: Group };
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* A surface defined by three points
|
|
521
|
-
*/
|
|
522
|
-
export type TriangleSurface = Triangle3D;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Proxy for various curve types
|
|
526
|
-
*/
|
|
527
|
-
export type CurveProxy = { variant: "Line"; data: LineCurve3D } | { variant: "Arc"; data: ArcCurve } | { variant: "Circle"; data: CircleCurve } | { variant: "Ellipse"; data: EllipseCurve } | { variant: "Rectangle"; data: RectangleCurve } | { variant: "Polyline"; data: PolylineCurve3D } | { variant: "NURBS"; data: NurbsCurve } | { variant: "Poly"; data: PolyCurve };
|
|
528
|
-
|
|
529
550
|
|
|
530
551
|
export type PolylineCurve2D = {
|
|
531
552
|
points: Point2[];
|
|
@@ -568,21 +589,26 @@ export interface MeshInterop {
|
|
|
568
589
|
}
|
|
569
590
|
|
|
570
591
|
/**
|
|
571
|
-
*
|
|
592
|
+
* Interop proxy for various geometry types
|
|
572
593
|
*/
|
|
573
|
-
export
|
|
594
|
+
export type GeometryInterop = { variant: "Mesh"; data: MeshInterop } | { variant: "Curve"; data: CurveInterop } | { variant: "Point"; data: PointCloudInterop } | { variant: "Plane"; data: Plane } | { variant: "Group"; data: GeometryInterop[] };
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* A rectangle curve in 3D space
|
|
598
|
+
*/
|
|
599
|
+
export interface RectangleCurve {
|
|
574
600
|
/**
|
|
575
|
-
* The base plane of the
|
|
601
|
+
* The base plane of the rectangle
|
|
576
602
|
*/
|
|
577
603
|
plane: Plane;
|
|
578
604
|
/**
|
|
579
|
-
* The
|
|
605
|
+
* The domain of the rectangle in the plane x axis
|
|
580
606
|
*/
|
|
581
|
-
|
|
607
|
+
x: Domain;
|
|
582
608
|
/**
|
|
583
|
-
* The
|
|
609
|
+
* The domain of the rectangle in the plane y axis
|
|
584
610
|
*/
|
|
585
|
-
|
|
611
|
+
y: Domain;
|
|
586
612
|
}
|
|
587
613
|
|
|
588
614
|
/**
|
|
@@ -600,54 +626,34 @@ export interface CircleCurve {
|
|
|
600
626
|
}
|
|
601
627
|
|
|
602
628
|
/**
|
|
603
|
-
*
|
|
629
|
+
* A circular surface
|
|
604
630
|
*/
|
|
605
|
-
export interface
|
|
631
|
+
export interface CircularSurface {
|
|
606
632
|
/**
|
|
607
|
-
* The base plane of the
|
|
633
|
+
* The base plane of the circle
|
|
608
634
|
*/
|
|
609
635
|
plane: Plane;
|
|
610
636
|
/**
|
|
611
|
-
* The
|
|
612
|
-
*/
|
|
613
|
-
startAngle: number;
|
|
614
|
-
/**
|
|
615
|
-
* The end angle of the arc
|
|
616
|
-
*/
|
|
617
|
-
endAngle: number;
|
|
618
|
-
/**
|
|
619
|
-
* The radius of the arc
|
|
637
|
+
* The radius of the circle
|
|
620
638
|
*/
|
|
621
639
|
radius: number;
|
|
622
640
|
}
|
|
623
641
|
|
|
624
642
|
/**
|
|
625
|
-
*
|
|
643
|
+
* A surface defined by three points
|
|
626
644
|
*/
|
|
627
|
-
export
|
|
628
|
-
/**
|
|
629
|
-
* The plane that the box is aligned to
|
|
630
|
-
*/
|
|
631
|
-
plane: Plane;
|
|
632
|
-
/**
|
|
633
|
-
* The bounding box in the local coordinate system
|
|
634
|
-
*/
|
|
635
|
-
bounds: BoundingBox3D;
|
|
636
|
-
}
|
|
645
|
+
export type TriangleSurface = Triangle3D;
|
|
637
646
|
|
|
638
647
|
/**
|
|
639
|
-
*
|
|
648
|
+
* Proxy for various curve types
|
|
640
649
|
*/
|
|
641
|
-
export
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
*/
|
|
649
|
-
radius: number;
|
|
650
|
-
}
|
|
650
|
+
export type CurveProxy = { variant: "Line"; data: LineCurve3D } | { variant: "Arc"; data: ArcCurve } | { variant: "Circle"; data: CircleCurve } | { variant: "Ellipse"; data: EllipseCurve } | { variant: "Rectangle"; data: RectangleCurve } | { variant: "Polyline"; data: PolylineCurve3D } | { variant: "NURBS"; data: NurbsCurve } | { variant: "Poly"; data: PolyCurve };
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
export type BoundingBox3D = {
|
|
654
|
+
min: Vector3;
|
|
655
|
+
max: Vector3;
|
|
656
|
+
};
|
|
651
657
|
|
|
652
658
|
/**
|
|
653
659
|
* Plane representation with origin, normal, x axis, and y axis
|
|
@@ -689,32 +695,63 @@ export interface PlaneSurface {
|
|
|
689
695
|
y: Domain;
|
|
690
696
|
}
|
|
691
697
|
|
|
698
|
+
/**
|
|
699
|
+
* A ellipse curve in 3D space
|
|
700
|
+
*/
|
|
701
|
+
export interface EllipseCurve {
|
|
702
|
+
/**
|
|
703
|
+
* The base plane of the ellipse
|
|
704
|
+
*/
|
|
705
|
+
plane: Plane;
|
|
706
|
+
/**
|
|
707
|
+
* The x radius of the ellipse
|
|
708
|
+
*/
|
|
709
|
+
xRadius: number;
|
|
710
|
+
/**
|
|
711
|
+
* The y radius of the ellipse
|
|
712
|
+
*/
|
|
713
|
+
yRadius: number;
|
|
714
|
+
}
|
|
692
715
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
u_knots: T[];
|
|
702
|
-
v_knots: T[];
|
|
703
|
-
u_degree: T;
|
|
704
|
-
v_degree: T;
|
|
705
|
-
};
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
export type BoundingBox3D = {
|
|
709
|
-
min: Vector3;
|
|
710
|
-
max: Vector3;
|
|
711
|
-
};
|
|
716
|
+
/**
|
|
717
|
+
* A face of a mesh with three vertices
|
|
718
|
+
*/
|
|
719
|
+
export interface MeshTriangleFace {
|
|
720
|
+
a: number;
|
|
721
|
+
b: number;
|
|
722
|
+
c: number;
|
|
723
|
+
}
|
|
712
724
|
|
|
713
725
|
export interface Domain {
|
|
714
726
|
min: number;
|
|
715
727
|
max: number;
|
|
716
728
|
}
|
|
717
729
|
|
|
730
|
+
/**
|
|
731
|
+
* Interop struct for point cloud data
|
|
732
|
+
*/
|
|
733
|
+
export interface PointCloudInterop {
|
|
734
|
+
/**
|
|
735
|
+
* Vertices of the point cloud
|
|
736
|
+
*/
|
|
737
|
+
vertices: [number, number, number][];
|
|
738
|
+
/**
|
|
739
|
+
* Transform matrix of the point cloud
|
|
740
|
+
*/
|
|
741
|
+
transform: Transform3<number>;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Proxy for various surface types
|
|
746
|
+
*/
|
|
747
|
+
export type SurfaceProxy = { variant: "Circular"; data: CircularSurface } | { variant: "Triangle"; data: TriangleSurface } | { variant: "Plane"; data: PlaneSurface } | { variant: "NURBS"; data: NurbsSurface } | { variant: "Trimmed"; data: TrimmedSurface };
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
export type LineCurve3D = {
|
|
751
|
+
a: Point3;
|
|
752
|
+
b: Point3;
|
|
753
|
+
};
|
|
754
|
+
|
|
718
755
|
/**
|
|
719
756
|
* Interop struct for curve data
|
|
720
757
|
*/
|
|
@@ -752,46 +789,9 @@ export interface Mesh {
|
|
|
752
789
|
}
|
|
753
790
|
|
|
754
791
|
/**
|
|
755
|
-
*
|
|
756
|
-
*/
|
|
757
|
-
export type NurbsSurface = NurbsSurface3D<number>;
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* A rectangle curve in 3D space
|
|
761
|
-
*/
|
|
762
|
-
export interface RectangleCurve {
|
|
763
|
-
/**
|
|
764
|
-
* The base plane of the rectangle
|
|
765
|
-
*/
|
|
766
|
-
plane: Plane;
|
|
767
|
-
/**
|
|
768
|
-
* The domain of the rectangle in the plane x axis
|
|
769
|
-
*/
|
|
770
|
-
x: Domain;
|
|
771
|
-
/**
|
|
772
|
-
* The domain of the rectangle in the plane y axis
|
|
773
|
-
*/
|
|
774
|
-
y: Domain;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* Interop struct for point cloud data
|
|
779
|
-
*/
|
|
780
|
-
export interface PointCloudInterop {
|
|
781
|
-
/**
|
|
782
|
-
* Vertices of the point cloud
|
|
783
|
-
*/
|
|
784
|
-
vertices: [number, number, number][];
|
|
785
|
-
/**
|
|
786
|
-
* Transform matrix of the point cloud
|
|
787
|
-
*/
|
|
788
|
-
transform: Transform3<number>;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* Proxy for various surface types
|
|
792
|
+
* Geometry proxy for various geometry types
|
|
793
793
|
*/
|
|
794
|
-
export type
|
|
794
|
+
export type GeometryProxy = { variant: "Curve"; data: CurveProxy } | { variant: "Surface"; data: SurfaceProxy } | { variant: "Brep"; data: Brep } | { variant: "Mesh"; data: Mesh } | { variant: "BBox"; data: OrientedBox } | { variant: "Group"; data: Group };
|
|
795
795
|
|
|
796
796
|
/**
|
|
797
797
|
* Modular structure with a graph handle
|
|
@@ -871,8 +871,8 @@ export interface InitOutput {
|
|
|
871
871
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
872
872
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
873
873
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
874
|
-
readonly
|
|
875
|
-
readonly
|
|
874
|
+
readonly closure885_externref_shim: (a: number, b: number, c: any) => void;
|
|
875
|
+
readonly closure3602_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
876
876
|
readonly __wbindgen_start: () => void;
|
|
877
877
|
}
|
|
878
878
|
|
package/index.js
CHANGED
|
@@ -225,11 +225,11 @@ export function do_nothing_just_tell_wasm_bindgen_to_generate_types() {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
228
|
-
wasm.
|
|
228
|
+
wasm.closure885_externref_shim(arg0, arg1, arg2);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
function __wbg_adapter_129(arg0, arg1, arg2, arg3) {
|
|
232
|
-
wasm.
|
|
232
|
+
wasm.closure3602_externref_shim(arg0, arg1, arg2, arg3);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
const ModularFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -425,10 +425,10 @@ function __wbg_get_imports() {
|
|
|
425
425
|
const ret = Object.entries(arg0);
|
|
426
426
|
return ret;
|
|
427
427
|
};
|
|
428
|
-
imports.wbg.
|
|
428
|
+
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
429
429
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
430
430
|
}, arguments) };
|
|
431
|
-
imports.wbg.
|
|
431
|
+
imports.wbg.__wbg_getRandomValues_e14bd3de0db61032 = function() { return handleError(function (arg0, arg1) {
|
|
432
432
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
433
433
|
}, arguments) };
|
|
434
434
|
imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
|
|
@@ -643,8 +643,8 @@ function __wbg_get_imports() {
|
|
|
643
643
|
const ret = false;
|
|
644
644
|
return ret;
|
|
645
645
|
};
|
|
646
|
-
imports.wbg.
|
|
647
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
646
|
+
imports.wbg.__wbindgen_closure_wrapper3884 = function(arg0, arg1, arg2) {
|
|
647
|
+
const ret = makeMutClosure(arg0, arg1, 886, __wbg_adapter_52);
|
|
648
648
|
return ret;
|
|
649
649
|
};
|
|
650
650
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/index_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Masatatsu Nakamura <masatatsu.nakamura@gmail.com"
|
|
6
6
|
],
|
|
7
7
|
"description": "Modular is a module project designed to import node graphs created in Nodi in JSON format, enabling the extraction of geometric data generated based on the node graph structure.",
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.29",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|