nodi-modular 0.0.33 → 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 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 NodeInterop {
93
+ export interface NodePropertyInterop {
94
94
  /**
95
- * Node variant
95
+ * Property name
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
96
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
- * Node identifier
139
+ * Whether to enable adaptive tessellation
100
140
  */
101
- id: string;
102
- name: string;
103
- label: string | undefined;
104
- description: string;
141
+ enabled: boolean;
105
142
  /**
106
- * Input parameters
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
- inputs: IOInterop[];
145
+ normTolerance: number;
109
146
  /**
110
- * Input variables
147
+ * Minimum number of divisions in u direction
111
148
  */
112
- inputVariables: IOVariables | undefined;
149
+ minDivsU: number;
113
150
  /**
114
- * Output parameters
151
+ * Minimum number of divisions in v direction
115
152
  */
116
- outputs: IOInterop[];
153
+ minDivsV: number;
117
154
  /**
118
- * Output variables
155
+ * Minimum depth for division
119
156
  */
120
- outputVariables: IOVariables | undefined;
157
+ minDepth: number;
121
158
  /**
122
- * Node properties
159
+ * Maximum depth for division
123
160
  */
124
- properties: NodePropertyInterop[];
125
- enabled: boolean;
126
- visible: boolean;
127
- meta: NodeMetaInterop;
161
+ maxDepth: number;
128
162
  }
129
163
 
130
- export interface NodeEntityInterop {
131
- variant: string;
132
- id: string;
133
- name: string;
134
- label: string | undefined;
135
- inputs: string[];
136
- outputs: string[];
137
- enabled: boolean;
138
- visible: boolean;
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
- * Interop struct for node meta
186
+ * Curve interop handle for wasm interop
187
+ * stride = 3 (x, y, z)
143
188
  */
144
- export interface NodeMetaInterop {
145
- /**
146
- * Error message
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
- * Interop struct for node property
251
+ * Geometry identifier
242
252
  */
243
- export interface NodePropertyInterop {
253
+ export interface GeometryIdentifier {
244
254
  /**
245
- * Property name
255
+ * Parent node ID
246
256
  */
247
- name: string;
257
+ graphNodeSet?: GraphNodeSet;
248
258
  /**
249
- * Property value
259
+ * Output ID that the geometry is belonged to
250
260
  */
251
- value: NodePropertyValue;
261
+ outputId: OutputId;
252
262
  /**
253
- * Whether the node has input connection and the property change is disabled
263
+ * Geometry ID
254
264
  */
255
- connected?: boolean;
265
+ geometryId: ID<GeometryProxy>;
256
266
  /**
257
- * Whether the property is disabled in node\' inspector
267
+ * Transform matrix in interop format
258
268
  */
259
- disabled?: boolean;
269
+ transform: TransformInterop;
260
270
  }
261
271
 
262
272
  /**
263
- * Interop struct for transform
264
- * Represents a 4x4 matrix as a 16-element array
273
+ * Interop struct for node
265
274
  */
266
- export type TransformInterop = number[];
267
-
268
- export interface GroupInteropHandle {
269
- objects: GeometryInteropHandleProxy[];
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
- * Whether to enable adaptive tessellation
281
+ * Node identifier
290
282
  */
291
- enabled: boolean;
283
+ id: string;
284
+ name: string;
285
+ label: string | undefined;
286
+ description: string;
292
287
  /**
293
- * Tolerance for the normal vector: if the L2 norm of the normal vectors is below this value, the edge is considered flat
288
+ * Input parameters
294
289
  */
295
- normTolerance: number;
290
+ inputs: IOInterop[];
296
291
  /**
297
- * Minimum number of divisions in u direction
292
+ * Input variables
298
293
  */
299
- minDivsU: number;
294
+ inputVariables: IOVariables | undefined;
300
295
  /**
301
- * Minimum number of divisions in v direction
296
+ * Output parameters
302
297
  */
303
- minDivsV: number;
298
+ outputs: IOInterop[];
304
299
  /**
305
- * Minimum depth for division
300
+ * Output variables
306
301
  */
307
- minDepth: number;
302
+ outputVariables: IOVariables | undefined;
308
303
  /**
309
- * Maximum depth for division
304
+ * Node properties
310
305
  */
311
- maxDepth: number;
312
- }
313
-
314
- export interface NodeConnectionInterop {
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 IndicesInteropHandle {
323
- count: number;
324
- indices: number;
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
- * Curve interop handle for wasm interop
329
- * stride = 3 (x, y, z)
324
+ * Interop struct for node meta
330
325
  */
331
- export interface CurveInteropHandle {
332
- count: number;
333
- vertices: number;
334
- transform: TransformInterop | undefined;
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";
@@ -357,24 +357,31 @@ export interface Prune<T, U> {
357
357
  bypass: Connection[] | undefined;
358
358
  }
359
359
 
360
+ export interface ConnectedComponentNode {
361
+ sources: NodeId[];
362
+ destinations: NodeId[];
363
+ }
364
+
365
+ export interface ConnectedComponents<T, U> {
366
+ nodes: IndexMap<NodeId, ConnectedComponentNode<T, U>>;
367
+ }
368
+
360
369
  export type GraphVariant = "Root" | { SubGraph: SubGraphId };
361
370
 
371
+ export interface SubGraphIdSet {
372
+ subGraphId: SubGraphId;
373
+ instanceId: SubGraphInstanceId;
374
+ }
375
+
362
376
  /**
363
- * A sub graph is a graph that is a part of a larger graph
377
+ * Defines the dynamics of an IO parameter.
364
378
  */
365
- export interface SubGraph<T, U> {
366
- /**
367
- * The id of the sub graph
368
- */
369
- id: SubGraphId;
370
- /**
371
- * The graph of the sub graph
372
- */
373
- graph: Graph<T, U>;
374
- /**
375
- * The instances of the sub graph
376
- */
377
- instances: SubGraphInstanceId[];
379
+ export interface IOVariables {
380
+ minCount: number;
381
+ maxCount: number;
382
+ defaultCount: number;
383
+ offset: number;
384
+ editable: boolean;
378
385
  }
379
386
 
380
387
  /**
@@ -388,6 +395,14 @@ export interface IOParameter<T, U> {
388
395
  connections: U[];
389
396
  }
390
397
 
398
+ /**
399
+ * A set of node id and instance id
400
+ */
401
+ export interface GraphNodeSet {
402
+ subGraphIdSet: SubGraphIdSet | undefined;
403
+ nodeId: NodeId;
404
+ }
405
+
391
406
  /**
392
407
  * Graph structure
393
408
  */
@@ -402,41 +417,24 @@ export interface Graph<T, U> {
402
417
  sub_graphs?: IndexMap<SubGraphId, SubGraph<T, U>>;
403
418
  }
404
419
 
405
- export interface SubGraphIdSet {
406
- subGraphId: SubGraphId;
407
- instanceId: SubGraphInstanceId;
408
- }
409
-
410
- /**
411
- * Defines the dynamics of an IO parameter.
412
- */
413
- export interface IOVariables {
414
- minCount: number;
415
- maxCount: number;
416
- defaultCount: number;
417
- offset: number;
418
- editable: boolean;
419
- }
420
+ export type AccessTypes = "Item" | "List" | "Tree";
420
421
 
421
422
  /**
422
- * A set of node id and instance id
423
+ * A sub graph is a graph that is a part of a larger graph
423
424
  */
424
- export interface GraphNodeSet {
425
- subGraphIdSet: SubGraphIdSet | undefined;
426
- nodeId: NodeId;
427
- }
428
-
429
- export type AccessTypes = "Item" | "List" | "Tree";
430
-
431
- export interface Connection {
432
- source: NodeParameter<OutputId>;
433
- destination: NodeParameter<InputId>;
434
- }
435
-
436
- export interface NodeParameter<T> {
437
- nodeId: NodeId;
438
- parameterId: T;
439
- parameterIndex: number;
425
+ export interface SubGraph<T, U> {
426
+ /**
427
+ * The id of the sub graph
428
+ */
429
+ id: SubGraphId;
430
+ /**
431
+ * The graph of the sub graph
432
+ */
433
+ graph: Graph<T, U>;
434
+ /**
435
+ * The instances of the sub graph
436
+ */
437
+ instances: SubGraphInstanceId[];
440
438
  }
441
439
 
442
440
  export interface Node<T> {
@@ -454,13 +452,15 @@ export type OutputIOManager = IOManager<OutputId, InputId>;
454
452
 
455
453
  export type InputIOManager = IOManager<InputId, OutputId>;
456
454
 
457
- export interface ConnectedComponentNode {
458
- sources: NodeId[];
459
- destinations: NodeId[];
455
+ export interface Connection {
456
+ source: NodeParameter<OutputId>;
457
+ destination: NodeParameter<InputId>;
460
458
  }
461
459
 
462
- export interface ConnectedComponents<T, U> {
463
- nodes: IndexMap<NodeId, ConnectedComponentNode<T, U>>;
460
+ export interface NodeParameter<T> {
461
+ nodeId: NodeId;
462
+ parameterId: T;
463
+ parameterIndex: number;
464
464
  }
465
465
 
466
466
  export interface IOManager<T, U> {
@@ -468,113 +468,52 @@ export interface IOManager<T, U> {
468
468
  }
469
469
 
470
470
 
471
- export type NurbsCurve3D<T = number> = {
472
- control_points: Point4<T>[];
473
- knots: T[];
474
- degree: T;
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;
475
477
  };
476
478
 
477
479
  /**
478
- * Interop struct for point cloud data
479
- */
480
- export interface PointCloudInterop {
481
- /**
482
- * Vertices of the point cloud
483
- */
484
- vertices: [number, number, number][];
485
- /**
486
- * Transform matrix of the point cloud
487
- */
488
- transform: Transform3<number>;
489
- }
490
-
491
- export type PolyCurve = CompoundCurve<number, U4>;
492
-
493
- export type NurbsCurve = NurbsCurve3D<number>;
494
-
495
- /**
496
- * Proxy for various curve types
497
- */
498
- 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 };
499
-
500
- /**
501
- * Proxy for various surface types
502
- */
503
- export type SurfaceProxy = { variant: "Circular"; data: CircularSurface } | { variant: "Triangle"; data: TriangleSurface } | { variant: "Plane"; data: PlaneSurface } | { variant: "NURBS"; data: NurbsSurface } | { variant: "Trimmed"; data: TrimmedSurface };
504
-
505
-
506
- export type Triangle3D = {
507
- a: Point3;
508
- b: Point3;
509
- c: Point3;
510
- };
480
+ * A NURBS surface container
481
+ */
482
+ export type NurbsSurface = NurbsSurface3D<number>;
483
+
484
+ export interface Domain {
485
+ min: number;
486
+ max: number;
487
+ }
511
488
 
512
489
  /**
513
- * Interop struct for mesh data
490
+ * Interop struct for point cloud data
514
491
  */
515
- export interface MeshInterop {
492
+ export interface PointCloudInterop {
516
493
  /**
517
- * Vertices of the mesh
494
+ * Vertices of the point cloud
518
495
  */
519
496
  vertices: [number, number, number][];
520
497
  /**
521
- * Normals of the mesh
522
- */
523
- normals: [number, number, number][];
524
- /**
525
- * UV coordinates of the mesh
526
- */
527
- uv?: [number, number][];
528
- /**
529
- * Faces of the mesh
530
- */
531
- faces?: [number, number, number][];
532
- /**
533
- * Transform matrix of the mesh
498
+ * Transform matrix of the point cloud
534
499
  */
535
- transform?: Transform3<number>;
500
+ transform: Transform3<number>;
536
501
  }
537
502
 
538
503
  /**
539
- * Interop proxy for various geometry types
504
+ * Geometry proxy for various geometry types
540
505
  */
541
- export type GeometryInterop = { variant: "Mesh"; data: MeshInterop } | { variant: "Curve"; data: CurveInterop } | { variant: "Point"; data: PointCloudInterop } | { variant: "Plane"; data: Plane } | { variant: "Group"; data: GeometryInterop[] };
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 };
542
507
 
543
508
  /**
544
- * Interop struct for curve data
509
+ * A surface defined by three points
545
510
  */
546
- export interface CurveInterop {
547
- /**
548
- * Vertices of the curve
549
- */
550
- vertices: [number, number, number][];
551
- /**
552
- * Transform matrix of the curve
553
- */
554
- transform: Transform3<number> | undefined;
555
- }
511
+ export type TriangleSurface = Triangle3D;
556
512
 
557
513
  /**
558
- * Mesh representation with vertices, normals, uv, and index
514
+ * Proxy for various curve types
559
515
  */
560
- export interface Mesh {
561
- /**
562
- * Vertices of the mesh
563
- */
564
- vertices: Point3<number>[];
565
- /**
566
- * Normals of the mesh
567
- */
568
- normals: Vector3<number>[] | undefined;
569
- /**
570
- * UV coordinates of the mesh
571
- */
572
- uv: Vector2<number>[] | undefined;
573
- /**
574
- * Index of the mesh
575
- */
576
- index: [number, number, number][];
577
- }
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 };
578
517
 
579
518
 
580
519
  export type LineCurve3D = {
@@ -582,20 +521,6 @@ export type LineCurve3D = {
582
521
  b: Point3;
583
522
  };
584
523
 
585
-
586
- export type NurbsSurface3D<T = number> = {
587
- control_points: Point4<T>[][];
588
- u_knots: T[];
589
- v_knots: T[];
590
- u_degree: T;
591
- v_degree: T;
592
- };
593
-
594
- export interface Domain {
595
- min: number;
596
- max: number;
597
- }
598
-
599
524
  /**
600
525
  * Plane representation with origin, normal, x axis, and y axis
601
526
  */
@@ -618,20 +543,6 @@ export interface Plane {
618
543
  yAxis: Vector3<number>;
619
544
  }
620
545
 
621
- /**
622
- * An oriented box in 3D space
623
- */
624
- export interface OrientedBox {
625
- /**
626
- * The plane that the box is aligned to
627
- */
628
- plane: Plane;
629
- /**
630
- * The bounding box in the local coordinate system
631
- */
632
- bounds: BoundingBox3D;
633
- }
634
-
635
546
  /**
636
547
  * A geometry object with a transformation
637
548
  */
@@ -646,21 +557,6 @@ export interface GeometryTransform {
646
557
  transform: Transform3<number>;
647
558
  }
648
559
 
649
- /**
650
- * Geometry proxy for various geometry types
651
- */
652
- 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 };
653
-
654
- /**
655
- * A surface defined by three points
656
- */
657
- export type TriangleSurface = Triangle3D;
658
-
659
- /**
660
- * A NURBS surface container
661
- */
662
- export type NurbsSurface = NurbsSurface3D<number>;
663
-
664
560
  /**
665
561
  * A rectangle curve in 3D space
666
562
  */
@@ -679,6 +575,8 @@ export interface RectangleCurve {
679
575
  y: Domain;
680
576
  }
681
577
 
578
+ export type PolyCurve = CompoundCurve<number, U4>;
579
+
682
580
  /**
683
581
  * A ellipse curve in 3D space
684
582
  */
@@ -697,6 +595,39 @@ export interface EllipseCurve {
697
595
  yRadius: number;
698
596
  }
699
597
 
598
+
599
+ export type Triangle3D = {
600
+ a: Point3;
601
+ b: Point3;
602
+ c: Point3;
603
+ };
604
+
605
+ /**
606
+ * Interop struct for mesh data
607
+ */
608
+ export interface MeshInterop {
609
+ /**
610
+ * Vertices of the mesh
611
+ */
612
+ vertices: [number, number, number][];
613
+ /**
614
+ * Normals of the mesh
615
+ */
616
+ normals: [number, number, number][];
617
+ /**
618
+ * UV coordinates of the mesh
619
+ */
620
+ uv?: [number, number][];
621
+ /**
622
+ * Faces of the mesh
623
+ */
624
+ faces?: [number, number, number][];
625
+ /**
626
+ * Transform matrix of the mesh
627
+ */
628
+ transform?: Transform3<number>;
629
+ }
630
+
700
631
  /**
701
632
  * An arc curve in 3D space
702
633
  */
@@ -719,6 +650,23 @@ export interface ArcCurve {
719
650
  radius: number;
720
651
  }
721
652
 
653
+
654
+ export type NurbsCurve3D<T = number> = {
655
+ control_points: Point4<T>[];
656
+ knots: T[];
657
+ degree: T;
658
+ };
659
+
660
+ /**
661
+ * Interop proxy for various geometry types
662
+ */
663
+ export type GeometryInterop = { variant: "Mesh"; data: MeshInterop } | { variant: "Curve"; data: CurveInterop } | { variant: "Point"; data: PointCloudInterop } | { variant: "Plane"; data: Plane } | { variant: "Group"; data: GeometryInterop[] };
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
+
722
670
  /**
723
671
  * A surface defined by a plane and two domains in x and y directions
724
672
  */
@@ -737,6 +685,58 @@ export interface PlaneSurface {
737
685
  y: Domain;
738
686
  }
739
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
+
698
+ /**
699
+ * Mesh representation with vertices, normals, uv, and index
700
+ */
701
+ export interface Mesh {
702
+ /**
703
+ * Vertices of the mesh
704
+ */
705
+ vertices: Point3<number>[];
706
+ /**
707
+ * Normals of the mesh
708
+ */
709
+ normals: Vector3<number>[] | undefined;
710
+ /**
711
+ * UV coordinates of the mesh
712
+ */
713
+ uv: Vector2<number>[] | undefined;
714
+ /**
715
+ * Index of the mesh
716
+ */
717
+ index: [number, number, number][];
718
+ }
719
+
720
+
721
+ export type BoundingBox3D = {
722
+ min: Vector3;
723
+ max: Vector3;
724
+ };
725
+
726
+ /**
727
+ * A collection of geometry objects
728
+ */
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
740
  /**
741
741
  * A circular surface
742
742
  */
@@ -765,32 +765,32 @@ export interface CircleCurve {
765
765
  radius: number;
766
766
  }
767
767
 
768
-
769
- export type PolylineCurve2D = {
770
- points: Point2[];
771
- };
772
- export type PolylineCurve3D = {
773
- points: Point3[];
774
- };
775
-
776
-
777
- export type BoundingBox3D = {
778
- min: Vector3;
779
- max: Vector3;
780
- };
781
-
782
768
  /**
783
- * A collection of geometry objects
769
+ * An oriented box in 3D space
784
770
  */
785
- export type Group = GeometryTransform[];
771
+ export interface OrientedBox {
772
+ /**
773
+ * The plane that the box is aligned to
774
+ */
775
+ plane: Plane;
776
+ /**
777
+ * The bounding box in the local coordinate system
778
+ */
779
+ bounds: BoundingBox3D;
780
+ }
786
781
 
787
782
  /**
788
- * A face of a mesh with three vertices
783
+ * Interop struct for curve data
789
784
  */
790
- export interface MeshTriangleFace {
791
- a: number;
792
- b: number;
793
- c: number;
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
794
  }
795
795
 
796
796
  /**
@@ -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 closure901_externref_shim: (a: number, b: number, c: any) => void;
875
- readonly closure3815_externref_shim: (a: number, b: number, c: any, d: any) => void;
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 __wbg_adapter_52(arg0, arg1, arg2) {
228
- wasm.closure901_externref_shim(arg0, arg1, arg2);
239
+ function __wbg_adapter_50(arg0, arg1, arg2) {
240
+ wasm.closure910_externref_shim(arg0, arg1, arg2);
229
241
  }
230
242
 
231
- function __wbg_adapter_129(arg0, arg1, arg2, arg3) {
232
- wasm.closure3815_externref_shim(arg0, arg1, arg2, arg3);
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
- if (module.headers.get('Content-Type') != 'application/wasm') {
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.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
428
+ imports.wbg.__wbg_buffer_a1a27a0dfa70165d = function(arg0) {
409
429
  const ret = arg0.buffer;
410
430
  return ret;
411
431
  };
412
- imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
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.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
417
- const ret = arg0.call(arg1, arg2);
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.__wbg_done_769e5ede4b31c67b = function(arg0) {
440
+ imports.wbg.__wbg_done_4d01f352bade43b7 = function(arg0) {
421
441
  const ret = arg0.done;
422
442
  return ret;
423
443
  };
424
- imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
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.__wbg_getTime_46267b1c24877e30 = function(arg0) {
454
+ imports.wbg.__wbg_getTime_2afe67905d873e92 = function(arg0) {
435
455
  const ret = arg0.getTime();
436
456
  return ret;
437
457
  };
438
- imports.wbg.__wbg_getTimezoneOffset_6b5752021c499c47 = function(arg0) {
458
+ imports.wbg.__wbg_getTimezoneOffset_31f33c0868da345e = function(arg0) {
439
459
  const ret = arg0.getTimezoneOffset();
440
460
  return ret;
441
461
  };
442
- imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
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.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
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.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
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.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
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.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
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.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
504
+ imports.wbg.__wbg_isArray_5f090bed72bd4f89 = function(arg0) {
485
505
  const ret = Array.isArray(arg0);
486
506
  return ret;
487
507
  };
488
- imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
508
+ imports.wbg.__wbg_isSafeInteger_90d7c4674047d684 = function(arg0) {
489
509
  const ret = Number.isSafeInteger(arg0);
490
510
  return ret;
491
511
  };
492
- imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
512
+ imports.wbg.__wbg_iterator_4068add5b2aef7a6 = function() {
493
513
  const ret = Symbol.iterator;
494
514
  return ret;
495
515
  };
496
- imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
516
+ imports.wbg.__wbg_length_ab6d22b5ead75c72 = function(arg0) {
497
517
  const ret = arg0.length;
498
518
  return ret;
499
519
  };
500
- imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
520
+ imports.wbg.__wbg_length_f00ec12454a5d9fd = function(arg0) {
501
521
  const ret = arg0.length;
502
522
  return ret;
503
523
  };
504
- imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
524
+ imports.wbg.__wbg_new0_97314565408dea38 = function() {
505
525
  const ret = new Date();
506
526
  return ret;
507
527
  };
508
- imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
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 __wbg_adapter_129(a, state0.b, arg0, arg1);
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.__wbg_new_31a97dac4f10fab7 = function(arg0) {
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.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
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.__wbg_newwithyearmonthdayhrminsec_72c204d952ef4426 = function(arg0, arg1, arg2, arg3, arg4, arg5) {
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.__wbg_next_25feadfc0913fea9 = function(arg0) {
574
+ imports.wbg.__wbg_next_8bb824d217961b5d = function(arg0) {
555
575
  const ret = arg0.next;
556
576
  return ret;
557
577
  };
558
- imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
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.__wbg_now_d18023d54d4e5500 = function(arg0) {
582
+ imports.wbg.__wbg_now_7ab37f05ab2d0b81 = function(arg0) {
563
583
  const ret = arg0.now();
564
584
  return ret;
565
585
  };
566
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
586
+ imports.wbg.__wbg_queueMicrotask_46c1df247678729f = function(arg0) {
567
587
  queueMicrotask(arg0);
568
588
  };
569
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
589
+ imports.wbg.__wbg_queueMicrotask_8acf3ccb75ed8d11 = function(arg0) {
570
590
  const ret = arg0.queueMicrotask;
571
591
  return ret;
572
592
  };
573
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
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.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
584
- arg0.set(arg1, arg2 >>> 0);
600
+ imports.wbg.__wbg_set_7422acbe992d64ab = function(arg0, arg1, arg2) {
601
+ arg0[arg1 >>> 0] = arg2;
585
602
  };
586
- imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
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.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
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.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
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.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
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.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
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.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
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.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
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.__wbindgen_closure_wrapper4059 = function(arg0, arg1, arg2) {
647
- const ret = makeMutClosure(arg0, arg1, 902, __wbg_adapter_52);
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.33",
9
- "license": "MIT",
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"