@ikijs/mcp 0.31.1 → 0.32.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 +15 -14
- package/dist/{chunk-BQVILYRV.mjs → chunk-576N2JWR.mjs} +354 -87
- package/dist/chunk-576N2JWR.mjs.map +1 -0
- package/dist/cli.js +350 -86
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +73 -23
- package/dist/index.d.ts +73 -23
- package/dist/index.js +356 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/render-page.global.js +23 -19
- package/package.json +1 -1
- package/dist/chunk-BQVILYRV.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
SWEEP_PRESETS,
|
|
2
3
|
autoRigFromLayers,
|
|
3
4
|
checkModelFolds,
|
|
5
|
+
checkNod,
|
|
4
6
|
checkSweep,
|
|
5
7
|
composeLayersFromParts,
|
|
6
8
|
createIkiMcpServer,
|
|
@@ -9,6 +11,7 @@ import {
|
|
|
9
11
|
describeRigPlan,
|
|
10
12
|
formatFoldReport,
|
|
11
13
|
formatMeasureReport,
|
|
14
|
+
formatNodReport,
|
|
12
15
|
formatPhysicsReport,
|
|
13
16
|
formatRigPlanReport,
|
|
14
17
|
formatSweepReport,
|
|
@@ -18,10 +21,12 @@ import {
|
|
|
18
21
|
measureTurnReference,
|
|
19
22
|
renderPoses,
|
|
20
23
|
validateIki
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-576N2JWR.mjs";
|
|
22
25
|
export {
|
|
26
|
+
SWEEP_PRESETS,
|
|
23
27
|
autoRigFromLayers,
|
|
24
28
|
checkModelFolds,
|
|
29
|
+
checkNod,
|
|
25
30
|
checkSweep,
|
|
26
31
|
composeLayersFromParts,
|
|
27
32
|
createIkiMcpServer,
|
|
@@ -30,6 +35,7 @@ export {
|
|
|
30
35
|
describeRigPlan,
|
|
31
36
|
formatFoldReport,
|
|
32
37
|
formatMeasureReport,
|
|
38
|
+
formatNodReport,
|
|
33
39
|
formatPhysicsReport,
|
|
34
40
|
formatRigPlanReport,
|
|
35
41
|
formatSweepReport,
|
|
@@ -2265,7 +2265,8 @@ void main() {
|
|
|
2265
2265
|
}
|
|
2266
2266
|
);
|
|
2267
2267
|
for (let step = 0; step < spec.warmup; step++) {
|
|
2268
|
-
|
|
2268
|
+
for (const [id, v] of Object.entries(spec.steps[0]))
|
|
2269
|
+
p.setParameter(id, v);
|
|
2269
2270
|
motion.update(step * spec.frameMs);
|
|
2270
2271
|
}
|
|
2271
2272
|
const cells = /* @__PURE__ */ new Map();
|
|
@@ -2276,7 +2277,7 @@ void main() {
|
|
|
2276
2277
|
spec,
|
|
2277
2278
|
motion,
|
|
2278
2279
|
cells,
|
|
2279
|
-
kymograph: newCanvas(spec.frame.width, spec.frames * spec.kymograph.band),
|
|
2280
|
+
kymograph: spec.kymograph ? newCanvas(spec.frame.width, spec.frames * spec.kymograph.band) : void 0,
|
|
2280
2281
|
nextStep: 0,
|
|
2281
2282
|
frame: 0
|
|
2282
2283
|
};
|
|
@@ -2287,7 +2288,9 @@ void main() {
|
|
|
2287
2288
|
}
|
|
2288
2289
|
const { spec, motion, cells, kymograph } = sweep;
|
|
2289
2290
|
while (sweep.nextStep <= spec.captureEvery * sweep.frame) {
|
|
2290
|
-
|
|
2291
|
+
for (const [id, v] of Object.entries(spec.steps[sweep.nextStep])) {
|
|
2292
|
+
player.setParameter(id, v);
|
|
2293
|
+
}
|
|
2291
2294
|
motion.update((spec.warmup + sweep.nextStep) * spec.frameMs);
|
|
2292
2295
|
sweep.nextStep++;
|
|
2293
2296
|
}
|
|
@@ -2297,22 +2300,23 @@ void main() {
|
|
|
2297
2300
|
if (cell) {
|
|
2298
2301
|
cell.getContext("2d").drawImage(shot, 0, 0, cell.width, cell.height);
|
|
2299
2302
|
}
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2303
|
+
if (spec.kymograph && kymograph) {
|
|
2304
|
+
const { row, band } = spec.kymograph;
|
|
2305
|
+
kymograph.getContext("2d").drawImage(
|
|
2306
|
+
shot,
|
|
2307
|
+
0,
|
|
2308
|
+
row - Math.floor(band / 2),
|
|
2309
|
+
shot.width,
|
|
2310
|
+
band,
|
|
2311
|
+
0,
|
|
2312
|
+
sweep.frame * band,
|
|
2313
|
+
shot.width,
|
|
2314
|
+
band
|
|
2315
|
+
);
|
|
2316
|
+
}
|
|
2312
2317
|
sweep.frame++;
|
|
2313
|
-
const values = {
|
|
2314
|
-
|
|
2315
|
-
};
|
|
2318
|
+
const values = {};
|
|
2319
|
+
for (const id of spec.parameters) values[id] = player.getParameter(id);
|
|
2316
2320
|
for (const id of spec.physicsOutputs) values[id] = player.getParameter(id);
|
|
2317
2321
|
return { png: shot.toDataURL("image/png"), values };
|
|
2318
2322
|
},
|
|
@@ -2338,7 +2342,7 @@ void main() {
|
|
|
2338
2342
|
});
|
|
2339
2343
|
const out = {
|
|
2340
2344
|
sheet: sheet.toDataURL("image/png"),
|
|
2341
|
-
kymograph: sweep.kymograph
|
|
2345
|
+
kymograph: sweep.kymograph?.toDataURL("image/png")
|
|
2342
2346
|
};
|
|
2343
2347
|
resetParameters(player);
|
|
2344
2348
|
sweep = void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikijs/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "MCP server that lets AI agents build 2D puppet characters: compose AI-drawn part images, check their geometry and auto-rig them into an open .iki model — Iki, the free Live2D alternative.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iki",
|