fast-mesh-wasm 0.6.0 → 0.7.0
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/dist/{client-BrTp2eMp.js → client-DFgvktkT.js} +164 -10
- package/dist/{client-Ds09vLkN.d.ts → client-nvmbhtn-.d.ts} +76 -14
- package/dist/{engine-DjdY3GxK.js → engine-BL5_sWAf.js} +15 -4
- package/dist/io.d.ts +200 -2
- package/dist/io.js +3057 -3
- package/dist/{mesh-BsqIofgT.d.ts → mesh-BHTFxsXc.d.ts} +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.js +3 -2
- package/dist/{protocol-Cb23HelE.d.ts → protocol-DFR0JDAS.d.ts} +3 -1
- package/dist/r3f.d.ts +3 -3
- package/dist/r3f.js +1 -1
- package/dist/react.d.ts +2 -2
- package/dist/{scene-D0HNTwoo.js → scene-DUsj6uJD.js} +346 -30
- package/dist/{scene-like-CADk1vfb.d.ts → scene-like-CR_Dpohm.d.ts} +902 -146
- package/dist/{store-BfC6kkf5.d.ts → store-8HWG90Jg.d.ts} +14 -3
- package/dist/{store-DIQmxF_s.js → store-BAzHRRkt.js} +18 -2
- package/dist/store.d.ts +3 -3
- package/dist/store.js +1 -1
- package/dist/three.d.ts +2 -2
- package/dist/views-BSy-Qeg8.js +584 -0
- package/dist/wasm/fast_mesh_wasm.d.ts +7 -0
- package/dist/wasm/fast_mesh_wasm.js +21 -0
- package/dist/wasm/fast_mesh_wasm_bg.wasm +0 -0
- package/dist/wasm/fast_mesh_wasm_bg.wasm.d.ts +1 -0
- package/dist/wasm-threads/fast_mesh_wasm.d.ts +7 -0
- package/dist/wasm-threads/fast_mesh_wasm.js +21 -0
- package/dist/wasm-threads/fast_mesh_wasm_bg.wasm +0 -0
- package/dist/wasm-threads/fast_mesh_wasm_bg.wasm.d.ts +1 -0
- package/dist/web.d.ts +2 -2
- package/dist/web.js +3 -2
- package/dist/worker-engine.d.ts +1 -1
- package/dist/worker-engine.js +1 -1
- package/dist/worker-entry.js +1 -1
- package/dist/worker.d.ts +1 -1
- package/dist/worker.js +1 -1
- package/package.json +1 -1
- package/dist/views-B00kdV0R.js +0 -214
|
@@ -99,49 +99,6 @@ declare class FieldHandle {
|
|
|
99
99
|
declare class SectionHandle {
|
|
100
100
|
private readonly brand;
|
|
101
101
|
}
|
|
102
|
-
/**
|
|
103
|
-
* Zero-copy views of one mesh's render buffers, slot-aligned.
|
|
104
|
-
*
|
|
105
|
-
* Each getter builds a fresh view over the current wasm memory. A view is
|
|
106
|
-
* only valid until the next scene call that may allocate or move buffers
|
|
107
|
-
* (any edit, add, undo, query, ...): the buffer may have moved, so a kept
|
|
108
|
-
* view may read other data, or be empty once the memory grew. Re-acquire
|
|
109
|
-
* views after every scene call and do not keep them. With
|
|
110
|
-
* `new Scene({ debug: true })` reading a kept view warns.
|
|
111
|
-
*/
|
|
112
|
-
interface MeshViews {
|
|
113
|
-
/** Local positions, 3 floats per vertex slot; dead slots hold stale data. */
|
|
114
|
-
positions(): Float32Array;
|
|
115
|
-
/**
|
|
116
|
-
* Vertex normals, 3 floats per vertex slot, or `null` when normals are off.
|
|
117
|
-
* For a `"lazy"` or `"manual"` mesh it can be shorter than 3 · vertex slots
|
|
118
|
-
* after a growth, until the mesh is updated ({@link Scene.update}).
|
|
119
|
-
*/
|
|
120
|
-
normals(): Float32Array | null;
|
|
121
|
-
/** RGBA8 colours, 4 bytes per vertex slot, or `null` without colouring. */
|
|
122
|
-
colors(): Uint8Array | null;
|
|
123
|
-
/**
|
|
124
|
-
* The values the colours are made from (the colouring field's values), 1
|
|
125
|
-
* float per vertex slot, or `null` without colouring. They change only at
|
|
126
|
-
* the colours' dirty slots, so they follow the `colors` change ranges.
|
|
127
|
-
* Optional for other {@link SceneLike} hosts; `Scene` and `WorkerScene`
|
|
128
|
-
* provide it.
|
|
129
|
-
*/
|
|
130
|
-
values?(): Float32Array | null;
|
|
131
|
-
/**
|
|
132
|
-
* Texture coordinates, 2 floats per vertex slot, or `null` for a mesh
|
|
133
|
-
* without them (never given, or dropped by an operation: see
|
|
134
|
-
* `docs/uv-channel.md`). Optional for other {@link SceneLike} hosts; `Scene`
|
|
135
|
-
* and `WorkerScene` provide it ({@link SceneMeshViews}).
|
|
136
|
-
*/
|
|
137
|
-
uvs?(): Float32Array | null;
|
|
138
|
-
/** 3 vertex indices per triangle slot; a removed triangle reads `0, 0, 0`. */
|
|
139
|
-
indices(): Uint32Array;
|
|
140
|
-
}
|
|
141
|
-
/** {@link MeshViews} of `Scene` and `WorkerScene`, which always provide `uvs`. */
|
|
142
|
-
interface SceneMeshViews extends MeshViews {
|
|
143
|
-
uvs(): Float32Array | null;
|
|
144
|
-
}
|
|
145
102
|
/** `[start, count]` in elements: vertex slots, or triangle slots for indices. */
|
|
146
103
|
type Range = readonly [start: number, count: number];
|
|
147
104
|
/** A snapshot of selected vertices of one mesh; see the module docs. */
|
|
@@ -194,6 +151,49 @@ interface IsolateReport {
|
|
|
194
151
|
/** The same vertex set with the post-edit stamp. */
|
|
195
152
|
selection: VertexSelection;
|
|
196
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Zero-copy views of one mesh's render buffers, slot-aligned.
|
|
156
|
+
*
|
|
157
|
+
* Each getter builds a fresh view over the current wasm memory. A view is
|
|
158
|
+
* only valid until the next scene call that may allocate or move buffers
|
|
159
|
+
* (any edit, add, undo, query, ...): the buffer may have moved, so a kept
|
|
160
|
+
* view may read other data, or be empty once the memory grew. Re-acquire
|
|
161
|
+
* views after every scene call and do not keep them. With
|
|
162
|
+
* `new Scene({ debug: true })` reading a kept view warns.
|
|
163
|
+
*/
|
|
164
|
+
interface MeshViews {
|
|
165
|
+
/** Local positions, 3 floats per vertex slot; dead slots hold stale data. */
|
|
166
|
+
positions(): Float32Array;
|
|
167
|
+
/**
|
|
168
|
+
* Vertex normals, 3 floats per vertex slot, or `null` when normals are off.
|
|
169
|
+
* For a `"lazy"` or `"manual"` mesh it can be shorter than 3 · vertex slots
|
|
170
|
+
* after a growth, until the mesh is updated ({@link Scene.update}).
|
|
171
|
+
*/
|
|
172
|
+
normals(): Float32Array | null;
|
|
173
|
+
/** RGBA8 colours, 4 bytes per vertex slot, or `null` without colouring. */
|
|
174
|
+
colors(): Uint8Array | null;
|
|
175
|
+
/**
|
|
176
|
+
* The values the colours are made from (the colouring field's values), 1
|
|
177
|
+
* float per vertex slot, or `null` without colouring. They change only at
|
|
178
|
+
* the colours' dirty slots, so they follow the `colors` change ranges.
|
|
179
|
+
* Optional for other {@link SceneLike} hosts; `Scene` and `WorkerScene`
|
|
180
|
+
* provide it.
|
|
181
|
+
*/
|
|
182
|
+
values?(): Float32Array | null;
|
|
183
|
+
/**
|
|
184
|
+
* Texture coordinates, 2 floats per vertex slot, or `null` for a mesh
|
|
185
|
+
* without them (never given, or dropped by an operation: see
|
|
186
|
+
* `docs/uv-channel.md`). Optional for other {@link SceneLike} hosts; `Scene`
|
|
187
|
+
* and `WorkerScene` provide it ({@link SceneMeshViews}).
|
|
188
|
+
*/
|
|
189
|
+
uvs?(): Float32Array | null;
|
|
190
|
+
/** 3 vertex indices per triangle slot; a removed triangle reads `0, 0, 0`. */
|
|
191
|
+
indices(): Uint32Array;
|
|
192
|
+
}
|
|
193
|
+
/** {@link MeshViews} of `Scene` and `WorkerScene`, which always provide `uvs`. */
|
|
194
|
+
interface SceneMeshViews extends MeshViews {
|
|
195
|
+
uvs(): Float32Array | null;
|
|
196
|
+
}
|
|
197
197
|
/**
|
|
198
198
|
* What changed in one mesh since the previous {@link Scene.takeChanges}.
|
|
199
199
|
* Range lists are ascending; `"all"` means re-upload the whole buffer.
|
|
@@ -691,39 +691,51 @@ interface AnalyzeOptions {
|
|
|
691
691
|
/** The most entries kept in each counted list. Defaults to 1000. */
|
|
692
692
|
maxListed?: number;
|
|
693
693
|
}
|
|
694
|
+
/** Which normal direction `inflate` pushes vertices along. */
|
|
695
|
+
type InflateMethod = "vertexNormal" | "averageNormal" | "strokeNormal";
|
|
696
|
+
/** Surface relaxation kernel for `smooth`. */
|
|
697
|
+
type SmoothMethod = "taubin" | "laplacian" | "hcLaplacian" | "cotangent";
|
|
698
|
+
/** Spatial or elastic kernel for `grab`. */
|
|
699
|
+
type GrabMethod = "sphere" | "geodesic" | "kelvinlet";
|
|
700
|
+
/** Which side(s) of the brush plane `flatten` projects toward the plane. */
|
|
701
|
+
type FlattenMode = "both" | "peaks" | "valleys";
|
|
702
|
+
/** Footprint profile for `clay`. */
|
|
703
|
+
type ClayProfile = "round" | "strips";
|
|
704
|
+
/** Rotational kernel for `twist`. */
|
|
705
|
+
type TwistMethod = "vortex" | "kelvinlet";
|
|
706
|
+
/** Surface offsetting / reconstruction algorithm for `repair(mesh, { op: "offset", ... })`. */
|
|
707
|
+
type OffsetAlgorithm = "normal" | "fhEdt" | "bvhSdf";
|
|
694
708
|
/**
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
* tolerance or area below the `f32` range rounds to 0.
|
|
709
|
+
* Composable per-vertex surface feature mask multiplied into a brush's
|
|
710
|
+
* spatial falloff.
|
|
698
711
|
*/
|
|
699
|
-
type
|
|
700
|
-
|
|
701
|
-
tolerance: number;
|
|
702
|
-
} | {
|
|
703
|
-
op: "removeDegenerate";
|
|
704
|
-
areaEpsilon?: number;
|
|
705
|
-
removeUnusedVertices?: boolean;
|
|
712
|
+
type SurfaceFilter = {
|
|
713
|
+
kind: "none";
|
|
706
714
|
} | {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
keepLargest?: boolean;
|
|
715
|
+
kind: "peaksOnly";
|
|
716
|
+
threshold?: number;
|
|
717
|
+
contrast?: number;
|
|
711
718
|
} | {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
maxEdges?: number;
|
|
716
|
-
maxPerimeter?: number;
|
|
717
|
-
maxArea?: number;
|
|
718
|
-
loops?: readonly LoopId[];
|
|
719
|
-
allowUnclean?: boolean;
|
|
720
|
-
fair?: boolean;
|
|
721
|
-
dpLimit?: number;
|
|
722
|
-
/** Reject a minimum-weight triangulation past this dihedral, in radians. */
|
|
723
|
-
maxDihedral?: number;
|
|
724
|
-
/** Stop refining a patch once it has this many new vertices. */
|
|
725
|
-
maxRefineVertices?: number;
|
|
719
|
+
kind: "valleysOnly";
|
|
720
|
+
threshold?: number;
|
|
721
|
+
contrast?: number;
|
|
726
722
|
} | {
|
|
723
|
+
kind: "normalAngle";
|
|
724
|
+
normal?: Readonly<Vec3>;
|
|
725
|
+
maxAngleDeg?: number;
|
|
726
|
+
};
|
|
727
|
+
/** Mirror symmetry axes across local coordinate planes `x = 0`, `y = 0`, `z = 0`. */
|
|
728
|
+
interface Symmetry {
|
|
729
|
+
x?: boolean;
|
|
730
|
+
y?: boolean;
|
|
731
|
+
z?: boolean;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* One sculpt brush, stroke capture, or dynamic-topology operation for
|
|
735
|
+
* {@link Scene.sculpt} (and accepted identically by {@link Scene.repair}).
|
|
736
|
+
* Distances are in local mesh units.
|
|
737
|
+
*/
|
|
738
|
+
type SculptOp = {
|
|
727
739
|
op: "inflate";
|
|
728
740
|
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
729
741
|
center: Readonly<Vec3>;
|
|
@@ -731,6 +743,12 @@ type RepairOp = {
|
|
|
731
743
|
falloff: "linear" | "smooth";
|
|
732
744
|
/** Displacement scale; negative pulls instead of pushing. */
|
|
733
745
|
strength: number;
|
|
746
|
+
/** Normal evaluation mode; unset means `"vertexNormal"`. */
|
|
747
|
+
method?: InflateMethod;
|
|
748
|
+
/** Optional per-vertex surface feature mask. */
|
|
749
|
+
filter?: SurfaceFilter;
|
|
750
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
751
|
+
symmetry?: Symmetry;
|
|
734
752
|
/** Vertices this op must hold in place, or move less. */
|
|
735
753
|
protect?: VertexProtection;
|
|
736
754
|
} | {
|
|
@@ -741,10 +759,137 @@ type RepairOp = {
|
|
|
741
759
|
falloff: "linear" | "smooth";
|
|
742
760
|
/** Displacement scale; the per-vertex weight is `strength * falloff`. */
|
|
743
761
|
strength: number;
|
|
744
|
-
/** How many
|
|
762
|
+
/** How many relaxation cycles to run; 0 moves nothing. */
|
|
745
763
|
cycles: number;
|
|
764
|
+
/** Relaxation kernel; unset means `"taubin"`. */
|
|
765
|
+
method?: SmoothMethod;
|
|
766
|
+
/** Optional per-vertex surface feature mask. */
|
|
767
|
+
filter?: SurfaceFilter;
|
|
768
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
769
|
+
symmetry?: Symmetry;
|
|
770
|
+
/** Vertices this op must hold in place, or move less. */
|
|
771
|
+
protect?: VertexProtection;
|
|
772
|
+
} | {
|
|
773
|
+
op: "relax";
|
|
774
|
+
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
775
|
+
center: Readonly<Vec3>;
|
|
776
|
+
radius: number;
|
|
777
|
+
falloff: "linear" | "smooth";
|
|
778
|
+
/** Displacement scale; the per-vertex weight is `strength * falloff`. */
|
|
779
|
+
strength: number;
|
|
780
|
+
/** How many plain Laplacian passes to run; 0 moves nothing. */
|
|
781
|
+
cycles: number;
|
|
782
|
+
/** Optional per-vertex surface feature mask. */
|
|
783
|
+
filter?: SurfaceFilter;
|
|
784
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
785
|
+
symmetry?: Symmetry;
|
|
786
|
+
/** Vertices this op must hold in place, or move less. */
|
|
787
|
+
protect?: VertexProtection;
|
|
788
|
+
} | {
|
|
789
|
+
op: "grab";
|
|
790
|
+
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
791
|
+
center: Readonly<Vec3>;
|
|
792
|
+
radius: number;
|
|
793
|
+
falloff: "linear" | "smooth";
|
|
794
|
+
/** Displacement scale; the per-vertex offset is `strength * falloff * direction`. */
|
|
795
|
+
strength: number;
|
|
796
|
+
/** The drag vector in local coordinates; zero moves nothing. */
|
|
797
|
+
direction: Readonly<Vec3>;
|
|
798
|
+
/** Spatial or elastic kernel; unset means `"sphere"`. */
|
|
799
|
+
method?: GrabMethod;
|
|
800
|
+
/** Elastic Poisson ratio in `[0, 0.5]` for `"kelvinlet"`; unset means `0.4`. */
|
|
801
|
+
poisson?: number;
|
|
802
|
+
/** Evaluate offsets from stroke-start rest positions (`captureStrokeState`). */
|
|
803
|
+
fromStroke?: boolean;
|
|
804
|
+
/** Automatically widen brush reach on tangential surface drags to prevent fold-over. */
|
|
805
|
+
adaptiveReach?: boolean;
|
|
806
|
+
/** Optional per-vertex surface feature mask. */
|
|
807
|
+
filter?: SurfaceFilter;
|
|
808
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
809
|
+
symmetry?: Symmetry;
|
|
810
|
+
/** Vertices this op must hold in place, or move less. */
|
|
811
|
+
protect?: VertexProtection;
|
|
812
|
+
} | {
|
|
813
|
+
op: "flatten";
|
|
814
|
+
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
815
|
+
center: Readonly<Vec3>;
|
|
816
|
+
radius: number;
|
|
817
|
+
falloff: "linear" | "smooth";
|
|
818
|
+
/** Projection blend scale toward the brush plane. */
|
|
819
|
+
strength: number;
|
|
820
|
+
/** Which side(s) of the plane to project; unset means `"both"`. */
|
|
821
|
+
mode?: FlattenMode;
|
|
822
|
+
/** Explicit plane origin in local coordinates; unset fits the falloff-weighted centroid. */
|
|
823
|
+
planeOrigin?: Readonly<Vec3>;
|
|
824
|
+
/** Explicit non-zero plane normal in local coordinates; unset fits the falloff-weighted average normal. */
|
|
825
|
+
planeNormal?: Readonly<Vec3>;
|
|
826
|
+
/** Optional per-vertex surface feature mask. */
|
|
827
|
+
filter?: SurfaceFilter;
|
|
828
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
829
|
+
symmetry?: Symmetry;
|
|
830
|
+
/** Vertices this op must hold in place, or move less. */
|
|
831
|
+
protect?: VertexProtection;
|
|
832
|
+
} | {
|
|
833
|
+
op: "crease";
|
|
834
|
+
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
835
|
+
center: Readonly<Vec3>;
|
|
836
|
+
radius: number;
|
|
837
|
+
falloff: "linear" | "smooth";
|
|
838
|
+
/** Normal groove/ridge scale (`< 0` carves a crease, `> 0` raises a ridge, `0` pinches only). */
|
|
839
|
+
strength: number;
|
|
840
|
+
/** Tangent-plane radial pinch factor in `[0, 1]`; unset means `0.5`. */
|
|
841
|
+
pinch?: number;
|
|
842
|
+
/** Optional per-vertex surface feature mask. */
|
|
843
|
+
filter?: SurfaceFilter;
|
|
844
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
845
|
+
symmetry?: Symmetry;
|
|
846
|
+
/** Vertices this op must hold in place, or move less. */
|
|
847
|
+
protect?: VertexProtection;
|
|
848
|
+
} | {
|
|
849
|
+
op: "clay";
|
|
850
|
+
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
851
|
+
center: Readonly<Vec3>;
|
|
852
|
+
radius: number;
|
|
853
|
+
falloff: "linear" | "smooth";
|
|
854
|
+
/** Buildup/carve scale (`> 0` builds up, `< 0` carves down). */
|
|
855
|
+
strength: number;
|
|
856
|
+
/** Footprint profile (`"round"` or `"strips"`); unset means `"round"`. */
|
|
857
|
+
profile?: ClayProfile;
|
|
858
|
+
/** Optional stroke tangent direction in local coordinates for `"strips"`. */
|
|
859
|
+
tangent?: Readonly<Vec3>;
|
|
860
|
+
/** Optional per-vertex surface feature mask. */
|
|
861
|
+
filter?: SurfaceFilter;
|
|
862
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
863
|
+
symmetry?: Symmetry;
|
|
864
|
+
/** Vertices this op must hold in place, or move less. */
|
|
865
|
+
protect?: VertexProtection;
|
|
866
|
+
} | {
|
|
867
|
+
op: "twist";
|
|
868
|
+
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
869
|
+
center: Readonly<Vec3>;
|
|
870
|
+
radius: number;
|
|
871
|
+
falloff: "linear" | "smooth";
|
|
872
|
+
/** Twist angle scale in radians. */
|
|
873
|
+
strength: number;
|
|
874
|
+
/** Rotational kernel; unset means `"vortex"`. */
|
|
875
|
+
method?: TwistMethod;
|
|
876
|
+
/** Explicit non-zero twist axis in local coordinates; unset uses the average brush normal. */
|
|
877
|
+
axis?: Readonly<Vec3>;
|
|
878
|
+
/** Optional per-vertex surface feature mask. */
|
|
879
|
+
filter?: SurfaceFilter;
|
|
880
|
+
/** Optional mirror symmetry across local coordinate planes. */
|
|
881
|
+
symmetry?: Symmetry;
|
|
746
882
|
/** Vertices this op must hold in place, or move less. */
|
|
747
883
|
protect?: VertexProtection;
|
|
884
|
+
} | {
|
|
885
|
+
/**
|
|
886
|
+
* Snapshots lazy stroke-start rest positions and smooth normals for
|
|
887
|
+
* `inflate` (`method: "strokeNormal"`) and `grab` (`fromStroke: true`).
|
|
888
|
+
* Not an edit: no undo step, and it must be the only op of its list.
|
|
889
|
+
*/
|
|
890
|
+
op: "captureStrokeState";
|
|
891
|
+
/** Keep an already active stroke snapshot on this mesh. Unset means `false`. */
|
|
892
|
+
onlyIfMissing?: boolean;
|
|
748
893
|
} | {
|
|
749
894
|
op: "remesh";
|
|
750
895
|
/** Region center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
@@ -788,45 +933,128 @@ type RepairOp = {
|
|
|
788
933
|
maxSplits?: number;
|
|
789
934
|
/** New interior vertices follow the surface's curvature; `false` uses midpoints. Unset means `true`. */
|
|
790
935
|
smooth?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* With `smooth`, the angle in degrees past which two faces count as
|
|
938
|
+
* separated by a crease, in `(0, 180]`; unset means 45. A new vertex on
|
|
939
|
+
* such an edge sits at its midpoint, and faces beyond it do not tilt a
|
|
940
|
+
* curved point. A gentler crease rounds off, and a flat face beside it
|
|
941
|
+
* bulges: at 45, 0.20 beside a 30 degree crease on a 6.0 edge. Set it below
|
|
942
|
+
* a model's gentlest crease to keep that crease's flat faces flat; a coarse
|
|
943
|
+
* curved surface then rounds less.
|
|
944
|
+
*/
|
|
945
|
+
sharpAngle?: number;
|
|
946
|
+
};
|
|
947
|
+
/** Domain preset for {@link AutoRepairRequest}. */
|
|
948
|
+
type AutoRepairPreset = "general" | "scan3d" | "print3d" | "cadImport";
|
|
949
|
+
/** Strategy for {@link resolveSelfIntersections} and {@link AutoRepairRequest}. */
|
|
950
|
+
type SelfIntersectionMode = "none" | "deleteAndFill" | "cutAndStitch" | "voxelHeal";
|
|
951
|
+
/** Options for the `"makeManifold"` repair op. */
|
|
952
|
+
interface ManifoldOptions {
|
|
953
|
+
/** Remove exact duplicate triangles sharing the same unordered vertex triple. Defaults to `true`. */
|
|
954
|
+
removeDuplicates?: boolean;
|
|
955
|
+
/** Prune small dangling boundary fins attached to non-manifold edges. Defaults to `true`. */
|
|
956
|
+
pruneFins?: boolean;
|
|
957
|
+
/** Separate non-manifold edges (`> 2` incident faces) across sheets. Defaults to `true`. */
|
|
958
|
+
splitNonManifoldEdges?: boolean;
|
|
959
|
+
/** Separate pinch (bow-tie) vertices into distinct fan components. Defaults to `true`. */
|
|
960
|
+
splitPinchVertices?: boolean;
|
|
961
|
+
}
|
|
962
|
+
/** Options for the `"resolveSelfIntersections"` repair op. */
|
|
963
|
+
interface SelfIntersectOptions {
|
|
964
|
+
/** Resolution mode. Defaults to `"deleteAndFill"`. */
|
|
965
|
+
mode?: SelfIntersectionMode;
|
|
966
|
+
/** Number of 1-ring neighbor layers deleted around colliding faces (`"deleteAndFill"` and local fallback). Defaults to `1`. */
|
|
967
|
+
ringExpansion?: number;
|
|
968
|
+
/** Explicit voxel pitch in mesh units for `"voxelHeal"`. Omit for automatic sizing. */
|
|
969
|
+
voxelSize?: number;
|
|
970
|
+
/** Maximum voxel count for `"voxelHeal"` (`>= 64`). Defaults to `16_777_216` (`256^3`). */
|
|
971
|
+
maxVoxels?: number;
|
|
972
|
+
/** Optional hole boundary edge cap passed to `fillHoles`. Defaults to unbounded. */
|
|
973
|
+
maxHoleEdges?: number;
|
|
974
|
+
/** Whether hole patches in `"deleteAndFill"` are faired. Defaults to `true`. */
|
|
975
|
+
fair?: boolean;
|
|
976
|
+
/** Spatial weld tolerance for shared cut seam vertices in `"cutAndStitch"`. Defaults to `1e-5`. */
|
|
977
|
+
stitchTolerance?: number;
|
|
978
|
+
}
|
|
979
|
+
/** Options for the `"cleanupSlivers"` repair op. */
|
|
980
|
+
interface SliverOptions {
|
|
981
|
+
/** Maximum allowed circumradius-to-2-inradius aspect ratio (`>= 1`). Defaults to `20`. */
|
|
982
|
+
maxAspectRatio?: number;
|
|
983
|
+
/** Minimum interior angle threshold in degrees (`[0, 60]`). Defaults to `2`. */
|
|
984
|
+
minAngleDeg?: number;
|
|
985
|
+
/** Maximum interior angle threshold in degrees (`[60, 180]`). Defaults to `176`. */
|
|
986
|
+
maxAngleDeg?: number;
|
|
987
|
+
/** Maximum cleanup passes over the mesh. Defaults to `3`. */
|
|
988
|
+
maxIterations?: number;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* One repair operation for {@link Scene.repair}. Distances and areas are in
|
|
992
|
+
* mesh units (equal to world units). They are converted to `f32`, so a
|
|
993
|
+
* tolerance or area below the `f32` range rounds to 0.
|
|
994
|
+
*/
|
|
995
|
+
type RepairOp = SculptOp | {
|
|
996
|
+
op: "weld";
|
|
997
|
+
tolerance: number;
|
|
998
|
+
} | {
|
|
999
|
+
op: "removeDegenerate";
|
|
1000
|
+
areaEpsilon?: number;
|
|
1001
|
+
removeUnusedVertices?: boolean;
|
|
1002
|
+
} | {
|
|
1003
|
+
op: "removeSmallComponents";
|
|
1004
|
+
minTriangles?: number;
|
|
1005
|
+
minArea?: number;
|
|
1006
|
+
keepLargest?: boolean;
|
|
1007
|
+
} | {
|
|
1008
|
+
op: "orient";
|
|
1009
|
+
} | ({
|
|
1010
|
+
op: "makeManifold";
|
|
1011
|
+
} & ManifoldOptions) | ({
|
|
1012
|
+
op: "resolveSelfIntersections";
|
|
1013
|
+
} & SelfIntersectOptions) | ({
|
|
1014
|
+
op: "cleanupSlivers";
|
|
1015
|
+
} & SliverOptions) | {
|
|
1016
|
+
op: "fillHoles";
|
|
1017
|
+
maxEdges?: number;
|
|
1018
|
+
maxPerimeter?: number;
|
|
1019
|
+
maxArea?: number;
|
|
1020
|
+
loops?: readonly LoopId[];
|
|
1021
|
+
allowUnclean?: boolean;
|
|
1022
|
+
fair?: boolean;
|
|
1023
|
+
dpLimit?: number;
|
|
1024
|
+
/** Reject a minimum-weight triangulation past this dihedral, in radians. */
|
|
1025
|
+
maxDihedral?: number;
|
|
1026
|
+
/** Stop refining a patch once it has this many new vertices. */
|
|
1027
|
+
maxRefineVertices?: number;
|
|
791
1028
|
} | {
|
|
792
1029
|
op: "bridgeLoops";
|
|
793
1030
|
/** The two loops to connect, from `analyze(mesh).loops`. Order is insignificant. */
|
|
794
1031
|
loops: readonly [LoopId, LoopId];
|
|
795
1032
|
/** Maximum vertices per loop; unset means the default (128). */
|
|
796
1033
|
maxEdges?: number;
|
|
797
|
-
} | {
|
|
798
|
-
op: "grab";
|
|
799
|
-
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
800
|
-
center: Readonly<Vec3>;
|
|
801
|
-
radius: number;
|
|
802
|
-
falloff: "linear" | "smooth";
|
|
803
|
-
/** Displacement scale; the per-vertex offset is `strength * falloff * direction`. */
|
|
804
|
-
strength: number;
|
|
805
|
-
/** The drag vector in local coordinates; zero moves nothing. */
|
|
806
|
-
direction: Readonly<Vec3>;
|
|
807
|
-
/** Vertices this op must hold in place, or move less. */
|
|
808
|
-
protect?: VertexProtection;
|
|
809
|
-
} | {
|
|
810
|
-
op: "relax";
|
|
811
|
-
/** Brush center in local mesh coordinates, as in `views(mesh).positions()`. */
|
|
812
|
-
center: Readonly<Vec3>;
|
|
813
|
-
radius: number;
|
|
814
|
-
falloff: "linear" | "smooth";
|
|
815
|
-
/** Displacement scale; the per-vertex weight is `strength * falloff`. */
|
|
816
|
-
strength: number;
|
|
817
|
-
/** How many plain Laplacian passes to run; 0 moves nothing. */
|
|
818
|
-
cycles: number;
|
|
819
|
-
/** Vertices this op must hold in place, or move less. */
|
|
820
|
-
protect?: VertexProtection;
|
|
821
1034
|
} | {
|
|
822
1035
|
op: "offset";
|
|
823
1036
|
/**
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
* 0
|
|
1037
|
+
* Offset distance in local mesh units.
|
|
1038
|
+
* - `"normal"` (default): moves vertices along smooth normals (`0` moves nothing).
|
|
1039
|
+
* - `"fhEdt"` / `"bvhSdf"`: on closed outward-wound solids, positive expands,
|
|
1040
|
+
* negative shrinks, and `0` voxel-remeshes at the current surface; on open
|
|
1041
|
+
* sheets, `distance > 0` builds a closed thickened shell and `distance <= 0`
|
|
1042
|
+
* throws `INVALID_ARGUMENT`. Drops UVs (`uvsDropped: true`, undoable).
|
|
828
1043
|
*/
|
|
829
1044
|
distance: number;
|
|
1045
|
+
/** Offsetting algorithm; defaults to `"normal"`. */
|
|
1046
|
+
algorithm?: OffsetAlgorithm;
|
|
1047
|
+
/**
|
|
1048
|
+
* Grid spacing in local mesh units for `"fhEdt"` and `"bvhSdf"`; must be
|
|
1049
|
+
* positive and finite when provided. Omit for automatic (`bbox_diag / 64`,
|
|
1050
|
+
* clamped to `maxVoxels`). Ignored when `algorithm` is `"normal"`.
|
|
1051
|
+
*/
|
|
1052
|
+
voxelSize?: number;
|
|
1053
|
+
/**
|
|
1054
|
+
* Maximum 3D grid voxel count (`nx * ny * nz`) for `"fhEdt"` and `"bvhSdf"`;
|
|
1055
|
+
* must be an integer `>= 64`. Defaults to `16_777_216` (`256^3`).
|
|
1056
|
+
*/
|
|
1057
|
+
maxVoxels?: number;
|
|
830
1058
|
} | {
|
|
831
1059
|
op: "shell";
|
|
832
1060
|
/**
|
|
@@ -909,21 +1137,24 @@ interface FillReport {
|
|
|
909
1137
|
}[];
|
|
910
1138
|
}
|
|
911
1139
|
/**
|
|
912
|
-
* Vertices a brush op
|
|
1140
|
+
* Vertices a brush op holds back, with optional geodesic soft-band feathering.
|
|
913
1141
|
* After the op runs, each listed vertex's move is scaled by its weight: `0`
|
|
914
|
-
* leaves it at exactly the bytes it had, `1` keeps the whole move.
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
*
|
|
1142
|
+
* leaves it at exactly the bytes it had, `1` keeps the whole move. When
|
|
1143
|
+
* `band > 0`, vertices within geodesic surface distance `band` of `0`-weight
|
|
1144
|
+
* vertices feather smoothly across `[0, band]`. The op's report describes its
|
|
1145
|
+
* own move before scaling, and it stays one undo step; an op alone whose brush
|
|
1146
|
+
* holds only vertices at `0` reports 0 and leaves no step.
|
|
918
1147
|
*
|
|
919
|
-
* @throws `INVALID_ARGUMENT`
|
|
920
|
-
*
|
|
1148
|
+
* @throws `INVALID_ARGUMENT` when a vertex is not alive, a weight is outside
|
|
1149
|
+
* `[0, 1]`, `band` is negative or non-finite, or the lists differ in length.
|
|
921
1150
|
*/
|
|
922
1151
|
interface VertexProtection {
|
|
923
1152
|
/** The vertex slots to protect. */
|
|
924
|
-
vertices:
|
|
1153
|
+
vertices: Indices;
|
|
925
1154
|
/** One weight per vertex, each in `[0, 1]`; unset holds every listed vertex fully (all `0`). */
|
|
926
|
-
weights?:
|
|
1155
|
+
weights?: ArrayLike<number>;
|
|
1156
|
+
/** Geodesic soft-falloff transition band width in local units around `0`-weight vertices; unset means `0`. */
|
|
1157
|
+
band?: number;
|
|
927
1158
|
}
|
|
928
1159
|
/** What `inflate` did. */
|
|
929
1160
|
interface InflateReport {
|
|
@@ -935,6 +1166,28 @@ interface SmoothReport {
|
|
|
935
1166
|
moved: number;
|
|
936
1167
|
maxDisplacement: number;
|
|
937
1168
|
}
|
|
1169
|
+
/** What `flatten` did. */
|
|
1170
|
+
interface FlattenReport {
|
|
1171
|
+
moved: number;
|
|
1172
|
+
maxDisplacement: number;
|
|
1173
|
+
}
|
|
1174
|
+
/** What `crease` did. */
|
|
1175
|
+
interface CreaseReport {
|
|
1176
|
+
moved: number;
|
|
1177
|
+
maxDisplacement: number;
|
|
1178
|
+
}
|
|
1179
|
+
/** What `clay` did. */
|
|
1180
|
+
interface ClayReport {
|
|
1181
|
+
moved: number;
|
|
1182
|
+
maxDisplacement: number;
|
|
1183
|
+
}
|
|
1184
|
+
/** What `twist` did. */
|
|
1185
|
+
interface TwistReport {
|
|
1186
|
+
moved: number;
|
|
1187
|
+
maxDisplacement: number;
|
|
1188
|
+
}
|
|
1189
|
+
/** What `captureStrokeState` did: nothing to report. */
|
|
1190
|
+
type CaptureStrokeReport = Record<string, never>;
|
|
938
1191
|
/** What `remesh` did. */
|
|
939
1192
|
interface RemeshReport {
|
|
940
1193
|
splits: number;
|
|
@@ -976,8 +1229,18 @@ interface OffsetReport {
|
|
|
976
1229
|
maxDisplacement: number;
|
|
977
1230
|
/** Degenerate triangles the cleanup pass removed. */
|
|
978
1231
|
degenerateRemoved: number;
|
|
979
|
-
/** Vertices
|
|
1232
|
+
/** Vertices removed (cleanup pass for `"normal"`, replaced + cleanup for volumetric). */
|
|
980
1233
|
verticesRemoved: number;
|
|
1234
|
+
/** New vertices added by Marching Cubes (`0` for `"normal"`). */
|
|
1235
|
+
verticesAdded: number;
|
|
1236
|
+
/** New triangles added by Marching Cubes (`0` for `"normal"`). */
|
|
1237
|
+
trianglesAdded: number;
|
|
1238
|
+
/** Original triangles replaced (`0` for `"normal"`). */
|
|
1239
|
+
trianglesRemoved: number;
|
|
1240
|
+
/** Voxel spacing used in local mesh units (`0` for `"normal"`). */
|
|
1241
|
+
voxelSize: number;
|
|
1242
|
+
/** Whether the `"uv"` channel was dropped (`false` for `"normal"` or meshes without UVs). */
|
|
1243
|
+
uvsDropped: boolean;
|
|
981
1244
|
}
|
|
982
1245
|
/** What `shell` did. */
|
|
983
1246
|
interface ShellReport {
|
|
@@ -1008,6 +1271,31 @@ interface SubdivideReport {
|
|
|
1008
1271
|
/** Triangles added: three per subdivided triangle per level. */
|
|
1009
1272
|
trianglesAdded: number;
|
|
1010
1273
|
}
|
|
1274
|
+
/** What `makeManifold` did. */
|
|
1275
|
+
interface ManifoldReport {
|
|
1276
|
+
removedDuplicateTriangles: number;
|
|
1277
|
+
prunedFinTriangles: number;
|
|
1278
|
+
splitNonManifoldEdges: number;
|
|
1279
|
+
splitPinchVertices: number;
|
|
1280
|
+
verticesAdded: number;
|
|
1281
|
+
removedVertices: number;
|
|
1282
|
+
}
|
|
1283
|
+
/** What `resolveSelfIntersections` did. */
|
|
1284
|
+
interface SelfIntersectReport {
|
|
1285
|
+
initialPairs: number;
|
|
1286
|
+
remainingPairs: number;
|
|
1287
|
+
removedTriangles: number;
|
|
1288
|
+
addedTriangles: number;
|
|
1289
|
+
modeUsed: SelfIntersectionMode;
|
|
1290
|
+
uvsDropped: boolean;
|
|
1291
|
+
}
|
|
1292
|
+
/** What `cleanupSlivers` did. */
|
|
1293
|
+
interface SliverReport {
|
|
1294
|
+
collapsedNeedles: number;
|
|
1295
|
+
flippedCaps: number;
|
|
1296
|
+
removedDegenerate: number;
|
|
1297
|
+
removedVertices: number;
|
|
1298
|
+
}
|
|
1011
1299
|
/** Options of {@link Scene.join}. */
|
|
1012
1300
|
interface JoinOptions {
|
|
1013
1301
|
/** The loop on the target, from `analyze(target).loops`. */
|
|
@@ -1174,11 +1462,19 @@ type BooleanOp = "union" | "subtract" | "intersect";
|
|
|
1174
1462
|
*/
|
|
1175
1463
|
interface AutoRepairRequest {
|
|
1176
1464
|
kind: "auto";
|
|
1177
|
-
/**
|
|
1465
|
+
/** Domain preset configuring stages and defaults. Defaults to `"general"`. */
|
|
1466
|
+
preset?: AutoRepairPreset;
|
|
1467
|
+
/** Optional self-intersection resolution override for this run. */
|
|
1468
|
+
selfIntersectionMode?: SelfIntersectionMode;
|
|
1469
|
+
/** Voxel spacing in mesh units for volumetric healing (`"voxelHeal"` or `"print3d"` fallback). */
|
|
1470
|
+
voxelSize?: number;
|
|
1471
|
+
/** Maximum voxel count (`>= 64`) for volumetric healing. Defaults to `16_777_216`. */
|
|
1472
|
+
maxVoxels?: number;
|
|
1473
|
+
/** Vertices at most this far apart are welded, in mesh units. Default depends on `preset` (`1e-5` for `"general"`). */
|
|
1178
1474
|
weldTolerance?: number;
|
|
1179
|
-
/** Components with fewer triangles are removed; the largest always stays. Default `500
|
|
1475
|
+
/** Components with fewer triangles are removed; the largest always stays. Default depends on `preset` (`500` for `"general"`). */
|
|
1180
1476
|
minTriangles?: number;
|
|
1181
|
-
/** Fill only holes with at most this many edges; `Infinity` fills any size. Default `64
|
|
1477
|
+
/** Fill only holes with at most this many edges; `Infinity` fills any size (`"cadImport"` preserves open boundaries unless finite). Default depends on `preset` (`64` for `"general"`). */
|
|
1182
1478
|
maxEdges?: number;
|
|
1183
1479
|
/** Refine and fair each fill so it follows the surrounding curvature. Default `true`. */
|
|
1184
1480
|
fair?: boolean;
|
|
@@ -1193,9 +1489,40 @@ interface AutoRepairReport {
|
|
|
1193
1489
|
orient: OrientReport;
|
|
1194
1490
|
removeSmallComponents: RemoveReport;
|
|
1195
1491
|
fillHoles: FillReport;
|
|
1196
|
-
|
|
1492
|
+
makeManifold?: ManifoldReport;
|
|
1493
|
+
cleanupSlivers?: SliverReport;
|
|
1494
|
+
resolveSelfIntersections?: SelfIntersectReport;
|
|
1495
|
+
}
|
|
1496
|
+
/** The report of a {@link SculptOp}. */
|
|
1497
|
+
type SculptReport = InflateReport | SmoothReport | RelaxReport | GrabReport | FlattenReport | CreaseReport | ClayReport | TwistReport | CaptureStrokeReport | CaptureRestReport | StretchReport | RemeshReport;
|
|
1498
|
+
/** The report type of a sculpt op. */
|
|
1499
|
+
type SculptReportOf<O extends SculptOp> = O extends {
|
|
1500
|
+
op: "inflate";
|
|
1501
|
+
} ? InflateReport : O extends {
|
|
1502
|
+
op: "smooth";
|
|
1503
|
+
} ? SmoothReport : O extends {
|
|
1504
|
+
op: "relax";
|
|
1505
|
+
} ? RelaxReport : O extends {
|
|
1506
|
+
op: "grab";
|
|
1507
|
+
} ? GrabReport : O extends {
|
|
1508
|
+
op: "flatten";
|
|
1509
|
+
} ? FlattenReport : O extends {
|
|
1510
|
+
op: "crease";
|
|
1511
|
+
} ? CreaseReport : O extends {
|
|
1512
|
+
op: "clay";
|
|
1513
|
+
} ? ClayReport : O extends {
|
|
1514
|
+
op: "twist";
|
|
1515
|
+
} ? TwistReport : O extends {
|
|
1516
|
+
op: "captureStrokeState";
|
|
1517
|
+
} ? CaptureStrokeReport : O extends {
|
|
1518
|
+
op: "captureRestSizes";
|
|
1519
|
+
} ? CaptureRestReport : O extends {
|
|
1520
|
+
op: "splitStretched";
|
|
1521
|
+
} ? StretchReport : O extends {
|
|
1522
|
+
op: "remesh";
|
|
1523
|
+
} ? RemeshReport : SculptReport;
|
|
1197
1524
|
/** The report of a {@link RepairOp}. */
|
|
1198
|
-
type RepairReport = WeldReport | DegenerateReport | RemoveReport | OrientReport | FillReport |
|
|
1525
|
+
type RepairReport = SculptReport | WeldReport | DegenerateReport | RemoveReport | OrientReport | FillReport | BridgeReport | OffsetReport | ShellReport | SimplifyReport | SubdivideReport | ManifoldReport | SelfIntersectReport | SliverReport;
|
|
1199
1526
|
/** The report type of a repair op. */
|
|
1200
1527
|
type RepairReportOf<O extends RepairOp> = O extends {
|
|
1201
1528
|
op: "weld";
|
|
@@ -1206,6 +1533,12 @@ type RepairReportOf<O extends RepairOp> = O extends {
|
|
|
1206
1533
|
} ? RemoveReport : O extends {
|
|
1207
1534
|
op: "orient";
|
|
1208
1535
|
} ? OrientReport : O extends {
|
|
1536
|
+
op: "makeManifold";
|
|
1537
|
+
} ? ManifoldReport : O extends {
|
|
1538
|
+
op: "resolveSelfIntersections";
|
|
1539
|
+
} ? SelfIntersectReport : O extends {
|
|
1540
|
+
op: "cleanupSlivers";
|
|
1541
|
+
} ? SliverReport : O extends {
|
|
1209
1542
|
op: "fillHoles";
|
|
1210
1543
|
} ? FillReport : O extends {
|
|
1211
1544
|
op: "inflate";
|
|
@@ -1220,6 +1553,16 @@ type RepairReportOf<O extends RepairOp> = O extends {
|
|
|
1220
1553
|
} ? GrabReport : O extends {
|
|
1221
1554
|
op: "relax";
|
|
1222
1555
|
} ? RelaxReport : O extends {
|
|
1556
|
+
op: "flatten";
|
|
1557
|
+
} ? FlattenReport : O extends {
|
|
1558
|
+
op: "crease";
|
|
1559
|
+
} ? CreaseReport : O extends {
|
|
1560
|
+
op: "clay";
|
|
1561
|
+
} ? ClayReport : O extends {
|
|
1562
|
+
op: "twist";
|
|
1563
|
+
} ? TwistReport : O extends {
|
|
1564
|
+
op: "captureStrokeState";
|
|
1565
|
+
} ? CaptureStrokeReport : O extends {
|
|
1223
1566
|
op: "offset";
|
|
1224
1567
|
} ? OffsetReport : O extends {
|
|
1225
1568
|
op: "shell";
|
|
@@ -1244,6 +1587,24 @@ type RepairReportOf<O extends RepairOp> = O extends {
|
|
|
1244
1587
|
*/
|
|
1245
1588
|
declare class Scene implements SceneLike {
|
|
1246
1589
|
#private;
|
|
1590
|
+
/**
|
|
1591
|
+
* Callable repair domain (`scene.repair(mesh, op)` and `scene.repair.<method>(...)`).
|
|
1592
|
+
*/
|
|
1593
|
+
readonly repair: SyncRepairDomain;
|
|
1594
|
+
/**
|
|
1595
|
+
* Callable sculpt domain (`scene.sculpt(mesh, op)` and `scene.sculpt.<method>(...)`).
|
|
1596
|
+
*/
|
|
1597
|
+
readonly sculpt: SyncSculptDomain;
|
|
1598
|
+
/** Remesh, simplification, subdivision, and volumetric reconstruction domain. */
|
|
1599
|
+
readonly remesh: SyncRemeshDomain;
|
|
1600
|
+
/** Callable boolean, cutting, offsetting, and shell domain. */
|
|
1601
|
+
readonly boolean: SyncBooleanDomain;
|
|
1602
|
+
/** Surface deformation and vertex-protection domain. */
|
|
1603
|
+
readonly deform: SyncDeformDomain;
|
|
1604
|
+
/** Defect analysis, metrology, queries, fields, and section inspection domain. */
|
|
1605
|
+
readonly inspect: SyncInspectDomain;
|
|
1606
|
+
/** Rigid registration and alignment domain. */
|
|
1607
|
+
readonly align: SyncAlignDomain;
|
|
1247
1608
|
constructor(options?: SceneOptions);
|
|
1248
1609
|
/** Releases the scene and everything in it. Later calls throw `INVALID_ARGUMENT`; calling it again does nothing. */
|
|
1249
1610
|
free(): void;
|
|
@@ -1272,6 +1633,7 @@ declare class Scene implements SceneLike {
|
|
|
1272
1633
|
* one step; the removal is permanent. A drag of the source ends first,
|
|
1273
1634
|
* recording its moves as one step, so they survive a failed join.
|
|
1274
1635
|
*
|
|
1636
|
+
* @deprecated Use `scene.repair.join()` instead.
|
|
1275
1637
|
* @throws `UNKNOWN_MESH` for a removed handle; `INVALID_ARGUMENT` for one
|
|
1276
1638
|
* mesh twice or loops that cannot bridge; `STALE_LOOPS` for a loop that is
|
|
1277
1639
|
* not there. A failed join changes nothing.
|
|
@@ -1291,26 +1653,13 @@ declare class Scene implements SceneLike {
|
|
|
1291
1653
|
* The cut undoes in one step; the added mesh stays, like the removed
|
|
1292
1654
|
* source of {@link Scene.join}.
|
|
1293
1655
|
*
|
|
1656
|
+
* @deprecated Use `scene.boolean.cut()` instead.
|
|
1294
1657
|
* @throws `UNKNOWN_MESH` for a removed handle; `INVALID_ARGUMENT` when
|
|
1295
1658
|
* the plane does not cut the mesh or a rim cannot be capped, as listed in
|
|
1296
1659
|
* `docs/uv-channel.md`, for example a rim that closes by position with its
|
|
1297
1660
|
* walls wound against each other. A failed cut changes nothing.
|
|
1298
1661
|
*/
|
|
1299
1662
|
cutByPlane(mesh: MeshHandle, plane: SectionPlane, options?: CutOptions): CutReport;
|
|
1300
|
-
/**
|
|
1301
|
-
* Combines `source` into `target` in the world: the union, subtraction
|
|
1302
|
-
* (`target` minus `source`) or intersection. Returns `target`, now
|
|
1303
|
-
* holding the result with its placement; `source` is unchanged.
|
|
1304
|
-
*
|
|
1305
|
-
* Both meshes must be closed and manifold. The boolean undoes in one
|
|
1306
|
-
* step. Combining a mesh with itself is a no-op for `"union"` and
|
|
1307
|
-
* `"intersect"`, and clears it for `"subtract"`.
|
|
1308
|
-
*
|
|
1309
|
-
* @throws `UNKNOWN_MESH` for a removed handle; `INVALID_ARGUMENT` for an
|
|
1310
|
-
* input that is not closed, manifold and consistently wound. A failed
|
|
1311
|
-
* boolean changes nothing.
|
|
1312
|
-
*/
|
|
1313
|
-
boolean(target: MeshHandle, source: MeshHandle, op: BooleanOp): MeshHandle;
|
|
1314
1663
|
/**
|
|
1315
1664
|
* Rigidly aligns the mesh `moving` to the mesh `fixed` by point-to-plane ICP,
|
|
1316
1665
|
* with the closest points found through `fixed`'s BVH and trimmed by
|
|
@@ -1339,6 +1688,7 @@ declare class Scene implements SceneLike {
|
|
|
1339
1688
|
* followed exactly on a copy baked through it, so each such call costs a BVH
|
|
1340
1689
|
* build. All distances are in world units.
|
|
1341
1690
|
*
|
|
1691
|
+
* @deprecated Use `scene.align.register()` instead.
|
|
1342
1692
|
* @throws `UNKNOWN_MESH` for a removed handle; `INVALID_ARGUMENT` for one
|
|
1343
1693
|
* mesh twice, a mesh without triangles or an invalid option; `STALE_BVH` for
|
|
1344
1694
|
* a stale Manual `fixed`. Bad options and one mesh twice change nothing,
|
|
@@ -1496,6 +1846,7 @@ declare class Scene implements SceneLike {
|
|
|
1496
1846
|
* triangles, non-manifold edges and vertices, components, orientation
|
|
1497
1847
|
* conflicts and, on request, self-intersection.
|
|
1498
1848
|
*
|
|
1849
|
+
* @deprecated Use `scene.inspect.analyze()` or `scene.repair.analyze()` instead.
|
|
1499
1850
|
* @throws `INVALID_ARGUMENT` for a negative or non-finite `weldTolerance`; `STALE_BVH`, see {@link AnalyzeOptions.selfIntersection}.
|
|
1500
1851
|
*/
|
|
1501
1852
|
analyze(mesh: MeshHandle, options?: AnalyzeOptions): Analysis;
|
|
@@ -1505,48 +1856,58 @@ declare class Scene implements SceneLike {
|
|
|
1505
1856
|
* non-manifold mesh still gets its area; only `volume` is `null`, with
|
|
1506
1857
|
* `volumeReason` saying why. A read-only call: it leaves every view
|
|
1507
1858
|
* valid.
|
|
1859
|
+
*
|
|
1860
|
+
* @deprecated Use `scene.inspect.measure()` instead.
|
|
1508
1861
|
*/
|
|
1509
1862
|
measure(mesh: MeshHandle): MeasureResult;
|
|
1510
1863
|
/**
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
* `{ kind: "auto" }` runs the standard cleanup pipeline the same way and
|
|
1515
|
-
* returns a report per stage; see {@link AutoRepairRequest}.
|
|
1516
|
-
*
|
|
1517
|
-
* A single `inflate`, `relax` or `grab` costs by the vertices under the brush, not the
|
|
1518
|
-
* mesh (it uses the BVH, and reaches only vertices a triangle uses); in a list
|
|
1519
|
-
* they scan the mesh, so a sculpt stroke should send its dabs one at a time.
|
|
1864
|
+
* Live triangle-used vertex ids of `mesh` inside the closed local-space
|
|
1865
|
+
* sphere `(center, radius)`, in ascending order. Brings a `"lazy"` BVH up
|
|
1866
|
+
* to date first; throws `STALE_BVH` on a stale `"manual"` mesh.
|
|
1520
1867
|
*
|
|
1521
|
-
* @
|
|
1868
|
+
* @deprecated Use `scene.sculpt.verticesInSphere()` instead.
|
|
1869
|
+
* @throws `UNKNOWN_MESH` for a removed handle; `INVALID_ARGUMENT` when
|
|
1870
|
+
* `center` is not 3 finite numbers or `radius` is negative or non-finite;
|
|
1871
|
+
* `STALE_BVH` for a stale `"manual"` mesh.
|
|
1522
1872
|
*/
|
|
1523
|
-
|
|
1524
|
-
repair<const O extends RepairOp>(mesh: MeshHandle, op: O): RepairReportOf<O>;
|
|
1525
|
-
repair<const O extends readonly RepairOp[]>(mesh: MeshHandle, ops: O): { -readonly [K in keyof O]: RepairReportOf<O[K]>; };
|
|
1873
|
+
verticesInSphere(mesh: MeshHandle, center: Readonly<Vec3>, radius: number): Uint32Array;
|
|
1526
1874
|
/**
|
|
1527
1875
|
* The nearest hit of a world ray over every mesh, or `null`. `direction`
|
|
1528
1876
|
* need not be unit length; `distance` is in world units. Lazy meshes are
|
|
1529
1877
|
* brought up to date first.
|
|
1530
1878
|
*
|
|
1879
|
+
* @deprecated Use `scene.inspect.raycast()` instead.
|
|
1531
1880
|
* @throws `INVALID_ARGUMENT` for a non-finite origin or a zero direction; `STALE_BVH` for a stale `"manual"` mesh.
|
|
1532
1881
|
*/
|
|
1533
1882
|
raycast(origin: Readonly<Vec3>, direction: Readonly<Vec3>, options?: RaycastOptions): RayHit | null;
|
|
1534
1883
|
/**
|
|
1535
1884
|
* The surface point nearest to a world point, over every mesh or one, or
|
|
1536
1885
|
* `null` when none is within `maxDistance`.
|
|
1886
|
+
*
|
|
1887
|
+
* @deprecated Use `scene.inspect.closestPoint()` instead.
|
|
1537
1888
|
*/
|
|
1538
1889
|
closestPoint(point: Readonly<Vec3>, options?: ClosestPointOptions): ClosestHit | null;
|
|
1539
1890
|
/**
|
|
1540
1891
|
* The distance between two meshes' surfaces as placed, with a closest pair
|
|
1541
1892
|
* of points, or `null` when it exceeds `maxDistance` (default `Infinity`)
|
|
1542
1893
|
* or a mesh has no triangle.
|
|
1894
|
+
*
|
|
1895
|
+
* @deprecated Use `scene.inspect.meshDistance()` instead.
|
|
1543
1896
|
*/
|
|
1544
1897
|
meshDistance(a: MeshHandle, b: MeshHandle, options?: {
|
|
1545
1898
|
maxDistance?: number;
|
|
1546
1899
|
}): MeshDistance | null;
|
|
1547
|
-
/**
|
|
1900
|
+
/**
|
|
1901
|
+
* Whether two meshes intersect or touch as placed.
|
|
1902
|
+
*
|
|
1903
|
+
* @deprecated Use `scene.inspect.intersects()` instead.
|
|
1904
|
+
*/
|
|
1548
1905
|
intersects(a: MeshHandle, b: MeshHandle): boolean;
|
|
1549
|
-
/**
|
|
1906
|
+
/**
|
|
1907
|
+
* Every mesh pair (or every pair of `pairs`) within `margin`, sorted by mesh id.
|
|
1908
|
+
*
|
|
1909
|
+
* @deprecated Use `scene.inspect.findContacts()` instead.
|
|
1910
|
+
*/
|
|
1550
1911
|
findContacts(options?: FindContactsOptions): Contact[];
|
|
1551
1912
|
/**
|
|
1552
1913
|
* Selects vertices of a mesh: a sphere brush, a lasso polygon, or the
|
|
@@ -1611,6 +1972,7 @@ declare class Scene implements SceneLike {
|
|
|
1611
1972
|
* edits and placements by the mesh modes, like normals. Removing a mesh of
|
|
1612
1973
|
* `to` removes it from the field, or the field with its last target.
|
|
1613
1974
|
*
|
|
1975
|
+
* @deprecated Use `scene.inspect.addDistanceField()` instead.
|
|
1614
1976
|
* @throws `INVALID_ARGUMENT` when `to` is empty, holds `on` or a mesh twice, `maxDistance` is negative or NaN, or the name is taken.
|
|
1615
1977
|
*/
|
|
1616
1978
|
addDistanceField(desc: DistanceFieldDesc): FieldHandle;
|
|
@@ -1621,6 +1983,7 @@ declare class Scene implements SceneLike {
|
|
|
1621
1983
|
* `maxDistance` read `Infinity`. It follows edits and placements by the
|
|
1622
1984
|
* mesh modes, like normals, and colours like any field.
|
|
1623
1985
|
*
|
|
1986
|
+
* @deprecated Use `scene.inspect.addThicknessField()` instead.
|
|
1624
1987
|
* @throws `INVALID_ARGUMENT` when `maxDistance` is negative or NaN, or the name is taken.
|
|
1625
1988
|
*/
|
|
1626
1989
|
addThicknessField(desc: ThicknessFieldDesc): FieldHandle;
|
|
@@ -1630,6 +1993,7 @@ declare class Scene implements SceneLike {
|
|
|
1630
1993
|
* negative in bowls, zero on flats). It follows edits and placements by
|
|
1631
1994
|
* the mesh modes, like normals, and colours like any field.
|
|
1632
1995
|
*
|
|
1996
|
+
* @deprecated Use `scene.inspect.addCurvatureField()` instead.
|
|
1633
1997
|
* @throws `INVALID_ARGUMENT` when the name is taken.
|
|
1634
1998
|
*/
|
|
1635
1999
|
addCurvatureField(desc: CurvatureFieldDesc): FieldHandle;
|
|
@@ -1715,11 +2079,403 @@ declare class Scene implements SceneLike {
|
|
|
1715
2079
|
*/
|
|
1716
2080
|
sectionGap(section: SectionHandle, a: MeshHandle, b: MeshHandle): SectionGap | null;
|
|
1717
2081
|
}
|
|
2082
|
+
/** Return type parameterized over synchronous (`Scene`) vs worker (`WorkerScene`) hosts. */
|
|
2083
|
+
type AlignReturn<Async extends boolean, T> = Async extends true ? Promise<T> : T;
|
|
2084
|
+
/** Low-level host backend used by {@link createAlignDomain}. */
|
|
2085
|
+
interface AlignBackend<Async extends boolean = false> {
|
|
2086
|
+
register(moving: MeshHandle, fixed: MeshHandle, options?: RegisterOptions): AlignReturn<Async, RegisterResult>;
|
|
2087
|
+
}
|
|
2088
|
+
/** Rigid registration and alignment domain (`scene.align.*`). */
|
|
2089
|
+
interface AlignDomain<Async extends boolean = false> {
|
|
2090
|
+
register(moving: MeshHandle, fixed: MeshHandle, options?: RegisterOptions): AlignReturn<Async, RegisterResult>;
|
|
2091
|
+
}
|
|
2092
|
+
/** Synchronous alignment domain exposed by `Scene.align`. */
|
|
2093
|
+
type SyncAlignDomain = AlignDomain<false>;
|
|
2094
|
+
/** Asynchronous alignment domain exposed by `WorkerScene.align`. */
|
|
2095
|
+
type WorkerAlignDomain = AlignDomain<true>;
|
|
2096
|
+
/** Builds an {@link AlignDomain} backed by `backend`. */
|
|
2097
|
+
declare function createAlignDomain<Async extends boolean>(backend: AlignBackend<Async>): AlignDomain<Async>;
|
|
2098
|
+
/** Return type parameterized over synchronous (`Scene`) vs worker (`WorkerScene`) hosts. */
|
|
2099
|
+
type BooleanReturn<Async extends boolean, T> = Async extends true ? Promise<T> : T;
|
|
2100
|
+
/** Options for {@link BooleanDomain.offset}. */
|
|
2101
|
+
type OffsetOptions = Omit<Extract<RepairOp, {
|
|
2102
|
+
op: "offset";
|
|
2103
|
+
}>, "op">;
|
|
2104
|
+
/** Options for {@link BooleanDomain.shell}. */
|
|
2105
|
+
type ShellOptions = Omit<Extract<RepairOp, {
|
|
2106
|
+
op: "shell";
|
|
2107
|
+
}>, "op">;
|
|
2108
|
+
/** Low-level host backend used by {@link createBooleanDomain}. */
|
|
2109
|
+
interface BooleanBackend<Async extends boolean = false> {
|
|
2110
|
+
readonly isAsync: Async;
|
|
2111
|
+
repair<const O extends RepairOp>(mesh: MeshHandle, op: O): BooleanReturn<Async, RepairReportOf<O>>;
|
|
2112
|
+
boolean?: (target: MeshHandle, source: MeshHandle, op: BooleanOp) => BooleanReturn<Async, MeshHandle>;
|
|
2113
|
+
cutByPlane?: (mesh: MeshHandle, plane: SectionPlane, options?: CutOptions) => BooleanReturn<Async, CutReport>;
|
|
2114
|
+
}
|
|
2115
|
+
/**
|
|
2116
|
+
* Callable boolean, cutting, offsetting, and shell solidification domain
|
|
2117
|
+
* (`scene.boolean(...)` and `scene.boolean.<method>(...)`).
|
|
2118
|
+
*/
|
|
2119
|
+
interface BooleanDomain<Async extends boolean = false> {
|
|
2120
|
+
(target: MeshHandle, source: MeshHandle, op: BooleanOp): BooleanReturn<Async, MeshHandle>;
|
|
2121
|
+
union(target: MeshHandle, source: MeshHandle): BooleanReturn<Async, MeshHandle>;
|
|
2122
|
+
difference(target: MeshHandle, source: MeshHandle): BooleanReturn<Async, MeshHandle>;
|
|
2123
|
+
subtract(target: MeshHandle, source: MeshHandle): BooleanReturn<Async, MeshHandle>;
|
|
2124
|
+
intersection(target: MeshHandle, source: MeshHandle): BooleanReturn<Async, MeshHandle>;
|
|
2125
|
+
intersect(target: MeshHandle, source: MeshHandle): BooleanReturn<Async, MeshHandle>;
|
|
2126
|
+
cut(mesh: MeshHandle, plane: SectionPlane, options?: CutOptions): BooleanReturn<Async, CutReport>;
|
|
2127
|
+
cutByPlane(mesh: MeshHandle, plane: SectionPlane, options?: CutOptions): BooleanReturn<Async, CutReport>;
|
|
2128
|
+
offset(mesh: MeshHandle, options: OffsetOptions): BooleanReturn<Async, OffsetReport>;
|
|
2129
|
+
shell(mesh: MeshHandle, thickness: number | ShellOptions): BooleanReturn<Async, ShellReport>;
|
|
2130
|
+
}
|
|
2131
|
+
/** Synchronous boolean domain exposed by `Scene.boolean`. */
|
|
2132
|
+
type SyncBooleanDomain = BooleanDomain<false>;
|
|
2133
|
+
/** Asynchronous boolean domain exposed by `WorkerScene.boolean`. */
|
|
2134
|
+
type WorkerBooleanDomain = BooleanDomain<true>;
|
|
2135
|
+
/** Builds a callable {@link BooleanDomain} backed by `backend`. */
|
|
2136
|
+
declare function createBooleanDomain<Async extends boolean>(backend: BooleanBackend<Async>): BooleanDomain<Async>;
|
|
2137
|
+
/** Return type parameterized over synchronous (`Scene`) vs worker (`WorkerScene`) hosts. */
|
|
2138
|
+
type SculptReturn<Async extends boolean, T> = Async extends true ? Promise<T> : T;
|
|
2139
|
+
type InflateOp = Omit<Extract<SculptOp, {
|
|
2140
|
+
op: "inflate";
|
|
2141
|
+
}>, "op">;
|
|
2142
|
+
type SmoothOp = Omit<Extract<SculptOp, {
|
|
2143
|
+
op: "smooth";
|
|
2144
|
+
}>, "op">;
|
|
2145
|
+
type RelaxOp = Omit<Extract<SculptOp, {
|
|
2146
|
+
op: "relax";
|
|
2147
|
+
}>, "op">;
|
|
2148
|
+
type GrabOp = Omit<Extract<SculptOp, {
|
|
2149
|
+
op: "grab";
|
|
2150
|
+
}>, "op">;
|
|
2151
|
+
type FlattenOp = Omit<Extract<SculptOp, {
|
|
2152
|
+
op: "flatten";
|
|
2153
|
+
}>, "op">;
|
|
2154
|
+
type CreaseOp = Omit<Extract<SculptOp, {
|
|
2155
|
+
op: "crease";
|
|
2156
|
+
}>, "op">;
|
|
2157
|
+
type ClayOp = Omit<Extract<SculptOp, {
|
|
2158
|
+
op: "clay";
|
|
2159
|
+
}>, "op">;
|
|
2160
|
+
type TwistOp = Omit<Extract<SculptOp, {
|
|
2161
|
+
op: "twist";
|
|
2162
|
+
}>, "op">;
|
|
2163
|
+
type CaptureStrokeOptions = Omit<Extract<SculptOp, {
|
|
2164
|
+
op: "captureStrokeState";
|
|
2165
|
+
}>, "op">;
|
|
2166
|
+
type CaptureRestOptions = Omit<Extract<SculptOp, {
|
|
2167
|
+
op: "captureRestSizes";
|
|
2168
|
+
}>, "op">;
|
|
2169
|
+
type SplitStretchedOptions = Omit<Extract<SculptOp, {
|
|
2170
|
+
op: "splitStretched";
|
|
2171
|
+
}>, "op">;
|
|
2172
|
+
/** Options for {@link SculptDomain.beginStroke}. */
|
|
2173
|
+
interface BeginStrokeOptions {
|
|
2174
|
+
/** Keep an already active stroke snapshot on the mesh (`false` by default). */
|
|
2175
|
+
onlyIfMissing?: boolean;
|
|
2176
|
+
/** Also capture per-vertex rest edge sizes for dynamic `splitStretched`. */
|
|
2177
|
+
captureRestSizes?: boolean;
|
|
2178
|
+
/** Wrap stroke dabs inside a single history step when supported (`true` by default). */
|
|
2179
|
+
groupStep?: boolean;
|
|
2180
|
+
}
|
|
2181
|
+
/** Sculpt operations that support composable per-vertex surface filters. */
|
|
2182
|
+
type FilteredSculptOp = Extract<SculptOp, {
|
|
2183
|
+
filter?: SurfaceFilter;
|
|
2184
|
+
}>;
|
|
2185
|
+
/** Low-level host backend used by {@link createSculptDomain}. */
|
|
2186
|
+
interface SculptBackend<Async extends boolean = false> {
|
|
2187
|
+
sculpt<const O extends SculptOp>(mesh: MeshHandle, op: O): SculptReturn<Async, SculptReportOf<O>>;
|
|
2188
|
+
sculpt<const O extends readonly SculptOp[]>(mesh: MeshHandle, ops: O): SculptReturn<Async, { -readonly [K in keyof O]: SculptReportOf<O[K]>; }>;
|
|
2189
|
+
verticesInSphere(mesh: MeshHandle, center: Readonly<Vec3>, radius: number): SculptReturn<Async, Uint32Array>;
|
|
2190
|
+
beginStep?: () => void;
|
|
2191
|
+
endStep?: () => void;
|
|
2192
|
+
cancelStep?: () => void;
|
|
2193
|
+
}
|
|
2194
|
+
/**
|
|
2195
|
+
* Callable sculpt domain namespace (`scene.sculpt(...)` and `scene.sculpt.<method>(...)`).
|
|
2196
|
+
*
|
|
2197
|
+
* Preserves legacy `sculpt(mesh, op | ops)` call signatures while exposing
|
|
2198
|
+
* stroke lifecycle, surface filter helpers, brush shorthands, and dynamic
|
|
2199
|
+
* topology subdivision.
|
|
2200
|
+
*/
|
|
2201
|
+
interface SculptDomain<Async extends boolean = false> {
|
|
2202
|
+
<const O extends SculptOp>(mesh: MeshHandle, op: O): SculptReturn<Async, SculptReportOf<O>>;
|
|
2203
|
+
<const O extends readonly SculptOp[]>(mesh: MeshHandle, ops: O): SculptReturn<Async, { -readonly [K in keyof O]: SculptReportOf<O[K]>; }>;
|
|
2204
|
+
beginStroke(mesh: MeshHandle, options?: BeginStrokeOptions): SculptReturn<Async, CaptureStrokeReport>;
|
|
2205
|
+
dab<const O extends SculptOp>(mesh: MeshHandle, op: O): SculptReturn<Async, SculptReportOf<O>>;
|
|
2206
|
+
dab<const O extends readonly SculptOp[]>(mesh: MeshHandle, ops: O): SculptReturn<Async, { -readonly [K in keyof O]: SculptReportOf<O[K]>; }>;
|
|
2207
|
+
endStroke(): void;
|
|
2208
|
+
cancelStroke(): void;
|
|
2209
|
+
filter<T extends FilteredSculptOp>(op: T, surfaceFilter: SurfaceFilter): T & {
|
|
2210
|
+
filter: SurfaceFilter;
|
|
2211
|
+
};
|
|
2212
|
+
filter<const O extends FilteredSculptOp>(mesh: MeshHandle, op: O, surfaceFilter: SurfaceFilter): SculptReturn<Async, SculptReportOf<O>>;
|
|
2213
|
+
inflate(mesh: MeshHandle, op: InflateOp): SculptReturn<Async, InflateReport>;
|
|
2214
|
+
smooth(mesh: MeshHandle, op: SmoothOp): SculptReturn<Async, SmoothReport>;
|
|
2215
|
+
relax(mesh: MeshHandle, op: RelaxOp): SculptReturn<Async, RelaxReport>;
|
|
2216
|
+
grab(mesh: MeshHandle, op: GrabOp): SculptReturn<Async, GrabReport>;
|
|
2217
|
+
flatten(mesh: MeshHandle, op: FlattenOp): SculptReturn<Async, FlattenReport>;
|
|
2218
|
+
crease(mesh: MeshHandle, op: CreaseOp): SculptReturn<Async, CreaseReport>;
|
|
2219
|
+
clay(mesh: MeshHandle, op: ClayOp): SculptReturn<Async, ClayReport>;
|
|
2220
|
+
twist(mesh: MeshHandle, op: TwistOp): SculptReturn<Async, TwistReport>;
|
|
2221
|
+
captureStrokeState(mesh: MeshHandle, options?: CaptureStrokeOptions): SculptReturn<Async, CaptureStrokeReport>;
|
|
2222
|
+
captureRestSizes(mesh: MeshHandle, options?: CaptureRestOptions): SculptReturn<Async, CaptureRestReport>;
|
|
2223
|
+
splitStretched(mesh: MeshHandle, op: SplitStretchedOptions): SculptReturn<Async, StretchReport>;
|
|
2224
|
+
verticesInSphere(mesh: MeshHandle, center: Readonly<Vec3>, radius: number): SculptReturn<Async, Uint32Array>;
|
|
2225
|
+
}
|
|
2226
|
+
/** Synchronous sculpt domain exposed by `Scene.sculpt`. */
|
|
2227
|
+
type SyncSculptDomain = SculptDomain<false>;
|
|
2228
|
+
/** Asynchronous sculpt domain exposed by `WorkerScene.sculpt`. */
|
|
2229
|
+
type WorkerSculptDomain = SculptDomain<true>;
|
|
2230
|
+
/** Builds a callable {@link SculptDomain} backed by `backend`. */
|
|
2231
|
+
declare function createSculptDomain<Async extends boolean>(backend: SculptBackend<Async>): SculptDomain<Async>;
|
|
2232
|
+
/** Return type parameterized over synchronous (`Scene`) vs worker (`WorkerScene`) hosts. */
|
|
2233
|
+
type DeformReturn<Async extends boolean, T> = Async extends true ? Promise<T> : T;
|
|
2234
|
+
/** Deformation operations supporting per-vertex protection weights and geodesic falloff bands. */
|
|
2235
|
+
type ProtectedSculptOp = Extract<SculptOp, {
|
|
2236
|
+
protect?: VertexProtection;
|
|
2237
|
+
}>;
|
|
2238
|
+
/** Low-level host backend used by {@link createDeformDomain}. */
|
|
2239
|
+
interface DeformBackend<Async extends boolean = false> {
|
|
2240
|
+
sculpt<const O extends SculptOp>(mesh: MeshHandle, op: O): DeformReturn<Async, SculptReportOf<O>>;
|
|
2241
|
+
}
|
|
2242
|
+
/** Surface deformation and vertex-protection domain. */
|
|
2243
|
+
interface DeformDomain<Async extends boolean = false> {
|
|
2244
|
+
inflate(mesh: MeshHandle, op: InflateOp): DeformReturn<Async, InflateReport>;
|
|
2245
|
+
smooth(mesh: MeshHandle, op: SmoothOp): DeformReturn<Async, SmoothReport>;
|
|
2246
|
+
relax(mesh: MeshHandle, op: RelaxOp): DeformReturn<Async, RelaxReport>;
|
|
2247
|
+
relaxed(mesh: MeshHandle, op: RelaxOp): DeformReturn<Async, RelaxReport>;
|
|
2248
|
+
grab(mesh: MeshHandle, op: GrabOp): DeformReturn<Async, GrabReport>;
|
|
2249
|
+
flatten(mesh: MeshHandle, op: FlattenOp): DeformReturn<Async, FlattenReport>;
|
|
2250
|
+
crease(mesh: MeshHandle, op: CreaseOp): DeformReturn<Async, CreaseReport>;
|
|
2251
|
+
clay(mesh: MeshHandle, op: ClayOp): DeformReturn<Async, ClayReport>;
|
|
2252
|
+
twist(mesh: MeshHandle, op: TwistOp): DeformReturn<Async, TwistReport>;
|
|
2253
|
+
protect<T extends ProtectedSculptOp>(op: T, protection: VertexProtection): T & {
|
|
2254
|
+
protect: VertexProtection;
|
|
2255
|
+
};
|
|
2256
|
+
protect<const O extends ProtectedSculptOp>(mesh: MeshHandle, op: O, protection: VertexProtection): DeformReturn<Async, SculptReportOf<O>>;
|
|
2257
|
+
}
|
|
2258
|
+
/** Synchronous deformation domain exposed by `Scene.deform`. */
|
|
2259
|
+
type SyncDeformDomain = DeformDomain<false>;
|
|
2260
|
+
/** Asynchronous deformation domain exposed by `WorkerScene.deform`. */
|
|
2261
|
+
type WorkerDeformDomain = DeformDomain<true>;
|
|
2262
|
+
/** Builds a {@link DeformDomain} backed by `backend`. */
|
|
2263
|
+
declare function createDeformDomain<Async extends boolean>(backend: DeformBackend<Async>): DeformDomain<Async>;
|
|
2264
|
+
/** Return type parameterized over synchronous (`Scene`) vs worker (`WorkerScene`) hosts. */
|
|
2265
|
+
type InspectReturn<Async extends boolean, T> = Async extends true ? Promise<T> : T;
|
|
2266
|
+
/** Low-level host backend used by {@link createInspectDomain}. */
|
|
2267
|
+
interface InspectBackend<Async extends boolean = false> {
|
|
2268
|
+
analyze(mesh: MeshHandle, options?: AnalyzeOptions): InspectReturn<Async, Analysis>;
|
|
2269
|
+
measure(mesh: MeshHandle): InspectReturn<Async, MeasureResult>;
|
|
2270
|
+
bounds(mesh: MeshHandle): Bounds | null;
|
|
2271
|
+
raycast(origin: Readonly<Vec3>, direction: Readonly<Vec3>, options?: RaycastOptions): InspectReturn<Async, RayHit | null>;
|
|
2272
|
+
closestPoint(point: Readonly<Vec3>, options?: ClosestPointOptions): InspectReturn<Async, ClosestHit | null>;
|
|
2273
|
+
meshDistance(a: MeshHandle, b: MeshHandle, options?: {
|
|
2274
|
+
maxDistance?: number;
|
|
2275
|
+
}): InspectReturn<Async, MeshDistance | null>;
|
|
2276
|
+
intersects(a: MeshHandle, b: MeshHandle): InspectReturn<Async, boolean>;
|
|
2277
|
+
findContacts(options?: FindContactsOptions): InspectReturn<Async, Contact[]>;
|
|
2278
|
+
addDistanceField(desc: DistanceFieldDesc): FieldHandle;
|
|
2279
|
+
addThicknessField?: (desc: ThicknessFieldDesc) => FieldHandle;
|
|
2280
|
+
addCurvatureField?: (desc: CurvatureFieldDesc) => FieldHandle;
|
|
2281
|
+
removeField(field: FieldHandle): void;
|
|
2282
|
+
fieldValues(field: FieldHandle): InspectReturn<Async, Float32Array>;
|
|
2283
|
+
fieldNearest(field: FieldHandle): InspectReturn<Async, Uint32Array>;
|
|
2284
|
+
fieldStatus(field: FieldHandle): InspectReturn<Async, FieldStatus>;
|
|
2285
|
+
fieldTargetStatus(field: FieldHandle): InspectReturn<Async, FieldStatus["sign"][]>;
|
|
2286
|
+
setColoring(mesh: MeshHandle, rule: ColorRule | null): void;
|
|
2287
|
+
coloring(mesh: MeshHandle): ColorRule | null;
|
|
2288
|
+
addSection(desc: SectionDesc): SectionHandle;
|
|
2289
|
+
setSectionPlane(section: SectionHandle, plane: SectionPlane): void;
|
|
2290
|
+
sectionPlane(section: SectionHandle): SectionPlane;
|
|
2291
|
+
setSectionMeshes(section: SectionHandle, meshes: readonly MeshHandle[]): void;
|
|
2292
|
+
setSectionFill(section: SectionHandle, fill: boolean): void;
|
|
2293
|
+
removeSection(section: SectionHandle): void;
|
|
2294
|
+
section(section: SectionHandle, mesh: MeshHandle): SectionResult;
|
|
2295
|
+
sectionGap(section: SectionHandle, a: MeshHandle, b: MeshHandle): InspectReturn<Async, SectionGap | null>;
|
|
2296
|
+
updateSections?: () => void;
|
|
2297
|
+
}
|
|
2298
|
+
/** Metrology, defect analysis, raycasting, distance/thickness/curvature fields, and cross-section inspection domain. */
|
|
2299
|
+
interface InspectDomain<Async extends boolean = false> {
|
|
2300
|
+
analyze(mesh: MeshHandle, options?: AnalyzeOptions): InspectReturn<Async, Analysis>;
|
|
2301
|
+
measure(mesh: MeshHandle): InspectReturn<Async, MeasureResult>;
|
|
2302
|
+
bounds(mesh: MeshHandle): Bounds | null;
|
|
2303
|
+
raycast(origin: Readonly<Vec3>, direction: Readonly<Vec3>, options?: RaycastOptions): InspectReturn<Async, RayHit | null>;
|
|
2304
|
+
closestPoint(point: Readonly<Vec3>, options?: ClosestPointOptions): InspectReturn<Async, ClosestHit | null>;
|
|
2305
|
+
meshDistance(a: MeshHandle, b: MeshHandle, options?: {
|
|
2306
|
+
maxDistance?: number;
|
|
2307
|
+
}): InspectReturn<Async, MeshDistance | null>;
|
|
2308
|
+
intersects(a: MeshHandle, b: MeshHandle): InspectReturn<Async, boolean>;
|
|
2309
|
+
findContacts(options?: FindContactsOptions): InspectReturn<Async, Contact[]>;
|
|
2310
|
+
addDistanceField(desc: DistanceFieldDesc): FieldHandle;
|
|
2311
|
+
addThicknessField(desc: ThicknessFieldDesc): FieldHandle;
|
|
2312
|
+
addCurvatureField(desc: CurvatureFieldDesc): FieldHandle;
|
|
2313
|
+
removeField(field: FieldHandle): void;
|
|
2314
|
+
fieldValues(field: FieldHandle): InspectReturn<Async, Float32Array>;
|
|
2315
|
+
fieldNearest(field: FieldHandle): InspectReturn<Async, Uint32Array>;
|
|
2316
|
+
fieldStatus(field: FieldHandle): InspectReturn<Async, FieldStatus>;
|
|
2317
|
+
fieldTargetStatus(field: FieldHandle): InspectReturn<Async, FieldStatus["sign"][]>;
|
|
2318
|
+
setColoring(mesh: MeshHandle, rule: ColorRule | null): void;
|
|
2319
|
+
coloring(mesh: MeshHandle): ColorRule | null;
|
|
2320
|
+
addSection(desc: SectionDesc): SectionHandle;
|
|
2321
|
+
setSectionPlane(section: SectionHandle, plane: SectionPlane): void;
|
|
2322
|
+
sectionPlane(section: SectionHandle): SectionPlane;
|
|
2323
|
+
setSectionMeshes(section: SectionHandle, meshes: readonly MeshHandle[]): void;
|
|
2324
|
+
setSectionFill(section: SectionHandle, fill: boolean): void;
|
|
2325
|
+
removeSection(section: SectionHandle): void;
|
|
2326
|
+
section(section: SectionHandle, mesh: MeshHandle): SectionResult;
|
|
2327
|
+
sectionGap(section: SectionHandle, a: MeshHandle, b: MeshHandle): InspectReturn<Async, SectionGap | null>;
|
|
2328
|
+
updateSections(): void;
|
|
2329
|
+
}
|
|
2330
|
+
/** Synchronous inspect domain exposed by `Scene.inspect`. */
|
|
2331
|
+
type SyncInspectDomain = InspectDomain<false>;
|
|
2332
|
+
/** Asynchronous inspect domain exposed by `WorkerScene.inspect`. */
|
|
2333
|
+
type WorkerInspectDomain = InspectDomain<true>;
|
|
2334
|
+
/** Builds an {@link InspectDomain} backed by `backend`. */
|
|
2335
|
+
declare function createInspectDomain<Async extends boolean>(backend: InspectBackend<Async>): InspectDomain<Async>;
|
|
2336
|
+
/** Return type parameterized over synchronous (`Scene`) vs worker (`WorkerScene`) hosts. */
|
|
2337
|
+
type RemeshReturn<Async extends boolean, T> = Async extends true ? Promise<T> : T;
|
|
2338
|
+
/** Options for {@link RemeshDomain.region} / {@link RemeshDomain.remesh}. */
|
|
2339
|
+
type RegionRemeshOptions = Omit<Extract<RepairOp, {
|
|
2340
|
+
op: "remesh";
|
|
2341
|
+
}>, "op">;
|
|
2342
|
+
/** Options for {@link RemeshDomain.simplify}. */
|
|
2343
|
+
type SimplifyOptions = Omit<Extract<RepairOp, {
|
|
2344
|
+
op: "simplify";
|
|
2345
|
+
}>, "op">;
|
|
2346
|
+
/** Options for {@link RemeshDomain.subdivide}. */
|
|
2347
|
+
type SubdivideOptions = Omit<Extract<RepairOp, {
|
|
2348
|
+
op: "subdivide";
|
|
2349
|
+
}>, "op">;
|
|
2350
|
+
/** Options for {@link RemeshDomain.voxel}. */
|
|
2351
|
+
interface VoxelRemeshOptions {
|
|
2352
|
+
/** Volumetric reconstruction backend (`"fhEdt"` by default). */
|
|
2353
|
+
algorithm?: Exclude<OffsetAlgorithm, "normal">;
|
|
2354
|
+
/** Grid voxel size in local mesh units (automatic when omitted). */
|
|
2355
|
+
voxelSize?: number;
|
|
2356
|
+
/** Maximum 3D grid voxel count (`>= 64`, defaults to `16_777_216`). */
|
|
2357
|
+
maxVoxels?: number;
|
|
2358
|
+
}
|
|
2359
|
+
/** Low-level host backend used by {@link createRemeshDomain}. */
|
|
2360
|
+
interface RemeshBackend<Async extends boolean = false> {
|
|
2361
|
+
repair<const O extends RepairOp>(mesh: MeshHandle, op: O): RemeshReturn<Async, RepairReportOf<O>>;
|
|
2362
|
+
}
|
|
2363
|
+
/** Remesh, simplification, subdivision, and volumetric reconstruction domain. */
|
|
2364
|
+
interface RemeshDomain<Async extends boolean = false> {
|
|
2365
|
+
remesh(mesh: MeshHandle, options: RegionRemeshOptions): RemeshReturn<Async, RemeshReport>;
|
|
2366
|
+
region(mesh: MeshHandle, options: RegionRemeshOptions): RemeshReturn<Async, RemeshReport>;
|
|
2367
|
+
simplify(mesh: MeshHandle, options: SimplifyOptions): RemeshReturn<Async, SimplifyReport>;
|
|
2368
|
+
subdivide(mesh: MeshHandle, options?: SubdivideOptions): RemeshReturn<Async, SubdivideReport>;
|
|
2369
|
+
voxel(mesh: MeshHandle, options?: VoxelRemeshOptions): RemeshReturn<Async, OffsetReport>;
|
|
2370
|
+
}
|
|
2371
|
+
/** Synchronous remesh domain exposed by `Scene.remesh`. */
|
|
2372
|
+
type SyncRemeshDomain = RemeshDomain<false>;
|
|
2373
|
+
/** Asynchronous remesh domain exposed by `WorkerScene.remesh`. */
|
|
2374
|
+
type WorkerRemeshDomain = RemeshDomain<true>;
|
|
2375
|
+
/** Builds a {@link RemeshDomain} backed by `backend`. */
|
|
2376
|
+
declare function createRemeshDomain<Async extends boolean>(backend: RemeshBackend<Async>): RemeshDomain<Async>;
|
|
2377
|
+
/** Return type parameterized over synchronous (`Scene`) vs worker (`WorkerScene`) hosts. */
|
|
2378
|
+
type RepairReturn<Async extends boolean, T> = Async extends true ? Promise<T> : T;
|
|
2379
|
+
/** Options for {@link RepairDomain.autoRepair} (`AutoRepairRequest` without `kind`). */
|
|
2380
|
+
type AutoRepairOptions = Omit<AutoRepairRequest, "kind">;
|
|
2381
|
+
/** Options for {@link RepairDomain.removeDegenerate}. */
|
|
2382
|
+
type DegenerateOptions = Omit<Extract<RepairOp, {
|
|
2383
|
+
op: "removeDegenerate";
|
|
2384
|
+
}>, "op">;
|
|
2385
|
+
/** Options for {@link RepairDomain.removeSmallComponents}. */
|
|
2386
|
+
type SmallComponentOptions = Omit<Extract<RepairOp, {
|
|
2387
|
+
op: "removeSmallComponents";
|
|
2388
|
+
}>, "op">;
|
|
2389
|
+
/** Options for {@link RepairDomain.fillHoles}. */
|
|
2390
|
+
type FillHolesOptions = Omit<Extract<RepairOp, {
|
|
2391
|
+
op: "fillHoles";
|
|
2392
|
+
}>, "op">;
|
|
2393
|
+
/** Options for {@link RepairDomain.bridge}. */
|
|
2394
|
+
type BridgeLoopsOptions = Omit<Extract<RepairOp, {
|
|
2395
|
+
op: "bridgeLoops";
|
|
2396
|
+
}>, "op">;
|
|
2397
|
+
/** Options for {@link RepairDomain.clean}. */
|
|
2398
|
+
interface CleanOptions {
|
|
2399
|
+
areaEpsilon?: number;
|
|
2400
|
+
removeUnusedVertices?: boolean;
|
|
2401
|
+
minTriangles?: number;
|
|
2402
|
+
minArea?: number;
|
|
2403
|
+
keepLargest?: boolean;
|
|
2404
|
+
}
|
|
2405
|
+
/** Combined report returned by {@link RepairDomain.clean}. */
|
|
2406
|
+
interface CleanReport {
|
|
2407
|
+
degenerate: DegenerateReport;
|
|
2408
|
+
components: RemoveReport;
|
|
2409
|
+
}
|
|
2410
|
+
/** Low-level host backend used by {@link createRepairDomain}. */
|
|
2411
|
+
interface RepairBackend<Async extends boolean = false> {
|
|
2412
|
+
repair(mesh: MeshHandle, request: AutoRepairRequest): RepairReturn<Async, AutoRepairReport>;
|
|
2413
|
+
repair<const O extends RepairOp>(mesh: MeshHandle, op: O): RepairReturn<Async, RepairReportOf<O>>;
|
|
2414
|
+
repair<const O extends readonly RepairOp[]>(mesh: MeshHandle, ops: O): RepairReturn<Async, { -readonly [K in keyof O]: RepairReportOf<O[K]>; }>;
|
|
2415
|
+
analyze(mesh: MeshHandle, options?: AnalyzeOptions): RepairReturn<Async, Analysis>;
|
|
2416
|
+
join(target: MeshHandle, source: MeshHandle, options: JoinOptions): RepairReturn<Async, JoinReport>;
|
|
2417
|
+
}
|
|
2418
|
+
/**
|
|
2419
|
+
* Callable repair domain namespace (`scene.repair(...)` and `scene.repair.<method>(...)`).
|
|
2420
|
+
*
|
|
2421
|
+
* Preserves legacy `repair(mesh, op | ops | request)` call signatures while
|
|
2422
|
+
* organizing repair operations cleanly under `scene.repair.*`.
|
|
2423
|
+
*/
|
|
2424
|
+
interface RepairDomain<Async extends boolean = false> {
|
|
2425
|
+
(mesh: MeshHandle, request: AutoRepairRequest): RepairReturn<Async, AutoRepairReport>;
|
|
2426
|
+
<const O extends RepairOp>(mesh: MeshHandle, op: O): RepairReturn<Async, RepairReportOf<O>>;
|
|
2427
|
+
<const O extends readonly RepairOp[]>(mesh: MeshHandle, ops: O): RepairReturn<Async, { -readonly [K in keyof O]: RepairReportOf<O[K]>; }>;
|
|
2428
|
+
analyze(mesh: MeshHandle, options?: AnalyzeOptions): RepairReturn<Async, Analysis>;
|
|
2429
|
+
autoRepair(mesh: MeshHandle, options?: AutoRepairOptions): RepairReturn<Async, AutoRepairReport>;
|
|
2430
|
+
clean(mesh: MeshHandle, options?: CleanOptions): RepairReturn<Async, CleanReport>;
|
|
2431
|
+
weld(mesh: MeshHandle, tolerance: number): RepairReturn<Async, WeldReport>;
|
|
2432
|
+
removeDegenerate(mesh: MeshHandle, options?: DegenerateOptions): RepairReturn<Async, DegenerateReport>;
|
|
2433
|
+
removeSmallComponents(mesh: MeshHandle, options?: SmallComponentOptions): RepairReturn<Async, RemoveReport>;
|
|
2434
|
+
orient(mesh: MeshHandle): RepairReturn<Async, OrientReport>;
|
|
2435
|
+
fillHoles(mesh: MeshHandle, options?: FillHolesOptions): RepairReturn<Async, FillReport>;
|
|
2436
|
+
bridge(mesh: MeshHandle, options: BridgeLoopsOptions): RepairReturn<Async, BridgeReport>;
|
|
2437
|
+
bridgeLoops(mesh: MeshHandle, options: BridgeLoopsOptions): RepairReturn<Async, BridgeReport>;
|
|
2438
|
+
join(target: MeshHandle, source: MeshHandle, options: JoinOptions): RepairReturn<Async, JoinReport>;
|
|
2439
|
+
makeManifold(mesh: MeshHandle, options?: ManifoldOptions): RepairReturn<Async, ManifoldReport>;
|
|
2440
|
+
resolveSelfIntersections(mesh: MeshHandle, options?: SelfIntersectOptions): RepairReturn<Async, SelfIntersectReport>;
|
|
2441
|
+
cleanupSlivers(mesh: MeshHandle, options?: SliverOptions): RepairReturn<Async, SliverReport>;
|
|
2442
|
+
}
|
|
2443
|
+
/** Synchronous repair domain exposed by `Scene.repair`. */
|
|
2444
|
+
type SyncRepairDomain = RepairDomain<false>;
|
|
2445
|
+
/** Asynchronous repair domain exposed by `WorkerScene.repair`. */
|
|
2446
|
+
type WorkerRepairDomain = RepairDomain<true>;
|
|
2447
|
+
/** Builds a callable {@link RepairDomain} backed by `backend`. */
|
|
2448
|
+
declare function createRepairDomain<Async extends boolean>(backend: RepairBackend<Async>): RepairDomain<Async>;
|
|
2449
|
+
/** Complete seven-domain API surface shared by `Scene` and `WorkerScene`. */
|
|
2450
|
+
interface SceneDomains<Async extends boolean = false> {
|
|
2451
|
+
readonly repair: RepairDomain<Async>;
|
|
2452
|
+
readonly sculpt: SculptDomain<Async>;
|
|
2453
|
+
readonly remesh: RemeshDomain<Async>;
|
|
2454
|
+
readonly boolean: BooleanDomain<Async>;
|
|
2455
|
+
readonly deform: DeformDomain<Async>;
|
|
2456
|
+
readonly inspect: InspectDomain<Async>;
|
|
2457
|
+
readonly align: AlignDomain<Async>;
|
|
2458
|
+
}
|
|
2459
|
+
/** Synchronous seven-domain surface implemented by `Scene`. */
|
|
2460
|
+
type SyncSceneDomains = SceneDomains<false>;
|
|
2461
|
+
/** Asynchronous seven-domain surface implemented by `WorkerScene`. */
|
|
2462
|
+
type WorkerSceneDomains = SceneDomains<true>;
|
|
2463
|
+
/** Domain-separated capability surface exposed by both `Scene` and `WorkerScene`. */
|
|
2464
|
+
interface SceneDomainsLike {
|
|
2465
|
+
readonly repair?: SyncRepairDomain | WorkerRepairDomain;
|
|
2466
|
+
readonly sculpt?: SyncSculptDomain | WorkerSculptDomain;
|
|
2467
|
+
readonly remesh?: SyncRemeshDomain | WorkerRemeshDomain;
|
|
2468
|
+
readonly boolean?: SyncBooleanDomain | WorkerBooleanDomain;
|
|
2469
|
+
readonly deform?: SyncDeformDomain | WorkerDeformDomain;
|
|
2470
|
+
readonly inspect?: SyncInspectDomain | WorkerInspectDomain;
|
|
2471
|
+
readonly align?: SyncAlignDomain | WorkerAlignDomain;
|
|
2472
|
+
}
|
|
1718
2473
|
/**
|
|
1719
2474
|
* What the adapters need from a scene: render buffers, placements, section
|
|
1720
2475
|
* results, change notification and drags. All methods are synchronous.
|
|
2476
|
+
* `Scene` and `WorkerScene` also attach the seven optional domain namespaces.
|
|
1721
2477
|
*/
|
|
1722
|
-
interface SceneLike {
|
|
2478
|
+
interface SceneLike extends SceneDomainsLike {
|
|
1723
2479
|
/**
|
|
1724
2480
|
* Views of the mesh's render buffers. Slot counts follow from them, so
|
|
1725
2481
|
* `positions()` must be exactly 3 × vertex slots long and `indices()`
|
|
@@ -1752,4 +2508,4 @@ interface SceneLike {
|
|
|
1752
2508
|
*/
|
|
1753
2509
|
bounds?(mesh: MeshHandle): Bounds | null;
|
|
1754
2510
|
}
|
|
1755
|
-
export {
|
|
2511
|
+
export { SculptDomain as $, StretchReport as $n, FindContactsOptions as $t, InspectDomain as A, RepairReport as An, Vec3 as Ar, CaptureRestReport as At, WorkerDeformDomain as B, SectionGap as Bn, CurvatureFieldDesc as Bt, SimplifyOptions as C, RegisterOptions as Cn, Mat3 as Cr, AnalyzeOptions as Ct, WorkerRemeshDomain as D, RemeshReport as Dn, Positions64 as Dr, BooleanOp as Dt, VoxelRemeshOptions as E, RelaxReport as En, Positions as Er, AutoRepairRequest as Et, DeformBackend as F, SculptOp as Fn, ClosestPointOptions as Ft, ClayOp as G, SelfIntersectionMode as Gn, DragOptions as Gt, BeginStrokeOptions as H, SectionResult as Hn, CutReport as Ht, DeformDomain as I, SculptReport as In, ColorRule as It, FlattenOp as J, SimplifyReport as Jn, EditRef as Jt, CreaseOp as K, ShellReport as Kn, DragSession as Kt, DeformReturn as L, SculptReportOf as Ln, Colormap as Lt, SyncInspectDomain as M, Rgba as Mn, computeVertexNormals as Mr, ClayProfile as Mt, WorkerInspectDomain as N, Scene as Nn, ClayReport as Nt, createRemeshDomain as O, RemoveReport as On, Quat as Or, BoundaryLoop as Ot, createInspectDomain as P, SceneOptions as Pn, ClosestHit as Pt, SculptBackend as Q, SmoothReport as Qn, FilledLoop as Qt, ProtectedSculptOp as R, SectionContour as Rn, Contact as Rt, RemeshReturn as S, RegisterNotApplied as Sn, InitInput as Sr, Analysis as St, SyncRemeshDomain as T, RegisterStatus as Tn, PlacementInput as Tr, AutoRepairReport as Tt, CaptureRestOptions as U, SelfIntersectOptions as Un, DegenerateReport as Ut, createDeformDomain as V, SectionPlane as Vn, CutOptions as Vt, CaptureStrokeOptions as W, SelfIntersectReport as Wn, DistanceFieldDesc as Wt, InflateOp as X, SliverReport as Xn, FieldStatus as Xt, GrabOp as Y, SliverOptions as Yn, EditResult as Yt, RelaxOp as Z, SmoothMethod as Zn, FillReport as Zt, WorkerRepairDomain as _, OrientReport as _n, FieldHandle as _r, AlignReturn as _t, WorkerSceneDomains as a, InflateReport as an, TwistReport as ar, WorkerSculptDomain as at, RemeshBackend as b, RaycastOptions as bn, Bounds as br, createAlignDomain as bt, CleanOptions as c, LoopId as cn, MeshViews as cr, BooleanDomain as ct, FillHolesOptions as d, MeasureResult as dn, ComponentSelect as dr, ShellOptions as dt, FlattenMode as en, SubdivideReport as er, SculptReturn as et, RepairBackend as f, MeshChange as fn, IsolateReport as fr, SyncBooleanDomain as ft, SyncRepairDomain as g, OffsetReport as gn, Range as gr, AlignDomain as gt, SmallComponentOptions as h, OffsetAlgorithm as hn, VertexSelection as hr, AlignBackend as ht, SyncSceneDomains as i, InflateMethod as in, TwistMethod as ir, TwistOp as it, InspectReturn as j, RepairReportOf as jn, computeBounds as jr, CaptureStrokeReport as jt, InspectBackend as k, RepairOp as kn, UpdateMode as kr, BridgeReport as kt, CleanReport as l, ManifoldOptions as ln, SceneMeshViews as lr, BooleanReturn as lt, RepairReturn as m, MeshDistance as mn, SelectSpec as mr, createBooleanDomain as mt, SceneLike as n, GrabMethod as nn, Symmetry as nr, SplitStretchedOptions as nt, AutoRepairOptions as o, JoinOptions as on, VertexProtection as or, createSculptDomain as ot, RepairDomain as p, MeshComponent as pn, LassoSelect as pr, WorkerBooleanDomain as pt, FilteredSculptOp as q, SignMode as qn, EditOp as qt, SceneDomains as r, GrabReport as rn, ThicknessFieldDesc as rr, SyncSculptDomain as rt, BridgeLoopsOptions as s, JoinReport as sn, WeldReport as sr, BooleanBackend as st, SceneDomainsLike as t, FlattenReport as tn, SurfaceFilter as tr, SmoothOp as tt, DegenerateOptions as u, ManifoldReport as un, BrushSelect as ur, OffsetOptions as ut, createRepairDomain as v, OutOfRange as vn, MeshHandle as vr, SyncAlignDomain as vt, SubdivideOptions as w, RegisterResult as wn, Placement as wr, AutoRepairPreset as wt, RemeshDomain as x, RegisterMotion as xn, Indices as xr, AddMeshOptions as xt, RegionRemeshOptions as y, RayHit as yn, SectionHandle as yr, WorkerAlignDomain as yt, SyncDeformDomain as z, SectionDesc as zn, CreaseReport as zt };
|