@ikijs/editor 0.16.0 → 0.16.1
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/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -73,11 +73,12 @@ declare class SetPartTransform extends FieldCommand<number | undefined> {
|
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* Capture the warp deformer's grid as one keyform at the driving parameter
|
|
76
|
-
* `value`, upserting `offsets` into
|
|
76
|
+
* `value`, upserting `offsets` into the deformer's single grid warp. The 4-tuple-style
|
|
77
77
|
* mutable `offsets` array is cloned on construction so a later caller mutation
|
|
78
78
|
* cannot corrupt apply/redo (mirrors {@link SetPartColor}).
|
|
79
79
|
*
|
|
80
|
-
* `apply` validates BEFORE mutating: the deformer must have
|
|
80
|
+
* `apply` validates BEFORE mutating: the deformer must have exactly one grid
|
|
81
|
+
* warp (several are refused — which driver to write into is ambiguous), the
|
|
81
82
|
* offsets length must equal `grid.points.length`, and `value` must lie within
|
|
82
83
|
* the driving parameter's declared `[min,max]` (fail fast, before
|
|
83
84
|
* `parseIkiModel` would reject it). Prior keyforms are deep-copied once on the
|
package/dist/index.d.ts
CHANGED
|
@@ -73,11 +73,12 @@ declare class SetPartTransform extends FieldCommand<number | undefined> {
|
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* Capture the warp deformer's grid as one keyform at the driving parameter
|
|
76
|
-
* `value`, upserting `offsets` into
|
|
76
|
+
* `value`, upserting `offsets` into the deformer's single grid warp. The 4-tuple-style
|
|
77
77
|
* mutable `offsets` array is cloned on construction so a later caller mutation
|
|
78
78
|
* cannot corrupt apply/redo (mirrors {@link SetPartColor}).
|
|
79
79
|
*
|
|
80
|
-
* `apply` validates BEFORE mutating: the deformer must have
|
|
80
|
+
* `apply` validates BEFORE mutating: the deformer must have exactly one grid
|
|
81
|
+
* warp (several are refused — which driver to write into is ambiguous), the
|
|
81
82
|
* offsets length must equal `grid.points.length`, and `value` must lie within
|
|
82
83
|
* the driving parameter's declared `[min,max]` (fail fast, before
|
|
83
84
|
* `parseIkiModel` would reject it). Prior keyforms are deep-copied once on the
|
package/dist/index.js
CHANGED
|
@@ -721,6 +721,12 @@ var CaptureGridKeyform = class {
|
|
|
721
721
|
prevKeyforms;
|
|
722
722
|
apply(doc) {
|
|
723
723
|
const deformer = doc.findWarpDeformer(this.deformerId);
|
|
724
|
+
const count = deformer.warps?.length ?? 0;
|
|
725
|
+
if (count > 1) {
|
|
726
|
+
throw new Error(
|
|
727
|
+
`deformers."${this.deformerId}".warps: ${count} grid warps \u2014 capture targets a deformer with exactly one grid warp (which entry to write into is ambiguous)`
|
|
728
|
+
);
|
|
729
|
+
}
|
|
724
730
|
const warp = deformer.warps?.[0];
|
|
725
731
|
if (!warp) {
|
|
726
732
|
throw new Error(
|