nodi-modular 0.0.34 → 0.0.35
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 +312 -312
- package/index.js +97 -81
- package/index_bg.wasm +0 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -88,72 +88,122 @@ export interface VectorDisplayHandle {
|
|
|
88
88
|
export type DisplayProxyHandle = { variant: "Vector"; data: VectorDisplayHandle } | { variant: "PointList"; data: PointListDisplayHandle };
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* Interop struct for node
|
|
91
|
+
* Interop struct for node property
|
|
92
92
|
*/
|
|
93
|
-
export interface
|
|
93
|
+
export interface NodePropertyInterop {
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Property name
|
|
96
96
|
*/
|
|
97
|
+
name: string;
|
|
98
|
+
/**
|
|
99
|
+
* Property value
|
|
100
|
+
*/
|
|
101
|
+
value: NodePropertyValue;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the node has input connection and the property change is disabled
|
|
104
|
+
*/
|
|
105
|
+
connected?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the property is disabled in node\' inspector
|
|
108
|
+
*/
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Interop struct for transform
|
|
114
|
+
* Represents a 4x4 matrix as a 16-element array
|
|
115
|
+
*/
|
|
116
|
+
export type TransformInterop = number[];
|
|
117
|
+
|
|
118
|
+
export interface GroupInteropHandle {
|
|
119
|
+
objects: GeometryInteropHandleProxy[];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface NodeCreationSetting {
|
|
123
|
+
id: NodeId;
|
|
97
124
|
variant: string;
|
|
125
|
+
name?: string;
|
|
126
|
+
label?: string;
|
|
127
|
+
inputs?: number;
|
|
128
|
+
outputs?: number;
|
|
129
|
+
properties: NodePropertyInterop[];
|
|
130
|
+
enabled?: boolean;
|
|
131
|
+
visible?: boolean;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Options for adaptive tessellation to create geometry interoperability
|
|
136
|
+
*/
|
|
137
|
+
export interface AdaptiveTessellationOptions {
|
|
98
138
|
/**
|
|
99
|
-
*
|
|
139
|
+
* Whether to enable adaptive tessellation
|
|
100
140
|
*/
|
|
101
|
-
|
|
102
|
-
name: string;
|
|
103
|
-
label: string | undefined;
|
|
104
|
-
description: string;
|
|
141
|
+
enabled: boolean;
|
|
105
142
|
/**
|
|
106
|
-
*
|
|
143
|
+
* Tolerance for the normal vector: if the L2 norm of the normal vectors is below this value, the edge is considered flat
|
|
107
144
|
*/
|
|
108
|
-
|
|
145
|
+
normTolerance: number;
|
|
109
146
|
/**
|
|
110
|
-
*
|
|
147
|
+
* Minimum number of divisions in u direction
|
|
111
148
|
*/
|
|
112
|
-
|
|
149
|
+
minDivsU: number;
|
|
113
150
|
/**
|
|
114
|
-
*
|
|
151
|
+
* Minimum number of divisions in v direction
|
|
115
152
|
*/
|
|
116
|
-
|
|
153
|
+
minDivsV: number;
|
|
117
154
|
/**
|
|
118
|
-
*
|
|
155
|
+
* Minimum depth for division
|
|
119
156
|
*/
|
|
120
|
-
|
|
157
|
+
minDepth: number;
|
|
121
158
|
/**
|
|
122
|
-
*
|
|
159
|
+
* Maximum depth for division
|
|
123
160
|
*/
|
|
124
|
-
|
|
125
|
-
enabled: boolean;
|
|
126
|
-
visible: boolean;
|
|
127
|
-
meta: NodeMetaInterop;
|
|
161
|
+
maxDepth: number;
|
|
128
162
|
}
|
|
129
163
|
|
|
130
|
-
export interface
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
164
|
+
export interface NodeConnectionInterop {
|
|
165
|
+
outputNodeId: string;
|
|
166
|
+
outputIndex: number;
|
|
167
|
+
inputNodeId: string;
|
|
168
|
+
inputIndex: number;
|
|
169
|
+
inputConnectionIndex: number | undefined;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface IndicesInteropHandle {
|
|
173
|
+
count: number;
|
|
174
|
+
indices: number;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface DataTreeInterop {
|
|
178
|
+
branches: IndexMap<string, string[]>;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface DataTreeFormatInterop {
|
|
182
|
+
outputs: IndexMap<string, string>;
|
|
139
183
|
}
|
|
140
184
|
|
|
141
185
|
/**
|
|
142
|
-
*
|
|
186
|
+
* Curve interop handle for wasm interop
|
|
187
|
+
* stride = 3 (x, y, z)
|
|
143
188
|
*/
|
|
144
|
-
export interface
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
error: string | undefined;
|
|
149
|
-
/**
|
|
150
|
-
* Node\' output has geometry or not
|
|
151
|
-
*/
|
|
152
|
-
hasGeometry: boolean;
|
|
189
|
+
export interface CurveInteropHandle {
|
|
190
|
+
count: number;
|
|
191
|
+
vertices: number;
|
|
192
|
+
transform: TransformInterop | undefined;
|
|
153
193
|
}
|
|
154
194
|
|
|
155
195
|
export type GeometryInteropHandleProxy = { variant: "Mesh"; data: MeshInteropHandle } | { variant: "Curve"; data: CurveInteropHandle } | { variant: "Group"; data: GroupInteropHandle };
|
|
156
196
|
|
|
197
|
+
export type GeometryInteropVec = GeometryInterop[];
|
|
198
|
+
|
|
199
|
+
export type NodeConnectionInteropVec = NodeConnectionInterop[];
|
|
200
|
+
|
|
201
|
+
export type NodePropertyInteropVec = NodePropertyInterop[];
|
|
202
|
+
|
|
203
|
+
export type NodeInteropVec = NodeInterop[];
|
|
204
|
+
|
|
205
|
+
export type EdgeInteropVec = EdgeInterop[];
|
|
206
|
+
|
|
157
207
|
export interface EdgeInterop {
|
|
158
208
|
source: EdgeUnitInterop<OutputId>;
|
|
159
209
|
destination: EdgeUnitInterop<InputId>;
|
|
@@ -165,28 +215,6 @@ export interface EdgeUnitInterop<IO> {
|
|
|
165
215
|
io: IO;
|
|
166
216
|
}
|
|
167
217
|
|
|
168
|
-
/**
|
|
169
|
-
* Geometry identifier
|
|
170
|
-
*/
|
|
171
|
-
export interface GeometryIdentifier {
|
|
172
|
-
/**
|
|
173
|
-
* Parent node ID
|
|
174
|
-
*/
|
|
175
|
-
graphNodeSet?: GraphNodeSet;
|
|
176
|
-
/**
|
|
177
|
-
* Output ID that the geometry is belonged to
|
|
178
|
-
*/
|
|
179
|
-
outputId: OutputId;
|
|
180
|
-
/**
|
|
181
|
-
* Geometry ID
|
|
182
|
-
*/
|
|
183
|
-
geometryId: ID<GeometryProxy>;
|
|
184
|
-
/**
|
|
185
|
-
* Transform matrix in interop format
|
|
186
|
-
*/
|
|
187
|
-
transform: TransformInterop;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
218
|
|
|
191
219
|
/// Manually added types due to limitations in the `wasm-bindgen` & `tsify` crates.
|
|
192
220
|
export type ID<T = any> = string;
|
|
@@ -219,119 +247,91 @@ export type Transform3<T = number> = FixedLengthArray<T, 16>;
|
|
|
219
247
|
export type Matrix4<T = number> = FixedLengthArray<FixedLengthArray<T, 4>, 4>;
|
|
220
248
|
|
|
221
249
|
|
|
222
|
-
export type GeometryInteropVec = GeometryInterop[];
|
|
223
|
-
|
|
224
|
-
export type NodeConnectionInteropVec = NodeConnectionInterop[];
|
|
225
|
-
|
|
226
|
-
export type NodePropertyInteropVec = NodePropertyInterop[];
|
|
227
|
-
|
|
228
|
-
export type NodeInteropVec = NodeInterop[];
|
|
229
|
-
|
|
230
|
-
export type EdgeInteropVec = EdgeInterop[];
|
|
231
|
-
|
|
232
|
-
export interface DataTreeInterop {
|
|
233
|
-
branches: IndexMap<string, string[]>;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export interface DataTreeFormatInterop {
|
|
237
|
-
outputs: IndexMap<string, string>;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
250
|
/**
|
|
241
|
-
*
|
|
251
|
+
* Geometry identifier
|
|
242
252
|
*/
|
|
243
|
-
export interface
|
|
253
|
+
export interface GeometryIdentifier {
|
|
244
254
|
/**
|
|
245
|
-
*
|
|
255
|
+
* Parent node ID
|
|
246
256
|
*/
|
|
247
|
-
|
|
257
|
+
graphNodeSet?: GraphNodeSet;
|
|
248
258
|
/**
|
|
249
|
-
*
|
|
259
|
+
* Output ID that the geometry is belonged to
|
|
250
260
|
*/
|
|
251
|
-
|
|
261
|
+
outputId: OutputId;
|
|
252
262
|
/**
|
|
253
|
-
*
|
|
263
|
+
* Geometry ID
|
|
254
264
|
*/
|
|
255
|
-
|
|
265
|
+
geometryId: ID<GeometryProxy>;
|
|
256
266
|
/**
|
|
257
|
-
*
|
|
267
|
+
* Transform matrix in interop format
|
|
258
268
|
*/
|
|
259
|
-
|
|
269
|
+
transform: TransformInterop;
|
|
260
270
|
}
|
|
261
271
|
|
|
262
272
|
/**
|
|
263
|
-
* Interop struct for
|
|
264
|
-
* Represents a 4x4 matrix as a 16-element array
|
|
273
|
+
* Interop struct for node
|
|
265
274
|
*/
|
|
266
|
-
export
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export interface NodeCreationSetting {
|
|
273
|
-
id: NodeId;
|
|
275
|
+
export interface NodeInterop {
|
|
276
|
+
/**
|
|
277
|
+
* Node variant
|
|
278
|
+
*/
|
|
274
279
|
variant: string;
|
|
275
|
-
name?: string;
|
|
276
|
-
label?: string;
|
|
277
|
-
inputs?: number;
|
|
278
|
-
outputs?: number;
|
|
279
|
-
properties: NodePropertyInterop[];
|
|
280
|
-
enabled?: boolean;
|
|
281
|
-
visible?: boolean;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Options for adaptive tessellation to create geometry interoperability
|
|
286
|
-
*/
|
|
287
|
-
export interface AdaptiveTessellationOptions {
|
|
288
280
|
/**
|
|
289
|
-
*
|
|
281
|
+
* Node identifier
|
|
290
282
|
*/
|
|
291
|
-
|
|
283
|
+
id: string;
|
|
284
|
+
name: string;
|
|
285
|
+
label: string | undefined;
|
|
286
|
+
description: string;
|
|
292
287
|
/**
|
|
293
|
-
*
|
|
288
|
+
* Input parameters
|
|
294
289
|
*/
|
|
295
|
-
|
|
290
|
+
inputs: IOInterop[];
|
|
296
291
|
/**
|
|
297
|
-
*
|
|
292
|
+
* Input variables
|
|
298
293
|
*/
|
|
299
|
-
|
|
294
|
+
inputVariables: IOVariables | undefined;
|
|
300
295
|
/**
|
|
301
|
-
*
|
|
296
|
+
* Output parameters
|
|
302
297
|
*/
|
|
303
|
-
|
|
298
|
+
outputs: IOInterop[];
|
|
304
299
|
/**
|
|
305
|
-
*
|
|
300
|
+
* Output variables
|
|
306
301
|
*/
|
|
307
|
-
|
|
302
|
+
outputVariables: IOVariables | undefined;
|
|
308
303
|
/**
|
|
309
|
-
*
|
|
304
|
+
* Node properties
|
|
310
305
|
*/
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
outputNodeId: string;
|
|
316
|
-
outputIndex: number;
|
|
317
|
-
inputNodeId: string;
|
|
318
|
-
inputIndex: number;
|
|
319
|
-
inputConnectionIndex: number | undefined;
|
|
306
|
+
properties: NodePropertyInterop[];
|
|
307
|
+
enabled: boolean;
|
|
308
|
+
visible: boolean;
|
|
309
|
+
meta: NodeMetaInterop;
|
|
320
310
|
}
|
|
321
311
|
|
|
322
|
-
export interface
|
|
323
|
-
|
|
324
|
-
|
|
312
|
+
export interface NodeEntityInterop {
|
|
313
|
+
variant: string;
|
|
314
|
+
id: string;
|
|
315
|
+
name: string;
|
|
316
|
+
label: string | undefined;
|
|
317
|
+
inputs: string[];
|
|
318
|
+
outputs: string[];
|
|
319
|
+
enabled: boolean;
|
|
320
|
+
visible: boolean;
|
|
325
321
|
}
|
|
326
322
|
|
|
327
323
|
/**
|
|
328
|
-
*
|
|
329
|
-
* stride = 3 (x, y, z)
|
|
324
|
+
* Interop struct for node meta
|
|
330
325
|
*/
|
|
331
|
-
export interface
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
326
|
+
export interface NodeMetaInterop {
|
|
327
|
+
/**
|
|
328
|
+
* Error message
|
|
329
|
+
*/
|
|
330
|
+
error: string | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* Node\' output has geometry or not
|
|
333
|
+
*/
|
|
334
|
+
hasGeometry: boolean;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
export type GraphMappingTypes = "None" | "Bezier" | "Linear" | "Sine";
|
|
@@ -468,90 +468,36 @@ export interface IOManager<T, U> {
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
|
|
471
|
-
export type
|
|
472
|
-
|
|
473
|
-
|
|
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;
|
|
474
477
|
};
|
|
475
478
|
|
|
476
479
|
/**
|
|
477
|
-
*
|
|
478
|
-
*/
|
|
479
|
-
export interface PointCloudInterop {
|
|
480
|
-
/**
|
|
481
|
-
* Vertices of the point cloud
|
|
482
|
-
*/
|
|
483
|
-
vertices: [number, number, number][];
|
|
484
|
-
/**
|
|
485
|
-
* Transform matrix of the point cloud
|
|
486
|
-
*/
|
|
487
|
-
transform: Transform3<number>;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Plane representation with origin, normal, x axis, and y axis
|
|
492
|
-
*/
|
|
493
|
-
export interface Plane {
|
|
494
|
-
/**
|
|
495
|
-
* Origin coordinate of the plane
|
|
496
|
-
*/
|
|
497
|
-
origin: Point3<number>;
|
|
498
|
-
/**
|
|
499
|
-
* Normal vector of the plane
|
|
500
|
-
*/
|
|
501
|
-
normal: Vector3<number>;
|
|
502
|
-
/**
|
|
503
|
-
* X axis of the plane
|
|
504
|
-
*/
|
|
505
|
-
xAxis: Vector3<number>;
|
|
506
|
-
/**
|
|
507
|
-
* Y axis of the plane
|
|
508
|
-
*/
|
|
509
|
-
yAxis: Vector3<number>;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Proxy for various surface types
|
|
480
|
+
* A NURBS surface container
|
|
514
481
|
*/
|
|
515
|
-
export type
|
|
482
|
+
export type NurbsSurface = NurbsSurface3D<number>;
|
|
516
483
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
export interface RectangleCurve {
|
|
521
|
-
/**
|
|
522
|
-
* The base plane of the rectangle
|
|
523
|
-
*/
|
|
524
|
-
plane: Plane;
|
|
525
|
-
/**
|
|
526
|
-
* The domain of the rectangle in the plane x axis
|
|
527
|
-
*/
|
|
528
|
-
x: Domain;
|
|
529
|
-
/**
|
|
530
|
-
* The domain of the rectangle in the plane y axis
|
|
531
|
-
*/
|
|
532
|
-
y: Domain;
|
|
484
|
+
export interface Domain {
|
|
485
|
+
min: number;
|
|
486
|
+
max: number;
|
|
533
487
|
}
|
|
534
488
|
|
|
535
489
|
/**
|
|
536
|
-
*
|
|
490
|
+
* Interop struct for point cloud data
|
|
537
491
|
*/
|
|
538
|
-
export interface
|
|
539
|
-
/**
|
|
540
|
-
* The base plane of the arc
|
|
541
|
-
*/
|
|
542
|
-
plane: Plane;
|
|
543
|
-
/**
|
|
544
|
-
* The start angle of the arc
|
|
545
|
-
*/
|
|
546
|
-
startAngle: number;
|
|
492
|
+
export interface PointCloudInterop {
|
|
547
493
|
/**
|
|
548
|
-
*
|
|
494
|
+
* Vertices of the point cloud
|
|
549
495
|
*/
|
|
550
|
-
|
|
496
|
+
vertices: [number, number, number][];
|
|
551
497
|
/**
|
|
552
|
-
*
|
|
498
|
+
* Transform matrix of the point cloud
|
|
553
499
|
*/
|
|
554
|
-
|
|
500
|
+
transform: Transform3<number>;
|
|
555
501
|
}
|
|
556
502
|
|
|
557
503
|
/**
|
|
@@ -560,98 +506,76 @@ export interface ArcCurve {
|
|
|
560
506
|
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 };
|
|
561
507
|
|
|
562
508
|
/**
|
|
563
|
-
*
|
|
509
|
+
* A surface defined by three points
|
|
564
510
|
*/
|
|
565
|
-
export type
|
|
511
|
+
export type TriangleSurface = Triangle3D;
|
|
566
512
|
|
|
567
513
|
/**
|
|
568
|
-
*
|
|
514
|
+
* Proxy for various curve types
|
|
569
515
|
*/
|
|
570
|
-
export type
|
|
516
|
+
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 };
|
|
571
517
|
|
|
572
518
|
|
|
573
|
-
export type
|
|
574
|
-
|
|
575
|
-
|
|
519
|
+
export type LineCurve3D = {
|
|
520
|
+
a: Point3;
|
|
521
|
+
b: Point3;
|
|
576
522
|
};
|
|
577
523
|
|
|
578
524
|
/**
|
|
579
|
-
*
|
|
525
|
+
* Plane representation with origin, normal, x axis, and y axis
|
|
580
526
|
*/
|
|
581
|
-
export interface
|
|
527
|
+
export interface Plane {
|
|
582
528
|
/**
|
|
583
|
-
*
|
|
529
|
+
* Origin coordinate of the plane
|
|
584
530
|
*/
|
|
585
|
-
|
|
531
|
+
origin: Point3<number>;
|
|
586
532
|
/**
|
|
587
|
-
*
|
|
533
|
+
* Normal vector of the plane
|
|
588
534
|
*/
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* A circular surface
|
|
594
|
-
*/
|
|
595
|
-
export interface CircularSurface {
|
|
535
|
+
normal: Vector3<number>;
|
|
596
536
|
/**
|
|
597
|
-
*
|
|
537
|
+
* X axis of the plane
|
|
598
538
|
*/
|
|
599
|
-
|
|
539
|
+
xAxis: Vector3<number>;
|
|
600
540
|
/**
|
|
601
|
-
*
|
|
541
|
+
* Y axis of the plane
|
|
602
542
|
*/
|
|
603
|
-
|
|
543
|
+
yAxis: Vector3<number>;
|
|
604
544
|
}
|
|
605
545
|
|
|
606
546
|
/**
|
|
607
|
-
* A
|
|
547
|
+
* A geometry object with a transformation
|
|
608
548
|
*/
|
|
609
|
-
export interface
|
|
549
|
+
export interface GeometryTransform {
|
|
610
550
|
/**
|
|
611
|
-
* The
|
|
551
|
+
* The handle to the geometry object
|
|
612
552
|
*/
|
|
613
|
-
|
|
553
|
+
geometry: Handle<GeometryProxy>;
|
|
614
554
|
/**
|
|
615
|
-
*
|
|
555
|
+
* Transformation matrix of the geometry
|
|
616
556
|
*/
|
|
617
|
-
|
|
557
|
+
transform: Transform3<number>;
|
|
618
558
|
}
|
|
619
559
|
|
|
620
|
-
|
|
621
|
-
export type PolylineCurve2D = {
|
|
622
|
-
points: Point2[];
|
|
623
|
-
};
|
|
624
|
-
export type PolylineCurve3D = {
|
|
625
|
-
points: Point3[];
|
|
626
|
-
};
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
export type NurbsSurface3D<T = number> = {
|
|
630
|
-
control_points: Point4<T>[][];
|
|
631
|
-
u_knots: T[];
|
|
632
|
-
v_knots: T[];
|
|
633
|
-
u_degree: T;
|
|
634
|
-
v_degree: T;
|
|
635
|
-
};
|
|
636
|
-
|
|
637
560
|
/**
|
|
638
|
-
*
|
|
561
|
+
* A rectangle curve in 3D space
|
|
639
562
|
*/
|
|
640
|
-
export interface
|
|
563
|
+
export interface RectangleCurve {
|
|
641
564
|
/**
|
|
642
|
-
* The plane
|
|
565
|
+
* The base plane of the rectangle
|
|
643
566
|
*/
|
|
644
567
|
plane: Plane;
|
|
645
568
|
/**
|
|
646
|
-
* The
|
|
569
|
+
* The domain of the rectangle in the plane x axis
|
|
647
570
|
*/
|
|
648
|
-
|
|
571
|
+
x: Domain;
|
|
572
|
+
/**
|
|
573
|
+
* The domain of the rectangle in the plane y axis
|
|
574
|
+
*/
|
|
575
|
+
y: Domain;
|
|
649
576
|
}
|
|
650
577
|
|
|
651
|
-
|
|
652
|
-
* A NURBS surface container
|
|
653
|
-
*/
|
|
654
|
-
export type NurbsSurface = NurbsSurface3D<number>;
|
|
578
|
+
export type PolyCurve = CompoundCurve<number, U4>;
|
|
655
579
|
|
|
656
580
|
/**
|
|
657
581
|
* A ellipse curve in 3D space
|
|
@@ -671,32 +595,6 @@ export interface EllipseCurve {
|
|
|
671
595
|
yRadius: number;
|
|
672
596
|
}
|
|
673
597
|
|
|
674
|
-
export interface Domain {
|
|
675
|
-
min: number;
|
|
676
|
-
max: number;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* A collection of geometry objects
|
|
681
|
-
*/
|
|
682
|
-
export type Group = GeometryTransform[];
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* A face of a mesh with three vertices
|
|
686
|
-
*/
|
|
687
|
-
export interface MeshTriangleFace {
|
|
688
|
-
a: number;
|
|
689
|
-
b: number;
|
|
690
|
-
c: number;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
export type NurbsCurve3D<T = number> = {
|
|
695
|
-
control_points: Point4<T>[];
|
|
696
|
-
knots: T[];
|
|
697
|
-
degree: T;
|
|
698
|
-
};
|
|
699
|
-
|
|
700
598
|
|
|
701
599
|
export type Triangle3D = {
|
|
702
600
|
a: Point3;
|
|
@@ -730,11 +628,73 @@ export interface MeshInterop {
|
|
|
730
628
|
transform?: Transform3<number>;
|
|
731
629
|
}
|
|
732
630
|
|
|
631
|
+
/**
|
|
632
|
+
* An arc curve in 3D space
|
|
633
|
+
*/
|
|
634
|
+
export interface ArcCurve {
|
|
635
|
+
/**
|
|
636
|
+
* The base plane of the arc
|
|
637
|
+
*/
|
|
638
|
+
plane: Plane;
|
|
639
|
+
/**
|
|
640
|
+
* The start angle of the arc
|
|
641
|
+
*/
|
|
642
|
+
startAngle: number;
|
|
643
|
+
/**
|
|
644
|
+
* The end angle of the arc
|
|
645
|
+
*/
|
|
646
|
+
endAngle: number;
|
|
647
|
+
/**
|
|
648
|
+
* The radius of the arc
|
|
649
|
+
*/
|
|
650
|
+
radius: number;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
export type NurbsCurve3D<T = number> = {
|
|
655
|
+
control_points: Point4<T>[];
|
|
656
|
+
knots: T[];
|
|
657
|
+
degree: T;
|
|
658
|
+
};
|
|
659
|
+
|
|
733
660
|
/**
|
|
734
661
|
* Interop proxy for various geometry types
|
|
735
662
|
*/
|
|
736
663
|
export type GeometryInterop = { variant: "Mesh"; data: MeshInterop } | { variant: "Curve"; data: CurveInterop } | { variant: "Point"; data: PointCloudInterop } | { variant: "Plane"; data: Plane } | { variant: "Group"; data: GeometryInterop[] };
|
|
737
664
|
|
|
665
|
+
/**
|
|
666
|
+
* Proxy for various surface types
|
|
667
|
+
*/
|
|
668
|
+
export type SurfaceProxy = { variant: "Circular"; data: CircularSurface } | { variant: "Triangle"; data: TriangleSurface } | { variant: "Plane"; data: PlaneSurface } | { variant: "NURBS"; data: NurbsSurface } | { variant: "Trimmed"; data: TrimmedSurface };
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* A surface defined by a plane and two domains in x and y directions
|
|
672
|
+
*/
|
|
673
|
+
export interface PlaneSurface {
|
|
674
|
+
/**
|
|
675
|
+
* The base plane of the surface
|
|
676
|
+
*/
|
|
677
|
+
plane: Plane;
|
|
678
|
+
/**
|
|
679
|
+
* The domain in x direction
|
|
680
|
+
*/
|
|
681
|
+
x: Domain;
|
|
682
|
+
/**
|
|
683
|
+
* The domain in y direction
|
|
684
|
+
*/
|
|
685
|
+
y: Domain;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export type NurbsCurve = NurbsCurve3D<number>;
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
export type PolylineCurve2D = {
|
|
692
|
+
points: Point2[];
|
|
693
|
+
};
|
|
694
|
+
export type PolylineCurve3D = {
|
|
695
|
+
points: Point3[];
|
|
696
|
+
};
|
|
697
|
+
|
|
738
698
|
/**
|
|
739
699
|
* Mesh representation with vertices, normals, uv, and index
|
|
740
700
|
*/
|
|
@@ -757,41 +717,81 @@ export interface Mesh {
|
|
|
757
717
|
index: [number, number, number][];
|
|
758
718
|
}
|
|
759
719
|
|
|
720
|
+
|
|
721
|
+
export type BoundingBox3D = {
|
|
722
|
+
min: Vector3;
|
|
723
|
+
max: Vector3;
|
|
724
|
+
};
|
|
725
|
+
|
|
760
726
|
/**
|
|
761
|
-
* A
|
|
727
|
+
* A collection of geometry objects
|
|
762
728
|
*/
|
|
763
|
-
export
|
|
729
|
+
export type Group = GeometryTransform[];
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* A face of a mesh with three vertices
|
|
733
|
+
*/
|
|
734
|
+
export interface MeshTriangleFace {
|
|
735
|
+
a: number;
|
|
736
|
+
b: number;
|
|
737
|
+
c: number;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* A circular surface
|
|
742
|
+
*/
|
|
743
|
+
export interface CircularSurface {
|
|
764
744
|
/**
|
|
765
|
-
* The
|
|
745
|
+
* The base plane of the circle
|
|
766
746
|
*/
|
|
767
|
-
|
|
747
|
+
plane: Plane;
|
|
768
748
|
/**
|
|
769
|
-
*
|
|
749
|
+
* The radius of the circle
|
|
770
750
|
*/
|
|
771
|
-
|
|
751
|
+
radius: number;
|
|
772
752
|
}
|
|
773
753
|
|
|
774
754
|
/**
|
|
775
|
-
* A
|
|
755
|
+
* A circle curve in 3D space
|
|
776
756
|
*/
|
|
777
|
-
export interface
|
|
757
|
+
export interface CircleCurve {
|
|
778
758
|
/**
|
|
779
|
-
* The base plane of the
|
|
759
|
+
* The base plane of the circle
|
|
780
760
|
*/
|
|
781
761
|
plane: Plane;
|
|
782
762
|
/**
|
|
783
|
-
* The
|
|
763
|
+
* The radius of the circle
|
|
784
764
|
*/
|
|
785
|
-
|
|
765
|
+
radius: number;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* An oriented box in 3D space
|
|
770
|
+
*/
|
|
771
|
+
export interface OrientedBox {
|
|
786
772
|
/**
|
|
787
|
-
* The
|
|
773
|
+
* The plane that the box is aligned to
|
|
788
774
|
*/
|
|
789
|
-
|
|
775
|
+
plane: Plane;
|
|
776
|
+
/**
|
|
777
|
+
* The bounding box in the local coordinate system
|
|
778
|
+
*/
|
|
779
|
+
bounds: BoundingBox3D;
|
|
790
780
|
}
|
|
791
781
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
782
|
+
/**
|
|
783
|
+
* Interop struct for curve data
|
|
784
|
+
*/
|
|
785
|
+
export interface CurveInterop {
|
|
786
|
+
/**
|
|
787
|
+
* Vertices of the curve
|
|
788
|
+
*/
|
|
789
|
+
vertices: [number, number, number][];
|
|
790
|
+
/**
|
|
791
|
+
* Transform matrix of the curve
|
|
792
|
+
*/
|
|
793
|
+
transform: Transform3<number> | undefined;
|
|
794
|
+
}
|
|
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 closure910_externref_shim: (a: number, b: number, c: any) => void;
|
|
875
|
+
readonly closure3804_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
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
-
let WASM_VECTOR_LEN = 0;
|
|
4
|
-
|
|
5
3
|
let cachedUint8ArrayMemory0 = null;
|
|
6
4
|
|
|
7
5
|
function getUint8ArrayMemory0() {
|
|
@@ -11,6 +9,29 @@ function getUint8ArrayMemory0() {
|
|
|
11
9
|
return cachedUint8ArrayMemory0;
|
|
12
10
|
}
|
|
13
11
|
|
|
12
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
13
|
+
|
|
14
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
15
|
+
|
|
16
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
|
+
let numBytesDecoded = 0;
|
|
18
|
+
function decodeText(ptr, len) {
|
|
19
|
+
numBytesDecoded += len;
|
|
20
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
+
cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
22
|
+
cachedTextDecoder.decode();
|
|
23
|
+
numBytesDecoded = len;
|
|
24
|
+
}
|
|
25
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getStringFromWasm0(ptr, len) {
|
|
29
|
+
ptr = ptr >>> 0;
|
|
30
|
+
return decodeText(ptr, len);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let WASM_VECTOR_LEN = 0;
|
|
34
|
+
|
|
14
35
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
15
36
|
|
|
16
37
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -94,15 +115,6 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
94
115
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
95
116
|
}
|
|
96
117
|
|
|
97
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
98
|
-
|
|
99
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
100
|
-
|
|
101
|
-
function getStringFromWasm0(ptr, len) {
|
|
102
|
-
ptr = ptr >>> 0;
|
|
103
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
118
|
function isLikeNone(x) {
|
|
107
119
|
return x === undefined || x === null;
|
|
108
120
|
}
|
|
@@ -224,12 +236,12 @@ export function do_nothing_just_tell_wasm_bindgen_to_generate_types() {
|
|
|
224
236
|
wasm.do_nothing_just_tell_wasm_bindgen_to_generate_types();
|
|
225
237
|
}
|
|
226
238
|
|
|
227
|
-
function
|
|
228
|
-
wasm.
|
|
239
|
+
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
240
|
+
wasm.closure910_externref_shim(arg0, arg1, arg2);
|
|
229
241
|
}
|
|
230
242
|
|
|
231
|
-
function
|
|
232
|
-
wasm.
|
|
243
|
+
function __wbg_adapter_127(arg0, arg1, arg2, arg3) {
|
|
244
|
+
wasm.closure3804_externref_shim(arg0, arg1, arg2, arg3);
|
|
233
245
|
}
|
|
234
246
|
|
|
235
247
|
const ModularFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -364,6 +376,8 @@ export class Modular {
|
|
|
364
376
|
}
|
|
365
377
|
}
|
|
366
378
|
|
|
379
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
380
|
+
|
|
367
381
|
async function __wbg_load(module, imports) {
|
|
368
382
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
369
383
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -371,7 +385,9 @@ async function __wbg_load(module, imports) {
|
|
|
371
385
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
372
386
|
|
|
373
387
|
} catch (e) {
|
|
374
|
-
|
|
388
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
389
|
+
|
|
390
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
375
391
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
376
392
|
|
|
377
393
|
} else {
|
|
@@ -398,6 +414,10 @@ async function __wbg_load(module, imports) {
|
|
|
398
414
|
function __wbg_get_imports() {
|
|
399
415
|
const imports = {};
|
|
400
416
|
imports.wbg = {};
|
|
417
|
+
imports.wbg.__wbg_Error_0497d5bdba9362e5 = function(arg0, arg1) {
|
|
418
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
419
|
+
return ret;
|
|
420
|
+
};
|
|
401
421
|
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
402
422
|
const ret = String(arg1);
|
|
403
423
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -405,23 +425,23 @@ function __wbg_get_imports() {
|
|
|
405
425
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
406
426
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
407
427
|
};
|
|
408
|
-
imports.wbg.
|
|
428
|
+
imports.wbg.__wbg_buffer_a1a27a0dfa70165d = function(arg0) {
|
|
409
429
|
const ret = arg0.buffer;
|
|
410
430
|
return ret;
|
|
411
431
|
};
|
|
412
|
-
imports.wbg.
|
|
413
|
-
const ret = arg0.call(arg1);
|
|
432
|
+
imports.wbg.__wbg_call_f2db6205e5c51dc8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
433
|
+
const ret = arg0.call(arg1, arg2);
|
|
414
434
|
return ret;
|
|
415
435
|
}, arguments) };
|
|
416
|
-
imports.wbg.
|
|
417
|
-
const ret = arg0.call(arg1
|
|
436
|
+
imports.wbg.__wbg_call_fbe8be8bf6436ce5 = function() { return handleError(function (arg0, arg1) {
|
|
437
|
+
const ret = arg0.call(arg1);
|
|
418
438
|
return ret;
|
|
419
439
|
}, arguments) };
|
|
420
|
-
imports.wbg.
|
|
440
|
+
imports.wbg.__wbg_done_4d01f352bade43b7 = function(arg0) {
|
|
421
441
|
const ret = arg0.done;
|
|
422
442
|
return ret;
|
|
423
443
|
};
|
|
424
|
-
imports.wbg.
|
|
444
|
+
imports.wbg.__wbg_entries_41651c850143b957 = function(arg0) {
|
|
425
445
|
const ret = Object.entries(arg0);
|
|
426
446
|
return ret;
|
|
427
447
|
};
|
|
@@ -431,19 +451,19 @@ function __wbg_get_imports() {
|
|
|
431
451
|
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
432
452
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
433
453
|
}, arguments) };
|
|
434
|
-
imports.wbg.
|
|
454
|
+
imports.wbg.__wbg_getTime_2afe67905d873e92 = function(arg0) {
|
|
435
455
|
const ret = arg0.getTime();
|
|
436
456
|
return ret;
|
|
437
457
|
};
|
|
438
|
-
imports.wbg.
|
|
458
|
+
imports.wbg.__wbg_getTimezoneOffset_31f33c0868da345e = function(arg0) {
|
|
439
459
|
const ret = arg0.getTimezoneOffset();
|
|
440
460
|
return ret;
|
|
441
461
|
};
|
|
442
|
-
imports.wbg.
|
|
462
|
+
imports.wbg.__wbg_get_92470be87867c2e5 = function() { return handleError(function (arg0, arg1) {
|
|
443
463
|
const ret = Reflect.get(arg0, arg1);
|
|
444
464
|
return ret;
|
|
445
465
|
}, arguments) };
|
|
446
|
-
imports.wbg.
|
|
466
|
+
imports.wbg.__wbg_get_a131a44bd1eb6979 = function(arg0, arg1) {
|
|
447
467
|
const ret = arg0[arg1 >>> 0];
|
|
448
468
|
return ret;
|
|
449
469
|
};
|
|
@@ -451,7 +471,7 @@ function __wbg_get_imports() {
|
|
|
451
471
|
const ret = arg0[arg1];
|
|
452
472
|
return ret;
|
|
453
473
|
};
|
|
454
|
-
imports.wbg.
|
|
474
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_a8b6f580b363f2bc = function(arg0) {
|
|
455
475
|
let result;
|
|
456
476
|
try {
|
|
457
477
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -461,7 +481,7 @@ function __wbg_get_imports() {
|
|
|
461
481
|
const ret = result;
|
|
462
482
|
return ret;
|
|
463
483
|
};
|
|
464
|
-
imports.wbg.
|
|
484
|
+
imports.wbg.__wbg_instanceof_Map_80cc65041c96417a = function(arg0) {
|
|
465
485
|
let result;
|
|
466
486
|
try {
|
|
467
487
|
result = arg0 instanceof Map;
|
|
@@ -471,7 +491,7 @@ function __wbg_get_imports() {
|
|
|
471
491
|
const ret = result;
|
|
472
492
|
return ret;
|
|
473
493
|
};
|
|
474
|
-
imports.wbg.
|
|
494
|
+
imports.wbg.__wbg_instanceof_Uint8Array_ca460677bc155827 = function(arg0) {
|
|
475
495
|
let result;
|
|
476
496
|
try {
|
|
477
497
|
result = arg0 instanceof Uint8Array;
|
|
@@ -481,38 +501,54 @@ function __wbg_get_imports() {
|
|
|
481
501
|
const ret = result;
|
|
482
502
|
return ret;
|
|
483
503
|
};
|
|
484
|
-
imports.wbg.
|
|
504
|
+
imports.wbg.__wbg_isArray_5f090bed72bd4f89 = function(arg0) {
|
|
485
505
|
const ret = Array.isArray(arg0);
|
|
486
506
|
return ret;
|
|
487
507
|
};
|
|
488
|
-
imports.wbg.
|
|
508
|
+
imports.wbg.__wbg_isSafeInteger_90d7c4674047d684 = function(arg0) {
|
|
489
509
|
const ret = Number.isSafeInteger(arg0);
|
|
490
510
|
return ret;
|
|
491
511
|
};
|
|
492
|
-
imports.wbg.
|
|
512
|
+
imports.wbg.__wbg_iterator_4068add5b2aef7a6 = function() {
|
|
493
513
|
const ret = Symbol.iterator;
|
|
494
514
|
return ret;
|
|
495
515
|
};
|
|
496
|
-
imports.wbg.
|
|
516
|
+
imports.wbg.__wbg_length_ab6d22b5ead75c72 = function(arg0) {
|
|
497
517
|
const ret = arg0.length;
|
|
498
518
|
return ret;
|
|
499
519
|
};
|
|
500
|
-
imports.wbg.
|
|
520
|
+
imports.wbg.__wbg_length_f00ec12454a5d9fd = function(arg0) {
|
|
501
521
|
const ret = arg0.length;
|
|
502
522
|
return ret;
|
|
503
523
|
};
|
|
504
|
-
imports.wbg.
|
|
524
|
+
imports.wbg.__wbg_new0_97314565408dea38 = function() {
|
|
505
525
|
const ret = new Date();
|
|
506
526
|
return ret;
|
|
507
527
|
};
|
|
508
|
-
imports.wbg.
|
|
528
|
+
imports.wbg.__wbg_new_07b483f72211fd66 = function() {
|
|
529
|
+
const ret = new Object();
|
|
530
|
+
return ret;
|
|
531
|
+
};
|
|
532
|
+
imports.wbg.__wbg_new_58353953ad2097cc = function() {
|
|
533
|
+
const ret = new Array();
|
|
534
|
+
return ret;
|
|
535
|
+
};
|
|
536
|
+
imports.wbg.__wbg_new_a2957aa5684de228 = function(arg0) {
|
|
537
|
+
const ret = new Date(arg0);
|
|
538
|
+
return ret;
|
|
539
|
+
};
|
|
540
|
+
imports.wbg.__wbg_new_a979b4b45bd55c7f = function() {
|
|
541
|
+
const ret = new Map();
|
|
542
|
+
return ret;
|
|
543
|
+
};
|
|
544
|
+
imports.wbg.__wbg_new_e30c39c06edaabf2 = function(arg0, arg1) {
|
|
509
545
|
try {
|
|
510
546
|
var state0 = {a: arg0, b: arg1};
|
|
511
547
|
var cb0 = (arg0, arg1) => {
|
|
512
548
|
const a = state0.a;
|
|
513
549
|
state0.a = 0;
|
|
514
550
|
try {
|
|
515
|
-
return
|
|
551
|
+
return __wbg_adapter_127(a, state0.b, arg0, arg1);
|
|
516
552
|
} finally {
|
|
517
553
|
state0.a = a;
|
|
518
554
|
}
|
|
@@ -523,91 +559,75 @@ function __wbg_get_imports() {
|
|
|
523
559
|
state0.a = state0.b = 0;
|
|
524
560
|
}
|
|
525
561
|
};
|
|
526
|
-
imports.wbg.
|
|
527
|
-
const ret = new Date(arg0);
|
|
528
|
-
return ret;
|
|
529
|
-
};
|
|
530
|
-
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
531
|
-
const ret = new Object();
|
|
532
|
-
return ret;
|
|
533
|
-
};
|
|
534
|
-
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
535
|
-
const ret = new Map();
|
|
536
|
-
return ret;
|
|
537
|
-
};
|
|
538
|
-
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
539
|
-
const ret = new Array();
|
|
540
|
-
return ret;
|
|
541
|
-
};
|
|
542
|
-
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
562
|
+
imports.wbg.__wbg_new_e52b3efaaa774f96 = function(arg0) {
|
|
543
563
|
const ret = new Uint8Array(arg0);
|
|
544
564
|
return ret;
|
|
545
565
|
};
|
|
546
|
-
imports.wbg.
|
|
566
|
+
imports.wbg.__wbg_newnoargs_ff528e72d35de39a = function(arg0, arg1) {
|
|
547
567
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
548
568
|
return ret;
|
|
549
569
|
};
|
|
550
|
-
imports.wbg.
|
|
570
|
+
imports.wbg.__wbg_newwithyearmonthdayhrminsec_2a1ddf52c4ac57fd = function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
551
571
|
const ret = new Date(arg0 >>> 0, arg1, arg2, arg3, arg4, arg5);
|
|
552
572
|
return ret;
|
|
553
573
|
};
|
|
554
|
-
imports.wbg.
|
|
574
|
+
imports.wbg.__wbg_next_8bb824d217961b5d = function(arg0) {
|
|
555
575
|
const ret = arg0.next;
|
|
556
576
|
return ret;
|
|
557
577
|
};
|
|
558
|
-
imports.wbg.
|
|
578
|
+
imports.wbg.__wbg_next_e2da48d8fff7439a = function() { return handleError(function (arg0) {
|
|
559
579
|
const ret = arg0.next();
|
|
560
580
|
return ret;
|
|
561
581
|
}, arguments) };
|
|
562
|
-
imports.wbg.
|
|
582
|
+
imports.wbg.__wbg_now_7ab37f05ab2d0b81 = function(arg0) {
|
|
563
583
|
const ret = arg0.now();
|
|
564
584
|
return ret;
|
|
565
585
|
};
|
|
566
|
-
imports.wbg.
|
|
586
|
+
imports.wbg.__wbg_queueMicrotask_46c1df247678729f = function(arg0) {
|
|
567
587
|
queueMicrotask(arg0);
|
|
568
588
|
};
|
|
569
|
-
imports.wbg.
|
|
589
|
+
imports.wbg.__wbg_queueMicrotask_8acf3ccb75ed8d11 = function(arg0) {
|
|
570
590
|
const ret = arg0.queueMicrotask;
|
|
571
591
|
return ret;
|
|
572
592
|
};
|
|
573
|
-
imports.wbg.
|
|
593
|
+
imports.wbg.__wbg_resolve_0dac8c580ffd4678 = function(arg0) {
|
|
574
594
|
const ret = Promise.resolve(arg0);
|
|
575
595
|
return ret;
|
|
576
596
|
};
|
|
577
|
-
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
578
|
-
arg0[arg1 >>> 0] = arg2;
|
|
579
|
-
};
|
|
580
597
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
581
598
|
arg0[arg1] = arg2;
|
|
582
599
|
};
|
|
583
|
-
imports.wbg.
|
|
584
|
-
arg0
|
|
600
|
+
imports.wbg.__wbg_set_7422acbe992d64ab = function(arg0, arg1, arg2) {
|
|
601
|
+
arg0[arg1 >>> 0] = arg2;
|
|
585
602
|
};
|
|
586
|
-
imports.wbg.
|
|
603
|
+
imports.wbg.__wbg_set_d6bdfd275fb8a4ce = function(arg0, arg1, arg2) {
|
|
587
604
|
const ret = arg0.set(arg1, arg2);
|
|
588
605
|
return ret;
|
|
589
606
|
};
|
|
590
|
-
imports.wbg.
|
|
607
|
+
imports.wbg.__wbg_set_fe4e79d1ed3b0e9b = function(arg0, arg1, arg2) {
|
|
608
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
609
|
+
};
|
|
610
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_487c52c58d65314d = function() {
|
|
591
611
|
const ret = typeof global === 'undefined' ? null : global;
|
|
592
612
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
593
613
|
};
|
|
594
|
-
imports.wbg.
|
|
614
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_ee9704f328b6b291 = function() {
|
|
595
615
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
596
616
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
597
617
|
};
|
|
598
|
-
imports.wbg.
|
|
618
|
+
imports.wbg.__wbg_static_accessor_SELF_78c9e3071b912620 = function() {
|
|
599
619
|
const ret = typeof self === 'undefined' ? null : self;
|
|
600
620
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
601
621
|
};
|
|
602
|
-
imports.wbg.
|
|
622
|
+
imports.wbg.__wbg_static_accessor_WINDOW_a093d21393777366 = function() {
|
|
603
623
|
const ret = typeof window === 'undefined' ? null : window;
|
|
604
624
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
605
625
|
};
|
|
606
|
-
imports.wbg.
|
|
626
|
+
imports.wbg.__wbg_then_db882932c0c714c6 = function(arg0, arg1) {
|
|
607
627
|
const ret = arg0.then(arg1);
|
|
608
628
|
return ret;
|
|
609
629
|
};
|
|
610
|
-
imports.wbg.
|
|
630
|
+
imports.wbg.__wbg_value_17b896954e14f896 = function(arg0) {
|
|
611
631
|
const ret = arg0.value;
|
|
612
632
|
return ret;
|
|
613
633
|
};
|
|
@@ -643,8 +663,8 @@ function __wbg_get_imports() {
|
|
|
643
663
|
const ret = false;
|
|
644
664
|
return ret;
|
|
645
665
|
};
|
|
646
|
-
imports.wbg.
|
|
647
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
666
|
+
imports.wbg.__wbindgen_closure_wrapper4066 = function(arg0, arg1, arg2) {
|
|
667
|
+
const ret = makeMutClosure(arg0, arg1, 909, __wbg_adapter_50);
|
|
648
668
|
return ret;
|
|
649
669
|
};
|
|
650
670
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
@@ -654,10 +674,6 @@ function __wbg_get_imports() {
|
|
|
654
674
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
655
675
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
656
676
|
};
|
|
657
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
658
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
659
|
-
return ret;
|
|
660
|
-
};
|
|
661
677
|
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
662
678
|
const ret = arg0 in arg1;
|
|
663
679
|
return ret;
|
package/index_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
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.
|
|
9
|
-
"license": "
|
|
8
|
+
"version": "0.0.35",
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/Nodi3d/modular"
|