@ikijs/mcp 0.31.1 → 0.33.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 +21 -20
- package/dist/{chunk-BQVILYRV.mjs → chunk-5D7374FI.mjs} +606 -103
- package/dist/chunk-5D7374FI.mjs.map +1 -0
- package/dist/cli.js +647 -150
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +118 -29
- package/dist/index.d.ts +118 -29
- package/dist/index.js +655 -150
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/render-page.global.js +23 -19
- package/package.json +2 -2
- package/dist/chunk-BQVILYRV.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -278,10 +278,10 @@ type AutoRigResult = {
|
|
|
278
278
|
* fallback path has no measured edge to report at all. Passed to the
|
|
279
279
|
* generator so it can land each candidate through its OWN motion
|
|
280
280
|
* (hair_front's silhouette hold, a turn group's grid for the face and
|
|
281
|
-
* its features,
|
|
282
|
-
* outline and lands where it rests,
|
|
283
|
-
*
|
|
284
|
-
* REST pixel. */
|
|
281
|
+
* its features, a side lock's own shear, the body's own turn
|
|
282
|
+
* translate; `hair_back` holds the outline and lands where it rests,
|
|
283
|
+
* and a role outside that table is refused) and take the outermost
|
|
284
|
+
* LANDING, not just the outermost REST pixel. */
|
|
285
285
|
headEdges?: {
|
|
286
286
|
left: {
|
|
287
287
|
role: string;
|
|
@@ -322,8 +322,9 @@ type AutoRigResult = {
|
|
|
322
322
|
/** What the turn solve settled on — the cues the rig reaches, the
|
|
323
323
|
* targets it had to cut down (`clamped`) and, per side whose far iris
|
|
324
324
|
* the bangs' run still covers at some far stop, how much of it
|
|
325
|
-
* (`strandOverlap`)
|
|
326
|
-
*
|
|
325
|
+
* (`strandOverlap`) and, per side lock, how it keeps its room on the turn
|
|
326
|
+
* (`hairSide`, report-only, printed as `HAIRSIDE` lines). Absent for a
|
|
327
|
+
* layer set with no nose, which solves no turn at all. */
|
|
327
328
|
turn?: TurnSolveReport;
|
|
328
329
|
/** The written model's folds over the engine's pose set, its eyes and
|
|
329
330
|
* mouth shutting on purpose set apart as `expected`. Report-only: a
|
|
@@ -640,6 +641,22 @@ declare const DEFAULT_LAYOUT: {
|
|
|
640
641
|
w: number;
|
|
641
642
|
mirror: true;
|
|
642
643
|
};
|
|
644
|
+
hair_side_L: {
|
|
645
|
+
src: string;
|
|
646
|
+
cx: number;
|
|
647
|
+
cy: number;
|
|
648
|
+
w: number;
|
|
649
|
+
optional: true;
|
|
650
|
+
mirror: true;
|
|
651
|
+
};
|
|
652
|
+
hair_side_R: {
|
|
653
|
+
src: string;
|
|
654
|
+
cx: number;
|
|
655
|
+
cy: number;
|
|
656
|
+
w: number;
|
|
657
|
+
optional: true;
|
|
658
|
+
mirror: false;
|
|
659
|
+
};
|
|
643
660
|
hair_front: {
|
|
644
661
|
src: string;
|
|
645
662
|
cx: number;
|
|
@@ -796,6 +813,28 @@ declare function formatFoldReport(report: FoldReport, canvas: {
|
|
|
796
813
|
*/
|
|
797
814
|
declare function formatPhysicsReport(report: PhysicsReport): string[];
|
|
798
815
|
|
|
816
|
+
/**
|
|
817
|
+
* The text lines `auto_rig_from_layers` prints the turn solve's report-only
|
|
818
|
+
* `hairSide` numbers as, after the `PHYSICS` lines. An agent reads them; none
|
|
819
|
+
* refuses the rig.
|
|
820
|
+
*/
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* `hairSide` as text lines, none when it is absent (a set with no side lock,
|
|
824
|
+
* whose result text stays as it was). Per side lock, the screen-left one
|
|
825
|
+
* first and labelled by its ROLE — `hair_side_R` hangs on the screen left —
|
|
826
|
+
* one line per metric the report holds: `HAIRSIDE cover <role>`, `HAIRSIDE
|
|
827
|
+
* tail <role>`; for a lock with neither, `HAIRSIDE <role>: no cover or tail
|
|
828
|
+
* row`; for a lock with no `rowRuns`, `HAIRSIDE <role>: unavailable — <why>`.
|
|
829
|
+
* Poses read as the parameter setting that reproduces them; px are model px,
|
|
830
|
+
* and the cover's row is given in model space and as model px from the
|
|
831
|
+
* top of the model's `canvas`, as a `FOLD` line gives its rest point.
|
|
832
|
+
*/
|
|
833
|
+
declare function formatHairSideReport(hairSide: TurnSolveReport["hairSide"], canvas: {
|
|
834
|
+
width: number;
|
|
835
|
+
height: number;
|
|
836
|
+
}): string[];
|
|
837
|
+
|
|
799
838
|
/**
|
|
800
839
|
* Measure the head-turn cues in a PAIR of images of the same character — one
|
|
801
840
|
* facing front, one turned — and report them as three ratios. It is how a
|
|
@@ -953,9 +992,47 @@ type SweepReport = {
|
|
|
953
992
|
preset: "turn";
|
|
954
993
|
unavailable: string;
|
|
955
994
|
};
|
|
995
|
+
/** A pair gap or a width, face widths: the range along the nod at each turn. */
|
|
996
|
+
interface NodRange {
|
|
997
|
+
id: "eyes" | "irises" | "mouth";
|
|
998
|
+
range: {
|
|
999
|
+
m30: number;
|
|
1000
|
+
zero: number;
|
|
1001
|
+
p30: number;
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
/** The additivity residual of a landmark at the four corners; first letter AngleX, second AngleY. */
|
|
1005
|
+
interface CornerResidual {
|
|
1006
|
+
id: string;
|
|
1007
|
+
residual: {
|
|
1008
|
+
mm: number;
|
|
1009
|
+
mp: number;
|
|
1010
|
+
pm: number;
|
|
1011
|
+
pp: number;
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
type NodReport = {
|
|
1015
|
+
unit: "fw";
|
|
1016
|
+
faceWidth: number;
|
|
1017
|
+
nod: NodRange[];
|
|
1018
|
+
corner: CornerResidual[];
|
|
1019
|
+
} | {
|
|
1020
|
+
unavailable: string;
|
|
1021
|
+
};
|
|
1022
|
+
/**
|
|
1023
|
+
* The nod at three turns: `ParamAngleY` −30 … +30 in 1° steps at `ParamAngleX`
|
|
1024
|
+
* −30, 0 and +30, no physics. `nod` is how far a pair gap (or the mouth's
|
|
1025
|
+
* width) moves along each ladder; `corner` is the AngleX × AngleY additivity
|
|
1026
|
+
* residual per landmark, the rest term included, so a rig whose parts add the
|
|
1027
|
+
* turn and the nod reads 0. Both are read against each other and against the
|
|
1028
|
+
* corpus's zeros, never against a bound.
|
|
1029
|
+
*/
|
|
1030
|
+
declare function checkNod(model: IkiModel): NodReport;
|
|
956
1031
|
declare function checkSweep(model: IkiModel): SweepReport;
|
|
957
1032
|
/** One `SWEEP` line per landmark and one for the plate, or the one `unavailable` line. */
|
|
958
1033
|
declare function formatSweepReport(report: SweepReport): string[];
|
|
1034
|
+
/** The `SWEEP nod` and `SWEEP corner` lines, or the one `unavailable` line. */
|
|
1035
|
+
declare function formatNodReport(report: NodReport): string[];
|
|
959
1036
|
|
|
960
1037
|
/**
|
|
961
1038
|
* The pose plan `render_poses` captures: the canvas framing, the crops and the
|
|
@@ -998,6 +1075,8 @@ interface RenderPlan {
|
|
|
998
1075
|
poses: RenderPose[];
|
|
999
1076
|
/** The sweep's fixed framing; absent when no sweep was asked for. */
|
|
1000
1077
|
sweepCrop?: RenderCrop;
|
|
1078
|
+
/** The same for each `sweeps` entry, aligned with it; absent without `sweeps`. */
|
|
1079
|
+
sweepsCrops?: (RenderCrop | undefined)[];
|
|
1001
1080
|
}
|
|
1002
1081
|
/** A pose the caller names, rendered in place of the model's own set. */
|
|
1003
1082
|
interface RequestedPose {
|
|
@@ -1021,6 +1100,22 @@ interface RenderPosesInput {
|
|
|
1021
1100
|
poses?: RequestedPose[];
|
|
1022
1101
|
/** A turn sweep rendered in addition to the poses, into `<outDir>/<name>/`. */
|
|
1023
1102
|
sweep?: RequestedSweep;
|
|
1103
|
+
/** More sweeps, rendered after `sweep`, each into its own `<outDir>/<name>/`. */
|
|
1104
|
+
sweeps?: RequestedSweep[];
|
|
1105
|
+
}
|
|
1106
|
+
interface SweepOutput {
|
|
1107
|
+
name: string;
|
|
1108
|
+
preset: SweepPreset;
|
|
1109
|
+
dir: string;
|
|
1110
|
+
fps: number;
|
|
1111
|
+
frames: number;
|
|
1112
|
+
manifest: string;
|
|
1113
|
+
sheet: string;
|
|
1114
|
+
/** Absent for a preset without one (`turn-nod`). */
|
|
1115
|
+
kymograph?: string;
|
|
1116
|
+
flipbook: string;
|
|
1117
|
+
report: SweepReport;
|
|
1118
|
+
nod: NodReport;
|
|
1024
1119
|
}
|
|
1025
1120
|
type RenderPosesResult = {
|
|
1026
1121
|
ok: true;
|
|
@@ -1046,18 +1141,10 @@ type RenderPosesResult = {
|
|
|
1046
1141
|
physics: PhysicsReport;
|
|
1047
1142
|
/** Present whenever `sweep` was asked for; absent only from a server
|
|
1048
1143
|
* before 0.31.0, which strips the input. */
|
|
1049
|
-
sweep?:
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
fps: number;
|
|
1054
|
-
frames: number;
|
|
1055
|
-
manifest: string;
|
|
1056
|
-
sheet: string;
|
|
1057
|
-
kymograph: string;
|
|
1058
|
-
flipbook: string;
|
|
1059
|
-
report: SweepReport;
|
|
1060
|
-
};
|
|
1144
|
+
sweep?: SweepOutput;
|
|
1145
|
+
/** In request order; present whenever `sweeps` was asked for, absent
|
|
1146
|
+
* from a server before 0.32.0, which strips the input. */
|
|
1147
|
+
sweeps?: SweepOutput[];
|
|
1061
1148
|
} | {
|
|
1062
1149
|
ok: false;
|
|
1063
1150
|
error: string;
|
|
@@ -1070,19 +1157,22 @@ type RenderPosesResult = {
|
|
|
1070
1157
|
declare function renderPoses(input: RenderPosesInput): Promise<RenderPosesResult>;
|
|
1071
1158
|
|
|
1072
1159
|
/**
|
|
1073
|
-
* The
|
|
1074
|
-
* turn
|
|
1075
|
-
*
|
|
1160
|
+
* The sweeps `render_poses` renders on request: an eased ±30 `ParamAngleX`
|
|
1161
|
+
* turn, or the `turn-nod` box through every `ParamAngleX` × `ParamAngleY`
|
|
1162
|
+
* stop, with the hair physics running. This file is their pure pieces — the
|
|
1163
|
+
* schedules, the sheet picks, the kymograph row, the flipbook template and the
|
|
1076
1164
|
* output directory — all decided in Node; the page only draws what the
|
|
1077
1165
|
* {@link SweepSpec} says. The page script imports this file for TYPES only (it
|
|
1078
1166
|
* is bundled as a browser IIFE and must never pull in `node:fs`).
|
|
1079
1167
|
*/
|
|
1080
1168
|
|
|
1169
|
+
declare const SWEEP_PRESETS: readonly ["turn", "turn-nod"];
|
|
1170
|
+
type SweepPreset = (typeof SWEEP_PRESETS)[number];
|
|
1081
1171
|
/** What the caller asks for. */
|
|
1082
1172
|
interface RequestedSweep {
|
|
1083
1173
|
/** Becomes the directory `<outDir>/<name>/`. */
|
|
1084
1174
|
name: string;
|
|
1085
|
-
preset:
|
|
1175
|
+
preset: SweepPreset;
|
|
1086
1176
|
/** Model px from the top-left, as a pose's crop; absent = the standard shot. */
|
|
1087
1177
|
crop?: {
|
|
1088
1178
|
x: number;
|
|
@@ -1093,9 +1183,9 @@ interface RequestedSweep {
|
|
|
1093
1183
|
}
|
|
1094
1184
|
/** `manifest.json`. */
|
|
1095
1185
|
interface SweepManifest {
|
|
1096
|
-
version:
|
|
1097
|
-
preset:
|
|
1098
|
-
|
|
1186
|
+
version: 2;
|
|
1187
|
+
preset: SweepPreset;
|
|
1188
|
+
parameters: string[];
|
|
1099
1189
|
fps: number;
|
|
1100
1190
|
clockHz: number;
|
|
1101
1191
|
warmupS: number;
|
|
@@ -1113,7 +1203,7 @@ interface SweepManifest {
|
|
|
1113
1203
|
kymographRow: {
|
|
1114
1204
|
row: number;
|
|
1115
1205
|
at: "eye row" | "middle";
|
|
1116
|
-
};
|
|
1206
|
+
} | null;
|
|
1117
1207
|
sheet: {
|
|
1118
1208
|
frames: number[];
|
|
1119
1209
|
cell: {
|
|
@@ -1126,12 +1216,11 @@ interface SweepManifest {
|
|
|
1126
1216
|
i: number;
|
|
1127
1217
|
file: string;
|
|
1128
1218
|
t: number;
|
|
1129
|
-
|
|
1130
|
-
/** The effective `parameter` and every physics output, read off the player after step 2i. */
|
|
1219
|
+
/** Every scripted id and every physics output, read off the player after step 2i. */
|
|
1131
1220
|
values: Record<string, number>;
|
|
1132
1221
|
}[];
|
|
1133
1222
|
}
|
|
1134
1223
|
|
|
1135
1224
|
declare function createIkiMcpServer(): McpServer;
|
|
1136
1225
|
|
|
1137
|
-
export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type RequestedSweep, type StandardParameterInfo, type SweepManifest, type SweepReport, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, checkSweep, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, describeRigPlan, formatFoldReport, formatMeasureReport, formatPhysicsReport, formatRigPlanReport, formatSweepReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
|
|
1226
|
+
export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type NodReport, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type RequestedSweep, SWEEP_PRESETS, type StandardParameterInfo, type SweepManifest, type SweepPreset, type SweepReport, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, checkNod, checkSweep, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, describeRigPlan, formatFoldReport, formatHairSideReport, formatMeasureReport, formatNodReport, formatPhysicsReport, formatRigPlanReport, formatSweepReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
|
package/dist/index.d.ts
CHANGED
|
@@ -278,10 +278,10 @@ type AutoRigResult = {
|
|
|
278
278
|
* fallback path has no measured edge to report at all. Passed to the
|
|
279
279
|
* generator so it can land each candidate through its OWN motion
|
|
280
280
|
* (hair_front's silhouette hold, a turn group's grid for the face and
|
|
281
|
-
* its features,
|
|
282
|
-
* outline and lands where it rests,
|
|
283
|
-
*
|
|
284
|
-
* REST pixel. */
|
|
281
|
+
* its features, a side lock's own shear, the body's own turn
|
|
282
|
+
* translate; `hair_back` holds the outline and lands where it rests,
|
|
283
|
+
* and a role outside that table is refused) and take the outermost
|
|
284
|
+
* LANDING, not just the outermost REST pixel. */
|
|
285
285
|
headEdges?: {
|
|
286
286
|
left: {
|
|
287
287
|
role: string;
|
|
@@ -322,8 +322,9 @@ type AutoRigResult = {
|
|
|
322
322
|
/** What the turn solve settled on — the cues the rig reaches, the
|
|
323
323
|
* targets it had to cut down (`clamped`) and, per side whose far iris
|
|
324
324
|
* the bangs' run still covers at some far stop, how much of it
|
|
325
|
-
* (`strandOverlap`)
|
|
326
|
-
*
|
|
325
|
+
* (`strandOverlap`) and, per side lock, how it keeps its room on the turn
|
|
326
|
+
* (`hairSide`, report-only, printed as `HAIRSIDE` lines). Absent for a
|
|
327
|
+
* layer set with no nose, which solves no turn at all. */
|
|
327
328
|
turn?: TurnSolveReport;
|
|
328
329
|
/** The written model's folds over the engine's pose set, its eyes and
|
|
329
330
|
* mouth shutting on purpose set apart as `expected`. Report-only: a
|
|
@@ -640,6 +641,22 @@ declare const DEFAULT_LAYOUT: {
|
|
|
640
641
|
w: number;
|
|
641
642
|
mirror: true;
|
|
642
643
|
};
|
|
644
|
+
hair_side_L: {
|
|
645
|
+
src: string;
|
|
646
|
+
cx: number;
|
|
647
|
+
cy: number;
|
|
648
|
+
w: number;
|
|
649
|
+
optional: true;
|
|
650
|
+
mirror: true;
|
|
651
|
+
};
|
|
652
|
+
hair_side_R: {
|
|
653
|
+
src: string;
|
|
654
|
+
cx: number;
|
|
655
|
+
cy: number;
|
|
656
|
+
w: number;
|
|
657
|
+
optional: true;
|
|
658
|
+
mirror: false;
|
|
659
|
+
};
|
|
643
660
|
hair_front: {
|
|
644
661
|
src: string;
|
|
645
662
|
cx: number;
|
|
@@ -796,6 +813,28 @@ declare function formatFoldReport(report: FoldReport, canvas: {
|
|
|
796
813
|
*/
|
|
797
814
|
declare function formatPhysicsReport(report: PhysicsReport): string[];
|
|
798
815
|
|
|
816
|
+
/**
|
|
817
|
+
* The text lines `auto_rig_from_layers` prints the turn solve's report-only
|
|
818
|
+
* `hairSide` numbers as, after the `PHYSICS` lines. An agent reads them; none
|
|
819
|
+
* refuses the rig.
|
|
820
|
+
*/
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* `hairSide` as text lines, none when it is absent (a set with no side lock,
|
|
824
|
+
* whose result text stays as it was). Per side lock, the screen-left one
|
|
825
|
+
* first and labelled by its ROLE — `hair_side_R` hangs on the screen left —
|
|
826
|
+
* one line per metric the report holds: `HAIRSIDE cover <role>`, `HAIRSIDE
|
|
827
|
+
* tail <role>`; for a lock with neither, `HAIRSIDE <role>: no cover or tail
|
|
828
|
+
* row`; for a lock with no `rowRuns`, `HAIRSIDE <role>: unavailable — <why>`.
|
|
829
|
+
* Poses read as the parameter setting that reproduces them; px are model px,
|
|
830
|
+
* and the cover's row is given in model space and as model px from the
|
|
831
|
+
* top of the model's `canvas`, as a `FOLD` line gives its rest point.
|
|
832
|
+
*/
|
|
833
|
+
declare function formatHairSideReport(hairSide: TurnSolveReport["hairSide"], canvas: {
|
|
834
|
+
width: number;
|
|
835
|
+
height: number;
|
|
836
|
+
}): string[];
|
|
837
|
+
|
|
799
838
|
/**
|
|
800
839
|
* Measure the head-turn cues in a PAIR of images of the same character — one
|
|
801
840
|
* facing front, one turned — and report them as three ratios. It is how a
|
|
@@ -953,9 +992,47 @@ type SweepReport = {
|
|
|
953
992
|
preset: "turn";
|
|
954
993
|
unavailable: string;
|
|
955
994
|
};
|
|
995
|
+
/** A pair gap or a width, face widths: the range along the nod at each turn. */
|
|
996
|
+
interface NodRange {
|
|
997
|
+
id: "eyes" | "irises" | "mouth";
|
|
998
|
+
range: {
|
|
999
|
+
m30: number;
|
|
1000
|
+
zero: number;
|
|
1001
|
+
p30: number;
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
/** The additivity residual of a landmark at the four corners; first letter AngleX, second AngleY. */
|
|
1005
|
+
interface CornerResidual {
|
|
1006
|
+
id: string;
|
|
1007
|
+
residual: {
|
|
1008
|
+
mm: number;
|
|
1009
|
+
mp: number;
|
|
1010
|
+
pm: number;
|
|
1011
|
+
pp: number;
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
type NodReport = {
|
|
1015
|
+
unit: "fw";
|
|
1016
|
+
faceWidth: number;
|
|
1017
|
+
nod: NodRange[];
|
|
1018
|
+
corner: CornerResidual[];
|
|
1019
|
+
} | {
|
|
1020
|
+
unavailable: string;
|
|
1021
|
+
};
|
|
1022
|
+
/**
|
|
1023
|
+
* The nod at three turns: `ParamAngleY` −30 … +30 in 1° steps at `ParamAngleX`
|
|
1024
|
+
* −30, 0 and +30, no physics. `nod` is how far a pair gap (or the mouth's
|
|
1025
|
+
* width) moves along each ladder; `corner` is the AngleX × AngleY additivity
|
|
1026
|
+
* residual per landmark, the rest term included, so a rig whose parts add the
|
|
1027
|
+
* turn and the nod reads 0. Both are read against each other and against the
|
|
1028
|
+
* corpus's zeros, never against a bound.
|
|
1029
|
+
*/
|
|
1030
|
+
declare function checkNod(model: IkiModel): NodReport;
|
|
956
1031
|
declare function checkSweep(model: IkiModel): SweepReport;
|
|
957
1032
|
/** One `SWEEP` line per landmark and one for the plate, or the one `unavailable` line. */
|
|
958
1033
|
declare function formatSweepReport(report: SweepReport): string[];
|
|
1034
|
+
/** The `SWEEP nod` and `SWEEP corner` lines, or the one `unavailable` line. */
|
|
1035
|
+
declare function formatNodReport(report: NodReport): string[];
|
|
959
1036
|
|
|
960
1037
|
/**
|
|
961
1038
|
* The pose plan `render_poses` captures: the canvas framing, the crops and the
|
|
@@ -998,6 +1075,8 @@ interface RenderPlan {
|
|
|
998
1075
|
poses: RenderPose[];
|
|
999
1076
|
/** The sweep's fixed framing; absent when no sweep was asked for. */
|
|
1000
1077
|
sweepCrop?: RenderCrop;
|
|
1078
|
+
/** The same for each `sweeps` entry, aligned with it; absent without `sweeps`. */
|
|
1079
|
+
sweepsCrops?: (RenderCrop | undefined)[];
|
|
1001
1080
|
}
|
|
1002
1081
|
/** A pose the caller names, rendered in place of the model's own set. */
|
|
1003
1082
|
interface RequestedPose {
|
|
@@ -1021,6 +1100,22 @@ interface RenderPosesInput {
|
|
|
1021
1100
|
poses?: RequestedPose[];
|
|
1022
1101
|
/** A turn sweep rendered in addition to the poses, into `<outDir>/<name>/`. */
|
|
1023
1102
|
sweep?: RequestedSweep;
|
|
1103
|
+
/** More sweeps, rendered after `sweep`, each into its own `<outDir>/<name>/`. */
|
|
1104
|
+
sweeps?: RequestedSweep[];
|
|
1105
|
+
}
|
|
1106
|
+
interface SweepOutput {
|
|
1107
|
+
name: string;
|
|
1108
|
+
preset: SweepPreset;
|
|
1109
|
+
dir: string;
|
|
1110
|
+
fps: number;
|
|
1111
|
+
frames: number;
|
|
1112
|
+
manifest: string;
|
|
1113
|
+
sheet: string;
|
|
1114
|
+
/** Absent for a preset without one (`turn-nod`). */
|
|
1115
|
+
kymograph?: string;
|
|
1116
|
+
flipbook: string;
|
|
1117
|
+
report: SweepReport;
|
|
1118
|
+
nod: NodReport;
|
|
1024
1119
|
}
|
|
1025
1120
|
type RenderPosesResult = {
|
|
1026
1121
|
ok: true;
|
|
@@ -1046,18 +1141,10 @@ type RenderPosesResult = {
|
|
|
1046
1141
|
physics: PhysicsReport;
|
|
1047
1142
|
/** Present whenever `sweep` was asked for; absent only from a server
|
|
1048
1143
|
* before 0.31.0, which strips the input. */
|
|
1049
|
-
sweep?:
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
fps: number;
|
|
1054
|
-
frames: number;
|
|
1055
|
-
manifest: string;
|
|
1056
|
-
sheet: string;
|
|
1057
|
-
kymograph: string;
|
|
1058
|
-
flipbook: string;
|
|
1059
|
-
report: SweepReport;
|
|
1060
|
-
};
|
|
1144
|
+
sweep?: SweepOutput;
|
|
1145
|
+
/** In request order; present whenever `sweeps` was asked for, absent
|
|
1146
|
+
* from a server before 0.32.0, which strips the input. */
|
|
1147
|
+
sweeps?: SweepOutput[];
|
|
1061
1148
|
} | {
|
|
1062
1149
|
ok: false;
|
|
1063
1150
|
error: string;
|
|
@@ -1070,19 +1157,22 @@ type RenderPosesResult = {
|
|
|
1070
1157
|
declare function renderPoses(input: RenderPosesInput): Promise<RenderPosesResult>;
|
|
1071
1158
|
|
|
1072
1159
|
/**
|
|
1073
|
-
* The
|
|
1074
|
-
* turn
|
|
1075
|
-
*
|
|
1160
|
+
* The sweeps `render_poses` renders on request: an eased ±30 `ParamAngleX`
|
|
1161
|
+
* turn, or the `turn-nod` box through every `ParamAngleX` × `ParamAngleY`
|
|
1162
|
+
* stop, with the hair physics running. This file is their pure pieces — the
|
|
1163
|
+
* schedules, the sheet picks, the kymograph row, the flipbook template and the
|
|
1076
1164
|
* output directory — all decided in Node; the page only draws what the
|
|
1077
1165
|
* {@link SweepSpec} says. The page script imports this file for TYPES only (it
|
|
1078
1166
|
* is bundled as a browser IIFE and must never pull in `node:fs`).
|
|
1079
1167
|
*/
|
|
1080
1168
|
|
|
1169
|
+
declare const SWEEP_PRESETS: readonly ["turn", "turn-nod"];
|
|
1170
|
+
type SweepPreset = (typeof SWEEP_PRESETS)[number];
|
|
1081
1171
|
/** What the caller asks for. */
|
|
1082
1172
|
interface RequestedSweep {
|
|
1083
1173
|
/** Becomes the directory `<outDir>/<name>/`. */
|
|
1084
1174
|
name: string;
|
|
1085
|
-
preset:
|
|
1175
|
+
preset: SweepPreset;
|
|
1086
1176
|
/** Model px from the top-left, as a pose's crop; absent = the standard shot. */
|
|
1087
1177
|
crop?: {
|
|
1088
1178
|
x: number;
|
|
@@ -1093,9 +1183,9 @@ interface RequestedSweep {
|
|
|
1093
1183
|
}
|
|
1094
1184
|
/** `manifest.json`. */
|
|
1095
1185
|
interface SweepManifest {
|
|
1096
|
-
version:
|
|
1097
|
-
preset:
|
|
1098
|
-
|
|
1186
|
+
version: 2;
|
|
1187
|
+
preset: SweepPreset;
|
|
1188
|
+
parameters: string[];
|
|
1099
1189
|
fps: number;
|
|
1100
1190
|
clockHz: number;
|
|
1101
1191
|
warmupS: number;
|
|
@@ -1113,7 +1203,7 @@ interface SweepManifest {
|
|
|
1113
1203
|
kymographRow: {
|
|
1114
1204
|
row: number;
|
|
1115
1205
|
at: "eye row" | "middle";
|
|
1116
|
-
};
|
|
1206
|
+
} | null;
|
|
1117
1207
|
sheet: {
|
|
1118
1208
|
frames: number[];
|
|
1119
1209
|
cell: {
|
|
@@ -1126,12 +1216,11 @@ interface SweepManifest {
|
|
|
1126
1216
|
i: number;
|
|
1127
1217
|
file: string;
|
|
1128
1218
|
t: number;
|
|
1129
|
-
|
|
1130
|
-
/** The effective `parameter` and every physics output, read off the player after step 2i. */
|
|
1219
|
+
/** Every scripted id and every physics output, read off the player after step 2i. */
|
|
1131
1220
|
values: Record<string, number>;
|
|
1132
1221
|
}[];
|
|
1133
1222
|
}
|
|
1134
1223
|
|
|
1135
1224
|
declare function createIkiMcpServer(): McpServer;
|
|
1136
1225
|
|
|
1137
|
-
export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type RequestedSweep, type StandardParameterInfo, type SweepManifest, type SweepReport, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, checkSweep, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, describeRigPlan, formatFoldReport, formatMeasureReport, formatPhysicsReport, formatRigPlanReport, formatSweepReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
|
|
1226
|
+
export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type NodReport, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type RequestedSweep, SWEEP_PRESETS, type StandardParameterInfo, type SweepManifest, type SweepPreset, type SweepReport, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, checkNod, checkSweep, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, describeRigPlan, formatFoldReport, formatHairSideReport, formatMeasureReport, formatNodReport, formatPhysicsReport, formatRigPlanReport, formatSweepReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
|