nodi-modular 0.0.25 → 0.0.26
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 +146 -146
- package/index.js +4 -4
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -334,11 +334,6 @@ export interface GeometryIdentifier {
|
|
|
334
334
|
transform: TransformInterop;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
export interface Prune<T, U> {
|
|
338
|
-
connectedComponents: ConnectedComponents<T, U>[];
|
|
339
|
-
bypass: Connection[] | undefined;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
337
|
export type GraphMappingTypes = "None" | "Bezier" | "Linear" | "Sine";
|
|
343
338
|
|
|
344
339
|
export interface Node<T> {
|
|
@@ -356,6 +351,20 @@ export type OutputIOManager = IOManager<OutputId, InputId>;
|
|
|
356
351
|
|
|
357
352
|
export type InputIOManager = IOManager<InputId, OutputId>;
|
|
358
353
|
|
|
354
|
+
/**
|
|
355
|
+
* Graph structure
|
|
356
|
+
*/
|
|
357
|
+
export interface Graph<T, U> {
|
|
358
|
+
/**
|
|
359
|
+
* Nodes in the graph
|
|
360
|
+
*/
|
|
361
|
+
nodes: IndexMap<NodeId, Node<T, U>>;
|
|
362
|
+
/**
|
|
363
|
+
* nested graphs
|
|
364
|
+
*/
|
|
365
|
+
sub_graphs?: IndexMap<SubGraphId, SubGraph<T, U>>;
|
|
366
|
+
}
|
|
367
|
+
|
|
359
368
|
export interface SubGraphIdSet {
|
|
360
369
|
subGraphId: SubGraphId;
|
|
361
370
|
instanceId: SubGraphInstanceId;
|
|
@@ -394,6 +403,11 @@ export interface GraphNodeSet {
|
|
|
394
403
|
nodeId: NodeId;
|
|
395
404
|
}
|
|
396
405
|
|
|
406
|
+
export interface Prune<T, U> {
|
|
407
|
+
connectedComponents: ConnectedComponents<T, U>[];
|
|
408
|
+
bypass: Connection[] | undefined;
|
|
409
|
+
}
|
|
410
|
+
|
|
397
411
|
/**
|
|
398
412
|
* A parameter for an input or output of a node.
|
|
399
413
|
*/
|
|
@@ -405,20 +419,6 @@ export interface IOParameter<T, U> {
|
|
|
405
419
|
connections: U[];
|
|
406
420
|
}
|
|
407
421
|
|
|
408
|
-
/**
|
|
409
|
-
* Graph structure
|
|
410
|
-
*/
|
|
411
|
-
export interface Graph<T, U> {
|
|
412
|
-
/**
|
|
413
|
-
* Nodes in the graph
|
|
414
|
-
*/
|
|
415
|
-
nodes: IndexMap<NodeId, Node<T, U>>;
|
|
416
|
-
/**
|
|
417
|
-
* nested graphs
|
|
418
|
-
*/
|
|
419
|
-
sub_graphs?: IndexMap<SubGraphId, SubGraph<T, U>>;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
422
|
export interface IOManager<T, U> {
|
|
423
423
|
parameters: IOParameter<T, U>[];
|
|
424
424
|
}
|
|
@@ -468,6 +468,65 @@ export interface SubGraph<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;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Interop proxy for various geometry types
|
|
479
|
+
*/
|
|
480
|
+
export type GeometryInterop = { variant: "Mesh"; data: MeshInterop } | { variant: "Curve"; data: CurveInterop } | { variant: "Point"; data: PointCloudInterop } | { variant: "Plane"; data: Plane } | { variant: "Group"; data: GeometryInterop[] };
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* A geometry object with a transformation
|
|
484
|
+
*/
|
|
485
|
+
export interface GeometryTransform {
|
|
486
|
+
/**
|
|
487
|
+
* The handle to the geometry object
|
|
488
|
+
*/
|
|
489
|
+
geometry: Handle<GeometryProxy>;
|
|
490
|
+
/**
|
|
491
|
+
* Transformation matrix of the geometry
|
|
492
|
+
*/
|
|
493
|
+
transform: Transform3<number>;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export type PolyCurve = CompoundCurve<number, U4>;
|
|
497
|
+
|
|
498
|
+
export type NurbsCurve = NurbsCurve3D<number>;
|
|
499
|
+
|
|
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
|
+
|
|
471
530
|
export type PolylineCurve2D = {
|
|
472
531
|
points: Point2[];
|
|
473
532
|
};
|
|
@@ -563,14 +622,72 @@ export interface ArcCurve {
|
|
|
563
622
|
}
|
|
564
623
|
|
|
565
624
|
/**
|
|
566
|
-
*
|
|
625
|
+
* An oriented box in 3D space
|
|
567
626
|
*/
|
|
568
|
-
export
|
|
627
|
+
export interface OrientedBox {
|
|
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
|
+
}
|
|
569
637
|
|
|
570
638
|
/**
|
|
571
|
-
*
|
|
639
|
+
* A circular surface
|
|
572
640
|
*/
|
|
573
|
-
export
|
|
641
|
+
export interface CircularSurface {
|
|
642
|
+
/**
|
|
643
|
+
* The base plane of the circle
|
|
644
|
+
*/
|
|
645
|
+
plane: Plane;
|
|
646
|
+
/**
|
|
647
|
+
* The radius of the circle
|
|
648
|
+
*/
|
|
649
|
+
radius: number;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Plane representation with origin, normal, x axis, and y axis
|
|
654
|
+
*/
|
|
655
|
+
export interface Plane {
|
|
656
|
+
/**
|
|
657
|
+
* Origin coordinate of the plane
|
|
658
|
+
*/
|
|
659
|
+
origin: Point3<number>;
|
|
660
|
+
/**
|
|
661
|
+
* Normal vector of the plane
|
|
662
|
+
*/
|
|
663
|
+
normal: Vector3<number>;
|
|
664
|
+
/**
|
|
665
|
+
* X axis of the plane
|
|
666
|
+
*/
|
|
667
|
+
xAxis: Vector3<number>;
|
|
668
|
+
/**
|
|
669
|
+
* Y axis of the plane
|
|
670
|
+
*/
|
|
671
|
+
yAxis: Vector3<number>;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* A surface defined by a plane and two domains in x and y directions
|
|
676
|
+
*/
|
|
677
|
+
export interface PlaneSurface {
|
|
678
|
+
/**
|
|
679
|
+
* The base plane of the surface
|
|
680
|
+
*/
|
|
681
|
+
plane: Plane;
|
|
682
|
+
/**
|
|
683
|
+
* The domain in x direction
|
|
684
|
+
*/
|
|
685
|
+
x: Domain;
|
|
686
|
+
/**
|
|
687
|
+
* The domain in y direction
|
|
688
|
+
*/
|
|
689
|
+
y: Domain;
|
|
690
|
+
}
|
|
574
691
|
|
|
575
692
|
|
|
576
693
|
export type LineCurve3D = {
|
|
@@ -579,13 +696,6 @@ export type LineCurve3D = {
|
|
|
579
696
|
};
|
|
580
697
|
|
|
581
698
|
|
|
582
|
-
export type NurbsCurve3D<T = number> = {
|
|
583
|
-
control_points: Point4<T>[];
|
|
584
|
-
knots: T[];
|
|
585
|
-
degree: T;
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
|
|
589
699
|
export type NurbsSurface3D<T = number> = {
|
|
590
700
|
control_points: Point4<T>[][];
|
|
591
701
|
u_knots: T[];
|
|
@@ -600,10 +710,10 @@ export type BoundingBox3D = {
|
|
|
600
710
|
max: Vector3;
|
|
601
711
|
};
|
|
602
712
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
713
|
+
export interface Domain {
|
|
714
|
+
min: number;
|
|
715
|
+
max: number;
|
|
716
|
+
}
|
|
607
717
|
|
|
608
718
|
/**
|
|
609
719
|
* Interop struct for curve data
|
|
@@ -641,24 +751,6 @@ export interface Mesh {
|
|
|
641
751
|
index: [number, number, number][];
|
|
642
752
|
}
|
|
643
753
|
|
|
644
|
-
/**
|
|
645
|
-
* A surface defined by a plane and two domains in x and y directions
|
|
646
|
-
*/
|
|
647
|
-
export interface PlaneSurface {
|
|
648
|
-
/**
|
|
649
|
-
* The base plane of the surface
|
|
650
|
-
*/
|
|
651
|
-
plane: Plane;
|
|
652
|
-
/**
|
|
653
|
-
* The domain in x direction
|
|
654
|
-
*/
|
|
655
|
-
x: Domain;
|
|
656
|
-
/**
|
|
657
|
-
* The domain in y direction
|
|
658
|
-
*/
|
|
659
|
-
y: Domain;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
754
|
/**
|
|
663
755
|
* A NURBS surface container
|
|
664
756
|
*/
|
|
@@ -682,84 +774,6 @@ export interface RectangleCurve {
|
|
|
682
774
|
y: Domain;
|
|
683
775
|
}
|
|
684
776
|
|
|
685
|
-
export type NurbsCurve = NurbsCurve3D<number>;
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* A geometry object with a transformation
|
|
689
|
-
*/
|
|
690
|
-
export interface GeometryTransform {
|
|
691
|
-
/**
|
|
692
|
-
* The handle to the geometry object
|
|
693
|
-
*/
|
|
694
|
-
geometry: Handle<GeometryProxy>;
|
|
695
|
-
/**
|
|
696
|
-
* Transformation matrix of the geometry
|
|
697
|
-
*/
|
|
698
|
-
transform: Transform3<number>;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* Geometry proxy for various geometry types
|
|
703
|
-
*/
|
|
704
|
-
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 };
|
|
705
|
-
|
|
706
|
-
export type PolyCurve = CompoundCurve<number, U4>;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* A circular surface
|
|
710
|
-
*/
|
|
711
|
-
export interface CircularSurface {
|
|
712
|
-
/**
|
|
713
|
-
* The base plane of the circle
|
|
714
|
-
*/
|
|
715
|
-
plane: Plane;
|
|
716
|
-
/**
|
|
717
|
-
* The radius of the circle
|
|
718
|
-
*/
|
|
719
|
-
radius: number;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
export interface Domain {
|
|
723
|
-
min: number;
|
|
724
|
-
max: number;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Plane representation with origin, normal, x axis, and y axis
|
|
729
|
-
*/
|
|
730
|
-
export interface Plane {
|
|
731
|
-
/**
|
|
732
|
-
* Origin coordinate of the plane
|
|
733
|
-
*/
|
|
734
|
-
origin: Point3<number>;
|
|
735
|
-
/**
|
|
736
|
-
* Normal vector of the plane
|
|
737
|
-
*/
|
|
738
|
-
normal: Vector3<number>;
|
|
739
|
-
/**
|
|
740
|
-
* X axis of the plane
|
|
741
|
-
*/
|
|
742
|
-
xAxis: Vector3<number>;
|
|
743
|
-
/**
|
|
744
|
-
* Y axis of the plane
|
|
745
|
-
*/
|
|
746
|
-
yAxis: Vector3<number>;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* An oriented box in 3D space
|
|
751
|
-
*/
|
|
752
|
-
export interface OrientedBox {
|
|
753
|
-
/**
|
|
754
|
-
* The plane that the box is aligned to
|
|
755
|
-
*/
|
|
756
|
-
plane: Plane;
|
|
757
|
-
/**
|
|
758
|
-
* The bounding box in the local coordinate system
|
|
759
|
-
*/
|
|
760
|
-
bounds: BoundingBox3D;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
777
|
/**
|
|
764
778
|
* Interop struct for point cloud data
|
|
765
779
|
*/
|
|
@@ -774,20 +788,6 @@ export interface PointCloudInterop {
|
|
|
774
788
|
transform: Transform3<number>;
|
|
775
789
|
}
|
|
776
790
|
|
|
777
|
-
/**
|
|
778
|
-
* A collection of geometry objects
|
|
779
|
-
*/
|
|
780
|
-
export type Group = GeometryTransform[];
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* A face of a mesh with three vertices
|
|
784
|
-
*/
|
|
785
|
-
export interface MeshTriangleFace {
|
|
786
|
-
a: number;
|
|
787
|
-
b: number;
|
|
788
|
-
c: number;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
791
|
/**
|
|
792
792
|
* Proxy for various surface types
|
|
793
793
|
*/
|
|
@@ -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 closure865_externref_shim: (a: number, b: number, c: any) => void;
|
|
875
|
+
readonly closure3552_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.closure865_externref_shim(arg0, arg1, arg2);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
function __wbg_adapter_129(arg0, arg1, arg2, arg3) {
|
|
232
|
-
wasm.
|
|
232
|
+
wasm.closure3552_externref_shim(arg0, arg1, arg2, arg3);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
const ModularFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -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_wrapper3636 = function(arg0, arg1, arg2) {
|
|
647
|
+
const ret = makeMutClosure(arg0, arg1, 866, __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.26",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|