pixi-effects 0.47.1 → 0.47.3
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/CHANGELOG.md +23 -0
- package/README.md +5 -5
- package/ai/chat-template.html +3 -3
- package/dist/Composition-6TXRN65C.js +7 -0
- package/dist/{Composition-ME3L3EFT.js.map → Composition-6TXRN65C.js.map} +1 -1
- package/dist/Composition-IC274CKO.cjs +16 -0
- package/dist/{Composition-AZEATHJB.cjs.map → Composition-IC274CKO.cjs.map} +1 -1
- package/dist/{Spans-YV7K4X5I.js → Spans-3T6ZEEN4.js} +6 -6
- package/dist/{Spans-YV7K4X5I.js.map → Spans-3T6ZEEN4.js.map} +1 -1
- package/dist/{Spans-LTKEUHDN.cjs → Spans-M5KMHT6K.cjs} +11 -11
- package/dist/{Spans-LTKEUHDN.cjs.map → Spans-M5KMHT6K.cjs.map} +1 -1
- package/dist/{blendModes-56NHK2MP.js → blendModes-S72MBYKY.js} +4 -4
- package/dist/{blendModes-56NHK2MP.js.map → blendModes-S72MBYKY.js.map} +1 -1
- package/dist/{blendModes-ONOPMMAB.cjs → blendModes-Y56QAMC4.cjs} +5 -5
- package/dist/{blendModes-ONOPMMAB.cjs.map → blendModes-Y56QAMC4.cjs.map} +1 -1
- package/dist/{chunk-4NOTVQ3I.cjs → chunk-33OVRSXF.cjs} +29 -29
- package/dist/{chunk-4NOTVQ3I.cjs.map → chunk-33OVRSXF.cjs.map} +1 -1
- package/dist/{chunk-OVTTCX2E.js → chunk-6LA7W362.js} +136 -64
- package/dist/chunk-6LA7W362.js.map +1 -0
- package/dist/{chunk-7IDEWQPH.js → chunk-G4PXCV2B.js} +12 -8
- package/dist/chunk-G4PXCV2B.js.map +1 -0
- package/dist/{chunk-BFERTUXK.cjs → chunk-GDY56V74.cjs} +92 -92
- package/dist/{chunk-BFERTUXK.cjs.map → chunk-GDY56V74.cjs.map} +1 -1
- package/dist/{chunk-6MHJKCXO.js → chunk-HGKXEPDJ.js} +5 -5
- package/dist/{chunk-6MHJKCXO.js.map → chunk-HGKXEPDJ.js.map} +1 -1
- package/dist/{chunk-QMVK55LC.js → chunk-HX73PCVU.js} +5 -5
- package/dist/{chunk-QMVK55LC.js.map → chunk-HX73PCVU.js.map} +1 -1
- package/dist/{chunk-NVKHUAHU.js → chunk-JVO2W77G.js} +5 -5
- package/dist/chunk-JVO2W77G.js.map +1 -0
- package/dist/{chunk-UTDELFOU.js → chunk-PC7DFDCV.js} +4 -4
- package/dist/{chunk-UTDELFOU.js.map → chunk-PC7DFDCV.js.map} +1 -1
- package/dist/{chunk-53DXJEO7.cjs → chunk-RU4N3B5B.cjs} +5 -5
- package/dist/{chunk-53DXJEO7.cjs.map → chunk-RU4N3B5B.cjs.map} +1 -1
- package/dist/{chunk-YXIEPTFG.cjs → chunk-VTGJRKW4.cjs} +182 -110
- package/dist/chunk-VTGJRKW4.cjs.map +1 -0
- package/dist/{chunk-NEMWRJQS.cjs → chunk-YSTOH5PC.cjs} +5 -5
- package/dist/chunk-YSTOH5PC.cjs.map +1 -0
- package/dist/{chunk-SMHTOWXG.cjs → chunk-ZAHCGFGC.cjs} +12 -8
- package/dist/chunk-ZAHCGFGC.cjs.map +1 -0
- package/dist/index.cjs +37 -37
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -6
- package/dist/loader.css +1 -1
- package/dist/present.cjs +6 -6
- package/dist/present.js +6 -6
- package/dist/sound.cjs +2 -2
- package/dist/sound.js +1 -1
- package/dist/three.cjs +93 -26
- package/dist/three.cjs.map +1 -1
- package/dist/three.d.cts +19 -4
- package/dist/three.d.ts +19 -4
- package/dist/three.js +89 -22
- package/dist/three.js.map +1 -1
- package/docs/dsl.md +9 -4
- package/llms-full.txt +12 -7
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +1 -1
- package/skills/pixi-effects/reference/cheatsheet.md +1 -1
- package/skills/pixi-effects/reference/recipes.md +1 -1
- package/skills/pixi-effects/template.html +6 -6
- package/dist/Composition-AZEATHJB.cjs +0 -16
- package/dist/Composition-ME3L3EFT.js +0 -7
- package/dist/chunk-7IDEWQPH.js.map +0 -1
- package/dist/chunk-NEMWRJQS.cjs.map +0 -1
- package/dist/chunk-NVKHUAHU.js.map +0 -1
- package/dist/chunk-OVTTCX2E.js.map +0 -1
- package/dist/chunk-SMHTOWXG.cjs.map +0 -1
- package/dist/chunk-YXIEPTFG.cjs.map +0 -1
|
@@ -316,10 +316,10 @@ function lintKeys(spec, warn = defaultWarn) {
|
|
|
316
316
|
}
|
|
317
317
|
if (spec.type === "audio" && SFX_KNOBS.has(key) && spec.sfx !== void 0) {
|
|
318
318
|
const sfx = spec.sfx;
|
|
319
|
-
const preset = typeof sfx === "string" ? sfx : sfx?.preset;
|
|
320
319
|
const v = spec[key];
|
|
321
320
|
const shown = typeof v === "number" || typeof v === "string" && v.length <= 24 ? JSON.stringify(v) : "\u2026";
|
|
322
|
-
|
|
321
|
+
const where = typeof sfx === "string" ? `sfx: { preset: '${sfx}', ${key}: ${shown} }` : `inside the sfx object you have (sfx: { \u2026, ${key}: ${shown} })`;
|
|
322
|
+
warn(`pixi-effects: ${who}: "${key}" is a knob of the sound effect, so it is ignored beside \`sfx\`: write it ${where}${key === "pitch" ? " (pitch is in semitones, \xB124: 12 is an octave up)" : key === "brightness" ? " (brightness is \u22121 dark \u2026 1 bright)" : ""}`);
|
|
323
323
|
continue;
|
|
324
324
|
}
|
|
325
325
|
if (TRANSFORM_KEYS.has(key) || PROP_KEYS.has(key) && kindsWithKey(key).length === 0) {
|
|
@@ -332,7 +332,7 @@ function lintKeys(spec, warn = defaultWarn) {
|
|
|
332
332
|
const owners = kindsWithKey(key);
|
|
333
333
|
const belongs = owners.length ? ` (it belongs to ${owners.slice(0, 3).join(", ")})` : "";
|
|
334
334
|
const hint = guess ? ` \u2014 did you mean "${guess}"?${belongs}` : belongs;
|
|
335
|
-
warn(`pixi-effects: ${who}: "${key}" is not a ${kindName(spec)} key${hint}. Valid keys: ${valid.join(", ")}`);
|
|
335
|
+
warn(`pixi-effects: ${who}: "${key}" is not a ${kindName(spec)} key${hint}${/[?.)]$/.test(hint) ? " " : ". "}Valid keys: ${valid.join(", ")}`);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
for (const { key, why } of pictureKeysIgnored(spec)) warn(`pixi-effects: ${who}: "${key}" does nothing on ${why}`);
|
|
@@ -363,5 +363,5 @@ exports.lintKeys = lintKeys;
|
|
|
363
363
|
exports.lintText = lintText;
|
|
364
364
|
exports.lintTiming = lintTiming;
|
|
365
365
|
exports.summarizeWarnings = summarizeWarnings;
|
|
366
|
-
//# sourceMappingURL=chunk-
|
|
367
|
-
//# sourceMappingURL=chunk-
|
|
366
|
+
//# sourceMappingURL=chunk-YSTOH5PC.cjs.map
|
|
367
|
+
//# sourceMappingURL=chunk-YSTOH5PC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/space/specKeys.ts","../src/core/layerKeys.ts","../src/core/lint.ts"],"names":["suggestName"],"mappings":";;;;;AAGO,SAAS,gBAAgB,IAAA,EAGhB;AACd,EAAA,MAAM,GAAA,uBAAU,GAAA,EAAY;AAC5B,EAAA,KAAA,MAAW,CAAA,IAAK,MAAA,CAAO,IAAA,CAAK,IAAA,CAAK,OAAA,IAAW,EAAE,CAAA,EAAG,GAAA,CAAI,GAAA,CAAI,CAAC,CAAA;AAC1D,EAAA,KAAA,MAAW,EAAA,IAAM,IAAA,CAAK,SAAA,IAAa,EAAC,EAAG;AACrC,IAAA,KAAA,MAAW,GAAA,IAAO,CAAC,EAAA,CAAG,GAAA,EAAK,GAAG,EAAA,EAAI,EAAA,CAAG,IAAI,CAAA,EAAG;AAC1C,MAAA,KAAA,MAAW,CAAA,IAAK,OAAO,IAAA,CAAK,GAAA,IAAO,EAAE,CAAA,EAAG,GAAA,CAAI,GAAA,CAAI,CAAC,CAAA;AAAA,IACnD;AAAA,EACF;AACA,EAA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AiB,GAAG,CAAA,GAAA,EAAM,GAAG,CAAA,+BAAA,EAAkC,QAAQ,CAAA,sBAAA,EAAoB,KAAK,CAAA,EAAA,CAAA,GAAO,EAAE,CAAA,2FAAA,CAA6F,CAAA;AAAA,IAC7M;AAAA,EACF;AACA,EAAA,IAAI,IAAA,CAAK,SAAS,MAAA,IAAU,IAAA,CAAK,SAAS,OAAO,IAAA,CAAK,UAAU,QAAA,EAAU;AACxE,IAAA,KAAA,MAAW,GAAA,IAAO,MAAA,CAAO,IAAA,CAAK,IAAA,CAAK,KAAK,CAAA,EAAG;AACzC,MAAA,IAAI,UAAA,CAAW,SAAS,GAAG,CAAA,IAAM,KAAK,KAAA,CAAkC,GAAG,MAAM,MAAA,EAAW;AAC5F,MAAA,MAAM,KAAA,GAAQA,6BAAA,CAAY,GAAA,EAAK,UAAU,CAAA;AACzC,MAAA,IAAA,CAAK,CAAA,cAAA,EAAiB,GAAG,CAAA,QAAA,EAAW,GAAG,2BAA2B,KAAA,GAAQ,CAAA,sBAAA,EAAoB,KAAK,CAAA,EAAA,CAAA,GAAO,EAAE,CAAA,wBAAA,EAA2B,UAAA,CAAW,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,IAChK;AAAA,EACF;AACF","file":"chunk-YSTOH5PC.cjs","sourcesContent":["import type { Keyframe } from '../types';\n\n/** Every prop key a spec touches in `initial` and in keyframe `set` / `to` / `from`. */\nexport function collectPropKeys(spec: {\n initial?: Record<string, unknown>;\n keyframes?: Keyframe[];\n}): Set<string> {\n const out = new Set<string>();\n for (const k of Object.keys(spec.initial ?? {})) out.add(k);\n for (const kf of spec.keyframes ?? []) {\n for (const bag of [kf.set, kf.to, kf.from]) {\n for (const k of Object.keys(bag ?? {})) out.add(k);\n }\n }\n return out;\n}\n","import type {\n SequenceCommon, VideoSequenceSpec, ImageSequenceSpec, TextSequenceSpec, AudioAssetSpec, AudioSfxSpec, AudioMusicSpec,\n CompositionSequenceSpec, CameraSequenceSpec, LightSequenceSpec, ShaderSequenceSpec, CanvasSequenceSpec, NullSequenceSpec, SequenceSpec,\n RectShapeSpec, CircleShapeSpec, EllipseShapeSpec, ArcShapeSpec, LineShapeSpec, PolygonShapeSpec, PathShapeSpec,\n} from '../types';\n\n/**\n * The keys a layer of each kind may have, for `lintKeys`. They are tables of names, so each one is checked against its type twice, by\n * the compiler: `satisfies` rejects a name the type does not have, and `Covers` fails the build when the type has a key the table lacks\n * (add a key to a spec type and `tsc` tells you to add it here, so the warning never calls a real key unknown).\n */\ntype KeysOfUnion<T> = T extends unknown ? keyof T : never;\ntype Covers<T, K extends readonly string[]> = [Exclude<KeysOfUnion<T>, K[number]>] extends [never] ? true : { missing: Exclude<KeysOfUnion<T>, K[number]> };\ntype Assert<T extends true> = T;\n\nconst COMMON = ['type', 'name', 'parent', 'at', 'duration', 'initial', 'keyframes', 'filters', 'filterArea', 'mask', 'blendMode', 'threeD', 'hideBehindCamera', 'lit', 'castsShadows'] as const satisfies readonly KeysOfUnion<SequenceCommon | { type: string }>[];\n\nconst VIDEO = [...COMMON, 'asset', 'loop', 'audio', 'volume', 'speed'] as const satisfies readonly KeysOfUnion<VideoSequenceSpec>[];\nconst IMAGE = [...COMMON, 'asset', 'colorSpace', 'scaleMode'] as const satisfies readonly KeysOfUnion<ImageSequenceSpec>[];\nconst TEXT = [...COMMON, 'text', 'spans', 'format', 'resolution', 'style', 'colorSpace', 'fillGradient'] as const satisfies readonly KeysOfUnion<TextSequenceSpec>[];\nconst AUDIO = [...COMMON, 'volume', 'asset', 'loop', 'sfx', 'music', 'speed'] as const satisfies readonly KeysOfUnion<AudioAssetSpec | AudioSfxSpec | AudioMusicSpec>[];\nconst COMPOSITION = [...COMMON, 'width', 'height', 'sequences', 'transitions', 'speed'] as const satisfies readonly KeysOfUnion<CompositionSequenceSpec>[];\nconst CAMERA = [...COMMON] as const satisfies readonly KeysOfUnion<CameraSequenceSpec>[];\nconst LIGHT = [...COMMON, 'kind', 'falloff'] as const satisfies readonly KeysOfUnion<LightSequenceSpec>[];\nconst SHADER = [...COMMON, 'fragment', 'uniforms', 'width', 'height', 'resolution', 'transparent'] as const satisfies readonly KeysOfUnion<ShaderSequenceSpec>[];\nconst CANVAS = [...COMMON, 'draw', 'setup', 'width', 'height', 'resolution', 'params', 'seed', 'smoothing'] as const satisfies readonly KeysOfUnion<CanvasSequenceSpec>[];\nconst NULL = [...COMMON] as const satisfies readonly KeysOfUnion<NullSequenceSpec>[];\n\nconst SHAPE = [...COMMON, 'shape', 'fillGradient', 'colorSpace', 'strokeCap', 'strokeJoin'] as const;\nconst TRIM = ['trimStart', 'trimEnd', 'trimEach'] as const;\nconst RECT = [...SHAPE, ...TRIM, 'width', 'height', 'cornerRadius', 'anchorX', 'anchorY'] as const satisfies readonly KeysOfUnion<RectShapeSpec>[];\nconst CIRCLE = [...SHAPE, ...TRIM, 'radius', 'anchorX', 'anchorY'] as const satisfies readonly KeysOfUnion<CircleShapeSpec>[];\nconst ELLIPSE = [...SHAPE, ...TRIM, 'radiusX', 'radiusY', 'anchorX', 'anchorY'] as const satisfies readonly KeysOfUnion<EllipseShapeSpec>[];\nconst ARC = [...SHAPE, 'radius', 'innerRadius', 'startAngle', 'endAngle'] as const satisfies readonly KeysOfUnion<ArcShapeSpec>[];\nconst LINE = [...SHAPE, ...TRIM, 'from', 'to'] as const satisfies readonly KeysOfUnion<LineShapeSpec>[];\nconst POLYGON = [...SHAPE, ...TRIM, 'points', 'open'] as const satisfies readonly KeysOfUnion<PolygonShapeSpec>[];\nconst PATH = [...SHAPE, ...TRIM, 'd', 'fillRule', 'morphTo', 'morph', 'morphPoints'] as const satisfies readonly KeysOfUnion<PathShapeSpec>[];\n\n/** The compiler checks every table covers its type (this type is never used: it exists to fail the build). */\nexport type __Covered = [\n Assert<Covers<VideoSequenceSpec, typeof VIDEO>>, Assert<Covers<ImageSequenceSpec, typeof IMAGE>>, Assert<Covers<TextSequenceSpec, typeof TEXT>>,\n Assert<Covers<AudioAssetSpec | AudioSfxSpec | AudioMusicSpec, typeof AUDIO>>, Assert<Covers<CompositionSequenceSpec, typeof COMPOSITION>>,\n Assert<Covers<CameraSequenceSpec, typeof CAMERA>>, Assert<Covers<LightSequenceSpec, typeof LIGHT>>, Assert<Covers<ShaderSequenceSpec, typeof SHADER>>, Assert<Covers<CanvasSequenceSpec, typeof CANVAS>>, Assert<Covers<NullSequenceSpec, typeof NULL>>,\n Assert<Covers<RectShapeSpec, typeof RECT>>, Assert<Covers<CircleShapeSpec, typeof CIRCLE>>, Assert<Covers<EllipseShapeSpec, typeof ELLIPSE>>,\n Assert<Covers<ArcShapeSpec, typeof ARC>>, Assert<Covers<LineShapeSpec, typeof LINE>>, Assert<Covers<PolygonShapeSpec, typeof POLYGON>>,\n Assert<Covers<PathShapeSpec, typeof PATH>>,\n];\n\nconst SHAPES: Record<string, readonly string[]> = { rect: RECT, circle: CIRCLE, ellipse: ELLIPSE, arc: ARC, line: LINE, polygon: POLYGON, path: PATH };\nconst BY_TYPE: Record<string, readonly string[]> = { video: VIDEO, image: IMAGE, text: TEXT, audio: AUDIO, composition: COMPOSITION, camera: CAMERA, light: LIGHT, shader: SHADER, canvas: CANVAS, null: NULL };\n\n/** The keys that shape what is drawn: a layer that is never drawn (audio, a camera, a light) accepts them in its type but they do nothing there. */\nconst PICTURE_KEYS = ['filters', 'filterArea', 'mask', 'blendMode', 'threeD', 'hideBehindCamera', 'lit', 'castsShadows'] as const;\nconst NOT_DRAWN: Record<string, string> = {\n audio: 'an audio layer: it is not drawn (it plays)',\n camera: 'a camera layer: it is not drawn, it frames the picture (its place and lens go in `initial` / `keyframes`: x y z lookAtX … fov)',\n light: 'a light layer: it is not drawn, it lights `threeD` layers (its numbers go in `initial` / `keyframes`: intensity color …)',\n};\n\n/** For a layer that is never drawn: the picture keys it carries, each with what the layer is (the keys do nothing there). A light keeps `castsShadows`, its own switch. */\nexport function pictureKeysIgnored(spec: { type: string } & Record<string, unknown>): Array<{ key: string; why: string }> {\n const why = NOT_DRAWN[spec.type];\n if (!why) return [];\n return PICTURE_KEYS.filter(k => spec[k] !== undefined && !(spec.type === 'light' && k === 'castsShadows')).map(key => ({ key, why }));\n}\n\n/** What a layer may be called, for the message: `text layer`, `rect shape`. */\nexport function kindName(spec: { type: string; shape?: string }): string {\n return spec.type === 'shape' && spec.shape ? `${spec.shape} shape` : `${spec.type} layer`;\n}\n\n/** The keys a layer may have, or null for a kind this library does not know (a `three` layer: registered elsewhere, so not checked). */\nexport function layerKeys(spec: { type: string; shape?: string }): readonly string[] | null {\n if (spec.type === 'shape') return (spec.shape && SHAPES[spec.shape]) || null;\n return BY_TYPE[spec.type] ?? null;\n}\n\n/** Which kinds have `key` (for \"it belongs to a circle shape\"). */\nexport function kindsWithKey(key: string): string[] {\n const out: string[] = [];\n for (const [shape, keys] of Object.entries(SHAPES)) if (keys.includes(key)) out.push(`${shape} shape`);\n for (const [type, keys] of Object.entries(BY_TYPE)) if (keys.includes(key)) out.push(`${type} layer`);\n return out;\n}\n\n/** Names a keyframe or `initial` may animate. Dotted paths (`filters.g.amount`, `three.box.x`) belong to their routers and are not looked up here. */\nexport const PROP_KEYS: ReadonlySet<string> = new Set([\n // transform and look\n 'x', 'y', 'z', 'alpha', 'rotation', 'rotationX', 'rotationY', 'width', 'height', 'visible', 'autoAlpha',\n 'scale', 'scaleX', 'scaleY', 'anchor', 'anchorX', 'anchorY', 'pivot', 'pivotX', 'pivotY', 'skew', 'skewX', 'skewY',\n 'position', 'positionX', 'positionY', 'tilePosition', 'tilePositionX', 'tilePositionY', 'tileScale', 'tileScaleX', 'tileScaleY', 'tint',\n // shapes\n 'fillColor', 'fillAlpha', 'strokeColor', 'strokeAlpha', 'strokeWidth', 'cornerRadius', 'radius', 'radiusX', 'radiusY',\n 'innerRadius', 'startAngle', 'endAngle', 'trimStart', 'trimEnd', 'trimEach', 'morph', 'fillGradient', 'strokeCap', 'strokeJoin',\n // text, audio, video\n 'fill', 'value', 'visibleChars', 'text', 'volume', 'time',\n // camera\n 'lookAtX', 'lookAtY', 'lookAtZ', 'fov', 'focus', 'aperture', 'offsetX', 'offsetY', 'offsetZ', 'lookOffsetX', 'lookOffsetY', 'lookOffsetZ',\n // light + fog\n 'intensity', 'color', 'coneAngle', 'coneFeather', 'falloffDistance', 'shadowDarkness', 'shadowDiffusion', 'fogNear', 'fogFar', 'fogColor', 'fogAmount',\n]);\n\n/** The text `style` keys (PixiJS TextStyle) that this library passes on. */\nexport const STYLE_KEYS: readonly string[] = [\n 'fontSize', 'fontFamily', 'fontWeight', 'fontStyle', 'fontVariant', 'fill', 'stroke', 'dropShadow', 'letterSpacing', 'lineHeight', 'leading',\n 'align', 'wordWrap', 'wordWrapWidth', 'breakWords', 'whiteSpace', 'padding', 'textBaseline', 'trim', 'lineJoin', 'miterLimit', 'filters', 'tagStyles',\n];\n\nexport type { SequenceSpec };\n","import type { SequenceSpec } from '../types';\nimport { collectPropKeys } from '../space/specKeys';\nimport { suggestName } from './options';\nimport { layerKeys, kindName, kindsWithKey, pictureKeysIgnored, PROP_KEYS, STYLE_KEYS } from './layerKeys';\n\ntype Warn = (message: string, kind?: 'late-keyframe') => void;\nconst defaultWarn: Warn = m => console.warn(m);\n\n/** \"layer \"name\"\" or \"unnamed text layer\" — how warnings refer to a sequence. */\nexport function describeLayer(spec: { name?: string; type: string }): string {\n return spec.name ? `layer \"${spec.name}\"` : `unnamed ${spec.type} layer`;\n}\n\n/**\n * Timing mistakes that otherwise fail silently: a layer that starts after its\n * composition has ended, or a keyframe that starts after its own layer has\n * ended (the usual cause: writing keyframe `at` in composition time instead of\n * time since the start of the layer).\n */\nexport function lintTiming(spec: SequenceSpec, parentDuration: number, warn: Warn = defaultWarn): void {\n const who = describeLayer(spec);\n const at = spec.at ?? 0;\n if (at >= parentDuration) {\n warn(`pixi-effects: ${who} starts at ${at}s, after its composition ends (${parentDuration}s), so it is never visible`);\n }\n // An sfx or a piece of music without a duration is as long as its sound, which only the audio layer knows (it checks its own keyframes).\n if (spec.type === 'audio' && ((spec as { sfx?: unknown }).sfx !== undefined || (spec as { music?: unknown }).music !== undefined) && spec.duration === undefined) return;\n if (at >= parentDuration) return; // never visible: said above, and its keyframes say nothing more\n const lives = spec.duration ?? Math.max(0, parentDuration - at); // without a duration a layer lives until its composition ends\n const ms = (x: number) => Math.round(x * 1000) / 1000;\n (spec.keyframes ?? []).forEach((kf, i) => {\n const kat = kf.at ?? 0;\n if (kat >= lives) {\n warn(\n `pixi-effects: ${who}: keyframes[${i}] starts at ${kat}s, after the layer ends (duration ${ms(lives)}s), so it never plays. ` +\n `Keyframe \\`at\\` is measured from the start of this layer, not from the start of the composition.`,\n 'late-keyframe',\n );\n return;\n }\n // Starts in time but is cut off by the layer's end: a FADE (to alpha 0 or 1, or from 0 / 1) that never finishes (a trial: a fade-out that stopped half way, a 1.2 s fade-in on a 0.6 s layer).\n // Not a drift, a fall, a zoom or a decaying glow (to 0.22) that is still going when its layer ends: those are common and on purpose. A `set` is instant, a repeating tween\n // (a blink) and a spring ('auto') are meant to run over, and a cut of under 0.2 s (a few frames: the last keyframe of a generated loop) is nothing.\n const length = kf.duration;\n // a fade ends (almost) opaque or (almost) clear: `to` alpha, or, when only `from` names alpha, the value it fades from (a fade-in `from: { alpha: 0 }` ends where it was)\n const toAlpha = (kf.to as Record<string, unknown> | undefined)?.alpha;\n const fromAlpha = (kf.from as Record<string, unknown> | undefined)?.alpha;\n const nearEnd = (v: unknown) => typeof v === 'number' && (v <= 0.1 || v >= 0.9);\n const fade = toAlpha !== undefined ? nearEnd(toAlpha) : nearEnd(fromAlpha);\n if (fade && typeof length === 'number' && length > 0 && !kf.repeat) {\n const start = kat < 0 ? lives + kat : kat; // a negative `at` counts back from the end of the layer\n const cut = (start + length - lives) / length;\n if (start >= 0 && cut > 0.25 && cut * length >= 0.2) {\n warn(\n `pixi-effects: ${who}: keyframes[${i}] runs from ${ms(start)}s to ${ms(start + length)}s but the layer ends at ${ms(lives)}s, so the last ${Math.round(cut * 100)}% of it never plays ` +\n `(a fade stops half way). Keyframe \\`at\\` is measured from the start of this layer: start it earlier, make it shorter, or make the layer longer.`,\n 'late-keyframe',\n );\n }\n }\n });\n}\n\n/**\n * A loop that builds a hundred layers makes the same mistake a hundred times. Print the first few in full and\n * say how many more there are: the rest are the same loop.\n */\nexport function summarizeWarnings(messages: string[], shown = 3): string[] {\n if (messages.length <= shown) return messages;\n return [...messages.slice(0, shown), `pixi-effects: ${messages.length - shown} more layers with the same problem (the same loop or helper is probably building them): fix the ones above and these go away.`];\n}\n\n/** A text layer that animates `value` but has nowhere to print it. */\nexport function lintText(spec: SequenceSpec, warn: Warn = defaultWarn): void {\n if (spec.type !== 'text') return;\n // Every string the layer ever shows: its `text` and any `set: { text }` swap.\n const strings = [spec.text ?? '', ...(spec.keyframes ?? []).map(kf => String((kf.set as Record<string, unknown> | undefined)?.text ?? ''))];\n const hasPlaceholder = strings.some(t => t.includes('{value}'));\n if (hasPlaceholder && !collectPropKeys(spec).has('value')) {\n warn(`pixi-effects: ${describeLayer(spec)}: the text has a {value} placeholder but nothing sets or animates \\`value\\`, so it prints 0. Set initial: { value: … } or animate it; {value} is reserved for counters (there is no way to print a literal \"{value}\").`);\n }\n if (collectPropKeys(spec).has('value') && !hasPlaceholder) {\n warn(`pixi-effects: ${describeLayer(spec)}: \\`value\\` is set or animated but the text has no {value} placeholder, so nothing shows it. Use text: '{value}' (or e.g. '{value} users').`);\n }\n}\n\nconst REMAPPABLE = new Set(['video', 'audio', 'composition']);\n/** Top-level names that mean a time remap and have their own message. */\nconst REMAP_NAMES = new Set(['time', 'timeRemap', 'reverse']);\nconst TIME_BAGS = ['set', 'to', 'from'] as const;\n\n/** The mistakes a time remap can make (`speed` / `time`), said once when the layer is built. Called from `lintKeys`. */\nfunction lintRemap(spec: SequenceSpec, warn: Warn): void {\n const s = spec as unknown as Record<string, any>;\n const who = describeLayer(spec);\n const kfs: Array<Record<string, any>> = s.keyframes ?? [];\n const bags: Array<Record<string, any> | undefined> = [s.initial, ...kfs.flatMap(kf => TIME_BAGS.map(b => kf[b]))];\n const timeInInitial = !!s.initial && s.initial.time !== undefined;\n const timeInKeyframes = kfs.some(kf => TIME_BAGS.some(b => kf[b] && kf[b].time !== undefined));\n const timed = timeInInitial || timeInKeyframes;\n if (bags.some(bag => bag && bag.speed !== undefined)) {\n warn(`pixi-effects: ${who}: speed is a fixed setting, not an animatable property: write it on the layer (speed: 2); to change the speed over time, animate time (keyframes: [{ at: 0, from: { time: 0 }, to: { time: 4 }, duration: 2, ease: 'power2.in' }])`);\n }\n if (!REMAPPABLE.has(spec.type)) {\n if (timed) warn(`pixi-effects: ${who}: \"time\" only works on video, audio and composition layers; put this layer in a composition and remap that (it is ignored here)`);\n return; // a top-level speed here is the key warning's business (\"not a ... key\")\n }\n if (s.reverse !== undefined) warn(`pixi-effects: ${who}: \"reverse\" is not a key: write speed: -1 to play backward`);\n if (s.timeRemap !== undefined) warn(`pixi-effects: ${who}: \"timeRemap\" is not a key: animate time in keyframes (from / to / set), or write speed`);\n if (s.time !== undefined) warn(`pixi-effects: ${who}: \"time\" belongs in initial or keyframes (initial: { time: 2 }), not on the layer`);\n if (spec.type === 'audio' && (s.sfx !== undefined || s.music !== undefined) && (s.speed !== undefined || timed)) {\n warn(`pixi-effects: ${who}: speed and time do not apply to a synthesised sound (sfx, music); change an sfx's pitch with pitch (semitones), or put it in a composition and remap that`);\n return;\n }\n if (s.speed !== undefined && (typeof s.speed !== 'number' || !Number.isFinite(s.speed) || s.speed === 0)) {\n warn(`pixi-effects: ${who}: speed ${JSON.stringify(s.speed)} cannot be used: write a number other than 0 (negative plays backward); to hold a moment, key time to the same value twice`);\n }\n if (s.speed !== undefined && timeInKeyframes) {\n warn(`pixi-effects: ${who}: speed and keyframed time are both set; time wins and speed is ignored. Use one of them`);\n }\n if (timeInInitial && typeof s.initial.time !== 'number') {\n warn(`pixi-effects: ${who}: initial.time must be a number of seconds, got ${JSON.stringify(s.initial.time)}`);\n }\n kfs.forEach((kf, i) => {\n for (const b of TIME_BAGS) {\n const v = kf[b]?.time;\n if (v !== undefined && typeof v !== 'number' && typeof v !== 'string') warn(`pixi-effects: ${who}: keyframes[${i}].${b}.time must be a number of seconds, got ${JSON.stringify(v)}`);\n }\n });\n}\n\n/**\n * Keys that do not exist, which the library used to ignore without a word (a typo in a layer key, a mistyped property in a keyframe, a\n * style key Pixi does not know). Said once each, with what was probably meant. A warning, never an error. Not checked here: dotted\n * paths (`filters.g.amount`, `three.box.x`: their routers say what is wrong), the names `fillGradient` says itself (`gradientAngle`),\n * and a kind of layer registered elsewhere (`three`).\n */\n/** Keys the library used to have: the sentence says what to write now. */\nconst REMOVED_KEYS: Record<string, string> = {\n maskInverted: 'a hole instead of a crop is `mask: { layer: <the mask layer>, invert: true }`',\n};\n\n/** The knobs of a sound effect: they are keys of `sfx: { … }`, not of the layer. */\nconst SFX_KNOBS = new Set(['pitch', 'brightness', 'seed']);\n\n/** Where a layer is and how it is turned: always `initial` or a keyframe, even for a kind of layer that has such a name as a key of another meaning (`anchorX` on a shape). */\nconst TRANSFORM_KEYS = new Set(['x', 'y', 'z', 'alpha', 'rotation', 'rotationX', 'rotationY', 'scale', 'scaleX', 'scaleY', 'anchor', 'anchorX', 'anchorY',\n 'pivot', 'pivotX', 'pivotY', 'skew', 'skewX', 'skewY', 'position', 'positionX', 'positionY', 'tint', 'visible', 'autoAlpha']);\n\nexport function lintKeys(spec: SequenceSpec, warn: Warn = defaultWarn): void {\n const who = describeLayer(spec);\n const valid = layerKeys(spec as { type: string; shape?: string });\n if (valid) {\n for (const key of Object.keys(spec)) {\n if (valid.includes(key) || (spec as unknown as Record<string, unknown>)[key] === undefined) continue; // a spread that sets a key only when it applies leaves `undefined`\n if (REMAPPABLE.has(spec.type) && REMAP_NAMES.has(key)) continue; // lintRemap has its own message for these\n if (REMOVED_KEYS[key]) { warn(`pixi-effects: ${who}: \"${key}\" is not a ${kindName(spec as { type: string; shape?: string })} key: ${REMOVED_KEYS[key]}`); continue; }\n // `pitch`, `brightness`, `seed` are knobs of the sound effect, they go inside `sfx` (a trial: three agents wrote them beside `sfx:`)\n if (spec.type === 'audio' && SFX_KNOBS.has(key) && (spec as { sfx?: unknown }).sfx !== undefined) {\n const sfx = (spec as { sfx?: unknown }).sfx;\n const v = (spec as unknown as Record<string, unknown>)[key];\n const shown = typeof v === 'number' || (typeof v === 'string' && v.length <= 24) ? JSON.stringify(v) : '…';\n const where = typeof sfx === 'string' ? `sfx: { preset: '${sfx}', ${key}: ${shown} }` : `inside the sfx object you have (sfx: { …, ${key}: ${shown} })`;\n warn(`pixi-effects: ${who}: \"${key}\" is a knob of the sound effect, so it is ignored beside \\`sfx\\`: write it ${where}${key === 'pitch' ? ' (pitch is in semitones, ±24: 12 is an octave up)' : key === 'brightness' ? ' (brightness is −1 dark … 1 bright)' : ''}`);\n continue;\n }\n // `z`, `x`, `alpha`, `rotationX` … are properties of the picture: they go in `initial` (or a keyframe), not on the layer. Say that, not a guess at another key.\n if (TRANSFORM_KEYS.has(key) || (PROP_KEYS.has(key) && kindsWithKey(key).length === 0)) { // (a key some other kind of layer owns, `radius` on a rect, keeps its \"it belongs to\" sentence below)\n const v = (spec as unknown as Record<string, unknown>)[key];\n const shown = typeof v === 'number' || (typeof v === 'string' && v.length <= 24) ? JSON.stringify(v) : '…';\n warn(`pixi-effects: ${who}: \"${key}\" is a property, not a ${kindName(spec as { type: string; shape?: string })} key, so it is ignored: write it in initial (initial: { ${key}: ${shown} }) or in a keyframe`);\n continue;\n }\n const guess = suggestName(key, valid.filter(k => k !== 'type'));\n const owners = kindsWithKey(key);\n const belongs = owners.length ? ` (it belongs to ${owners.slice(0, 3).join(', ')})` : '';\n const hint = guess ? ` — did you mean \"${guess}\"?${belongs}` : belongs;\n warn(`pixi-effects: ${who}: \"${key}\" is not a ${kindName(spec as { type: string; shape?: string })} key${hint}${/[?.)]$/.test(hint) ? ' ' : '. '}Valid keys: ${valid.join(', ')}`);\n }\n }\n for (const { key, why } of pictureKeysIgnored(spec as unknown as { type: string } & Record<string, unknown>)) warn(`pixi-effects: ${who}: \"${key}\" does nothing on ${why}`);\n lintRemap(spec, warn);\n const said = new Set<string>();\n const bags: Array<Record<string, unknown> | undefined> = [spec.initial, ...(spec.keyframes ?? []).flatMap(kf => [kf.set, kf.to, kf.from])] as Array<Record<string, unknown> | undefined>;\n for (const bag of bags) {\n for (const key of Object.keys(bag ?? {})) {\n if (bag![key] === undefined) continue;\n if (PROP_KEYS.has(key) || key.includes('.') || /^gradient/i.test(key) || said.has(key) || key === 'speed') continue; // (speed: lintRemap says what to write)\n said.add(key);\n const guess = suggestName(key, [...PROP_KEYS]);\n warn(`pixi-effects: ${who}: \"${key}\" is not an animatable property${guess ? ` — did you mean \"${guess}\"?` : ''} (in initial, set, to or from). See the cheatsheet for the properties of this kind of layer`);\n }\n }\n if (spec.type === 'text' && spec.style && typeof spec.style === 'object') {\n for (const key of Object.keys(spec.style)) {\n if (STYLE_KEYS.includes(key) || (spec.style as Record<string, unknown>)[key] === undefined) continue;\n const guess = suggestName(key, STYLE_KEYS);\n warn(`pixi-effects: ${who}: style.${key} is not a text style key${guess ? ` — did you mean \"${guess}\"?` : ''} (it is ignored). Keys: ${STYLE_KEYS.join(', ')}`);\n }\n }\n}\n"]}
|
|
@@ -329,6 +329,7 @@ function analyzeAudio(mix, sources, stats, movieDuration, opts = {}) {
|
|
|
329
329
|
return measure(Array.from({ length: b.numberOfChannels }, (_, c) => b.getChannelData(c)), b.sampleRate);
|
|
330
330
|
};
|
|
331
331
|
const scoreNotes = [];
|
|
332
|
+
const normGain = stats?.loudness?.gainDb ?? 0;
|
|
332
333
|
const buried = [];
|
|
333
334
|
const list = [...sources].sort((a, b) => a.start - b.start).map((s) => {
|
|
334
335
|
const layer = s.layer ?? "an audio layer";
|
|
@@ -358,18 +359,21 @@ function analyzeAudio(mix, sources, stats, movieDuration, opts = {}) {
|
|
|
358
359
|
if (over > 2 && over / s.music.seconds > 0.15) scoreNotes.push(`${layer} (${source}): the score is ${Math.round(s.music.seconds * 10) / 10}s long but only ${Math.round(plays * 100) / 100}s of it play, so it is cut off mid-phrase. Write fewer bars (or a faster tempo) so it ends with the movie`);
|
|
359
360
|
}
|
|
360
361
|
if (s.music && s.music.tracks.length > 1) {
|
|
361
|
-
const
|
|
362
|
+
const longest = Math.max(...s.music.tracks.map((t) => t.beats));
|
|
363
|
+
const short = s.music.tracks.filter((t) => t.beats <= longest - s.music.meter);
|
|
362
364
|
if (short.length > 0) {
|
|
363
|
-
scoreNotes.push(`${layer} (${source}): ${short.slice(0, 3).map((t) => `the ${t.inst} track is ${Math.round(t.beats * 100) / 100} beats long against ${
|
|
365
|
+
scoreNotes.push(`${layer} (${source}): ${short.slice(0, 3).map((t) => `the ${t.inst} track is ${Math.round(t.beats * 100) / 100} beats long against ${longest} for the longest and falls silent from beat ${Math.round(t.beats * 100) / 100} (bar ${Math.floor(t.beats / s.music.meter) + 1})`).join("; ")}. If that is a miscount, add its missing beats (a rest is \`_:4\`); if it is on purpose, ignore this`);
|
|
366
|
+
} else if (s.music.beats >= longest + s.music.meter) {
|
|
367
|
+
scoreNotes.push(`${layer} (${source}): the drums run to beat ${s.music.beats}, past the end of every track at beat ${longest}: from there only the drums play`);
|
|
364
368
|
}
|
|
365
369
|
}
|
|
366
370
|
let belowMixDb;
|
|
367
371
|
if (!clock && !s.sourceMap && s.start < movieDuration && ownDb > INAUDIBLE_DB) {
|
|
368
372
|
const at = s.start + sound.loudestAt;
|
|
369
373
|
const around = db(peakIn(Math.max(0, at - 0.05), Math.min(movieDuration, at + 0.05)));
|
|
370
|
-
belowMixDb = Math.max(0, Math.round((around - ownDb) * 10) / 10);
|
|
374
|
+
belowMixDb = Math.max(0, Math.round((around - (ownDb + normGain)) * 10) / 10);
|
|
371
375
|
if (!s.music && source.startsWith("sfx") && sound.length <= 4 && belowMixDb >= BURIED_DB) {
|
|
372
|
-
buried.push({ layer, source, ownDb, topVolume, around, belowMixDb, at: Math.round(at * 100) / 100 });
|
|
376
|
+
buried.push({ layer, source, ownDb: Math.round((ownDb + normGain) * 10) / 10, topVolume, around, belowMixDb, at: Math.round(at * 100) / 100 });
|
|
373
377
|
}
|
|
374
378
|
}
|
|
375
379
|
return { layer, source, start: s.start, end: s.end, peakDb, sound, ...belowMixDb !== void 0 ? { belowMixDb } : {}, ...s.music ? { music: s.music } : {} };
|
|
@@ -385,7 +389,7 @@ function analyzeAudio(mix, sources, stats, movieDuration, opts = {}) {
|
|
|
385
389
|
if (whole.truePeakDb > 0) issues.push(`the mix's true peak is ${whole.truePeakDb} dBTP: it will distort when the video is encoded \u2014 lower the volume`);
|
|
386
390
|
const notes = [...scoreNotes];
|
|
387
391
|
if (whole.integratedLufs !== null) {
|
|
388
|
-
if (whole.integratedLufs < LOUDNESS_NOTES.quietBelow) notes.push(`the mix is quiet for web video: ${whole.integratedLufs} LUFS (typical \u221214 to \u221216); raise the volume, or ask for a loudness: movie.init({ loudness: -16 }), if that is not on purpose`);
|
|
392
|
+
if (whole.integratedLufs < LOUDNESS_NOTES.quietBelow && !stats?.loudness) notes.push(`the mix is quiet for web video: ${whole.integratedLufs} LUFS (typical \u221214 to \u221216); raise the volume, or ask for a loudness: movie.init({ loudness: -16 }), if that is not on purpose`);
|
|
389
393
|
else if (whole.integratedLufs > LOUDNESS_NOTES.loudAbove) notes.push(`the mix is loud: ${whole.integratedLufs} LUFS (typical web video \u221214 to \u221216)`);
|
|
390
394
|
}
|
|
391
395
|
if (whole.truePeakDb > LOUDNESS_NOTES.headroomDb && whole.truePeakDb <= 0) notes.push(`the true peak is ${whole.truePeakDb} dBTP: little headroom left for encoding (keep it below ${LOUDNESS_NOTES.headroomDb} dBTP)`);
|
|
@@ -395,7 +399,7 @@ function analyzeAudio(mix, sources, stats, movieDuration, opts = {}) {
|
|
|
395
399
|
const at = sources.filter((x) => x.start <= t && t < Math.min(x.end, movieDuration)).map((x) => x.layer && x.layer !== "an audio layer" ? `${x.layer}${x.source ? ` (${x.source})` : ""}` : x.source ?? "audio");
|
|
396
400
|
return [...new Set(at)].slice(0, 6).join(", ") || "nothing that is listed";
|
|
397
401
|
};
|
|
398
|
-
if (asked.gainDb !== 0) notes.push(`the whole mix was ${asked.gainDb > 0 ? "raised" : "lowered"} by ${Math.abs(asked.gainDb)} dB to reach ${asked.target} LUFS (init({ loudness: ${asked.target} }))`);
|
|
402
|
+
if (asked.gainDb !== 0) notes.push(`the whole mix was ${asked.gainDb > 0 ? "raised" : "lowered"} by ${Math.abs(asked.gainDb)} dB ${asked.limited ? "toward" : "to reach"} ${asked.target} LUFS (init({ loudness: ${asked.target} }))`);
|
|
399
403
|
if (asked.limited) {
|
|
400
404
|
notes.push(`the mix could not reach ${asked.target} LUFS: it stopped at ${asked.reachedLufs} LUFS because its loudest moment${asked.limiterAt !== void 0 ? ` (at ${asked.limiterAt} s, where ${playingAt(asked.limiterAt)} play)` : ""} would need more than ${asked.limiterDb ?? 10} dB of limiting to stay under -1 dBTP; lower the sound that peaks there (a click or hit on top of a quiet bed), or ask for less`);
|
|
401
405
|
} else if (asked.limiterDb !== void 0 && asked.limiterDb >= 3) {
|
|
@@ -447,5 +451,5 @@ exports.inspectSound = inspectSound;
|
|
|
447
451
|
exports.measureLoudness = measureLoudness;
|
|
448
452
|
exports.playSpan = playSpan;
|
|
449
453
|
exports.resampleThrough = resampleThrough;
|
|
450
|
-
//# sourceMappingURL=chunk-
|
|
451
|
-
//# sourceMappingURL=chunk-
|
|
454
|
+
//# sourceMappingURL=chunk-ZAHCGFGC.cjs.map
|
|
455
|
+
//# sourceMappingURL=chunk-ZAHCGFGC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/audioRemap.ts","../src/core/spectrum.ts","../src/audio/loudness.ts","../src/core/inspectAudio.ts"],"names":[],"mappings":";;;AAKA,SAAS,MAAA,CAAO,GAAgB,CAAA,EAAmB;AACjD,EAAA,IAAI,KAAA,GAAQ,CAAA,CAAE,KAAA,EAAO,KAAA,GAAQ,EAA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AAA,IAAY,UAAU,GAAA,CAAI,gBAAA;AAAA,IAAkB,QAAQ,CAAA,CAAE,MAAA;AAAA,IACpH,UAAU,CAAA,CAAE,QAAA;AAAA,IAAU,OAAA,EAAS,OAAA,CAAQ,GAAA,CAAI,CAAA,CAAA,MAAM,EAAE,CAAA,EAAG,CAAA,CAAE,CAAA,EAAG,KAAA,EAAO,CAAA,CAAE,KAAA,EAAM,CAAE,CAAA;AAAA,IAAG,OAAO,CAAC,GAAG,EAAE,KAAA,EAAO,GAAG,EAAE,MAAM;AAAA,GAChH;AACF","file":"chunk-ZAHCGFGC.cjs","sourcesContent":["import type { AudioDescriptor } from '../types';\n\ntype RemapFields = Pick<AudioDescriptor, 'start' | 'end' | 'loop' | 'initialVolume' | 'volumeKeyframes' | 'warp' | 'sourceMap'>;\n\n/** The gain of a sound at its own time `u`: `initialVolume` from `start`, then straight lines to each point (what the Web Audio ramps did). */\nfunction gainAt(a: RemapFields, u: number): number {\n let prevT = a.start, prevV = a.initialVolume ?? 1;\n if (u <= prevT) return prevV;\n for (const kf of a.volumeKeyframes ?? []) {\n if (u <= kf.time) return kf.time === prevT ? kf.value : prevV + (kf.value - prevV) * ((u - prevT) / (kf.time - prevT));\n prevT = kf.time; prevV = kf.value;\n }\n return prevV;\n}\n\nconst CELL = 1 / 1000;\n\n/**\n * Render a sound through its time maps. For every output sample T: u = warp(T) (sampled every millisecond, interpolated), the position\n * in the sound is sourceMap(u) (or u - start), and the sample is read with linear interpolation. Where the position hardly moves (a\n * freeze) it fades to silence rather than hold one sample as a DC offset. Returns null when it is never audible. `at` is where in the\n * mix the returned samples begin. Pitch follows speed (a resample, like a tape).\n */\nexport function resampleThrough(\n a: RemapFields, left: Float32Array, right: Float32Array, srcRate: number, outRate: number, total: number,\n): { L: Float32Array; R: Float32Array; at: number } | null {\n const nCell = Math.ceil(total / CELL) + 2;\n const U = new Float64Array(nCell);\n let first = -1, last = -1;\n for (let k = 0; k < nCell; k++) {\n const u = a.warp ? a.warp(k * CELL) : k * CELL;\n U[k] = u;\n if (Number.isFinite(u) && u >= a.start && u < a.end) { if (first < 0) first = k; last = k; }\n }\n if (first < 0) return null;\n const lo = Math.max(0, (first - 1) * CELL), hi = Math.min(total, (last + 2) * CELL);\n const n = Math.max(1, Math.ceil((hi - lo) * outRate));\n const L = new Float32Array(n), R = new Float32Array(n);\n const dur = left.length / srcRate;\n let prevPos = NaN;\n for (let i = 0; i < n; i++) {\n const T = lo + i / outRate;\n const x = T / CELL, k = Math.min(Math.floor(x), nCell - 2), f = x - k;\n const u0 = U[k]!, u1 = U[k + 1]!;\n if (!(Number.isFinite(u0) && Number.isFinite(u1))) { prevPos = NaN; continue; }\n const u = u0 * (1 - f) + u1 * f;\n if (u < a.start || u >= a.end) { prevPos = NaN; continue; }\n const raw = a.sourceMap ? a.sourceMap(u) : u - a.start;\n let pos = raw;\n if (a.loop) pos = ((pos % dur) + dur) % dur;\n const rate = Number.isNaN(prevPos) ? 1 : Math.abs(raw - prevPos) * outRate;\n prevPos = raw;\n if (pos < 0 || pos >= dur) continue;\n const g = gainAt(a, u) * Math.min(1, rate / 0.02);\n const sp = pos * srcRate, j = Math.floor(sp), fr = sp - j, j1 = Math.min(j + 1, left.length - 1);\n L[i] = (left[j]! * (1 - fr) + left[j1]! * fr) * g;\n R[i] = (right[j]! * (1 - fr) + right[j1]! * fr) * g;\n }\n return { L, R, at: lo };\n}\n\n/**\n * When a sound plays, in the MOVIE's time. Without a `warp` that is `start`..`end`; with one (the sound sits in a remapped composition)\n * `start` / `end` are the composition's local times, so the span is where the warp lands inside them. `total` is the movie's length.\n */\nexport function playSpan(a: Pick<AudioDescriptor, 'start' | 'end' | 'warp'>, total: number): { start: number; end: number } {\n if (!a.warp) return { start: a.start, end: a.end };\n let first = -1, last = -1;\n const n = Math.ceil(total / CELL) + 1;\n for (let k = 0; k <= n; k++) {\n const u = a.warp(k * CELL);\n if (Number.isFinite(u) && u >= a.start && u < a.end) { if (first < 0) first = k; last = k; }\n }\n return first < 0 ? { start: total, end: total } : { start: first * CELL, end: (last + 1) * CELL };\n}\n\n/**\n * The farthest local time the warp (the clock of the composition the sound sits in) reaches during the movie. A sound whose local `end` is\n * beyond it is cut short by that clock (it stops or stands still) — a different cause than the end of the movie.\n */\nexport function clockReach(a: Pick<AudioDescriptor, 'warp'>, total: number): number {\n let reach = -Infinity;\n const n = Math.ceil(total / CELL) + 1;\n for (let k = 0; k <= n; k++) {\n const u = a.warp ? a.warp(k * CELL) : k * CELL;\n if (Number.isFinite(u) && u > reach) reach = u;\n }\n return reach;\n}\n","/** In-place radix-2 FFT (re/im arrays of the same power-of-two length). */\nexport function fft(re: Float64Array, im: Float64Array): void {\n const n = re.length;\n for (let i = 1, j = 0; i < n; i++) {\n let bit = n >> 1;\n for (; j & bit; bit >>= 1) j ^= bit;\n j ^= bit;\n if (i < j) { [re[i], re[j]] = [re[j]!, re[i]!]; [im[i], im[j]] = [im[j]!, im[i]!]; }\n }\n for (let len = 2; len <= n; len <<= 1) {\n const ang = (-2 * Math.PI) / len;\n for (let i = 0; i < n; i += len) {\n for (let k = 0; k < len / 2; k++) {\n const wr = Math.cos(ang * k), wi = Math.sin(ang * k);\n const a = i + k, b = a + len / 2;\n const xr = re[b]! * wr - im[b]! * wi, xi = re[b]! * wi + im[b]! * wr;\n re[b] = re[a]! - xr; im[b] = im[a]! - xi;\n re[a] = re[a]! + xr; im[a] = im[a]! + xi;\n }\n }\n }\n}\n\nconst FRAME = 2048;\n\n/**\n * Spectral centroid (\"brightness\") in Hz of `samples[from, to)`: the power-weighted mean frequency\n * over Hann-windowed 2048-sample frames (louder frames count more). 0 for silence.\n * Rough guide: < 500 Hz dark / boomy, 1–3 kHz mid, > 4 kHz bright / airy.\n */\nexport function spectralCentroid(samples: Float32Array, sampleRate: number, from = 0, to = samples.length): number {\n let num = 0;\n let den = 0;\n const re = new Float64Array(FRAME);\n const im = new Float64Array(FRAME);\n const end = Math.min(to, samples.length);\n for (let start = Math.max(0, from); start < end; start += FRAME / 2) {\n for (let i = 0; i < FRAME; i++) {\n const k = start + i;\n const w = 0.5 - 0.5 * Math.cos((2 * Math.PI * i) / (FRAME - 1));\n re[i] = k < end ? samples[k]! * w : 0;\n im[i] = 0;\n }\n fft(re, im);\n for (let b = 1; b < FRAME / 2; b++) {\n const power = re[b]! * re[b]! + im[b]! * im[b]!;\n num += power * ((b * sampleRate) / FRAME);\n den += power;\n }\n }\n return den > 1e-9 ? Math.round(num / den / 10) * 10 : 0;\n}\n","/** Loudness of a mix, ITU-R BS.1770-4 / EBU R128, without a dependency. Pure: takes channels, returns numbers. */\nexport interface LoudnessReport { integratedLufs: number | null; truePeakDb: number | null; samplePeakDb: number; clippedSamples: number }\n\n/** Where the advice in `inspectAudio().notes` starts: one place, so the docs can point at it. */\nexport const LOUDNESS_NOTES = { quietBelow: -18, loudAbove: -9, headroomDb: -1 } as const;\n\ninterface Biquad { b: [number, number, number]; a: [number, number, number] }\n\n/** The K-weighting of BS.1770-4: a high shelf, then a 38 Hz high-pass, as biquads for any sample rate (bilinear transform). */\nfunction kWeighting(fs: number): [Biquad, Biquad] {\n const f0 = 1681.974450955533, G = 3.999843853973347, Q = 0.7071752369554196;\n const K = Math.tan(Math.PI * f0 / fs), Vh = 10 ** (G / 20), Vb = Vh ** 0.4996667741545416;\n const a0 = 1 + K / Q + K * K;\n const shelf: Biquad = {\n b: [(Vh + Vb * K / Q + K * K) / a0, 2 * (K * K - Vh) / a0, (Vh - Vb * K / Q + K * K) / a0],\n a: [1, 2 * (K * K - 1) / a0, (1 - K / Q + K * K) / a0],\n };\n const f1 = 38.13547087602444, Q1 = 0.5003270373238773, K1 = Math.tan(Math.PI * f1 / fs), a1 = 1 + K1 / Q1 + K1 * K1;\n const high: Biquad = { b: [1, -2, 1], a: [1, 2 * (K1 * K1 - 1) / a1, (1 - K1 / Q1 + K1 * K1) / a1] };\n return [shelf, high];\n}\n\nfunction filter(x: Float32Array, stages: Biquad[]): Float32Array {\n let cur = x;\n for (const { b, a } of stages) {\n const out = new Float32Array(cur.length); // Float32 between stages: half the memory, far below the measurement's resolution\n let x1 = 0, x2 = 0, y1 = 0, y2 = 0;\n for (let i = 0; i < cur.length; i++) {\n const xi = cur[i]!, y = b[0] * xi + b[1] * x1 + b[2] * x2 - a[1] * y1 - a[2] * y2;\n x2 = x1; x1 = xi; y2 = y1; y1 = y; out[i] = y;\n }\n cur = out;\n }\n return cur;\n}\n\nconst toDb = (x: number): number => Math.round(200 * Math.log10(Math.max(x, 1e-6))) / 10; // 0.1 dB, floor -120\n\nconst TP_HALF = 12, TP_BLOCK = 32;\nconst TP_KERNELS = [0.25, 0.5, 0.75].map(p => Float64Array.from({ length: 2 * TP_HALF }, (_, j) => {\n const k = j - TP_HALF + 1, x = k - p, s = x === 0 ? 1 : Math.sin(Math.PI * x) / (Math.PI * x);\n return s * (0.5 + 0.5 * Math.cos(Math.PI * x / (TP_HALF + 1)));\n}));\n/** No interpolated value can exceed (the loudest sample around it) x this: where that cannot beat the peak so far, skip the sums. */\nconst TP_GAIN = Math.max(...TP_KERNELS.map(k => k.reduce((a, v) => a + Math.abs(v), 0)));\n\n/** 4x oversampled peak (windowed-sinc interpolation, 12 samples either side): catches peaks between samples. Equal to checking every phase of every sample, only faster. */\nfunction truePeak(chans: Float32Array[]): number {\n let peak = 0;\n for (const c of chans) {\n const n = c.length;\n const blocks = Math.ceil(n / TP_BLOCK), blockMax = new Float32Array(blocks + 2); // [b + 1] is block b; the ends stay 0\n for (let i = 0; i < n; i++) { const a = Math.abs(c[i]!), b = (i / TP_BLOCK | 0) + 1; if (a > blockMax[b]!) blockMax[b] = a; if (a > peak) peak = a; }\n const padded = new Float32Array(n + 2 * TP_HALF); // zeros around, so the sums need no bounds check\n padded.set(c, TP_HALF);\n for (let i = 0; i < n; i++) {\n const b = (i / TP_BLOCK | 0) + 1;\n const local = Math.max(blockMax[b - 1]!, blockMax[b]!, blockMax[b + 1]!); // the 24 samples around i lie in these three blocks\n if (local * TP_GAIN <= peak) continue;\n for (let pi = 0; pi < 3; pi++) {\n const k = TP_KERNELS[pi]!;\n let v = 0;\n for (let j = 0; j < 2 * TP_HALF; j++) v += padded[i + 1 + j]! * k[j]!;\n const a = Math.abs(v);\n if (a > peak) peak = a;\n }\n }\n }\n return peak;\n}\n\nexport function measureLoudness(channels: Float32Array[], sampleRate: number, opts: { truePeak?: boolean } = {}): LoudnessReport {\n let samplePeak = 0, clipped = 0;\n for (const c of channels) for (let i = 0; i < c.length; i++) { const a = Math.abs(c[i]!); if (a > samplePeak) samplePeak = a; if (a >= 1) clipped++; }\n const stages = kWeighting(sampleRate);\n const weighted = channels.map(c => filter(c, stages));\n const block = Math.round(0.4 * sampleRate), hop = Math.round(0.1 * sampleRate);\n const energies: number[] = [];\n for (let s = 0; s + block <= (weighted[0]?.length ?? 0); s += hop) {\n let sum = 0;\n for (const w of weighted) { let z = 0; for (let i = s; i < s + block; i++) z += w[i]! * w[i]!; sum += z / block; } // the weight is 1 for L, R and mono\n energies.push(sum);\n }\n const lufs = (e: number): number => -0.691 + 10 * Math.log10(e);\n const absolute = energies.filter(e => e > 0 && lufs(e) > -70);\n let integrated: number | null = null;\n if (absolute.length) {\n const relative = lufs(absolute.reduce((a, b) => a + b, 0) / absolute.length) - 10;\n const gated = absolute.filter(e => lufs(e) > relative);\n if (gated.length) integrated = Math.round(10 * lufs(gated.reduce((a, b) => a + b, 0) / gated.length)) / 10;\n }\n return { integratedLufs: integrated, truePeakDb: opts.truePeak === false ? null : toDb(truePeak(channels)), samplePeakDb: toDb(samplePeak), clippedSamples: clipped };\n}\n\n/** Runs of at least `minLength` seconds where every channel stays below `thresholdDb` (default -60 dBFS). */\nexport function findSilences(channels: Float32Array[], sampleRate: number, opts: { minLength?: number; thresholdDb?: number } = {}): Array<{ from: number; to: number }> {\n const min = Math.round((opts.minLength ?? 1) * sampleRate), limit = 10 ** ((opts.thresholdDb ?? -60) / 20);\n const n = channels[0]?.length ?? 0, out: Array<{ from: number; to: number }> = [];\n let start = -1;\n const quiet = (i: number): boolean => channels.every(c => Math.abs(c[i]!) < limit);\n for (let i = 0; i <= n; i++) {\n const q = i < n && quiet(i);\n if (q && start < 0) start = i;\n if (!q && start >= 0) { if (i - start >= min) out.push({ from: Math.round(start / sampleRate * 1000) / 1000, to: Math.round(i / sampleRate * 1000) / 1000 }); start = -1; }\n }\n return out;\n}\n","import type { AudioDescriptor } from '../types';\nimport type { MusicSummary } from '../audio/music/events';\nimport { playSpan, clockReach } from './audioRemap';\nimport type { MixStats } from './AudioMixer';\nimport { spectralCentroid } from './spectrum';\nimport { findSilences, LOUDNESS_NOTES, measureLoudness } from '../audio/loudness';\n\nexport interface AudioInspectOptions {\n /** Width of each loudness window in seconds. Default 0.1. */\n window?: number;\n /** The scenes to measure one by one (`movie.inspectAudio()` fills this from the movie's named top-level compositions). Default: the whole movie as one. */\n scenes?: Array<{ name: string; start: number; end: number }>;\n}\n\n/** One sound measured ON ITS OWN (not mixed), so overlapping layers do not blur it. */\nexport interface SoundMeasure {\n /** Seconds of audio the source has (an sfx: its length; a file: the file's length). */\n length: number;\n /** Its own loudest sample, dBFS (before the layer's volume). */\n peakDb: number;\n /** Seconds from its start to its loudest sample — the moment to line up with the picture. */\n loudestAt: number;\n /** Spectral centroid in Hz: < 500 dark / boomy, 1–4 k mid, > 8 k airy / hissy. */\n brightnessHz: number;\n}\n\nexport interface AudioSourceReport {\n /** `layer \"pop-1\"` (or `unnamed audio layer`). */\n layer: string;\n /** `sfx \"pop\"`, `asset \"bgm\"`, `video \"green\"`. */\n source: string;\n /** Movie time, seconds. */\n start: number;\n end: number;\n /** Loudest sample of the MIX while this source plays, dBFS (−120 = silence). */\n peakDb: number;\n sound: SoundMeasure;\n /**\n * How far below the loudest sample of the MIX around its own loudest moment this source is, dB (0 = it is the loudest thing there; 20 = the mix is 20 dB louder, so\n * the source is hardly heard). Absent for a sound inside a remapped composition (its time is not the movie's).\n */\n belowMixDb?: number;\n /** For a `music` layer: its score read back (bars per track, what starts in each bar, the drum spans). */\n music?: MusicSummary;\n}\n\nexport interface AudioReport {\n duration: number;\n sampleRate: number;\n /** Loudest sample of the mix before limiting, dBFS. Above 0 the mix was limited. */\n peakDb: number;\n peakAt: number;\n /** Every audio layer / video soundtrack in the mix, in start order. */\n sources: AudioSourceReport[];\n /** The mix over time: one row per window, `t` = window start. */\n windows: Array<{ t: number; rmsDb: number; peakDb: number; brightnessHz: number }>;\n /** Problems worth fixing: limiting, clipping, a true peak above 0 dBTP, inaudible layers, sounds cut off by the end of the movie. Read this first. */\n issues: string[];\n /** The mix as a whole (ITU-R BS.1770 loudness; `integratedLufs` is null for a mix shorter than 0.4 s or with nothing above −70 LUFS). */\n loudness: { integratedLufs: number | null; truePeakDb: number; clippedSamples: number; silences: Array<{ from: number; to: number }> };\n /** The same measure for each scene (`silent`: nothing above −60 dBFS). */\n scenes: Array<{ name: string; from: number; to: number; lufs: number | null; peakDb: number; silent: boolean }>;\n /** When each sound starts: what a waveform marks. */\n cues: Array<{ t: number; name: string }>;\n /** Advice, not faults: a mix that is quiet or loud for web video, little headroom, silent stretches. */\n notes: string[];\n}\n\ninterface PcmLike {\n numberOfChannels: number;\n sampleRate: number;\n length: number;\n getChannelData(ch: number): Float32Array;\n}\n\n/** A short sound effect this many dB under the loudest sample of the mix around its loudest moment is hardly heard. */\nconst BURIED_DB = 12;\n/** Below this a source counts as inaudible. */\nconst INAUDIBLE_DB = -50;\n\nconst db = (x: number): number => Math.round(10 * Math.max(-120, 20 * Math.log10(x))) / 10;\nconst mono = (chans: Float32Array[]): Float32Array => {\n if (chans.length === 1) return chans[0]!;\n const out = new Float32Array(chans[0]!.length);\n for (const d of chans) for (let i = 0; i < out.length; i++) out[i] = out[i]! + d[i]! / chans.length;\n return out;\n};\n\nfunction measure(chans: Float32Array[], sampleRate: number): SoundMeasure {\n let peak = 0;\n let at = 0;\n for (const d of chans) for (let i = 0; i < d.length; i++) if (Math.abs(d[i]!) > peak) { peak = Math.abs(d[i]!); at = i; }\n return {\n length: Math.round((chans[0]!.length / sampleRate) * 1000) / 1000,\n peakDb: db(peak),\n loudestAt: Math.round((at / sampleRate) * 1000) / 1000,\n brightnessHz: spectralCentroid(mono(chans), sampleRate),\n };\n}\n\n/**\n * Measure the soundtrack so an author who cannot listen can still check it: every sound on its own\n * (length, level, loudest moment, brightness), when it plays and how loud the mix is there, the mix over\n * time, and issues. Pure: takes the mix and the list of sources that went into it.\n */\nexport function analyzeAudio(\n mix: PcmLike | null, sources: AudioDescriptor[], stats: MixStats | null, movieDuration: number, opts: AudioInspectOptions = {},\n): AudioReport {\n // A sound inside a remapped composition has `start` / `end` in that composition's local time: report when it plays in the MOVIE's time.\n const warped = new Map<AudioDescriptor, { localEnd: number; reach: number }>();\n sources = sources.map(s => {\n if (!s.warp) return s;\n const moved = { ...s, ...playSpan(s, movieDuration) };\n warped.set(moved, { localEnd: s.end, reach: clockReach(s, movieDuration) });\n return moved;\n });\n if (!mix) {\n return { duration: movieDuration, sampleRate: 0, peakDb: -120, peakAt: 0, sources: [], windows: [],\n loudness: { integratedLufs: null, truePeakDb: -120, clippedSamples: 0, silences: [] }, scenes: [], cues: [], notes: [], issues: ['no audio: the movie has no audio layers (sound effects need no files: { type: \"audio\", sfx: \"pop\", at: 1 })'] };\n }\n const sr = mix.sampleRate;\n const chans = Array.from({ length: mix.numberOfChannels }, (_, c) => mix.getChannelData(c));\n const mixMono = mono(chans);\n const peakIn = (t0: number, t1: number): number => {\n let p = 0;\n const i1 = Math.min(mix.length, Math.ceil(t1 * sr));\n for (const d of chans) for (let i = Math.max(0, Math.floor(t0 * sr)); i < i1; i++) p = Math.max(p, Math.abs(d[i]!));\n return p;\n };\n\n // at least 10 ms: a smaller window would ask for a spectrum per sample\n const win = opts.window && opts.window > 0 ? Math.max(0.01, opts.window) : 0.1;\n const windows: AudioReport['windows'] = [];\n for (let t = 0; t < movieDuration - 1e-9; t += win) {\n const i0 = Math.floor(t * sr);\n const i1 = Math.min(mix.length, Math.floor((t + win) * sr));\n let sum = 0;\n let peak = 0;\n for (const d of chans) {\n for (let i = i0; i < i1; i++) {\n sum += d[i]! * d[i]!;\n peak = Math.max(peak, Math.abs(d[i]!));\n }\n }\n const n = Math.max(1, (i1 - i0) * chans.length);\n windows.push({ t: Math.round(t * 1000) / 1000, rmsDb: db(Math.sqrt(sum / n)), peakDb: db(peak), brightnessHz: spectralCentroid(mixMono, sr, i0, i1) });\n }\n\n const issues: string[] = [];\n if (stats && stats.peak > 1) {\n issues.push(`the mix peaks at ${db(stats.peak)} dBFS at ${stats.peakAt.toFixed(2)}s and was limited — lower the volume of the layers playing there`);\n }\n const rendered = new Map<string, SoundMeasure>();\n const soundOf = (s: AudioDescriptor): SoundMeasure => {\n if (s.synth) {\n let m = rendered.get(s.synth.key);\n if (!m) rendered.set(s.synth.key, (m = measure(s.synth.render(sr), sr)));\n return m;\n }\n const b = s.buffer!;\n return measure(Array.from({ length: b.numberOfChannels }, (_, c) => b.getChannelData(c)), b.sampleRate);\n };\n const scoreNotes: string[] = [];\n const normGain = stats?.loudness?.gainDb ?? 0;\n const buried: Array<{ layer: string; source: string; ownDb: number; topVolume: number; around: number; belowMixDb: number; at: number }> = [];\n const list = [...sources].sort((a, b) => a.start - b.start).map(s => {\n const layer = s.layer ?? 'an audio layer';\n const source = s.source ?? 'audio';\n const peakDb = db(peakIn(s.start, Math.min(s.end, movieDuration)));\n const sound = soundOf(s);\n // The layer's OWN level: the sound's peak at the loudest volume it ever has. Judging the mix instead would\n // hide a nearly silent layer under a loud one.\n const topVolume = Math.max(s.initialVolume ?? 1, ...(s.volumeKeyframes ?? []).map(k => k.value));\n const ownDb = db(Math.pow(10, sound.peakDb / 20) * Math.max(0, topVolume));\n if (s.start >= movieDuration) {\n issues.push(`${layer} (${source}) starts at ${s.start.toFixed(2)}s, after the movie ends (${movieDuration}s)`);\n } else if (ownDb < INAUDIBLE_DB || peakDb < INAUDIBLE_DB) {\n issues.push(`${layer} (${source}) is inaudible from ${s.start.toFixed(2)}s to ${s.end.toFixed(2)}s (its own peak ${ownDb} dBFS at volume ${topVolume}; mix peak there ${peakDb} dBFS) — check its volume`);\n }\n const clock = warped.get(s);\n if (s.synth && s.start < movieDuration) {\n if (clock) {\n // inside a remapped composition: it is cut short when the composition's clock never gets to the end of the sound\n if (clock.reach < clock.localEnd - 1e-3) {\n issues.push(`${layer} (${source}) is cut off: its composition's clock only reaches ${clock.reach.toFixed(2)}s (the sound is ${clock.localEnd.toFixed(2)}s long), because the clock stops or the movie ends first — give the layer a shorter duration, or let the clock run on`);\n }\n } else if (s.end > movieDuration + 1e-6) {\n issues.push(`${layer} (${source}) is cut off by the end of the movie at ${movieDuration}s (it runs to ${s.end.toFixed(2)}s)`);\n }\n }\n // A written score (`music`) much longer than what plays: said as a NOTE (a trial: 19.2 s of music under a 10 s film; the read-back showed it but nothing said it).\n // Not a fault: music that outlasts the movie ends with it (see Audio.ts). A tail under 2 s or 15 % over is only the reverb tail; a looping layer is meant to be cut.\n if (s.music && !s.loop && s.start < movieDuration && !clock) {\n const plays = Math.min(s.end, movieDuration) - s.start;\n const over = s.music.seconds - plays;\n if (over > 2 && over / s.music.seconds > 0.15) scoreNotes.push(`${layer} (${source}): the score is ${Math.round(s.music.seconds * 10) / 10}s long but only ${Math.round(plays * 100) / 100}s of it play, so it is cut off mid-phrase. Write fewer bars (or a faster tempo) so it ends with the movie`);\n }\n // A track a bar or more shorter than the longest one is silent from its end on: usually a miscount of the beats (a trial: three agents; only the read-back showed it). A note, not a fault: a bell may come and go on purpose.\n if (s.music && s.music.tracks.length > 1) {\n const longest = Math.max(...s.music.tracks.map(t => t.beats));\n const short = s.music.tracks.filter(t => t.beats <= longest - s.music!.meter);\n if (short.length > 0) {\n scoreNotes.push(`${layer} (${source}): ${short.slice(0, 3).map(t => `the ${t.inst} track is ${Math.round(t.beats * 100) / 100} beats long against ${longest} for the longest and falls silent from beat ${Math.round(t.beats * 100) / 100} (bar ${Math.floor(t.beats / s.music!.meter) + 1})`).join('; ')}. If that is a miscount, add its missing beats (a rest is \\`_:4\\`); if it is on purpose, ignore this`);\n } else if (s.music.beats >= longest + s.music.meter) {\n scoreNotes.push(`${layer} (${source}): the drums run to beat ${s.music.beats}, past the end of every track at beat ${longest}: from there only the drums play`);\n }\n }\n // Buried: the sound's own peak against the mix around its loudest moment. A short sound effect 12 dB or more under what plays with it is a hit nobody hears.\n // (A layer with its own speed or `time` plays the sound at another pace: its loudest moment is not at start + loudestAt, so it is left out.)\n let belowMixDb: number | undefined;\n if (!clock && !s.sourceMap && s.start < movieDuration && ownDb > INAUDIBLE_DB) {\n const at = s.start + sound.loudestAt;\n const around = db(peakIn(Math.max(0, at - 0.05), Math.min(movieDuration, at + 0.05)));\n belowMixDb = Math.max(0, Math.round((around - (ownDb + normGain)) * 10) / 10); // (the mix may have been raised to a loudness target: the sound's own peak is read before that, so it gets the same gain)\n if (!s.music && source.startsWith('sfx') && sound.length <= 4 && belowMixDb >= BURIED_DB) {\n buried.push({ layer, source, ownDb: Math.round((ownDb + normGain) * 10) / 10, topVolume, around, belowMixDb, at: Math.round(at * 100) / 100 });\n }\n }\n return { layer, source, start: s.start, end: s.end, peakDb, sound, ...(belowMixDb !== undefined ? { belowMixDb } : {}), ...(s.music ? { music: s.music } : {}) };\n });\n\n // ONE note for the movie (an accent that is meant to be subtle is common: the numbers are in every source's `belowMixDb`): how many, and the worst\n if (buried.length > 0) {\n const worst = buried.reduce((a, b) => (b.belowMixDb > a.belowMixDb ? b : a));\n // layers with no name all carry the same label, so they are counted one by one; a named layer that plays many times counts once\n const distinct = new Set(buried.map(x => (x.layer === 'an audio layer' ? `#${buried.indexOf(x)}` : x.layer) + x.source)).size;\n scoreNotes.push(`${distinct === 1 ? '1 sound effect is' : `${distinct} sound effects are`} buried (${BURIED_DB} dB or more under the loudest sample of the mix around its loudest moment${buried.length > distinct ? `, ${buried.length} times in all` : ''}): the worst is ${worst.layer} (${worst.source}), its own peak ${worst.ownDb} dBFS at volume ${Math.round(worst.topVolume * 100) / 100} against ${worst.around} dBFS at ${worst.at} s, ${worst.belowMixDb} dB louder. If it is meant to be heard, raise its volume (this one to about ${Math.round(Math.min(4, worst.topVolume * 10 ** ((worst.belowMixDb - 3) / 20)) * 10) / 10}, which puts it about 3 dB under the mix; an accent over music needs 2 to 3) or lower what plays there; every source's belowMixDb has its own number`);\n }\n // the mix as a whole, scene by scene, and the advice\n const whole = measureLoudness(chans, sr);\n const silences = findSilences(chans, sr, { minLength: 1 });\n if (whole.clippedSamples > 0) issues.push(`${whole.clippedSamples} sample(s) of the mix are at full scale (clipped) — lower the volume of the layers that play loudest`);\n if (whole.truePeakDb! > 0) issues.push(`the mix's true peak is ${whole.truePeakDb} dBTP: it will distort when the video is encoded — lower the volume`);\n const notes: string[] = [...scoreNotes];\n if (whole.integratedLufs !== null) {\n if (whole.integratedLufs < LOUDNESS_NOTES.quietBelow && !stats?.loudness) notes.push(`the mix is quiet for web video: ${whole.integratedLufs} LUFS (typical −14 to −16); raise the volume, or ask for a loudness: movie.init({ loudness: -16 }), if that is not on purpose`);\n else if (whole.integratedLufs > LOUDNESS_NOTES.loudAbove) notes.push(`the mix is loud: ${whole.integratedLufs} LUFS (typical web video −14 to −16)`);\n }\n if (whole.truePeakDb! > LOUDNESS_NOTES.headroomDb && whole.truePeakDb! <= 0) notes.push(`the true peak is ${whole.truePeakDb} dBTP: little headroom left for encoding (keep it below ${LOUDNESS_NOTES.headroomDb} dBTP)`);\n const asked = stats?.loudness;\n if (asked) {\n // which layers play at a moment (the ones a peak there is made of); an unnamed layer is told by what it plays\n const playingAt = (t: number): string => {\n const at = sources.filter(x => x.start <= t && t < Math.min(x.end, movieDuration)).map(x => (x.layer && x.layer !== 'an audio layer' ? `${x.layer}${x.source ? ` (${x.source})` : ''}` : x.source ?? 'audio'));\n return [...new Set(at)].slice(0, 6).join(', ') || 'nothing that is listed';\n };\n if (asked.gainDb !== 0) notes.push(`the whole mix was ${asked.gainDb > 0 ? 'raised' : 'lowered'} by ${Math.abs(asked.gainDb)} dB ${asked.limited ? 'toward' : 'to reach'} ${asked.target} LUFS (init({ loudness: ${asked.target} }))`);\n if (asked.limited) {\n notes.push(`the mix could not reach ${asked.target} LUFS: it stopped at ${asked.reachedLufs} LUFS because its loudest moment${asked.limiterAt !== undefined ? ` (at ${asked.limiterAt} s, where ${playingAt(asked.limiterAt)} play)` : ''} would need more than ${asked.limiterDb ?? 10} dB of limiting to stay under -1 dBTP; lower the sound that peaks there (a click or hit on top of a quiet bed), or ask for less`);\n } else if (asked.limiterDb !== undefined && asked.limiterDb >= 3) {\n notes.push(`a limiter took up to ${asked.limiterDb} dB off the loudest peak (at ${asked.limiterAt} s, where ${playingAt(asked.limiterAt ?? 0)} play) so that the mix reaches ${asked.target} LUFS without passing -1 dBTP: if that sound should hit harder, lower what plays under it`);\n }\n }\n for (const q of silences.slice(0, 3)) notes.push(`the mix is silent from ${q.from} s to ${q.to} s (${Math.round((q.to - q.from) * 10) / 10} s)`);\n if (silences.length > 3) notes.push(`and ${silences.length - 3} more silent stretch(es) (loudness.silences lists them all)`);\n const sceneList = (opts.scenes && opts.scenes.length ? opts.scenes : [{ name: 'movie', start: 0, end: movieDuration }]).map(sc => {\n const a = Math.max(0, Math.round(sc.start * sr)), b = Math.min(mix.length, Math.round(sc.end * sr));\n const part = chans.map(c => c.subarray(a, Math.max(a, b)));\n const m = measureLoudness(part, sr, { truePeak: false }); // the true peak is the slow part and is only wanted for the whole mix\n return { name: sc.name, from: sc.start, to: sc.end, lufs: m.integratedLufs, peakDb: m.samplePeakDb, silent: m.samplePeakDb < -60 };\n });\n\n return {\n duration: movieDuration,\n sampleRate: sr,\n peakDb: db(stats?.peak ?? peakIn(0, movieDuration)),\n peakAt: stats?.peakAt ?? 0,\n sources: list,\n windows,\n issues,\n loudness: { integratedLufs: whole.integratedLufs, truePeakDb: whole.truePeakDb ?? -120, clippedSamples: whole.clippedSamples, silences },\n scenes: sceneList,\n cues: list.map(s => ({ t: s.start, name: `${s.layer} (${s.source})` })),\n notes,\n };\n}\n\n/** What `inspectSound` says about a sound. */\nexport interface SoundReport {\n /** Seconds, the sample rate and the number of channels of what was measured. */\n duration: number;\n sampleRate: number;\n channels: number;\n /** The loudest sample, dBFS. */\n peakDb: number;\n /** ITU-R BS.1770 loudness, true peak, samples at full scale and silences, as `check` reports them for a movie's mix. */\n loudness: AudioReport['loudness'];\n /** The level over time: the RMS of each window (`window` seconds, 0.1 by default), dBFS. */\n windows: Array<{ t: number; rmsDb: number }>;\n /** Advice (quiet or loud for web video, little headroom, silent stretches) and what would distort when encoded. */\n notes: string[];\n}\n\n/**\n * Measure the sound of any file, not only a movie's mix: its loudness, peak, clipping, silences and level over time, with the same code `movie.inspectAudio()` uses, so\n * `check` and the `pixi-effects sound` command give the same numbers for the same samples. Takes decoded PCM (an AudioBuffer works).\n */\nexport function inspectSound(pcm: PcmLike, opts: { window?: number } = {}): SoundReport {\n const duration = pcm.length / pcm.sampleRate;\n const r = analyzeAudio(pcm, [], null, duration, opts.window ? { window: opts.window } : {});\n // a file that ends a few ms into a window would show that sliver as a row (a 36 ms tail of encoder padding reads as −90 dBFS): a last window under half the width is dropped\n const width = opts.window ?? 0.1;\n let windows = r.windows;\n if (windows.length > 1 && duration - windows[windows.length - 1]!.t < width / 2) windows = windows.slice(0, -1);\n return {\n duration: Math.round(duration * 1000) / 1000, sampleRate: pcm.sampleRate, channels: pcm.numberOfChannels, peakDb: r.peakDb,\n loudness: r.loudness, windows: windows.map(w => ({ t: w.t, rmsDb: w.rmsDb })), notes: [...r.notes, ...r.issues],\n };\n}\n\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,138 +1,138 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
3
|
+
var chunkVTGJRKW4_cjs = require('./chunk-VTGJRKW4.cjs');
|
|
4
|
+
require('./chunk-GDY56V74.cjs');
|
|
5
|
+
var chunk33OVRSXF_cjs = require('./chunk-33OVRSXF.cjs');
|
|
6
|
+
var chunkZAHCGFGC_cjs = require('./chunk-ZAHCGFGC.cjs');
|
|
7
|
+
require('./chunk-RU4N3B5B.cjs');
|
|
8
|
+
require('./chunk-YSTOH5PC.cjs');
|
|
9
9
|
var chunkTWZNOUM7_cjs = require('./chunk-TWZNOUM7.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, "Movie", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkVTGJRKW4_cjs.Movie; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "animateText", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkVTGJRKW4_cjs.animateText; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "audioEnvelope", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkVTGJRKW4_cjs.audioEnvelope; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "bpmEnvelope", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkVTGJRKW4_cjs.bpmEnvelope; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "cameraPath", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkVTGJRKW4_cjs.cameraPath; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "computeEnvelope", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkVTGJRKW4_cjs.computeEnvelope; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "dismissLoader", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkVTGJRKW4_cjs.dismissLoader; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "ease", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkVTGJRKW4_cjs.parseEase; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "failLoader", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkVTGJRKW4_cjs.failLoader; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "followPath", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkVTGJRKW4_cjs.followPath; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "kenBurns", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkVTGJRKW4_cjs.kenBurns; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "measureText", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkVTGJRKW4_cjs.measureText; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "musicBuffer", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkVTGJRKW4_cjs.musicBuffer; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "musicEnvelope", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkVTGJRKW4_cjs.musicEnvelope; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "musicEvents", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkVTGJRKW4_cjs.musicEvents; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "orbit", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkVTGJRKW4_cjs.orbit; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "particles", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkVTGJRKW4_cjs.particles; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "react", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkVTGJRKW4_cjs.react; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "resolveLoader", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkVTGJRKW4_cjs.resolveLoader; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "samplePath", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkVTGJRKW4_cjs.samplePath; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "splitText", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkVTGJRKW4_cjs.splitText; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "stagger", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkVTGJRKW4_cjs.stagger; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "wiggle", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkVTGJRKW4_cjs.wiggle; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "withFade", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkVTGJRKW4_cjs.withFade; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "Sequence", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunk33OVRSXF_cjs.Sequence; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "noise", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunk33OVRSXF_cjs.noise; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "noise2", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunk33OVRSXF_cjs.noise2; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "rand", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunk33OVRSXF_cjs.rand; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "random", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunk33OVRSXF_cjs.random; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "registerSequenceType", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunk33OVRSXF_cjs.registerSequenceType; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "inspectSound", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkZAHCGFGC_cjs.inspectSound; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "warnUnknownOptions", {
|
|
138
138
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -371,10 +371,10 @@ interface StaggerOptions {
|
|
|
371
371
|
* Given a layer array it returns new layers whose `at` is shifted by their delay; the originals are not touched.
|
|
372
372
|
* Everything is a pure function of the options (`from: 'random'` is seeded), so playback and export agree.
|
|
373
373
|
*/
|
|
374
|
-
declare function stagger(count: number, options?: StaggerOptions): number[];
|
|
374
|
+
declare function stagger(count: number, options?: StaggerOptions | number): number[];
|
|
375
375
|
declare function stagger<T extends {
|
|
376
376
|
at?: number;
|
|
377
|
-
}>(layers: readonly T[], options?: StaggerOptions): T[];
|
|
377
|
+
}>(layers: readonly T[], options?: StaggerOptions | number): T[];
|
|
378
378
|
|
|
379
379
|
/** Where a piece starts (`from`), as offsets in x / y and absolute values for the rest, and how it gets to its resting place. */
|
|
380
380
|
declare const PRESETS: {
|
|
@@ -450,7 +450,7 @@ interface AnimateTextTween {
|
|
|
450
450
|
/** `out` only: the composition second the exit starts at (every piece leaves in the same wave from then on, and holds its exit state until the layer ends). Without it the exit is the end of the layer run backwards. Not for `in` (an entrance starts with its piece: the options' `at`). */
|
|
451
451
|
at?: number;
|
|
452
452
|
/** `out` only: the wave of the exit, when it should not be the entrance's: `0` (all pieces leave at once), or `{ each: 0.1 }` and the other {@link stagger} options. Default: the same wave as the entrance (the options' `stagger`). */
|
|
453
|
-
stagger?: StaggerOptions |
|
|
453
|
+
stagger?: StaggerOptions | number;
|
|
454
454
|
}
|
|
455
455
|
interface AnimateTextOptions {
|
|
456
456
|
/** What a piece is: a character (default), a word or a line. */
|
|
@@ -473,7 +473,7 @@ interface AnimateTextOptions {
|
|
|
473
473
|
/** How a piece leaves, in the same wave (the entrance backwards, eased the other way). With `{ preset, at: T }` the exit starts at composition second T; without `at` it leaves from the END of the layer (`at + duration`), the last piece finishing exactly then. Default none. */
|
|
474
474
|
out?: TextPreset | AnimateTextTween | false;
|
|
475
475
|
/** The wave: see {@link stagger}. Default `{ each: 0.04 }`. */
|
|
476
|
-
stagger?: StaggerOptions;
|
|
476
|
+
stagger?: StaggerOptions | number;
|
|
477
477
|
/** A seeded drift between the entrance and the exit, each piece its own: `{ y: 4, rotation: 1 }` (amounts), `freq` (default 1 target per second), `seed`. */
|
|
478
478
|
idle?: {
|
|
479
479
|
x?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -371,10 +371,10 @@ interface StaggerOptions {
|
|
|
371
371
|
* Given a layer array it returns new layers whose `at` is shifted by their delay; the originals are not touched.
|
|
372
372
|
* Everything is a pure function of the options (`from: 'random'` is seeded), so playback and export agree.
|
|
373
373
|
*/
|
|
374
|
-
declare function stagger(count: number, options?: StaggerOptions): number[];
|
|
374
|
+
declare function stagger(count: number, options?: StaggerOptions | number): number[];
|
|
375
375
|
declare function stagger<T extends {
|
|
376
376
|
at?: number;
|
|
377
|
-
}>(layers: readonly T[], options?: StaggerOptions): T[];
|
|
377
|
+
}>(layers: readonly T[], options?: StaggerOptions | number): T[];
|
|
378
378
|
|
|
379
379
|
/** Where a piece starts (`from`), as offsets in x / y and absolute values for the rest, and how it gets to its resting place. */
|
|
380
380
|
declare const PRESETS: {
|
|
@@ -450,7 +450,7 @@ interface AnimateTextTween {
|
|
|
450
450
|
/** `out` only: the composition second the exit starts at (every piece leaves in the same wave from then on, and holds its exit state until the layer ends). Without it the exit is the end of the layer run backwards. Not for `in` (an entrance starts with its piece: the options' `at`). */
|
|
451
451
|
at?: number;
|
|
452
452
|
/** `out` only: the wave of the exit, when it should not be the entrance's: `0` (all pieces leave at once), or `{ each: 0.1 }` and the other {@link stagger} options. Default: the same wave as the entrance (the options' `stagger`). */
|
|
453
|
-
stagger?: StaggerOptions |
|
|
453
|
+
stagger?: StaggerOptions | number;
|
|
454
454
|
}
|
|
455
455
|
interface AnimateTextOptions {
|
|
456
456
|
/** What a piece is: a character (default), a word or a line. */
|
|
@@ -473,7 +473,7 @@ interface AnimateTextOptions {
|
|
|
473
473
|
/** How a piece leaves, in the same wave (the entrance backwards, eased the other way). With `{ preset, at: T }` the exit starts at composition second T; without `at` it leaves from the END of the layer (`at + duration`), the last piece finishing exactly then. Default none. */
|
|
474
474
|
out?: TextPreset | AnimateTextTween | false;
|
|
475
475
|
/** The wave: see {@link stagger}. Default `{ each: 0.04 }`. */
|
|
476
|
-
stagger?: StaggerOptions;
|
|
476
|
+
stagger?: StaggerOptions | number;
|
|
477
477
|
/** A seeded drift between the entrance and the exit, each piece its own: `{ y: 4, rotation: 1 }` (amounts), `freq` (default 1 target per second), `seed`. */
|
|
478
478
|
idle?: {
|
|
479
479
|
x?: number;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { Movie, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, dismissLoader, parseEase as ease, failLoader, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, orbit, particles, react, resolveLoader, samplePath, splitText, stagger, wiggle, withFade } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
export { Sequence, noise, noise2, rand, random, registerSequenceType } from './chunk-
|
|
4
|
-
export { inspectSound } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
export { Movie, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, dismissLoader, parseEase as ease, failLoader, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, orbit, particles, react, resolveLoader, samplePath, splitText, stagger, wiggle, withFade } from './chunk-6LA7W362.js';
|
|
2
|
+
import './chunk-HX73PCVU.js';
|
|
3
|
+
export { Sequence, noise, noise2, rand, random, registerSequenceType } from './chunk-HGKXEPDJ.js';
|
|
4
|
+
export { inspectSound } from './chunk-G4PXCV2B.js';
|
|
5
|
+
import './chunk-PC7DFDCV.js';
|
|
6
|
+
import './chunk-JVO2W77G.js';
|
|
7
7
|
export { warnUnknownOptions } from './chunk-BXOCEZ4U.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
9
9
|
//# sourceMappingURL=index.js.map
|