demoman 0.7.2 → 0.8.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 +6 -3
- package/THIRD_PARTY_NOTICES +1 -1
- package/dist/demoman.mjs +13952 -11067
- package/dist/page/mux-entry.js +7 -5
- package/dist/page/render-entry.js +113 -21
- package/dist/recipe.md +113 -113
- package/dist/skills/record-demo/SKILL.md +5 -2
- package/dist/studio/assets/confirm-dialog-Bcrw3f1a.js +72 -0
- package/dist/studio/assets/{confirm-dialog-Dd_hs1Bv.css → confirm-dialog-DSKBZQdV.css} +1 -1
- package/dist/studio/assets/editor-DUZKtJ2T.js +4 -0
- package/dist/studio/assets/library-BPokDo6m.js +1 -0
- package/dist/studio/assets/{library-inline-2187206c.css → library-inline-216fd6fd.css} +54 -0
- package/dist/studio/assets/settings-RZj4oUzT.js +1 -0
- package/dist/studio/assets/state-tew-ACWl.js +1 -0
- package/dist/studio/assets/{view-DsZQo9AJ.js → view-SxAupNyx.js} +1 -1
- package/dist/studio/editor.html +5 -5
- package/dist/studio/library.html +5 -5
- package/dist/studio/settings.html +4 -4
- package/dist/studio/studio-build.json +3 -3
- package/package.json +1 -1
- package/dist/studio/assets/confirm-dialog-CN_GqXY_.js +0 -72
- package/dist/studio/assets/editor-Cy1V14-4.js +0 -4
- package/dist/studio/assets/library-CQtDqEvE.js +0 -1
- package/dist/studio/assets/settings-C4OPkolR.js +0 -1
- package/dist/studio/assets/state-COWbBf84.js +0 -1
package/dist/page/mux-entry.js
CHANGED
|
@@ -15748,7 +15748,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15748
15748
|
});
|
|
15749
15749
|
|
|
15750
15750
|
// ../../packages/scene-schema/dist/document.js
|
|
15751
|
-
var CURRENT_SCHEMA_VERSION =
|
|
15751
|
+
var CURRENT_SCHEMA_VERSION = 13;
|
|
15752
15752
|
var Rect = external_exports.object({
|
|
15753
15753
|
x: external_exports.number(),
|
|
15754
15754
|
y: external_exports.number(),
|
|
@@ -15997,9 +15997,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15997
15997
|
rect: Rect,
|
|
15998
15998
|
note: external_exports.string().optional(),
|
|
15999
15999
|
/** Both or neither. Neither means the WHOLE take — the migration rule for
|
|
16000
|
-
* every mask written before ranges existed.
|
|
16001
|
-
|
|
16002
|
-
|
|
16000
|
+
* every mask written before ranges existed. In the frames' own time
|
|
16001
|
+
* since v13, as a removed piece is: a redaction follows the frames it
|
|
16002
|
+
* covers through every later cut, gap and hold (audit run 1). */
|
|
16003
|
+
start: SourcePointSchema.optional(),
|
|
16004
|
+
end: SourcePointSchema.optional()
|
|
16003
16005
|
});
|
|
16004
16006
|
var Hold = external_exports.object({
|
|
16005
16007
|
id: external_exports.string().min(1),
|
|
@@ -16361,7 +16363,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16361
16363
|
});
|
|
16362
16364
|
}
|
|
16363
16365
|
}
|
|
16364
|
-
if (m.start !== void 0 && m.end !== void 0 && m.start.actionId === m.end.actionId && m.end.
|
|
16366
|
+
if (m.start !== void 0 && m.end !== void 0 && m.start.actionId === m.end.actionId && m.end.sourceOffsetMs <= m.start.sourceOffsetMs) {
|
|
16365
16367
|
ctx.addIssue({
|
|
16366
16368
|
code: "custom",
|
|
16367
16369
|
message: `mask "${m.id}" ends before it starts`,
|
|
@@ -15979,7 +15979,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15979
15979
|
});
|
|
15980
15980
|
|
|
15981
15981
|
// ../../packages/scene-schema/dist/document.js
|
|
15982
|
-
var CURRENT_SCHEMA_VERSION =
|
|
15982
|
+
var CURRENT_SCHEMA_VERSION = 13;
|
|
15983
15983
|
var Rect = external_exports.object({
|
|
15984
15984
|
x: external_exports.number(),
|
|
15985
15985
|
y: external_exports.number(),
|
|
@@ -16228,9 +16228,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16228
16228
|
rect: Rect,
|
|
16229
16229
|
note: external_exports.string().optional(),
|
|
16230
16230
|
/** Both or neither. Neither means the WHOLE take — the migration rule for
|
|
16231
|
-
* every mask written before ranges existed.
|
|
16232
|
-
|
|
16233
|
-
|
|
16231
|
+
* every mask written before ranges existed. In the frames' own time
|
|
16232
|
+
* since v13, as a removed piece is: a redaction follows the frames it
|
|
16233
|
+
* covers through every later cut, gap and hold (audit run 1). */
|
|
16234
|
+
start: SourcePointSchema.optional(),
|
|
16235
|
+
end: SourcePointSchema.optional()
|
|
16234
16236
|
});
|
|
16235
16237
|
var Hold = external_exports.object({
|
|
16236
16238
|
id: external_exports.string().min(1),
|
|
@@ -16592,7 +16594,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16592
16594
|
});
|
|
16593
16595
|
}
|
|
16594
16596
|
}
|
|
16595
|
-
if (m.start !== void 0 && m.end !== void 0 && m.start.actionId === m.end.actionId && m.end.
|
|
16597
|
+
if (m.start !== void 0 && m.end !== void 0 && m.start.actionId === m.end.actionId && m.end.sourceOffsetMs <= m.start.sourceOffsetMs) {
|
|
16596
16598
|
ctx.addIssue({
|
|
16597
16599
|
code: "custom",
|
|
16598
16600
|
message: `mask "${m.id}" ends before it starts`,
|
|
@@ -17331,6 +17333,46 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17331
17333
|
return null;
|
|
17332
17334
|
return toOutputMs(timeline, sourceMs) + marker.offsetMs;
|
|
17333
17335
|
}
|
|
17336
|
+
function outputSpanOfSource(timeline, srcStartMs, srcEndMs) {
|
|
17337
|
+
let startMs = Number.POSITIVE_INFINITY;
|
|
17338
|
+
let endMs = Number.NEGATIVE_INFINITY;
|
|
17339
|
+
for (const s of timeline.segments) {
|
|
17340
|
+
const lo = Math.max(srcStartMs, s.srcStartMs);
|
|
17341
|
+
const hi = Math.min(srcEndMs, s.srcEndMs);
|
|
17342
|
+
if (lo > hi)
|
|
17343
|
+
continue;
|
|
17344
|
+
const span = s.srcEndMs - s.srcStartMs;
|
|
17345
|
+
const out = (src, still) => span === 0 ? still : s.outStartMs + (s.outEndMs - s.outStartMs) * (src - s.srcStartMs) / span;
|
|
17346
|
+
startMs = Math.min(startMs, out(lo, s.outStartMs));
|
|
17347
|
+
endMs = Math.max(endMs, out(hi, s.outEndMs));
|
|
17348
|
+
}
|
|
17349
|
+
return startMs <= endMs ? { startMs, endMs } : null;
|
|
17350
|
+
}
|
|
17351
|
+
function resolveMaskRange(args) {
|
|
17352
|
+
const { timeline } = args;
|
|
17353
|
+
const unplaced = [];
|
|
17354
|
+
const srcOf = (p, side, ifNone) => {
|
|
17355
|
+
const marker = args.markerSourceMs.get(p.actionId);
|
|
17356
|
+
if (marker === void 0) {
|
|
17357
|
+
unplaced.push(side);
|
|
17358
|
+
return ifNone;
|
|
17359
|
+
}
|
|
17360
|
+
return marker + p.sourceOffsetMs;
|
|
17361
|
+
};
|
|
17362
|
+
const srcStart = srcOf(args.start, "start", 0);
|
|
17363
|
+
const srcEnd = srcOf(args.end, "end", timeline.sourceDurationMs);
|
|
17364
|
+
const span = outputSpanOfSource(timeline, srcStart, srcEnd);
|
|
17365
|
+
if (span !== null && span.endMs > span.startMs) {
|
|
17366
|
+
return { range: span, unplaced, clamped: null };
|
|
17367
|
+
}
|
|
17368
|
+
const at = span?.startMs ?? clamp(toOutputMs(timeline, srcStart), 0, timeline.outputDurationMs);
|
|
17369
|
+
const note = srcEnd < srcStart ? `mask "${args.id}" ends ${Math.round(srcStart - srcEnd)}ms before it starts in the recording, so it covers nothing` : `mask "${args.id}" covers no frame of the video: every frame between its ends was removed`;
|
|
17370
|
+
return {
|
|
17371
|
+
range: { startMs: at, endMs: at },
|
|
17372
|
+
unplaced,
|
|
17373
|
+
clamped: { id: args.id, kind: "mask", note }
|
|
17374
|
+
};
|
|
17375
|
+
}
|
|
17334
17376
|
function resolveRange(args) {
|
|
17335
17377
|
const { timeline } = args;
|
|
17336
17378
|
const duration3 = timeline.outputDurationMs;
|
|
@@ -17926,15 +17968,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17926
17968
|
var COMPOSITOR_VERSION = "1.1.0";
|
|
17927
17969
|
|
|
17928
17970
|
// ../../packages/compositor/dist/plan/cosmetics.js
|
|
17929
|
-
function planCosmetics(scene
|
|
17930
|
-
return scene.edits.masks.
|
|
17931
|
-
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
|
|
17935
|
-
}
|
|
17936
|
-
|
|
17937
|
-
});
|
|
17971
|
+
function planCosmetics(scene) {
|
|
17972
|
+
return scene.edits.masks.map((m) => ({
|
|
17973
|
+
id: m.id,
|
|
17974
|
+
kind: "mask",
|
|
17975
|
+
rect: m.rect,
|
|
17976
|
+
// Both or neither, by the schema's refinement. Neither is the whole take.
|
|
17977
|
+
range: m.start && m.end ? { start: m.start, end: m.end } : null
|
|
17978
|
+
}));
|
|
17938
17979
|
}
|
|
17939
17980
|
|
|
17940
17981
|
// ../../packages/compositor/dist/plan/plan.js
|
|
@@ -18007,7 +18048,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18007
18048
|
// the author never recorded.
|
|
18008
18049
|
cursorSegments: planCursorSegments(scene, rectOf),
|
|
18009
18050
|
cameraIntents: planCameraIntents(scene, cutSteps, attachedToCuts),
|
|
18010
|
-
cosmetics: planCosmetics(scene
|
|
18051
|
+
cosmetics: planCosmetics(scene),
|
|
18011
18052
|
holds: (scene.edits.holds ?? []).flatMap((hold) => {
|
|
18012
18053
|
if (cutSteps.has(hold.marker.actionId)) {
|
|
18013
18054
|
attachedToCuts.push({
|
|
@@ -19068,9 +19109,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19068
19109
|
let range = null;
|
|
19069
19110
|
let unplaced = [];
|
|
19070
19111
|
if (binding.range) {
|
|
19071
|
-
const resolved =
|
|
19112
|
+
const resolved = resolveMaskRange({
|
|
19072
19113
|
id: binding.id,
|
|
19073
|
-
kind: "mask",
|
|
19074
19114
|
start: binding.range.start,
|
|
19075
19115
|
end: binding.range.end,
|
|
19076
19116
|
timeline,
|
|
@@ -19118,6 +19158,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19118
19158
|
throw new Error("frame bundle has no keyframes; cannot resolve a frame");
|
|
19119
19159
|
return keyframe;
|
|
19120
19160
|
}
|
|
19161
|
+
function keyframesBetween(bundle, fromMs, toMs) {
|
|
19162
|
+
const first = keyframeAt(bundle, fromMs);
|
|
19163
|
+
return bundle.keyframes.filter((k) => k === first || k.sourceTimeMs > fromMs && k.sourceTimeMs <= toMs);
|
|
19164
|
+
}
|
|
19121
19165
|
|
|
19122
19166
|
// ../../packages/compositor/dist/ports/frame-source-images.js
|
|
19123
19167
|
function createImageFrameSource(bundle, load2) {
|
|
@@ -19141,6 +19185,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19141
19185
|
const image = await get(keyframe.ref);
|
|
19142
19186
|
return { ...image, sourceTimeMs: keyframe.sourceTimeMs };
|
|
19143
19187
|
},
|
|
19188
|
+
warm(fromSourceMs, toSourceMs2) {
|
|
19189
|
+
for (const keyframe of keyframesBetween(bundle, fromSourceMs, toSourceMs2)) {
|
|
19190
|
+
get(keyframe.ref).catch(() => void 0);
|
|
19191
|
+
}
|
|
19192
|
+
},
|
|
19144
19193
|
describe: () => ({
|
|
19145
19194
|
keyframes: bundle.keyframes,
|
|
19146
19195
|
motionSpans: bundle.motionSpans
|
|
@@ -46568,6 +46617,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
46568
46617
|
sourceTimeMs: keyframe.sourceTimeMs
|
|
46569
46618
|
};
|
|
46570
46619
|
},
|
|
46620
|
+
warm(fromSourceMs, toSourceMs2) {
|
|
46621
|
+
for (const keyframe of keyframesBetween(bundle, fromSourceMs, toSourceMs2)) {
|
|
46622
|
+
still(keyframe.ref).catch(() => void 0);
|
|
46623
|
+
}
|
|
46624
|
+
},
|
|
46571
46625
|
describe: () => ({
|
|
46572
46626
|
keyframes: bundle.keyframes,
|
|
46573
46627
|
motionSpans: bundle.motionSpans
|
|
@@ -48156,6 +48210,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
48156
48210
|
};
|
|
48157
48211
|
}
|
|
48158
48212
|
var outputs = [];
|
|
48213
|
+
function softwareEncoded(target) {
|
|
48214
|
+
return {
|
|
48215
|
+
...target,
|
|
48216
|
+
encoder: {
|
|
48217
|
+
...target.encoder,
|
|
48218
|
+
hardwareAcceleration: target.encoder?.hardwareAcceleration ?? "prefer-software"
|
|
48219
|
+
}
|
|
48220
|
+
};
|
|
48221
|
+
}
|
|
48159
48222
|
async function render(manifest) {
|
|
48160
48223
|
const { scene, bundle, target, fileType } = manifest;
|
|
48161
48224
|
let logo = null;
|
|
@@ -48170,22 +48233,51 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
48170
48233
|
}
|
|
48171
48234
|
}
|
|
48172
48235
|
const report = globalThis[RENDER_PROGRESS_BINDING];
|
|
48236
|
+
const started = performance.now();
|
|
48237
|
+
const source = await framesFor(bundle, load);
|
|
48238
|
+
let framesMs = 0;
|
|
48239
|
+
let frameReads = 0;
|
|
48240
|
+
const frames = {
|
|
48241
|
+
at: async (ms) => {
|
|
48242
|
+
const t = performance.now();
|
|
48243
|
+
try {
|
|
48244
|
+
return await source.at(ms);
|
|
48245
|
+
} finally {
|
|
48246
|
+
framesMs += performance.now() - t;
|
|
48247
|
+
frameReads++;
|
|
48248
|
+
}
|
|
48249
|
+
},
|
|
48250
|
+
describe: () => source.describe(),
|
|
48251
|
+
...source.close === void 0 ? {} : { close: () => source.close?.() },
|
|
48252
|
+
...source.warm === void 0 ? {} : { warm: (from, to) => source.warm?.(from, to) },
|
|
48253
|
+
...source.unavailable === void 0 ? {} : { unavailable: () => source.unavailable?.() ?? [] }
|
|
48254
|
+
};
|
|
48173
48255
|
const { files, facts } = await renderOutput({
|
|
48174
48256
|
fileType,
|
|
48175
|
-
target,
|
|
48257
|
+
target: softwareEncoded(target),
|
|
48176
48258
|
scene,
|
|
48177
48259
|
bundle,
|
|
48178
|
-
frames
|
|
48260
|
+
frames,
|
|
48179
48261
|
logo,
|
|
48180
48262
|
...manifest.gifBudget === void 0 ? {} : { gifBudget: manifest.gifBudget },
|
|
48181
|
-
...manifest.mp4Cap === void 0 ? {} : {
|
|
48263
|
+
...manifest.mp4Cap === void 0 ? {} : {
|
|
48264
|
+
mp4Cap: {
|
|
48265
|
+
...manifest.mp4Cap,
|
|
48266
|
+
share: softwareEncoded(manifest.mp4Cap.share)
|
|
48267
|
+
}
|
|
48268
|
+
},
|
|
48182
48269
|
...manifest.stills === void 0 ? {} : { stills: manifest.stills },
|
|
48183
48270
|
onFrame: wholePercent((done, total, width, pass) => width === void 0 ? report?.(done, total) : pass === void 0 ? report?.(done, total, width) : report?.(done, total, width, pass))
|
|
48184
48271
|
});
|
|
48185
48272
|
outputs = files.map((f) => f.bytes);
|
|
48186
48273
|
return {
|
|
48187
48274
|
...facts,
|
|
48188
|
-
files: files.map((f) => ({ name: f.name, byteLength: f.bytes.byteLength }))
|
|
48275
|
+
files: files.map((f) => ({ name: f.name, byteLength: f.bytes.byteLength })),
|
|
48276
|
+
timing: {
|
|
48277
|
+
renderMs: performance.now() - started,
|
|
48278
|
+
framesMs,
|
|
48279
|
+
frameReads
|
|
48280
|
+
}
|
|
48189
48281
|
};
|
|
48190
48282
|
}
|
|
48191
48283
|
function readChunk(index, offset, length2) {
|