MCPcopy Create free account
hub / github.com/TomClive/SeeDance2Stitcher / stitchLabel

Function stitchLabel

server.js:349–365  ·  view source on GitHub ↗
(options, tone)

Source from the content-addressed store, hash-verified

347}
348
349function stitchLabel(options, tone) {
350 const parts = [];
351 if (options.trimStart2 > 0) parts.push(`-${options.trimStart2}f start v2`);
352 if (options.trimEnd1 > 0) parts.push(`-${options.trimEnd1}f end v1`);
353 parts.push(options.mode === "blend" ? `blend ${options.blendFrames}f` : "cut");
354 if (options.toneMatch && tone) {
355 const brightness = Math.abs(tone.meanDeltaPct).toFixed(1);
356 const contrast = Math.abs(tone.contrastDeltaPct).toFixed(1);
357 const brightnessDirection = tone.brightnessDelta >= 0 ? "+" : "-";
358 const contrastDirection = tone.contrastRatio >= 1 ? "+" : "-";
359 parts.push(`${brightnessDirection}${brightness}% brightness`);
360 parts.push(`${contrastDirection}${contrast}% contrast`);
361 parts.push(options.toneScope === "full" ? "tone all v2" : `tone ${options.toneFrames}f`);
362 }
363 if (options.interpolate) parts.push("motion interpolation");
364 return `SMOOTH STITCH - ${parts.join(", ")}`;
365}
366
367async function serveFile(res, filePath) {
368 try {

Callers 1

handleExportCollageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected