@ikijs/editor 0.16.0 → 0.17.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/README.md +23 -17
- package/dist/index.d.mts +41 -20
- package/dist/index.d.ts +41 -20
- package/dist/index.js +866 -357
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +866 -355
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -40,26 +40,27 @@ leaves the document untouched.
|
|
|
40
40
|
|
|
41
41
|
## API
|
|
42
42
|
|
|
43
|
-
| Area | Exports
|
|
44
|
-
| ------------------ |
|
|
45
|
-
| Document | `EditorDocument`, `EditCommand`
|
|
46
|
-
| Part edits | `AddPart`, `DeletePart`, `SetPartColor`, `SetPartWidth`, `SetPartHeight`, `SetPartOrder`, `SetPartTransform`, `SetPartBindings`, `SetPartMesh`, `SetPartDeformer`
|
|
47
|
-
| Deformer edits | `AddDeformer`, `DeleteDeformer`, `SetDeformerParent`, `SetDeformerTransform`, `SetDeformerBindings`, `SetDeformerPivot` (+ `X`/`Y`), `CaptureGridKeyform`
|
|
48
|
-
| Physics edits | `AddPhysicsRig`, `SetPhysicsRig`, `DeletePhysicsRig`
|
|
49
|
-
| Referential guards | `validateDeformerReparent`, `validateDeformerDelete`, `validatePartAttach`
|
|
50
|
-
| Atlas | `packAtlas`, `uvRectFor`, `ATLAS_PADDING`, `UV_INSET_PX`
|
|
51
|
-
| Grid keyforms | `computeGridOffsets`, `interpolateGridOffsets`, `upsertGridKeyform`
|
|
52
|
-
| Factories | `createDefaultPart`, `createDefaultMatrixDeformer`, `createDefaultWarpDeformer`, `createGridMesh`
|
|
53
|
-
| Pixels | `detectAlphaBbox`, `ALPHA_BBOX_THRESHOLD`, `AlphaBbox`, `ALPHA_OPAQUE`, `HEAD_BAND`, `SPECK_CORE_FRACTION`, `denseCoreOf`, `isSpeckCore`, `foregroundSpan`, `headHalfOf`
|
|
54
|
-
| Auto-rig | `generateIkiFromLayerSet`, `parseLayerRoles`, `createLayerSetMeasurer`, `TurnTargets`, `DEFAULT_TURN_TARGETS`, `TurnSolveReport`, `RigStyle`
|
|
55
|
-
| Bindings | `captureBindingEndpoint`
|
|
43
|
+
| Area | Exports |
|
|
44
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| Document | `EditorDocument`, `EditCommand` |
|
|
46
|
+
| Part edits | `AddPart`, `DeletePart`, `SetPartColor`, `SetPartWidth`, `SetPartHeight`, `SetPartOrder`, `SetPartTransform`, `SetPartBindings`, `SetPartMesh`, `SetPartDeformer` |
|
|
47
|
+
| Deformer edits | `AddDeformer`, `DeleteDeformer`, `SetDeformerParent`, `SetDeformerTransform`, `SetDeformerBindings`, `SetDeformerPivot` (+ `X`/`Y`), `CaptureGridKeyform` |
|
|
48
|
+
| Physics edits | `AddPhysicsRig`, `SetPhysicsRig`, `DeletePhysicsRig` |
|
|
49
|
+
| Referential guards | `validateDeformerReparent`, `validateDeformerDelete`, `validatePartAttach` |
|
|
50
|
+
| Atlas | `packAtlas`, `uvRectFor`, `ATLAS_PADDING`, `UV_INSET_PX` |
|
|
51
|
+
| Grid keyforms | `computeGridOffsets`, `interpolateGridOffsets`, `upsertGridKeyform` |
|
|
52
|
+
| Factories | `createDefaultPart`, `createDefaultMatrixDeformer`, `createDefaultWarpDeformer`, `createGridMesh` |
|
|
53
|
+
| Pixels | `detectAlphaBbox`, `ALPHA_BBOX_THRESHOLD`, `AlphaBbox`, `ALPHA_OPAQUE`, `HEAD_BAND`, `SPECK_CORE_FRACTION`, `denseCoreOf`, `isSpeckCore`, `foregroundSpan`, `headHalfOf` |
|
|
54
|
+
| Auto-rig | `generateIkiFromLayerSet`, `parseLayerRoles`, `partIdsOfRole`, `createLayerSetMeasurer`, `TurnTargets`, `DEFAULT_TURN_TARGETS`, `TurnSolveReport`, `RigStyle`, `LayerGeometryError` |
|
|
55
|
+
| Bindings | `captureBindingEndpoint` |
|
|
56
56
|
|
|
57
57
|
## Auto-rig
|
|
58
58
|
|
|
59
59
|
`generateIkiFromLayerSet` turns role-named layers (`face`, `eye_L`, `eye_R`,
|
|
60
60
|
`mouth`, plus optional `iris_*`, `brow_*`, `lash_*`, `lash_lower_*`, `hair_front`, `hair_back`,
|
|
61
|
-
…) into a rigged model that blinks, gazes, opens its mouth, turns its head over
|
|
62
|
-
a
|
|
61
|
+
`body`, `arm_*`, …) into a rigged model that blinks, gazes, opens its mouth, turns its head over
|
|
62
|
+
a body warp that breathes, follows the head a little and turns on
|
|
63
|
+
`ParamBodyAngleX/Y/Z`, and emotes with its brows — including a
|
|
63
64
|
hair-sway physics rig when a `hair_front` layer is present. With a `blush_*`
|
|
64
65
|
layer it declares `ParamCheek`, which fades the blush from faint at rest to
|
|
65
66
|
as drawn. Every rigged model also declares the head motions Nod, Shake and
|
|
@@ -77,8 +78,13 @@ edge further outside the back hair painted behind it than the nod alone does —
|
|
|
77
78
|
and the back hair stays behind; the neck and the
|
|
78
79
|
ears the face layer paints are cut off into islands of the plate's own mesh,
|
|
79
80
|
drawn behind the head — the neck stays (only the chin's shade slides across
|
|
80
|
-
it), the ears lag the face, the far one narrowing. AngleZ rolls the head 14° about the chin
|
|
81
|
-
breathes
|
|
81
|
+
it), the ears lag the face, the far one narrowing. AngleZ rolls the head 14° about the chin.
|
|
82
|
+
A `body` rides a body warp that breathes, follows the head's turn and tilt a
|
|
83
|
+
little and turns on `ParamBodyAngleX/Y/Z`, its legs planted, and the head
|
|
84
|
+
hangs from it. `arm_L` / `arm_R`, each a whole arm drawn hanging with its
|
|
85
|
+
shoulder at the top, hang from it too: each becomes an upper arm and a
|
|
86
|
+
forearm cut from the one crop, turning about the shoulder and the elbow on
|
|
87
|
+
`ParamArmL/R` and `ParamElbowL/R`. An arm needs a `body`.
|
|
82
88
|
|
|
83
89
|
On a layer set with a `nose`, `options.turnTargets` — the cues a 30° reference
|
|
84
90
|
measures (how far the eye pair slides, how much the far eye foreshortens,
|
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
|
|
@@ -695,7 +696,8 @@ interface RigStyle {
|
|
|
695
696
|
|
|
696
697
|
/** One role layer, as a host measured it off its decoded pixels. */
|
|
697
698
|
interface LayerInput {
|
|
698
|
-
/** Canonical role (see `parseLayerRoles`); becomes the part
|
|
699
|
+
/** Canonical role (see `parseLayerRoles`); becomes the part ids
|
|
700
|
+
* `partIdsOfRole` lists. */
|
|
699
701
|
role: string;
|
|
700
702
|
fileName: string;
|
|
701
703
|
canvasW: number;
|
|
@@ -711,12 +713,14 @@ interface LayerInput {
|
|
|
711
713
|
cropH: number;
|
|
712
714
|
/** Face only: half the opaque span of each crop row, canvas px (0 = none). */
|
|
713
715
|
rowHalfWidths?: number[];
|
|
714
|
-
/** `face` / `hair_front` / `hair_back`
|
|
715
|
-
* runs as a flat list of canvas
|
|
716
|
-
* each end exclusive (`[]` for a
|
|
717
|
-
* gap in the hair is a gap here:
|
|
718
|
-
*
|
|
719
|
-
* face's so it never bares skin.
|
|
716
|
+
/** `face` / `hair_front` / `hair_back` / `body` / `arm_L` / `arm_R` only:
|
|
717
|
+
* per crop row, its opaque (alpha ≥ 128) runs as a flat list of canvas
|
|
718
|
+
* columns `[start0, end0, start1, end1, …]`, each end exclusive (`[]` for a
|
|
719
|
+
* row with none). The actual pixels, so a gap in the hair is a gap here:
|
|
720
|
+
* the turn and the nod read off it where back hair is painted behind the
|
|
721
|
+
* front hair, and the crown's turn reads the face's so it never bares skin.
|
|
722
|
+
* The body's place the hips (where it splits into legs), and an arm's place
|
|
723
|
+
* its shoulder and elbow pivots. */
|
|
720
724
|
rowRuns?: number[][];
|
|
721
725
|
/** Nose only: the tight box of its alpha ≥ 128 pixels, canvas px. */
|
|
722
726
|
denseCore?: {
|
|
@@ -762,6 +766,14 @@ interface TurnTargets {
|
|
|
762
766
|
declare class TurnTargetError extends Error {
|
|
763
767
|
constructor(message: string);
|
|
764
768
|
}
|
|
769
|
+
/**
|
|
770
|
+
* Art geometry the rig cannot build on — today a body whose hips leave no row
|
|
771
|
+
* line under its pivots, or too little room for its motion (`body.ts`). A fact about the layers, not a bug, so a
|
|
772
|
+
* host reports it as an input error.
|
|
773
|
+
*/
|
|
774
|
+
declare class LayerGeometryError extends Error {
|
|
775
|
+
constructor(message: string);
|
|
776
|
+
}
|
|
765
777
|
/**
|
|
766
778
|
* The profile's own turn (`profile.ts`), in the cues' units — what a rig with
|
|
767
779
|
* no `turnTargets` renders on a head whose silhouette at the eye row is back
|
|
@@ -843,9 +855,13 @@ interface GenerateOptions {
|
|
|
843
855
|
};
|
|
844
856
|
}
|
|
845
857
|
|
|
858
|
+
/** The part ids a `role`'s layer becomes, back to front: every one of them
|
|
859
|
+
* takes its texture from the layer's crop. Throws on an unknown role. */
|
|
860
|
+
declare function partIdsOfRole(role: string): readonly string[];
|
|
846
861
|
/**
|
|
847
|
-
* Map file names to roles. Throws on an unknown role, a role named twice,
|
|
848
|
-
*
|
|
862
|
+
* Map file names to roles. Throws on an unknown role, a role named twice, a
|
|
863
|
+
* required role (`face`, `eye_L`, `eye_R`, `mouth`) missing, or an arm
|
|
864
|
+
* without a body.
|
|
849
865
|
*/
|
|
850
866
|
declare function parseLayerRoles(fileNames: string[]): {
|
|
851
867
|
role: string;
|
|
@@ -855,13 +871,17 @@ declare function parseLayerRoles(fileNames: string[]): {
|
|
|
855
871
|
/**
|
|
856
872
|
* `generateIkiFromLayerSet`: role layers in, a rigged `.iki` out.
|
|
857
873
|
*
|
|
858
|
-
* The rig's shape is a 2D head rig's usual one (`profile.ts`): a
|
|
859
|
-
*
|
|
860
|
-
*
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
*
|
|
874
|
+
* The rig's shape is a 2D head rig's usual one (`profile.ts`): a body warp
|
|
875
|
+
* (`body.ts`) that breathes, follows the head's turn and tilt a little and
|
|
876
|
+
* turns on BodyAngleX/Y/Z, its legs planted; a head deformer hung from it
|
|
877
|
+
* that rolls about the chin and breathes; each arm hung from it too, as an
|
|
878
|
+
* upper arm and a forearm turning about the shoulder and the elbow
|
|
879
|
+
* (`arms.ts`); one small warp grid per feature
|
|
880
|
+
* (each eye, each brow, the nose, the mouth), translating and foreshortening
|
|
881
|
+
* it by its own lead over the plate; and the plate, the hair and the blush
|
|
882
|
+
* moved by per-vertex keyforms of their own — the plate as up to four
|
|
883
|
+
* islands of one drawing: a head that slides, a neck that stays on the torso
|
|
884
|
+
* and two ears that lag. Blink, gaze, brows, mouth, breath and
|
|
865
885
|
* hair sway are part warps and bindings under those. The model also declares
|
|
866
886
|
* the default expressions and the Nod, Shake and Tilt motions
|
|
867
887
|
* (`animations.ts`).
|
|
@@ -1003,7 +1023,8 @@ interface LayerSetMeasurer {
|
|
|
1003
1023
|
* it: only the set's opaque union, this layer's per-row opaque extent and
|
|
1004
1024
|
* the `LayerInput` it returns outlive the call, so the host may drop `rgba`
|
|
1005
1025
|
* as soon as it returns. Returns the layer's `LayerInput` — its crop
|
|
1006
|
-
* box, the face's `rowHalfWidths`, the face's
|
|
1026
|
+
* box, the face's `rowHalfWidths`, the face's, hair layers', body's and
|
|
1027
|
+
* arms' `rowRuns`, the nose's
|
|
1007
1028
|
* `denseCore` unless that is a speck of its crop (`isSpeckCore`) — or
|
|
1008
1029
|
* `null` for an empty layer, one with no pixel at or above
|
|
1009
1030
|
* `ALPHA_BBOX_THRESHOLD`, which it records nothing for: the host reports
|
|
@@ -1260,4 +1281,4 @@ declare function createGridMesh(cols: number, rows: number): IkiMesh;
|
|
|
1260
1281
|
*/
|
|
1261
1282
|
declare function createDefaultWarpDeformer(model: IkiModel): IkiWarpDeformer;
|
|
1262
1283
|
|
|
1263
|
-
export { ALPHA_BBOX_THRESHOLD, ALPHA_OPAQUE, ATLAS_PADDING, AddDeformer, AddPart, AddPhysicsRig, type AlphaBbox, type ApplyAtlasInput, type AtlasAssignment, type AtlasLayout, type AtlasPlacement, type AtlasSource, CaptureGridKeyform, DEFAULT_TURN_TARGETS, type DeformerTransformChannel, DeleteDeformer, DeletePart, DeletePhysicsRig, type EditCommand, type EditTransformChannel, EditorDocument, HEAD_BAND, type IrisStrand, type LayerInput, type LayerSetMeasurement, type LayerSetMeasurer, type RgbaLayer, type RigStyle, SPECK_CORE_FRACTION, SetDeformerBindings, SetDeformerParent, SetDeformerPivot, SetDeformerPivotX, SetDeformerPivotY, SetDeformerTransform, SetPartBindings, SetPartColor, SetPartDeformer, SetPartHeight, SetPartMesh, SetPartOrder, SetPartTransform, SetPartWidth, SetPhysicsRig, type StrandOverlap, type TurnDepths, type TurnSolveReport, TurnTargetError, type TurnTargets, UV_INSET_PX, captureBindingEndpoint, computeGridOffsets, createDefaultMatrixDeformer, createDefaultPart, createDefaultWarpDeformer, createGridMesh, createLayerSetMeasurer, denseCoreOf, detectAlphaBbox, foregroundSpan, generateIkiFromLayerSet, headHalfOf, interpolateGridOffsets, isSpeckCore, packAtlas, parseLayerRoles, upsertGridKeyform, uvRectFor, validateDeformerDelete, validateDeformerReparent, validatePartAttach };
|
|
1284
|
+
export { ALPHA_BBOX_THRESHOLD, ALPHA_OPAQUE, ATLAS_PADDING, AddDeformer, AddPart, AddPhysicsRig, type AlphaBbox, type ApplyAtlasInput, type AtlasAssignment, type AtlasLayout, type AtlasPlacement, type AtlasSource, CaptureGridKeyform, DEFAULT_TURN_TARGETS, type DeformerTransformChannel, DeleteDeformer, DeletePart, DeletePhysicsRig, type EditCommand, type EditTransformChannel, EditorDocument, HEAD_BAND, type IrisStrand, LayerGeometryError, type LayerInput, type LayerSetMeasurement, type LayerSetMeasurer, type RgbaLayer, type RigStyle, SPECK_CORE_FRACTION, SetDeformerBindings, SetDeformerParent, SetDeformerPivot, SetDeformerPivotX, SetDeformerPivotY, SetDeformerTransform, SetPartBindings, SetPartColor, SetPartDeformer, SetPartHeight, SetPartMesh, SetPartOrder, SetPartTransform, SetPartWidth, SetPhysicsRig, type StrandOverlap, type TurnDepths, type TurnSolveReport, TurnTargetError, type TurnTargets, UV_INSET_PX, captureBindingEndpoint, computeGridOffsets, createDefaultMatrixDeformer, createDefaultPart, createDefaultWarpDeformer, createGridMesh, createLayerSetMeasurer, denseCoreOf, detectAlphaBbox, foregroundSpan, generateIkiFromLayerSet, headHalfOf, interpolateGridOffsets, isSpeckCore, packAtlas, parseLayerRoles, partIdsOfRole, upsertGridKeyform, uvRectFor, validateDeformerDelete, validateDeformerReparent, validatePartAttach };
|
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
|
|
@@ -695,7 +696,8 @@ interface RigStyle {
|
|
|
695
696
|
|
|
696
697
|
/** One role layer, as a host measured it off its decoded pixels. */
|
|
697
698
|
interface LayerInput {
|
|
698
|
-
/** Canonical role (see `parseLayerRoles`); becomes the part
|
|
699
|
+
/** Canonical role (see `parseLayerRoles`); becomes the part ids
|
|
700
|
+
* `partIdsOfRole` lists. */
|
|
699
701
|
role: string;
|
|
700
702
|
fileName: string;
|
|
701
703
|
canvasW: number;
|
|
@@ -711,12 +713,14 @@ interface LayerInput {
|
|
|
711
713
|
cropH: number;
|
|
712
714
|
/** Face only: half the opaque span of each crop row, canvas px (0 = none). */
|
|
713
715
|
rowHalfWidths?: number[];
|
|
714
|
-
/** `face` / `hair_front` / `hair_back`
|
|
715
|
-
* runs as a flat list of canvas
|
|
716
|
-
* each end exclusive (`[]` for a
|
|
717
|
-
* gap in the hair is a gap here:
|
|
718
|
-
*
|
|
719
|
-
* face's so it never bares skin.
|
|
716
|
+
/** `face` / `hair_front` / `hair_back` / `body` / `arm_L` / `arm_R` only:
|
|
717
|
+
* per crop row, its opaque (alpha ≥ 128) runs as a flat list of canvas
|
|
718
|
+
* columns `[start0, end0, start1, end1, …]`, each end exclusive (`[]` for a
|
|
719
|
+
* row with none). The actual pixels, so a gap in the hair is a gap here:
|
|
720
|
+
* the turn and the nod read off it where back hair is painted behind the
|
|
721
|
+
* front hair, and the crown's turn reads the face's so it never bares skin.
|
|
722
|
+
* The body's place the hips (where it splits into legs), and an arm's place
|
|
723
|
+
* its shoulder and elbow pivots. */
|
|
720
724
|
rowRuns?: number[][];
|
|
721
725
|
/** Nose only: the tight box of its alpha ≥ 128 pixels, canvas px. */
|
|
722
726
|
denseCore?: {
|
|
@@ -762,6 +766,14 @@ interface TurnTargets {
|
|
|
762
766
|
declare class TurnTargetError extends Error {
|
|
763
767
|
constructor(message: string);
|
|
764
768
|
}
|
|
769
|
+
/**
|
|
770
|
+
* Art geometry the rig cannot build on — today a body whose hips leave no row
|
|
771
|
+
* line under its pivots, or too little room for its motion (`body.ts`). A fact about the layers, not a bug, so a
|
|
772
|
+
* host reports it as an input error.
|
|
773
|
+
*/
|
|
774
|
+
declare class LayerGeometryError extends Error {
|
|
775
|
+
constructor(message: string);
|
|
776
|
+
}
|
|
765
777
|
/**
|
|
766
778
|
* The profile's own turn (`profile.ts`), in the cues' units — what a rig with
|
|
767
779
|
* no `turnTargets` renders on a head whose silhouette at the eye row is back
|
|
@@ -843,9 +855,13 @@ interface GenerateOptions {
|
|
|
843
855
|
};
|
|
844
856
|
}
|
|
845
857
|
|
|
858
|
+
/** The part ids a `role`'s layer becomes, back to front: every one of them
|
|
859
|
+
* takes its texture from the layer's crop. Throws on an unknown role. */
|
|
860
|
+
declare function partIdsOfRole(role: string): readonly string[];
|
|
846
861
|
/**
|
|
847
|
-
* Map file names to roles. Throws on an unknown role, a role named twice,
|
|
848
|
-
*
|
|
862
|
+
* Map file names to roles. Throws on an unknown role, a role named twice, a
|
|
863
|
+
* required role (`face`, `eye_L`, `eye_R`, `mouth`) missing, or an arm
|
|
864
|
+
* without a body.
|
|
849
865
|
*/
|
|
850
866
|
declare function parseLayerRoles(fileNames: string[]): {
|
|
851
867
|
role: string;
|
|
@@ -855,13 +871,17 @@ declare function parseLayerRoles(fileNames: string[]): {
|
|
|
855
871
|
/**
|
|
856
872
|
* `generateIkiFromLayerSet`: role layers in, a rigged `.iki` out.
|
|
857
873
|
*
|
|
858
|
-
* The rig's shape is a 2D head rig's usual one (`profile.ts`): a
|
|
859
|
-
*
|
|
860
|
-
*
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
*
|
|
874
|
+
* The rig's shape is a 2D head rig's usual one (`profile.ts`): a body warp
|
|
875
|
+
* (`body.ts`) that breathes, follows the head's turn and tilt a little and
|
|
876
|
+
* turns on BodyAngleX/Y/Z, its legs planted; a head deformer hung from it
|
|
877
|
+
* that rolls about the chin and breathes; each arm hung from it too, as an
|
|
878
|
+
* upper arm and a forearm turning about the shoulder and the elbow
|
|
879
|
+
* (`arms.ts`); one small warp grid per feature
|
|
880
|
+
* (each eye, each brow, the nose, the mouth), translating and foreshortening
|
|
881
|
+
* it by its own lead over the plate; and the plate, the hair and the blush
|
|
882
|
+
* moved by per-vertex keyforms of their own — the plate as up to four
|
|
883
|
+
* islands of one drawing: a head that slides, a neck that stays on the torso
|
|
884
|
+
* and two ears that lag. Blink, gaze, brows, mouth, breath and
|
|
865
885
|
* hair sway are part warps and bindings under those. The model also declares
|
|
866
886
|
* the default expressions and the Nod, Shake and Tilt motions
|
|
867
887
|
* (`animations.ts`).
|
|
@@ -1003,7 +1023,8 @@ interface LayerSetMeasurer {
|
|
|
1003
1023
|
* it: only the set's opaque union, this layer's per-row opaque extent and
|
|
1004
1024
|
* the `LayerInput` it returns outlive the call, so the host may drop `rgba`
|
|
1005
1025
|
* as soon as it returns. Returns the layer's `LayerInput` — its crop
|
|
1006
|
-
* box, the face's `rowHalfWidths`, the face's
|
|
1026
|
+
* box, the face's `rowHalfWidths`, the face's, hair layers', body's and
|
|
1027
|
+
* arms' `rowRuns`, the nose's
|
|
1007
1028
|
* `denseCore` unless that is a speck of its crop (`isSpeckCore`) — or
|
|
1008
1029
|
* `null` for an empty layer, one with no pixel at or above
|
|
1009
1030
|
* `ALPHA_BBOX_THRESHOLD`, which it records nothing for: the host reports
|
|
@@ -1260,4 +1281,4 @@ declare function createGridMesh(cols: number, rows: number): IkiMesh;
|
|
|
1260
1281
|
*/
|
|
1261
1282
|
declare function createDefaultWarpDeformer(model: IkiModel): IkiWarpDeformer;
|
|
1262
1283
|
|
|
1263
|
-
export { ALPHA_BBOX_THRESHOLD, ALPHA_OPAQUE, ATLAS_PADDING, AddDeformer, AddPart, AddPhysicsRig, type AlphaBbox, type ApplyAtlasInput, type AtlasAssignment, type AtlasLayout, type AtlasPlacement, type AtlasSource, CaptureGridKeyform, DEFAULT_TURN_TARGETS, type DeformerTransformChannel, DeleteDeformer, DeletePart, DeletePhysicsRig, type EditCommand, type EditTransformChannel, EditorDocument, HEAD_BAND, type IrisStrand, type LayerInput, type LayerSetMeasurement, type LayerSetMeasurer, type RgbaLayer, type RigStyle, SPECK_CORE_FRACTION, SetDeformerBindings, SetDeformerParent, SetDeformerPivot, SetDeformerPivotX, SetDeformerPivotY, SetDeformerTransform, SetPartBindings, SetPartColor, SetPartDeformer, SetPartHeight, SetPartMesh, SetPartOrder, SetPartTransform, SetPartWidth, SetPhysicsRig, type StrandOverlap, type TurnDepths, type TurnSolveReport, TurnTargetError, type TurnTargets, UV_INSET_PX, captureBindingEndpoint, computeGridOffsets, createDefaultMatrixDeformer, createDefaultPart, createDefaultWarpDeformer, createGridMesh, createLayerSetMeasurer, denseCoreOf, detectAlphaBbox, foregroundSpan, generateIkiFromLayerSet, headHalfOf, interpolateGridOffsets, isSpeckCore, packAtlas, parseLayerRoles, upsertGridKeyform, uvRectFor, validateDeformerDelete, validateDeformerReparent, validatePartAttach };
|
|
1284
|
+
export { ALPHA_BBOX_THRESHOLD, ALPHA_OPAQUE, ATLAS_PADDING, AddDeformer, AddPart, AddPhysicsRig, type AlphaBbox, type ApplyAtlasInput, type AtlasAssignment, type AtlasLayout, type AtlasPlacement, type AtlasSource, CaptureGridKeyform, DEFAULT_TURN_TARGETS, type DeformerTransformChannel, DeleteDeformer, DeletePart, DeletePhysicsRig, type EditCommand, type EditTransformChannel, EditorDocument, HEAD_BAND, type IrisStrand, LayerGeometryError, type LayerInput, type LayerSetMeasurement, type LayerSetMeasurer, type RgbaLayer, type RigStyle, SPECK_CORE_FRACTION, SetDeformerBindings, SetDeformerParent, SetDeformerPivot, SetDeformerPivotX, SetDeformerPivotY, SetDeformerTransform, SetPartBindings, SetPartColor, SetPartDeformer, SetPartHeight, SetPartMesh, SetPartOrder, SetPartTransform, SetPartWidth, SetPhysicsRig, type StrandOverlap, type TurnDepths, type TurnSolveReport, TurnTargetError, type TurnTargets, UV_INSET_PX, captureBindingEndpoint, computeGridOffsets, createDefaultMatrixDeformer, createDefaultPart, createDefaultWarpDeformer, createGridMesh, createLayerSetMeasurer, denseCoreOf, detectAlphaBbox, foregroundSpan, generateIkiFromLayerSet, headHalfOf, interpolateGridOffsets, isSpeckCore, packAtlas, parseLayerRoles, partIdsOfRole, upsertGridKeyform, uvRectFor, validateDeformerDelete, validateDeformerReparent, validatePartAttach };
|