pixi-effects 0.17.0 → 0.18.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +6 -6
  3. package/ai/CHAT.md +3 -0
  4. package/ai/SKILL.md +2 -2
  5. package/ai/chat-template.html +8 -4
  6. package/ai/reference/cheatsheet.md +2 -0
  7. package/ai/template.html +5 -5
  8. package/ai/tools/check.mjs +25 -109
  9. package/ai/tools/render.mjs +1 -0
  10. package/dist/Composition-6JMXWNVV.cjs +14 -0
  11. package/dist/{Composition-LMVEASHF.cjs.map → Composition-6JMXWNVV.cjs.map} +1 -1
  12. package/dist/Composition-MLBHYYFF.js +5 -0
  13. package/dist/{Composition-HYAOYPAX.js.map → Composition-MLBHYYFF.js.map} +1 -1
  14. package/dist/Controller.d.cts +1 -1
  15. package/dist/Controller.d.ts +1 -1
  16. package/dist/{Movie-DHJRrUfI.d.ts → Movie-DlHQ9C02.d.ts} +46 -2
  17. package/dist/{Movie-CoxF2Z7t.d.cts → Movie-K2YuVAdg.d.cts} +46 -2
  18. package/dist/Presenter.d.cts +1 -1
  19. package/dist/Presenter.d.ts +1 -1
  20. package/dist/{chunk-LBJRXU7N.cjs → chunk-ANO5R2E6.cjs} +14 -4
  21. package/dist/chunk-ANO5R2E6.cjs.map +1 -0
  22. package/dist/{chunk-ETAIVOHP.cjs → chunk-JW67MDHQ.cjs} +26 -26
  23. package/dist/{chunk-ETAIVOHP.cjs.map → chunk-JW67MDHQ.cjs.map} +1 -1
  24. package/dist/{chunk-ORTYBA42.js → chunk-SG3Y66FN.js} +14 -4
  25. package/dist/chunk-SG3Y66FN.js.map +1 -0
  26. package/dist/{chunk-Q3IVBYT7.js → chunk-UXDR3ZDU.js} +3 -3
  27. package/dist/{chunk-Q3IVBYT7.js.map → chunk-UXDR3ZDU.js.map} +1 -1
  28. package/dist/index.cjs +142 -31
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +1 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.js +119 -8
  33. package/dist/index.js.map +1 -1
  34. package/dist/loader.css +1 -1
  35. package/dist/three.cjs +5 -5
  36. package/dist/three.js +1 -1
  37. package/llms-full.txt +4 -2
  38. package/package.json +1 -1
  39. package/dist/Composition-HYAOYPAX.js +0 -5
  40. package/dist/Composition-LMVEASHF.cjs +0 -14
  41. package/dist/chunk-LBJRXU7N.cjs.map +0 -1
  42. package/dist/chunk-ORTYBA42.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Sequence, lintTiming, lintText, summarizeWarnings, buildSequenceTree, CameraSequence, describeLayer, NullSequence, cameraBasis, homeCamera, collectPropKeys, projectLayer, NEAR, DEG } from './chunk-ORTYBA42.js';
1
+ import { Sequence, lintTiming, lintText, summarizeWarnings, buildSequenceTree, CameraSequence, describeLayer, NullSequence, cameraBasis, homeCamera, collectPropKeys, projectLayer, NEAR, DEG } from './chunk-SG3Y66FN.js';
2
2
  import { suggestName } from './chunk-DKGG7WD4.js';
3
3
  import { Container, Rectangle, AlphaMask, PerspectiveMesh, Texture, Matrix, RenderTexture } from 'pixi.js';
4
4
  import { gsap } from 'gsap';
@@ -498,5 +498,5 @@ function frameOf(child) {
498
498
  }
499
499
 
500
500
  export { CompositionSequence };
501
- //# sourceMappingURL=chunk-Q3IVBYT7.js.map
502
- //# sourceMappingURL=chunk-Q3IVBYT7.js.map
501
+ //# sourceMappingURL=chunk-UXDR3ZDU.js.map
502
+ //# sourceMappingURL=chunk-UXDR3ZDU.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/space/camera.ts","../src/space/depth.ts","../src/space/Layer3D.ts","../src/space/lint.ts","../src/core/blend.ts","../src/sequences/Composition.ts"],"names":["i","frameOf","Container"],"mappings":";;;;;;AAQO,SAAS,gBAAA,CACd,IAAA,EACA,CAAA,EACA,OAAA,EACU;AACV,EAAA,KAAA,IAAS,IAAI,IAAA,CAAK,MAA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EAAC;AAClB,IAAA,KAAA,MAAW,CAAA,IAAK,IAAA,CAAK,SAAA,EAAW,CAAA,CAAE,OAAA,EAAQ;AAC1C,IAAA,KAAA,CAAM,OAAA,EAAQ;AAAA,EAChB;AACF;AAGA,SAAS,QAAQ,KAAA,EAAgF;AAC/F,EAAA,IAAI,iBAAiB,mBAAA,EAAqB;AACxC,IAAA,OAAO,OAAO,EAAE,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,KAAA,EAAO,KAAA,CAAM,cAAA,EAAgB,MAAA,EAAQ,KAAA,CAAM,eAAA,EAAgB,CAAA;AAAA,EACzF;AACA,EAAA,OAAO,MAAM,KAAA,CAAM,MAAA,CAAQ,cAAA,EAAe;AAC5C","file":"chunk-Q3IVBYT7.js","sourcesContent":["/** A camera layer's lifespan on the global timeline, seconds. */\nexport interface CameraWindow { start: number; end: number }\n\n/**\n * The active camera at time `t`: the last-listed (top-most) camera whose\n * lifespan covers `t`. Windows are [start, end), except that a camera running\n * to the end of its composition also covers the final instant `t === compEnd`.\n */\nexport function pickActiveCamera<T extends CameraWindow>(\n cams: readonly T[],\n t: number,\n compEnd: number,\n): T | null {\n for (let i = cams.length - 1; i >= 0; i--) {\n const c = cams[i]!;\n const inside = t >= c.start && (t < c.end || (c.end >= compEnd && t <= compEnd));\n if (inside) return c;\n }\n return null;\n}\n\n/** First pair of camera indices whose lifespans strictly overlap, or null. */\nexport function findOverlap(cams: readonly CameraWindow[]): [number, number] | null {\n for (let i = 0; i < cams.length; i++) {\n for (let j = i + 1; j < cams.length; j++) {\n const a = cams[i]!;\n const b = cams[j]!;\n if (a.start < b.end && b.start < a.end) return [i, j];\n }\n }\n return null;\n}\n","export interface DepthItem {\n /** Position in the composition's stack (monotonic; gaps allowed). */\n stackIndex: number;\n threeD: boolean;\n /** Camera-space depth (larger = farther). Only read for threeD items. */\n depth: number;\n}\n\nconst finite = (n: number): number => (Number.isFinite(n) ? n : 0);\n\n/**\n * zIndex per item. Non-3D items keep their stack index. Each run of\n * consecutive threeD items is redistributed over the same index slots,\n * farthest first (drawn first), ties in stack order.\n */\nexport function assignDepthOrder(items: readonly DepthItem[]): number[] {\n const out = items.map(i => i.stackIndex);\n let i = 0;\n while (i < items.length) {\n if (!items[i]!.threeD) { i++; continue; }\n let j = i;\n while (j + 1 < items.length && items[j + 1]!.threeD) j++;\n const run = items.slice(i, j + 1).map((it, k) => ({ it, pos: i + k }));\n const slots = run.map(r => r.it.stackIndex);\n const farthestFirst = [...run].sort((a, b) => finite(b.it.depth) - finite(a.it.depth));\n farthestFirst.forEach((r, k) => { out[r.pos] = slots[k]!; });\n i = j + 1;\n }\n return out;\n}\n","import { Container, Matrix, PerspectiveMesh, RenderTexture, Texture } from 'pixi.js';\nimport type { Sequence } from '../sequences/Base';\nimport { describeLayer } from '../core/lint';\nimport { DEG, NEAR, projectLayer, type CameraBasis, type LayerTransform, type Rect } from './math';\n\n/** Render textures are capped at this many pixels on the long side; larger layers are downscaled. */\nexport const MAX_TEXTURE_SIZE = 4096;\n/**\n * Render textures are drawn at this multiple of the layer size (until the caps),\n * so a layer enlarged by perspective (z > 0) stays sharp instead of showing\n * jagged edges and soft text.\n */\nexport const SUPERSAMPLE = 2;\n/** Total texture pixels per layer are capped here (≈ one 2048² target); resolution drops to fit. */\nexport const MAX_TEXTURE_PIXELS = 2048 * 2048;\n/** MSAA multiplies target memory ~4x, so only small textures get it (supersampling covers the rest). */\nexport const ANTIALIAS_MAX_PIXELS = 1024 * 1024;\n/** Mesh grid per side. 20 keeps steeply tilted planes free of visible affine warping. */\nexport const MESH_GRID = 20;\n\n/** The slice of a Pixi renderer Layer3D needs (also what tests fake). */\nexport interface SpaceHost {\n render(options: {\n container: Container;\n target: RenderTexture;\n transform: Matrix;\n clear: boolean;\n clearColor: number[];\n }): void;\n}\n\ntype Carrier = Container & { z?: number; rotationX?: number; rotationY?: number };\n\ninterface TextureSize { w: number; h: number; resolution: number; antialias: boolean }\n\n/** Sum of the target's filter paddings: the texture must be this much larger on every side or filter output is clipped. */\nfunction filterPadding(target: Container): number {\n const filters = (target as unknown as { filters?: ReadonlyArray<{ padding?: number }> | null }).filters;\n if (!Array.isArray(filters)) return 0;\n let pad = 0;\n for (const f of filters) pad += f?.padding ?? 0;\n return Number.isFinite(pad) && pad > 0 ? Math.ceil(pad) : 0;\n}\n\nexport function readLayerTransform(target: Container): LayerTransform {\n const c = target as Carrier;\n return {\n x: c.x, y: c.y, z: c.z ?? 0,\n rotationX: (c.rotationX ?? 0) * DEG,\n rotationY: (c.rotationY ?? 0) * DEG,\n rotationZ: c.rotation,\n scaleX: c.scale.x, scaleY: c.scale.y,\n pivotX: c.pivot.x, pivotY: c.pivot.y,\n };\n}\n\n/**\n * Draws one `threeD` sequence: its display object is rendered into a\n * RenderTexture (with its own 2D transform replaced, so layer-local content\n * lands at the texture origin) and shown on a PerspectiveMesh whose four\n * corners come from projecting the layer through the active camera.\n *\n * The sequence's `target` is never in the scene graph; the composition adds\n * `display` instead. `z`, `rotationX`, `rotationY` live on `target` as plain\n * numeric props so GSAP tweens them like any other prop.\n */\nexport class Layer3D {\n readonly display: PerspectiveMesh;\n /** Camera-space depth from the last update (larger = farther). */\n depth = 0;\n private rt: RenderTexture | null = null;\n /**\n * Textures replaced by a bigger / smaller one. Destroying one right away warns \"destroyed while still\n * bound\": the mesh's bind group still points at it until the next render. They go at the next update,\n * by which time a frame has been drawn with the new texture.\n */\n private retired: RenderTexture[] = [];\n private size: TextureSize | null = null;\n private warnedBehind = false;\n\n constructor(\n private readonly seq: Sequence,\n private readonly frameOf: () => Rect,\n ) {\n const target = seq.target as Carrier;\n target.z ??= 0;\n target.rotationX ??= 0;\n target.rotationY ??= 0;\n this.display = new PerspectiveMesh({ texture: Texture.WHITE, verticesX: MESH_GRID, verticesY: MESH_GRID });\n if (seq.spec.name) this.display.label = seq.spec.name;\n this.display.visible = false;\n }\n\n update(host: SpaceHost, basis: CameraBasis): void {\n this.flushRetired();\n const target = this.seq.target as Carrier | null;\n // Pixi skips rendering (and clearing) a container that is not `visible`\n // (e.g. PixiPlugin autoAlpha at alpha 0), which would leave a stale texture.\n if (!target || !target.renderable || !target.visible) return this.hide();\n\n const bounds = this.frameOf();\n const pad = filterPadding(target);\n const needW = Math.ceil(bounds.width + 2 * pad);\n const needH = Math.ceil(bounds.height + 2 * pad);\n if (!(needW >= 1 && needH >= 1) || !Number.isFinite(bounds.x) || !Number.isFinite(bounds.y)) return this.hide();\n\n const size = this.sizeFor(needW, needH);\n // The quad covers exactly the texture's pixel rect in layer space.\n const frame: Rect = { x: bounds.x - pad, y: bounds.y - pad, width: size.w, height: size.h };\n const projected = projectLayer(readLayerTransform(target), frame, basis);\n this.depth = projected.depth;\n if (!projected.visible) {\n if (!this.warnedBehind) {\n this.warnedBehind = true;\n if ((this.seq.spec as { hideBehindCamera?: boolean }).hideBehindCamera) return this.hide(); // on purpose: say nothing\n if (projected.depth > NEAR) {\n // the layer's own origin is in front of the camera: a tilt or a large size swings a CORNER past the camera plane\n console.warn(\n `pixi-effects: ${describeLayer(this.seq.spec)}: part of it (a corner) reaches the camera plane (z = ${(target.z ?? 0).toFixed(0)}, rotationX ${(target.rotationX ?? 0).toFixed(0)}°, rotationY ${(target.rotationY ?? 0).toFixed(0)}°), ` +\n `and a layer is hidden whole when any corner is at or behind it. Tilt it less (rotationX / rotationY), make it smaller, or keep the camera further away from it ` +\n `(the default camera sits at z = (height/2)/tan(fov/2), about 989 for 720p at fov 40).`,\n );\n } else {\n console.warn(\n `pixi-effects: ${describeLayer(this.seq.spec)} is at or behind the camera plane (z = ${(target.z ?? 0).toFixed(0)}) and is hidden. ` +\n `If that is unintended, lower its z or move the camera back (the default camera sits at z = (height/2)/tan(fov/2), about 989 for 720p at fov 40).`,\n );\n }\n }\n return this.hide();\n }\n\n this.ensureTexture(size);\n // `transform` replaces the container's own local transform for this render\n // (Pixi RenderGroupSystem), while `container.alpha` still applies — so the\n // texture carries the layer's alpha and the mesh alpha stays at 1.\n host.render({\n container: target,\n target: this.rt!,\n transform: new Matrix().translate(-frame.x, -frame.y),\n clear: true,\n clearColor: [0, 0, 0, 0],\n });\n this.display.geometry.setCorners(...projected.corners);\n this.display.visible = true;\n }\n\n destroy(): void {\n this.display.destroy();\n this.rt?.destroy(true);\n this.rt = null;\n this.flushRetired();\n }\n\n private flushRetired(): void {\n for (const t of this.retired) t.destroy(true);\n this.retired = [];\n }\n\n private hide(): void {\n this.display.visible = false;\n }\n\n /**\n * Texture size for content of w×h. An existing texture is kept while it is at\n * least that big and at most 2x too big, so content whose bounds change every\n * frame (typewriter text, growing shapes) does not reallocate each frame.\n */\n private sizeFor(w: number, h: number): TextureSize {\n const cur = this.size;\n if (cur && cur.w >= w && cur.h >= h && cur.w <= 2 * w && cur.h <= 2 * h) return cur;\n const resolution = Math.min(\n SUPERSAMPLE,\n MAX_TEXTURE_SIZE / Math.max(w, h),\n Math.sqrt(MAX_TEXTURE_PIXELS / (w * h)),\n );\n const antialias = w * h * resolution * resolution <= ANTIALIAS_MAX_PIXELS;\n return { w, h, resolution, antialias };\n }\n\n private ensureTexture(size: TextureSize): void {\n if (this.rt && this.size === size) return;\n // Same sampling: resize the texture where it is. Replacing it makes Pixi warn that the old one was\n // destroyed while still bound, because the mesh keeps pointing at it until the next render.\n if (this.rt && this.size && this.size.antialias === size.antialias) {\n this.rt.resize(size.w, size.h, size.resolution);\n this.size = size;\n return;\n }\n const next = RenderTexture.create({\n width: size.w, height: size.h, resolution: size.resolution, antialias: size.antialias,\n });\n this.display.texture = next;\n if (this.rt) this.retired.push(this.rt);\n this.rt = next;\n this.size = size;\n }\n}\n","import { collectPropKeys } from './specKeys';\nimport { describeLayer } from '../core/lint';\nimport type { SequenceSpec } from '../types';\n\ntype Warn = (message: string) => void;\nconst defaultWarn: Warn = m => console.warn(m);\n\nconst FOV_HINT = 'perspective is the camera\\'s \"fov\" — add a { type: \"camera\" } layer and set fov in its initial / keyframes';\n\n/** Keys that are never valid for any layer, with a hint at what the author probably meant. */\nconst LAYER_ALIASES: Record<string, string> = {\n rotateX: 'did you mean \"rotationX\"?',\n rotateY: 'did you mean \"rotationY\"?',\n rotateZ: 'did you mean \"rotation\"?',\n rotationZ: 'did you mean \"rotation\" (it is the Z rotation)?',\n translateZ: 'did you mean \"z\"?',\n depth: 'did you mean \"z\"?',\n posZ: 'did you mean \"z\"?',\n perspective: FOV_HINT,\n zoom: FOV_HINT,\n};\n\n/** Camera-only mistakes. */\nconst CAMERA_ALIASES: Record<string, string> = {\n pointOfInterest: 'did you mean \"lookAtX / lookAtY / lookAtZ\"?',\n lookAt: 'did you mean \"lookAtX / lookAtY / lookAtZ\"?',\n};\n\nconst CAMERA_PROPS = ['x', 'y', 'z', 'fov', 'lookAtX', 'lookAtY', 'lookAtZ', 'offsetX', 'offsetY', 'offsetZ', 'lookOffsetX', 'lookOffsetY', 'lookOffsetZ'];\nconst NEEDS_THREE_D = ['z', 'rotationX', 'rotationY'];\nconst SKEW_KEYS = ['skew', 'skewX', 'skewY'];\n\n/**\n * Warn (never throw) about the inputs an AI author is most likely to get wrong,\n * with a message that says what to change. One call per layer, at build time.\n */\nexport function lintSequence(spec: SequenceSpec, warn: Warn = defaultWarn): void {\n const who = describeLayer(spec);\n const keys = collectPropKeys(spec);\n const explained = new Set<string>();\n\n for (const k of keys) {\n const hint = LAYER_ALIASES[k] ?? (spec.type === 'camera' ? CAMERA_ALIASES[k] : undefined);\n if (hint) {\n explained.add(k);\n warn(`pixi-effects: ${who}: \"${k}\" is not a property — ${hint}`);\n }\n }\n\n if (spec.type === 'camera') {\n const raw = spec as unknown as Record<string, unknown>;\n for (const p of CAMERA_PROPS) {\n if (p in raw) warn(`pixi-effects: ${who}: \"${p}\" must go inside initial / keyframes, not on the camera itself`);\n }\n for (const k of Object.keys(raw)) {\n const hint = CAMERA_ALIASES[k] ?? LAYER_ALIASES[k];\n if (hint) warn(`pixi-effects: ${who}: \"${k}\" is not a property — ${hint} (inside initial)`);\n }\n for (const k of keys) {\n if (!explained.has(k) && !CAMERA_PROPS.includes(k)) {\n warn(`pixi-effects: ${who}: \"${k}\" has no effect on a camera (use ${CAMERA_PROPS.join(', ')})`);\n }\n }\n return;\n }\n\n if (spec.type === 'audio') {\n if (spec.threeD) warn(`pixi-effects: ${who}: threeD has no effect on audio`);\n return;\n }\n\n if (!spec.threeD) {\n for (const k of NEEDS_THREE_D) {\n if (keys.has(k)) warn(`pixi-effects: ${who}: \"${k}\" needs threeD: true (it is ignored otherwise)`);\n }\n } else {\n for (const k of SKEW_KEYS) {\n if (keys.has(k)) warn(`pixi-effects: ${who}: \"${k}\" is ignored on threeD layers`);\n }\n }\n}\n","import { describeLayer } from './lint';\n\nconst MODES = ['normal', 'add', 'screen', 'multiply'];\n\n/** Apply a layer's `blendMode` to its display object; an unknown mode warns and is ignored. */\nexport function applyBlendMode(spec: { blendMode?: string; name?: string; type: string }, display: { blendMode?: unknown; filters?: unknown }): void {\n const mode = spec.blendMode;\n if (mode === undefined) return;\n if (!MODES.includes(mode)) {\n console.warn(`pixi-effects: ${describeLayer(spec)}: blendMode \"${mode}\" is not supported (use ${MODES.join(', ')})`);\n return;\n }\n // A container's blend mode applies INSIDE a filter's offscreen pass (against transparent black: multiply gave\n // solid black) and not to the filtered result. With filters, the pass that draws onto the backdrop is the last\n // filter's, so the mode goes there; the container stays normal.\n const filters = display.filters;\n if (Array.isArray(filters) && filters.length > 0) {\n (filters[filters.length - 1] as { blendMode?: unknown }).blendMode = mode;\n return;\n }\n display.blendMode = mode;\n}\n","import { AlphaMask, Container, Rectangle } from 'pixi.js';\nimport { gsap } from 'gsap';\nimport { Sequence } from './Base';\nimport { NullSequence } from './Null';\nimport { suggestName } from '../core/options';\nimport { buildSequenceTree } from '../core/Composition';\nimport { CameraSequence } from '../space/CameraSequence';\nimport { findOverlap, pickActiveCamera } from '../space/camera';\nimport { assignDepthOrder } from '../space/depth';\nimport { Layer3D, type SpaceHost } from '../space/Layer3D';\nimport { lintSequence } from '../space/lint';\nimport { describeLayer, lintText, lintTiming, summarizeWarnings } from '../core/lint';\nimport { applyBlendMode } from '../core/blend';\nimport { cameraBasis, homeCamera } from '../space/math';\nimport type { CompositionSequenceSpec, AudioDescriptor, CompositionShape, SequenceSpec } from '../types';\n\ntype Timeline = ReturnType<typeof gsap.timeline>;\n\nexport class CompositionSequence extends Sequence {\n declare spec: CompositionSequenceSpec;\n private _innerContainer: Container | null = null;\n private _compositionShape: CompositionShape | null = null;\n _children: Sequence[] = [];\n private _cameras: CameraSequence[] = [];\n private _layers3d: Layer3D[] = [];\n /** Drawn children in stack order (cameras and target-less sequences excluded). */\n private _visual: Array<{ seq: Sequence; layer: Layer3D | null }> = [];\n /** Layers drawn inside a null layer (`parent`): they are not in the composition's own stack. */\n private _nested: Sequence[] = [];\n /** The null layer each parented layer is drawn inside. */\n private _parentOf = new Map<Sequence, NullSequence>();\n\n async build(): Promise<void> {\n const width = this.spec.width ?? this.parent?.width ?? this.root.width;\n const height = this.spec.height ?? this.parent?.height ?? this.root.height;\n if (this.duration === undefined) {\n this.duration = this.spec.duration ?? this.parent?.duration ?? this.root.duration;\n }\n const wrapper = new Container();\n wrapper.cullable = true;\n wrapper.cullableChildren = true;\n wrapper.cullArea = new Rectangle(0, 0, width, height);\n\n const inner = new Container();\n inner.cullable = true;\n inner.cullableChildren = true;\n wrapper.addChild(inner);\n\n this.target = wrapper;\n this.intrinsicWidth = width;\n this.intrinsicHeight = height;\n this._innerContainer = inner;\n this._compositionShape = { width, height, duration: this.duration };\n\n const lateKeyframes: string[] = [];\n for (const s of this.spec.sequences ?? []) {\n lintSequence(s);\n lintTiming(s, this.duration, (message, kind) => (kind === 'late-keyframe' ? lateKeyframes.push(message) : console.warn(message)));\n lintText(s);\n }\n for (const message of summarizeWarnings(lateKeyframes)) console.warn(message);\n\n this._children = await buildSequenceTree(\n this.spec.sequences ?? [],\n this._compositionShape,\n this.root,\n );\n this._resolveParents();\n for (const child of this._children) {\n // Cameras are display-less: they only feed the projection pass.\n if (child instanceof CameraSequence) {\n this._cameras.push(child);\n continue;\n }\n if (!child.target) continue;\n const holder = this._parentOf.get(child);\n const into = holder?.target ?? inner; // a layer with `parent` is drawn inside its null layer\n\n const maskSpec = (child.spec as { mask?: SequenceSpec }).mask;\n\n // threeD layers never enter the scene graph themselves: their display\n // object is rendered into a texture and a perspective mesh stands in.\n if (child.spec.threeD) {\n const layer = new Layer3D(child, frameOf(child));\n inner.addChild(layer.display);\n this._layers3d.push(layer);\n this._visual.push({ seq: child, layer });\n applyBlendMode(child.spec, layer.display);\n if (maskSpec) {\n console.warn(`pixi-effects: ${describeLayer(child.spec)}: mask is not supported on threeD layers yet; ignored`);\n }\n continue;\n }\n\n into.addChild(child.target);\n if (holder) this._nested.push(child);\n else this._visual.push({ seq: child, layer: null });\n applyBlendMode(child.spec, child.target);\n // If this child has a `mask` spec, build the mask sequence in the same\n // composition shape, add its target to the same parent (so its\n // transforms resolve in the same coord space), and wire PIXI's\n // mask channel. PIXI v8 renders mask containers into the stencil /\n // alpha buffer; they don't render as normal children.\n if (maskSpec) {\n // The mask lives and animates with the layer it masks: with no `at` of its own its `at` and\n // `duration` are the layer's, so its keyframes are measured from the layer's start too. An\n // explicit `at` is composition time, exactly like a layer's.\n const lifetime = maskSpec.at === undefined\n ? { at: child.at, duration: maskSpec.duration ?? child.duration }\n : {};\n const built = await buildSequenceTree([{ ...maskSpec, ...lifetime } as SequenceSpec], this._compositionShape, this.root);\n const maskSeq = built[0];\n if (maskSeq?.target) {\n into.addChild(maskSeq.target); // the mask shares the layer's space\n // PIXI v8 `setMask` accepts an `inverse` flag — that's how we\n // expose `maskInverted` from the spec. Falls back to plain\n // `target.mask = …` for runtimes that don't have setMask\n // (older PIXI builds).\n const inverse = (child.spec as { maskInverted?: boolean }).maskInverted ?? false;\n const t = child.target as Container & {\n setMask?: (opts: { mask: Container | null; inverse?: boolean }) => void;\n addEffect: (effect: AlphaMask) => void;\n mask: Container | null;\n };\n if (inverse || maskSpec.type === 'text') {\n // A stencil mask is the mask's geometry: a text layer's is its whole bounding box (the letters' alpha is ignored), and\n // PIXI's inverted stencil tests against the empty level, so inside a masked parent it shows what the parent hides.\n // An alpha mask draws the mask into a texture and uses its alpha: letters stay letters, an inverse is 1 − alpha.\n const effect = new AlphaMask({ mask: maskSeq.target });\n effect.inverse = inverse;\n t.setMask?.({ mask: undefined as never, inverse }); // the alpha pipe reads `inverse` from the maskee's mask options, not from the effect\n t.addEffect(effect);\n } else if (typeof t.setMask === 'function') {\n t.setMask({ mask: maskSeq.target, inverse });\n } else {\n t.mask = maskSeq.target;\n }\n child.maskSequence = maskSeq;\n maskSeq.keepHidden = maskSpec.type === 'image' || maskSpec.type === 'video'; // PIXI: a Sprite mask is hidden by renderable = false\n }\n }\n }\n\n if (this._layers3d.length > 0) {\n // Stack order becomes explicit zIndex so threeD layers can be re-sorted\n // by depth each frame without reparenting.\n inner.sortableChildren = true;\n this._visual.forEach((v, i) => {\n (v.layer?.display ?? v.seq.target!).zIndex = i;\n });\n } else if (this._cameras.length > 0) {\n console.warn('pixi-effects: camera has no effect: this composition has no threeD layers');\n }\n\n this.buildFilters();\n }\n\n override bindTimeline(timeline: Timeline, offset = 0): void {\n super.bindTimeline(timeline, offset);\n // Children's `at` is relative to this composition's start, so push them\n // forward by our absolute start time on the global timeline.\n const childOffset = offset + this.at;\n for (const child of this._children) {\n // Each layer builds its tweens in a small timeline of its own, which is added to the parent once, finished. Adding\n // thousands of tweens one by one to a single timeline makes GSAP re-measure the whole timeline at every add (the cost\n // grows with the square of the count: ~3 s for a piece with 700 particle layers); this way the parent only ever holds\n // one child per layer. Positions stay absolute, so the picture at any time is the same.\n const own = gsap.timeline({ defaults: { ease: 'none' } });\n child.bindTimeline(own, childOffset);\n // The mask shares the maskee's offset — its `at` is interpreted\n // relative to the composition's start, just like the child itself,\n // so a reveal-from-zero animation lines up naturally.\n child.maskSequence?.bindTimeline(own, childOffset);\n timeline.add(own, 0);\n }\n const overlap = findOverlap(this._cameras.map(c => c.window()));\n if (overlap) {\n console.warn(`pixi-effects: cameras #${overlap[0] + 1} and #${overlap[1] + 1} overlap in time; the top-most one wins`);\n }\n }\n\n /**\n * Drawn children in stack order, with the display object that stands in for each (the mesh for a threeD layer).\n * Null layers draw nothing and are left out; the layers inside them follow, with the null layers that carry them.\n */\n layers(): Array<{ seq: Sequence; display: Container; threeD: boolean; carriers: NullSequence[] }> {\n const carriersOf = (seq: Sequence): NullSequence[] => {\n const out: NullSequence[] = [];\n for (let p = this._parentOf.get(seq); p; p = this._parentOf.get(p)) out.push(p);\n return out;\n };\n return [...this._visual.map(v => v.seq), ...this._nested]\n .filter(seq => !(seq instanceof NullSequence))\n .map(seq => {\n const layer = this._visual.find(v => v.seq === seq)?.layer ?? null;\n return {\n seq,\n display: (layer?.display ?? seq.target!) as unknown as Container,\n threeD: layer !== null,\n carriers: carriersOf(seq),\n };\n });\n }\n\n /** Match every `parent: 'name'` to a null layer; anything that cannot work is said out loud and drawn unparented. */\n private _resolveParents(): void {\n const nulls = this._children.filter((c): c is NullSequence => c instanceof NullSequence);\n const nullNames = nulls.map(n => n.spec.name).filter((n): n is string => !!n);\n const warned = new Set<string>();\n for (const child of this._children) {\n const want = child.spec.parent;\n if (want === undefined) continue;\n const who = describeLayer(child.spec);\n if (child instanceof CameraSequence) { console.warn(`pixi-effects: ${who}: a camera cannot have a parent; ignored`); continue; }\n if (child.spec.threeD) { console.warn(`pixi-effects: ${who}: a threeD layer cannot have a parent (parent \"${want}\" ignored)`); continue; }\n const same = this._children.filter(c => c.spec.name === want);\n if (same.length === 0) {\n const hint = suggestName(want, nullNames);\n console.warn(`pixi-effects: ${who}: parent \"${want}\": no layer with that name${hint ? `; did you mean \"${hint}\"?` : ''} (the layer is drawn without a parent)`);\n continue;\n }\n const holder = same.find((c): c is NullSequence => c instanceof NullSequence);\n if (!holder) {\n console.warn(`pixi-effects: ${who}: parent \"${want}\" is a ${same[0]!.spec.type} layer; only { type: 'null' } layers can be parents (the layer is drawn without a parent)`);\n continue;\n }\n if (same.length > 1 && !warned.has(want)) {\n warned.add(want);\n console.warn(`pixi-effects: ${same.length} layers are named \"${want}\"; parent \"${want}\" uses the first null layer with that name`);\n }\n if (holder === child) { console.warn(`pixi-effects: ${who} is its own parent; ignored`); continue; }\n this._parentOf.set(child, holder);\n }\n // a chain that leads back to itself: break it where we find it\n for (const start of this._children) {\n const seen = new Set<Sequence>([start]);\n for (let p = this._parentOf.get(start); p; p = this._parentOf.get(p)) {\n if (p === start) {\n const names = [...seen].map(s => s.spec.name ?? s.spec.type).join(' → ');\n console.warn(`pixi-effects: parent cycle: ${names} → ${start.spec.name ?? start.spec.type}; the parent of \"${start.spec.name ?? start.spec.type}\" is ignored`);\n this._parentOf.delete(start);\n break;\n }\n if (seen.has(p)) break;\n seen.add(p);\n }\n }\n }\n\n override syncFrame(): void {\n super.syncFrame();\n for (const child of this._children) child.syncFrame();\n }\n\n override updateSpace(t: number, host: SpaceHost): void {\n // Inner compositions first: a threeD composition is rendered into its own\n // texture by this level, so its content must already be projected.\n for (const child of this._children) child.updateSpace(t, host);\n if (this._layers3d.length === 0 || !this._compositionShape) return;\n\n const { width, height } = this._compositionShape;\n const compEnd = (this.absoluteStart ?? 0) + (this.duration ?? 0);\n const active = pickActiveCamera(\n this._cameras.map(cam => ({ cam, ...cam.window() })),\n t,\n compEnd,\n );\n const basis = cameraBasis(active ? active.cam.state() : homeCamera(width, height), width, height);\n\n for (const layer of this._layers3d) layer.update(host, basis);\n\n const order = assignDepthOrder(\n this._visual.map((v, i) => ({ stackIndex: i, threeD: v.layer !== null, depth: v.layer?.depth ?? 0 })),\n );\n this._visual.forEach((v, i) => {\n if (v.layer) v.layer.display.zIndex = order[i]!;\n });\n }\n\n override collectAudio(out: AudioDescriptor[], baseTime: number): void {\n super.collectAudio(out, baseTime);\n const childBase = baseTime + this.at;\n for (const child of this._children) child.collectAudio(out, childBase);\n }\n\n override destroy(): void {\n for (const l of this._layers3d) l.destroy();\n this._layers3d = [];\n for (const c of this._children) c.destroy();\n super.destroy();\n }\n}\n\n/** Layer-space rectangle a threeD child projects: a composition's frame, otherwise its content bounds. */\nfunction frameOf(child: Sequence): () => { x: number; y: number; width: number; height: number } {\n if (child instanceof CompositionSequence) {\n return () => ({ x: 0, y: 0, width: child.intrinsicWidth, height: child.intrinsicHeight });\n }\n return () => child.target!.getLocalBounds();\n}\n"]}
1
+ {"version":3,"sources":["../src/space/camera.ts","../src/space/depth.ts","../src/space/Layer3D.ts","../src/space/lint.ts","../src/core/blend.ts","../src/sequences/Composition.ts"],"names":["i","frameOf","Container"],"mappings":";;;;;;AAQO,SAAS,gBAAA,CACd,IAAA,EACA,CAAA,EACA,OAAA,EACU;AACV,EAAA,KAAA,IAAS,IAAI,IAAA,CAAK,MAAA,GAAS,CAAA,EAAG,CAAA,IAAK,GAAG,CAAA,EAAA,EAAK;AACzC,IAAA,MAAM,CAAA,GAAI,KAAK,CAAC,CAAA;AAChB,IAAA,MAAM,MAAA,GAAS,CAAA,IAAK,CAAA,CAAE,KAAA,KAAU,CAAA,GAAI,EAAE,GAAA,IAAQ,CAAA,CAAE,GAAA,IAAO,OAAA,IAAW,CAAA,IAAK,OAAA,CAAA;AACvE,IAAA,IAAI,QAAQ,OAAO,CAAA;AAAA,EACrB;AACA,EAAA,OAAO,IAAA;AACT;AAGO,SAAS,YAAY,IAAA,EAAwD;AAClF,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,IAAA,CAAK,QAAQ,CAAA,EAAA,EAAK;AACpC,IAAA,KAAA,IAAS,IAAI,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,IAAA,CAAK,QAAQ,CAAA,EAAA,EAAK;AACxC,MAAA,MAAM,CAAA,GAAI,KAAK,CAAC,CAAA;AAChB,MAAA,MAAM,CAAA,GAAI,KAAK,CAAC,CAAA;AAChB,MAAA,IAAI,CAAA,CAAE,KAAA,GAAQ,CAAA,CAAE,GAAA,IAAO,CAAA,CAAE,KAAA,GAAQ,C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,MAAA,GAAS,MAAM,CAAC,CAAA;AAAA,IAC/C,CAAC,CAAA;AAAA,EACH;AAAA,EAES,YAAA,CAAa,KAAwB,QAAA,EAAwB;AACpE,IAAA,KAAA,CAAM,YAAA,CAAa,KAAK,QAAQ,CAAA;AAChC,IAAA,MAAM,SAAA,GAAY,WAAW,IAAA,CAAK,EAAA;AAClC,IAAA,KAAA,MAAW,SAAS,IAAA,CAAK,SAAA,EAAW,KAAA,CAAM,YAAA,CAAa,KAAK,SAAS,CAAA;AAAA,EACvE;AAAA,EAES,OAAA,GAAgB;AACvB,IAAA,KAAA,MAAW,CAAA,IAAK,IAAA,CAAK,SAAA,EAAW,CAAA,CAAE,OAAA,EAAQ;AAC1C,IAAA,IAAA,CAAK,YAAY,EAAC;AAClB,IAAA,KAAA,MAAW,CAAA,IAAK,IAAA,CAAK,SAAA,EAAW,CAAA,CAAE,OAAA,EAAQ;AAC1C,IAAA,KAAA,CAAM,OAAA,EAAQ;AAAA,EAChB;AACF;AAGA,SAAS,QAAQ,KAAA,EAAgF;AAC/F,EAAA,IAAI,iBAAiB,mBAAA,EAAqB;AACxC,IAAA,OAAO,OAAO,EAAE,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,KAAA,EAAO,KAAA,CAAM,cAAA,EAAgB,MAAA,EAAQ,KAAA,CAAM,eAAA,EAAgB,CAAA;AAAA,EACzF;AACA,EAAA,OAAO,MAAM,KAAA,CAAM,MAAA,CAAQ,cAAA,EAAe;AAC5C","file":"chunk-UXDR3ZDU.js","sourcesContent":["/** A camera layer's lifespan on the global timeline, seconds. */\nexport interface CameraWindow { start: number; end: number }\n\n/**\n * The active camera at time `t`: the last-listed (top-most) camera whose\n * lifespan covers `t`. Windows are [start, end), except that a camera running\n * to the end of its composition also covers the final instant `t === compEnd`.\n */\nexport function pickActiveCamera<T extends CameraWindow>(\n cams: readonly T[],\n t: number,\n compEnd: number,\n): T | null {\n for (let i = cams.length - 1; i >= 0; i--) {\n const c = cams[i]!;\n const inside = t >= c.start && (t < c.end || (c.end >= compEnd && t <= compEnd));\n if (inside) return c;\n }\n return null;\n}\n\n/** First pair of camera indices whose lifespans strictly overlap, or null. */\nexport function findOverlap(cams: readonly CameraWindow[]): [number, number] | null {\n for (let i = 0; i < cams.length; i++) {\n for (let j = i + 1; j < cams.length; j++) {\n const a = cams[i]!;\n const b = cams[j]!;\n if (a.start < b.end && b.start < a.end) return [i, j];\n }\n }\n return null;\n}\n","export interface DepthItem {\n /** Position in the composition's stack (monotonic; gaps allowed). */\n stackIndex: number;\n threeD: boolean;\n /** Camera-space depth (larger = farther). Only read for threeD items. */\n depth: number;\n}\n\nconst finite = (n: number): number => (Number.isFinite(n) ? n : 0);\n\n/**\n * zIndex per item. Non-3D items keep their stack index. Each run of\n * consecutive threeD items is redistributed over the same index slots,\n * farthest first (drawn first), ties in stack order.\n */\nexport function assignDepthOrder(items: readonly DepthItem[]): number[] {\n const out = items.map(i => i.stackIndex);\n let i = 0;\n while (i < items.length) {\n if (!items[i]!.threeD) { i++; continue; }\n let j = i;\n while (j + 1 < items.length && items[j + 1]!.threeD) j++;\n const run = items.slice(i, j + 1).map((it, k) => ({ it, pos: i + k }));\n const slots = run.map(r => r.it.stackIndex);\n const farthestFirst = [...run].sort((a, b) => finite(b.it.depth) - finite(a.it.depth));\n farthestFirst.forEach((r, k) => { out[r.pos] = slots[k]!; });\n i = j + 1;\n }\n return out;\n}\n","import { Container, Matrix, PerspectiveMesh, RenderTexture, Texture } from 'pixi.js';\nimport type { Sequence } from '../sequences/Base';\nimport { describeLayer } from '../core/lint';\nimport { DEG, NEAR, projectLayer, type CameraBasis, type LayerTransform, type Rect } from './math';\n\n/** Render textures are capped at this many pixels on the long side; larger layers are downscaled. */\nexport const MAX_TEXTURE_SIZE = 4096;\n/**\n * Render textures are drawn at this multiple of the layer size (until the caps),\n * so a layer enlarged by perspective (z > 0) stays sharp instead of showing\n * jagged edges and soft text.\n */\nexport const SUPERSAMPLE = 2;\n/** Total texture pixels per layer are capped here (≈ one 2048² target); resolution drops to fit. */\nexport const MAX_TEXTURE_PIXELS = 2048 * 2048;\n/** MSAA multiplies target memory ~4x, so only small textures get it (supersampling covers the rest). */\nexport const ANTIALIAS_MAX_PIXELS = 1024 * 1024;\n/** Mesh grid per side. 20 keeps steeply tilted planes free of visible affine warping. */\nexport const MESH_GRID = 20;\n\n/** The slice of a Pixi renderer Layer3D needs (also what tests fake). */\nexport interface SpaceHost {\n render(options: {\n container: Container;\n target: RenderTexture;\n transform: Matrix;\n clear: boolean;\n clearColor: number[];\n }): void;\n}\n\ntype Carrier = Container & { z?: number; rotationX?: number; rotationY?: number };\n\ninterface TextureSize { w: number; h: number; resolution: number; antialias: boolean }\n\n/** Sum of the target's filter paddings: the texture must be this much larger on every side or filter output is clipped. */\nfunction filterPadding(target: Container): number {\n const filters = (target as unknown as { filters?: ReadonlyArray<{ padding?: number }> | null }).filters;\n if (!Array.isArray(filters)) return 0;\n let pad = 0;\n for (const f of filters) pad += f?.padding ?? 0;\n return Number.isFinite(pad) && pad > 0 ? Math.ceil(pad) : 0;\n}\n\nexport function readLayerTransform(target: Container): LayerTransform {\n const c = target as Carrier;\n return {\n x: c.x, y: c.y, z: c.z ?? 0,\n rotationX: (c.rotationX ?? 0) * DEG,\n rotationY: (c.rotationY ?? 0) * DEG,\n rotationZ: c.rotation,\n scaleX: c.scale.x, scaleY: c.scale.y,\n pivotX: c.pivot.x, pivotY: c.pivot.y,\n };\n}\n\n/**\n * Draws one `threeD` sequence: its display object is rendered into a\n * RenderTexture (with its own 2D transform replaced, so layer-local content\n * lands at the texture origin) and shown on a PerspectiveMesh whose four\n * corners come from projecting the layer through the active camera.\n *\n * The sequence's `target` is never in the scene graph; the composition adds\n * `display` instead. `z`, `rotationX`, `rotationY` live on `target` as plain\n * numeric props so GSAP tweens them like any other prop.\n */\nexport class Layer3D {\n readonly display: PerspectiveMesh;\n /** Camera-space depth from the last update (larger = farther). */\n depth = 0;\n private rt: RenderTexture | null = null;\n /**\n * Textures replaced by a bigger / smaller one. Destroying one right away warns \"destroyed while still\n * bound\": the mesh's bind group still points at it until the next render. They go at the next update,\n * by which time a frame has been drawn with the new texture.\n */\n private retired: RenderTexture[] = [];\n private size: TextureSize | null = null;\n private warnedBehind = false;\n\n constructor(\n private readonly seq: Sequence,\n private readonly frameOf: () => Rect,\n ) {\n const target = seq.target as Carrier;\n target.z ??= 0;\n target.rotationX ??= 0;\n target.rotationY ??= 0;\n this.display = new PerspectiveMesh({ texture: Texture.WHITE, verticesX: MESH_GRID, verticesY: MESH_GRID });\n if (seq.spec.name) this.display.label = seq.spec.name;\n this.display.visible = false;\n }\n\n update(host: SpaceHost, basis: CameraBasis): void {\n this.flushRetired();\n const target = this.seq.target as Carrier | null;\n // Pixi skips rendering (and clearing) a container that is not `visible`\n // (e.g. PixiPlugin autoAlpha at alpha 0), which would leave a stale texture.\n if (!target || !target.renderable || !target.visible) return this.hide();\n\n const bounds = this.frameOf();\n const pad = filterPadding(target);\n const needW = Math.ceil(bounds.width + 2 * pad);\n const needH = Math.ceil(bounds.height + 2 * pad);\n if (!(needW >= 1 && needH >= 1) || !Number.isFinite(bounds.x) || !Number.isFinite(bounds.y)) return this.hide();\n\n const size = this.sizeFor(needW, needH);\n // The quad covers exactly the texture's pixel rect in layer space.\n const frame: Rect = { x: bounds.x - pad, y: bounds.y - pad, width: size.w, height: size.h };\n const projected = projectLayer(readLayerTransform(target), frame, basis);\n this.depth = projected.depth;\n if (!projected.visible) {\n if (!this.warnedBehind) {\n this.warnedBehind = true;\n if ((this.seq.spec as { hideBehindCamera?: boolean }).hideBehindCamera) return this.hide(); // on purpose: say nothing\n if (projected.depth > NEAR) {\n // the layer's own origin is in front of the camera: a tilt or a large size swings a CORNER past the camera plane\n console.warn(\n `pixi-effects: ${describeLayer(this.seq.spec)}: part of it (a corner) reaches the camera plane (z = ${(target.z ?? 0).toFixed(0)}, rotationX ${(target.rotationX ?? 0).toFixed(0)}°, rotationY ${(target.rotationY ?? 0).toFixed(0)}°), ` +\n `and a layer is hidden whole when any corner is at or behind it. Tilt it less (rotationX / rotationY), make it smaller, or keep the camera further away from it ` +\n `(the default camera sits at z = (height/2)/tan(fov/2), about 989 for 720p at fov 40).`,\n );\n } else {\n console.warn(\n `pixi-effects: ${describeLayer(this.seq.spec)} is at or behind the camera plane (z = ${(target.z ?? 0).toFixed(0)}) and is hidden. ` +\n `If that is unintended, lower its z or move the camera back (the default camera sits at z = (height/2)/tan(fov/2), about 989 for 720p at fov 40).`,\n );\n }\n }\n return this.hide();\n }\n\n this.ensureTexture(size);\n // `transform` replaces the container's own local transform for this render\n // (Pixi RenderGroupSystem), while `container.alpha` still applies — so the\n // texture carries the layer's alpha and the mesh alpha stays at 1.\n host.render({\n container: target,\n target: this.rt!,\n transform: new Matrix().translate(-frame.x, -frame.y),\n clear: true,\n clearColor: [0, 0, 0, 0],\n });\n this.display.geometry.setCorners(...projected.corners);\n this.display.visible = true;\n }\n\n destroy(): void {\n this.display.destroy();\n this.rt?.destroy(true);\n this.rt = null;\n this.flushRetired();\n }\n\n private flushRetired(): void {\n for (const t of this.retired) t.destroy(true);\n this.retired = [];\n }\n\n private hide(): void {\n this.display.visible = false;\n }\n\n /**\n * Texture size for content of w×h. An existing texture is kept while it is at\n * least that big and at most 2x too big, so content whose bounds change every\n * frame (typewriter text, growing shapes) does not reallocate each frame.\n */\n private sizeFor(w: number, h: number): TextureSize {\n const cur = this.size;\n if (cur && cur.w >= w && cur.h >= h && cur.w <= 2 * w && cur.h <= 2 * h) return cur;\n const resolution = Math.min(\n SUPERSAMPLE,\n MAX_TEXTURE_SIZE / Math.max(w, h),\n Math.sqrt(MAX_TEXTURE_PIXELS / (w * h)),\n );\n const antialias = w * h * resolution * resolution <= ANTIALIAS_MAX_PIXELS;\n return { w, h, resolution, antialias };\n }\n\n private ensureTexture(size: TextureSize): void {\n if (this.rt && this.size === size) return;\n // Same sampling: resize the texture where it is. Replacing it makes Pixi warn that the old one was\n // destroyed while still bound, because the mesh keeps pointing at it until the next render.\n if (this.rt && this.size && this.size.antialias === size.antialias) {\n this.rt.resize(size.w, size.h, size.resolution);\n this.size = size;\n return;\n }\n const next = RenderTexture.create({\n width: size.w, height: size.h, resolution: size.resolution, antialias: size.antialias,\n });\n this.display.texture = next;\n if (this.rt) this.retired.push(this.rt);\n this.rt = next;\n this.size = size;\n }\n}\n","import { collectPropKeys } from './specKeys';\nimport { describeLayer } from '../core/lint';\nimport type { SequenceSpec } from '../types';\n\ntype Warn = (message: string) => void;\nconst defaultWarn: Warn = m => console.warn(m);\n\nconst FOV_HINT = 'perspective is the camera\\'s \"fov\" — add a { type: \"camera\" } layer and set fov in its initial / keyframes';\n\n/** Keys that are never valid for any layer, with a hint at what the author probably meant. */\nconst LAYER_ALIASES: Record<string, string> = {\n rotateX: 'did you mean \"rotationX\"?',\n rotateY: 'did you mean \"rotationY\"?',\n rotateZ: 'did you mean \"rotation\"?',\n rotationZ: 'did you mean \"rotation\" (it is the Z rotation)?',\n translateZ: 'did you mean \"z\"?',\n depth: 'did you mean \"z\"?',\n posZ: 'did you mean \"z\"?',\n perspective: FOV_HINT,\n zoom: FOV_HINT,\n};\n\n/** Camera-only mistakes. */\nconst CAMERA_ALIASES: Record<string, string> = {\n pointOfInterest: 'did you mean \"lookAtX / lookAtY / lookAtZ\"?',\n lookAt: 'did you mean \"lookAtX / lookAtY / lookAtZ\"?',\n};\n\nconst CAMERA_PROPS = ['x', 'y', 'z', 'fov', 'lookAtX', 'lookAtY', 'lookAtZ', 'offsetX', 'offsetY', 'offsetZ', 'lookOffsetX', 'lookOffsetY', 'lookOffsetZ'];\nconst NEEDS_THREE_D = ['z', 'rotationX', 'rotationY'];\nconst SKEW_KEYS = ['skew', 'skewX', 'skewY'];\n\n/**\n * Warn (never throw) about the inputs an AI author is most likely to get wrong,\n * with a message that says what to change. One call per layer, at build time.\n */\nexport function lintSequence(spec: SequenceSpec, warn: Warn = defaultWarn): void {\n const who = describeLayer(spec);\n const keys = collectPropKeys(spec);\n const explained = new Set<string>();\n\n for (const k of keys) {\n const hint = LAYER_ALIASES[k] ?? (spec.type === 'camera' ? CAMERA_ALIASES[k] : undefined);\n if (hint) {\n explained.add(k);\n warn(`pixi-effects: ${who}: \"${k}\" is not a property — ${hint}`);\n }\n }\n\n if (spec.type === 'camera') {\n const raw = spec as unknown as Record<string, unknown>;\n for (const p of CAMERA_PROPS) {\n if (p in raw) warn(`pixi-effects: ${who}: \"${p}\" must go inside initial / keyframes, not on the camera itself`);\n }\n for (const k of Object.keys(raw)) {\n const hint = CAMERA_ALIASES[k] ?? LAYER_ALIASES[k];\n if (hint) warn(`pixi-effects: ${who}: \"${k}\" is not a property — ${hint} (inside initial)`);\n }\n for (const k of keys) {\n if (!explained.has(k) && !CAMERA_PROPS.includes(k)) {\n warn(`pixi-effects: ${who}: \"${k}\" has no effect on a camera (use ${CAMERA_PROPS.join(', ')})`);\n }\n }\n return;\n }\n\n if (spec.type === 'audio') {\n if (spec.threeD) warn(`pixi-effects: ${who}: threeD has no effect on audio`);\n return;\n }\n\n if (!spec.threeD) {\n for (const k of NEEDS_THREE_D) {\n if (keys.has(k)) warn(`pixi-effects: ${who}: \"${k}\" needs threeD: true (it is ignored otherwise)`);\n }\n } else {\n for (const k of SKEW_KEYS) {\n if (keys.has(k)) warn(`pixi-effects: ${who}: \"${k}\" is ignored on threeD layers`);\n }\n }\n}\n","import { describeLayer } from './lint';\n\nconst MODES = ['normal', 'add', 'screen', 'multiply'];\n\n/** Apply a layer's `blendMode` to its display object; an unknown mode warns and is ignored. */\nexport function applyBlendMode(spec: { blendMode?: string; name?: string; type: string }, display: { blendMode?: unknown; filters?: unknown }): void {\n const mode = spec.blendMode;\n if (mode === undefined) return;\n if (!MODES.includes(mode)) {\n console.warn(`pixi-effects: ${describeLayer(spec)}: blendMode \"${mode}\" is not supported (use ${MODES.join(', ')})`);\n return;\n }\n // A container's blend mode applies INSIDE a filter's offscreen pass (against transparent black: multiply gave\n // solid black) and not to the filtered result. With filters, the pass that draws onto the backdrop is the last\n // filter's, so the mode goes there; the container stays normal.\n const filters = display.filters;\n if (Array.isArray(filters) && filters.length > 0) {\n (filters[filters.length - 1] as { blendMode?: unknown }).blendMode = mode;\n return;\n }\n display.blendMode = mode;\n}\n","import { AlphaMask, Container, Rectangle } from 'pixi.js';\nimport { gsap } from 'gsap';\nimport { Sequence } from './Base';\nimport { NullSequence } from './Null';\nimport { suggestName } from '../core/options';\nimport { buildSequenceTree } from '../core/Composition';\nimport { CameraSequence } from '../space/CameraSequence';\nimport { findOverlap, pickActiveCamera } from '../space/camera';\nimport { assignDepthOrder } from '../space/depth';\nimport { Layer3D, type SpaceHost } from '../space/Layer3D';\nimport { lintSequence } from '../space/lint';\nimport { describeLayer, lintText, lintTiming, summarizeWarnings } from '../core/lint';\nimport { applyBlendMode } from '../core/blend';\nimport { cameraBasis, homeCamera } from '../space/math';\nimport type { CompositionSequenceSpec, AudioDescriptor, CompositionShape, SequenceSpec } from '../types';\n\ntype Timeline = ReturnType<typeof gsap.timeline>;\n\nexport class CompositionSequence extends Sequence {\n declare spec: CompositionSequenceSpec;\n private _innerContainer: Container | null = null;\n private _compositionShape: CompositionShape | null = null;\n _children: Sequence[] = [];\n private _cameras: CameraSequence[] = [];\n private _layers3d: Layer3D[] = [];\n /** Drawn children in stack order (cameras and target-less sequences excluded). */\n private _visual: Array<{ seq: Sequence; layer: Layer3D | null }> = [];\n /** Layers drawn inside a null layer (`parent`): they are not in the composition's own stack. */\n private _nested: Sequence[] = [];\n /** The null layer each parented layer is drawn inside. */\n private _parentOf = new Map<Sequence, NullSequence>();\n\n async build(): Promise<void> {\n const width = this.spec.width ?? this.parent?.width ?? this.root.width;\n const height = this.spec.height ?? this.parent?.height ?? this.root.height;\n if (this.duration === undefined) {\n this.duration = this.spec.duration ?? this.parent?.duration ?? this.root.duration;\n }\n const wrapper = new Container();\n wrapper.cullable = true;\n wrapper.cullableChildren = true;\n wrapper.cullArea = new Rectangle(0, 0, width, height);\n\n const inner = new Container();\n inner.cullable = true;\n inner.cullableChildren = true;\n wrapper.addChild(inner);\n\n this.target = wrapper;\n this.intrinsicWidth = width;\n this.intrinsicHeight = height;\n this._innerContainer = inner;\n this._compositionShape = { width, height, duration: this.duration };\n\n const lateKeyframes: string[] = [];\n for (const s of this.spec.sequences ?? []) {\n lintSequence(s);\n lintTiming(s, this.duration, (message, kind) => (kind === 'late-keyframe' ? lateKeyframes.push(message) : console.warn(message)));\n lintText(s);\n }\n for (const message of summarizeWarnings(lateKeyframes)) console.warn(message);\n\n this._children = await buildSequenceTree(\n this.spec.sequences ?? [],\n this._compositionShape,\n this.root,\n );\n this._resolveParents();\n for (const child of this._children) {\n // Cameras are display-less: they only feed the projection pass.\n if (child instanceof CameraSequence) {\n this._cameras.push(child);\n continue;\n }\n if (!child.target) continue;\n const holder = this._parentOf.get(child);\n const into = holder?.target ?? inner; // a layer with `parent` is drawn inside its null layer\n\n const maskSpec = (child.spec as { mask?: SequenceSpec }).mask;\n\n // threeD layers never enter the scene graph themselves: their display\n // object is rendered into a texture and a perspective mesh stands in.\n if (child.spec.threeD) {\n const layer = new Layer3D(child, frameOf(child));\n inner.addChild(layer.display);\n this._layers3d.push(layer);\n this._visual.push({ seq: child, layer });\n applyBlendMode(child.spec, layer.display);\n if (maskSpec) {\n console.warn(`pixi-effects: ${describeLayer(child.spec)}: mask is not supported on threeD layers yet; ignored`);\n }\n continue;\n }\n\n into.addChild(child.target);\n if (holder) this._nested.push(child);\n else this._visual.push({ seq: child, layer: null });\n applyBlendMode(child.spec, child.target);\n // If this child has a `mask` spec, build the mask sequence in the same\n // composition shape, add its target to the same parent (so its\n // transforms resolve in the same coord space), and wire PIXI's\n // mask channel. PIXI v8 renders mask containers into the stencil /\n // alpha buffer; they don't render as normal children.\n if (maskSpec) {\n // The mask lives and animates with the layer it masks: with no `at` of its own its `at` and\n // `duration` are the layer's, so its keyframes are measured from the layer's start too. An\n // explicit `at` is composition time, exactly like a layer's.\n const lifetime = maskSpec.at === undefined\n ? { at: child.at, duration: maskSpec.duration ?? child.duration }\n : {};\n const built = await buildSequenceTree([{ ...maskSpec, ...lifetime } as SequenceSpec], this._compositionShape, this.root);\n const maskSeq = built[0];\n if (maskSeq?.target) {\n into.addChild(maskSeq.target); // the mask shares the layer's space\n // PIXI v8 `setMask` accepts an `inverse` flag — that's how we\n // expose `maskInverted` from the spec. Falls back to plain\n // `target.mask = …` for runtimes that don't have setMask\n // (older PIXI builds).\n const inverse = (child.spec as { maskInverted?: boolean }).maskInverted ?? false;\n const t = child.target as Container & {\n setMask?: (opts: { mask: Container | null; inverse?: boolean }) => void;\n addEffect: (effect: AlphaMask) => void;\n mask: Container | null;\n };\n if (inverse || maskSpec.type === 'text') {\n // A stencil mask is the mask's geometry: a text layer's is its whole bounding box (the letters' alpha is ignored), and\n // PIXI's inverted stencil tests against the empty level, so inside a masked parent it shows what the parent hides.\n // An alpha mask draws the mask into a texture and uses its alpha: letters stay letters, an inverse is 1 − alpha.\n const effect = new AlphaMask({ mask: maskSeq.target });\n effect.inverse = inverse;\n t.setMask?.({ mask: undefined as never, inverse }); // the alpha pipe reads `inverse` from the maskee's mask options, not from the effect\n t.addEffect(effect);\n } else if (typeof t.setMask === 'function') {\n t.setMask({ mask: maskSeq.target, inverse });\n } else {\n t.mask = maskSeq.target;\n }\n child.maskSequence = maskSeq;\n maskSeq.keepHidden = maskSpec.type === 'image' || maskSpec.type === 'video'; // PIXI: a Sprite mask is hidden by renderable = false\n }\n }\n }\n\n if (this._layers3d.length > 0) {\n // Stack order becomes explicit zIndex so threeD layers can be re-sorted\n // by depth each frame without reparenting.\n inner.sortableChildren = true;\n this._visual.forEach((v, i) => {\n (v.layer?.display ?? v.seq.target!).zIndex = i;\n });\n } else if (this._cameras.length > 0) {\n console.warn('pixi-effects: camera has no effect: this composition has no threeD layers');\n }\n\n this.buildFilters();\n }\n\n override bindTimeline(timeline: Timeline, offset = 0): void {\n super.bindTimeline(timeline, offset);\n // Children's `at` is relative to this composition's start, so push them\n // forward by our absolute start time on the global timeline.\n const childOffset = offset + this.at;\n for (const child of this._children) {\n // Each layer builds its tweens in a small timeline of its own, which is added to the parent once, finished. Adding\n // thousands of tweens one by one to a single timeline makes GSAP re-measure the whole timeline at every add (the cost\n // grows with the square of the count: ~3 s for a piece with 700 particle layers); this way the parent only ever holds\n // one child per layer. Positions stay absolute, so the picture at any time is the same.\n const own = gsap.timeline({ defaults: { ease: 'none' } });\n child.bindTimeline(own, childOffset);\n // The mask shares the maskee's offset — its `at` is interpreted\n // relative to the composition's start, just like the child itself,\n // so a reveal-from-zero animation lines up naturally.\n child.maskSequence?.bindTimeline(own, childOffset);\n timeline.add(own, 0);\n }\n const overlap = findOverlap(this._cameras.map(c => c.window()));\n if (overlap) {\n console.warn(`pixi-effects: cameras #${overlap[0] + 1} and #${overlap[1] + 1} overlap in time; the top-most one wins`);\n }\n }\n\n /**\n * Drawn children in stack order, with the display object that stands in for each (the mesh for a threeD layer).\n * Null layers draw nothing and are left out; the layers inside them follow, with the null layers that carry them.\n */\n layers(): Array<{ seq: Sequence; display: Container; threeD: boolean; carriers: NullSequence[] }> {\n const carriersOf = (seq: Sequence): NullSequence[] => {\n const out: NullSequence[] = [];\n for (let p = this._parentOf.get(seq); p; p = this._parentOf.get(p)) out.push(p);\n return out;\n };\n return [...this._visual.map(v => v.seq), ...this._nested]\n .filter(seq => !(seq instanceof NullSequence))\n .map(seq => {\n const layer = this._visual.find(v => v.seq === seq)?.layer ?? null;\n return {\n seq,\n display: (layer?.display ?? seq.target!) as unknown as Container,\n threeD: layer !== null,\n carriers: carriersOf(seq),\n };\n });\n }\n\n /** Match every `parent: 'name'` to a null layer; anything that cannot work is said out loud and drawn unparented. */\n private _resolveParents(): void {\n const nulls = this._children.filter((c): c is NullSequence => c instanceof NullSequence);\n const nullNames = nulls.map(n => n.spec.name).filter((n): n is string => !!n);\n const warned = new Set<string>();\n for (const child of this._children) {\n const want = child.spec.parent;\n if (want === undefined) continue;\n const who = describeLayer(child.spec);\n if (child instanceof CameraSequence) { console.warn(`pixi-effects: ${who}: a camera cannot have a parent; ignored`); continue; }\n if (child.spec.threeD) { console.warn(`pixi-effects: ${who}: a threeD layer cannot have a parent (parent \"${want}\" ignored)`); continue; }\n const same = this._children.filter(c => c.spec.name === want);\n if (same.length === 0) {\n const hint = suggestName(want, nullNames);\n console.warn(`pixi-effects: ${who}: parent \"${want}\": no layer with that name${hint ? `; did you mean \"${hint}\"?` : ''} (the layer is drawn without a parent)`);\n continue;\n }\n const holder = same.find((c): c is NullSequence => c instanceof NullSequence);\n if (!holder) {\n console.warn(`pixi-effects: ${who}: parent \"${want}\" is a ${same[0]!.spec.type} layer; only { type: 'null' } layers can be parents (the layer is drawn without a parent)`);\n continue;\n }\n if (same.length > 1 && !warned.has(want)) {\n warned.add(want);\n console.warn(`pixi-effects: ${same.length} layers are named \"${want}\"; parent \"${want}\" uses the first null layer with that name`);\n }\n if (holder === child) { console.warn(`pixi-effects: ${who} is its own parent; ignored`); continue; }\n this._parentOf.set(child, holder);\n }\n // a chain that leads back to itself: break it where we find it\n for (const start of this._children) {\n const seen = new Set<Sequence>([start]);\n for (let p = this._parentOf.get(start); p; p = this._parentOf.get(p)) {\n if (p === start) {\n const names = [...seen].map(s => s.spec.name ?? s.spec.type).join(' → ');\n console.warn(`pixi-effects: parent cycle: ${names} → ${start.spec.name ?? start.spec.type}; the parent of \"${start.spec.name ?? start.spec.type}\" is ignored`);\n this._parentOf.delete(start);\n break;\n }\n if (seen.has(p)) break;\n seen.add(p);\n }\n }\n }\n\n override syncFrame(): void {\n super.syncFrame();\n for (const child of this._children) child.syncFrame();\n }\n\n override updateSpace(t: number, host: SpaceHost): void {\n // Inner compositions first: a threeD composition is rendered into its own\n // texture by this level, so its content must already be projected.\n for (const child of this._children) child.updateSpace(t, host);\n if (this._layers3d.length === 0 || !this._compositionShape) return;\n\n const { width, height } = this._compositionShape;\n const compEnd = (this.absoluteStart ?? 0) + (this.duration ?? 0);\n const active = pickActiveCamera(\n this._cameras.map(cam => ({ cam, ...cam.window() })),\n t,\n compEnd,\n );\n const basis = cameraBasis(active ? active.cam.state() : homeCamera(width, height), width, height);\n\n for (const layer of this._layers3d) layer.update(host, basis);\n\n const order = assignDepthOrder(\n this._visual.map((v, i) => ({ stackIndex: i, threeD: v.layer !== null, depth: v.layer?.depth ?? 0 })),\n );\n this._visual.forEach((v, i) => {\n if (v.layer) v.layer.display.zIndex = order[i]!;\n });\n }\n\n override collectAudio(out: AudioDescriptor[], baseTime: number): void {\n super.collectAudio(out, baseTime);\n const childBase = baseTime + this.at;\n for (const child of this._children) child.collectAudio(out, childBase);\n }\n\n override destroy(): void {\n for (const l of this._layers3d) l.destroy();\n this._layers3d = [];\n for (const c of this._children) c.destroy();\n super.destroy();\n }\n}\n\n/** Layer-space rectangle a threeD child projects: a composition's frame, otherwise its content bounds. */\nfunction frameOf(child: Sequence): () => { x: number; y: number; width: number; height: number } {\n if (child instanceof CompositionSequence) {\n return () => ({ x: 0, y: 0, width: child.intrinsicWidth, height: child.intrinsicHeight });\n }\n return () => child.target!.getLocalBounds();\n}\n"]}
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkETAIVOHP_cjs = require('./chunk-ETAIVOHP.cjs');
4
- var chunkLBJRXU7N_cjs = require('./chunk-LBJRXU7N.cjs');
3
+ var chunkJW67MDHQ_cjs = require('./chunk-JW67MDHQ.cjs');
4
+ var chunkANO5R2E6_cjs = require('./chunk-ANO5R2E6.cjs');
5
5
  var chunkUQBGW5DO_cjs = require('./chunk-UQBGW5DO.cjs');
6
6
  var PIXI = require('pixi.js');
7
7
  var gsap = require('gsap');
@@ -466,19 +466,22 @@ function inspectFonts(root) {
466
466
  if (face.status === "error") failed.add(face.family.replace(/^["']|["']$/g, ""));
467
467
  });
468
468
  const missing = [];
469
+ const used = /* @__PURE__ */ new Set();
469
470
  const walk2 = (seq, index) => {
470
471
  const spec = seq.spec;
471
472
  if (spec.type === "text") {
472
473
  const raw = spec.style?.fontFamily;
473
474
  const family2 = Array.isArray(raw) ? raw.join(", ") : typeof raw === "string" ? raw : "";
474
475
  const list = family2.split(",").map((f) => f.trim()).filter(Boolean);
476
+ for (const f of list) used.add(f.replace(/^["']|["']$/g, "").toLowerCase());
475
477
  if (list.length && !list.some(fontAvailable) && !list.some((f) => failed.has(f.replace(/^["']|["']$/g, "")))) missing.push({ layer: spec.name ?? `text#${index}`, family: family2 });
476
478
  }
477
479
  if (seq.maskSequence) walk2(seq.maskSequence, index);
478
480
  (seq._children ?? []).forEach((child, i) => walk2(child, i));
479
481
  };
480
482
  walk2(root, 0);
481
- return { missing, failed: [...failed] };
483
+ const all = [...failed];
484
+ return { missing, failed: all.filter((f) => used.has(f.toLowerCase())), failedUnused: all.filter((f) => !used.has(f.toLowerCase())) };
482
485
  }
483
486
 
484
487
  // src/core/scenes.ts
@@ -486,6 +489,92 @@ function namedScenes(rows) {
486
489
  return rows.filter((r) => r.depth === 0 && r.type === "composition" && !/[#×]/.test(r.name) && r.end - r.start >= 1).map((r) => ({ name: r.name, start: r.start, end: r.end }));
487
490
  }
488
491
 
492
+ // src/core/review.ts
493
+ function sampleFrames({ totalFrames, frameRate, scenes = [], step = 0.25, cap = 240 }) {
494
+ const last = totalFrames;
495
+ const clamp2 = (f) => Math.max(0, Math.min(last, Math.round(f)));
496
+ const edges = /* @__PURE__ */ new Set([0, last]);
497
+ for (const s of scenes) {
498
+ edges.add(clamp2(s.start * frameRate));
499
+ edges.add(clamp2(s.end * frameRate - 1));
500
+ }
501
+ const room = Math.max(0, cap - edges.size);
502
+ const seconds = totalFrames / frameRate;
503
+ const wanted = Math.floor(seconds / step) + 1;
504
+ const stride = wanted <= room ? step : seconds / Math.max(1, room);
505
+ const frames = new Set(edges);
506
+ for (let t = stride; frames.size < cap && t < seconds; t += stride) frames.add(clamp2(t * frameRate));
507
+ return [...frames].sort((a, b) => a - b);
508
+ }
509
+ var AT_HELP = "use seconds (3.5), a percentage (50%), a frame (f120) or a layer's start / mid / end (name@end)";
510
+ function resolveAtList(list, ctx) {
511
+ const { frameRate: fps, totalFrames, duration, rows } = ctx;
512
+ const out = [], used = /* @__PURE__ */ new Set();
513
+ const named = rows.flatMap((r) => r.parts && r.partNames ? r.partNames.map((name, i) => ({ name, start: r.parts[i].start, end: r.parts[i].end })) : [r]);
514
+ for (const raw of String(list).split(",").map((s) => s.trim()).filter(Boolean)) {
515
+ let frame, label, m;
516
+ if (m = raw.match(/^(.+)@(start|mid|end)$/)) {
517
+ const row = named.find((r) => r.name === m[1]);
518
+ if (!row) throw new Error(`--at "${raw}": no layer named "${m[1]}" (names: ${named.slice(0, 40).map((r) => r.name).join(", ")}${named.length > 40 ? ", \u2026" : ""})`);
519
+ const t = m[2] === "start" ? row.start : m[2] === "mid" ? (row.start + row.end) / 2 : row.end - 1 / fps;
520
+ frame = Math.round(t * fps);
521
+ label = `${m[1]}-${m[2]}`;
522
+ } else if (m = raw.match(/^(\d+(?:\.\d+)?)%$/)) {
523
+ frame = Math.round(Number(m[1]) / 100 * totalFrames);
524
+ label = `${m[1]}pct`;
525
+ } else if (m = raw.match(/^f(\d+)$/i)) {
526
+ frame = Number(m[1]);
527
+ label = `f${m[1]}`;
528
+ } else if (/^\d+(\.\d+)?$/.test(raw)) {
529
+ frame = Math.round(Number(raw) * fps);
530
+ label = `${Number(raw).toFixed(2)}s`;
531
+ } else throw new Error(`--at: cannot read "${raw}": ${AT_HELP}`);
532
+ if (frame > totalFrames || frame < 0) throw new Error(`--at "${raw}" is past the end: the movie is ${duration} s (${totalFrames} frames)`);
533
+ label = label.replace(/[\\/:*?"<>|]+/g, "-");
534
+ let unique = label, n = 2;
535
+ while (used.has(unique)) unique = `${label}-${n++}`;
536
+ used.add(unique);
537
+ out.push({ label: unique, frame });
538
+ }
539
+ return out;
540
+ }
541
+ function groupIssues(perFrame) {
542
+ const groups = /* @__PURE__ */ new Map();
543
+ for (const { frame, issues } of perFrame) {
544
+ for (const message of issues) {
545
+ const key = message.replace(/-?\d+(\.\d+)?/g, "#");
546
+ const g = groups.get(key);
547
+ if (g) {
548
+ g.count++;
549
+ g.lastFrame = frame;
550
+ } else groups.set(key, { message, count: 1, firstFrame: frame, lastFrame: frame });
551
+ }
552
+ }
553
+ return [...groups.values()];
554
+ }
555
+ function splitIssues(groups, strict = false) {
556
+ if (strict) return { problems: groups, review: [] };
557
+ const overlap = (g) => /\boverlap\b/.test(g.message);
558
+ return { problems: groups.filter((g) => !overlap(g)), review: groups.filter(overlap) };
559
+ }
560
+ async function reviewMovie(movie, opts = {}) {
561
+ const rows = movie.timelineData().rows;
562
+ const at = opts.at ? resolveAtList(opts.at, { frameRate: movie.frameRate, totalFrames: movie.totalFrames, duration: movie.duration, rows }) : [];
563
+ const frames = sampleFrames({ totalFrames: movie.totalFrames, frameRate: movie.frameRate, scenes: namedScenes(rows) });
564
+ const perFrame = [];
565
+ for (const frame of frames) {
566
+ const r = await movie.inspect(frame, { layers: "none" });
567
+ if (r.issues.length) perFrame.push({ frame, issues: r.issues });
568
+ }
569
+ const grouped = splitIssues(groupIssues(perFrame), !!opts.strict);
570
+ const fonts = movie.inspectFonts();
571
+ for (const f of fonts.failedUnused) grouped.review.push({ message: `web font "${f}" failed to load, but no text layer uses it (a broken or unused @font-face)`, count: 1, firstFrame: 0, lastFrame: 0 });
572
+ for (const m of fonts.missing) {
573
+ (opts.strict ? grouped.problems : grouped.review).push({ message: `layer "${m.layer}": none of the fonts "${m.family}" is available here (it is drawn in a fallback font)`, count: 1, firstFrame: 0, lastFrame: 0 });
574
+ }
575
+ return { frames: frames.length, problems: grouped.problems, review: grouped.review, fonts, audio: movie.audioBuffer ? movie.inspectAudio() : null, at };
576
+ }
577
+
489
578
  // src/core/onion.ts
490
579
  function onionTimes(from, to, count) {
491
580
  if (count <= 1) return [from];
@@ -522,9 +611,9 @@ function resolveRange(range2, ctx) {
522
611
  if (range2 === void 0) return { fromFrame: 0, toFrame: totalFrames, fromSec: 0, toSec: duration, partial: false };
523
612
  let from, to;
524
613
  if (typeof range2 === "string") {
525
- const rows = (ctx.rows ?? []).filter((r) => r.depth === 0);
614
+ const rows = (ctx.rows ?? []).filter((r) => r.depth === 0).flatMap((r) => r.parts && r.partNames ? r.partNames.map((name, i) => ({ name, start: r.parts[i].start, end: r.parts[i].end })) : [r]);
526
615
  const row = rows.find((r) => r.name === range2);
527
- if (!row) throw new Error(`pixi-effects: render({ range: "${range2}" }): no layer named "${range2}" at the top level (names: ${rows.map((r) => r.name).join(", ") || "none"})`);
616
+ if (!row) throw new Error(`pixi-effects: render({ range: "${range2}" }): no layer named "${range2}" at the top level (names: ${rows.slice(0, 40).map((r) => r.name).join(", ") || "none"}${rows.length > 40 ? ", \u2026" : ""})`);
528
617
  from = row.start;
529
618
  to = row.end;
530
619
  } else {
@@ -689,7 +778,7 @@ async function exportFrames(movie, options = {}) {
689
778
  }
690
779
  await canvasSource.close();
691
780
  await output.finalize();
692
- if (mb) await movie.gotoFrame(movie.totalFrames, true);
781
+ if (mb) await movie.gotoFrame(range2.toFrame, true);
693
782
  return new Blob([output.target.buffer], { type: output.format.mimeType });
694
783
  } finally {
695
784
  movie.app.ticker.start();
@@ -1136,16 +1225,16 @@ function expandTransitions(spec) {
1136
1225
  if (toUses > 1) {
1137
1226
  throw new Error(`pixi-effects: ${tag} sequence "${t.to}" is used as \`to\` in more than one transition`);
1138
1227
  }
1139
- const tStart = chunkLBJRXU7N_cjs.resolveAt(t.at, parentDuration);
1228
+ const tStart = chunkANO5R2E6_cjs.resolveAt(t.at, parentDuration);
1140
1229
  const tEnd = tStart + t.duration;
1141
1230
  const fromSeq = fromEntry.seq;
1142
- const fromStart = chunkLBJRXU7N_cjs.resolveAt(fromSeq.at, parentDuration);
1231
+ const fromStart = chunkANO5R2E6_cjs.resolveAt(fromSeq.at, parentDuration);
1143
1232
  const fromEnd = fromStart + (fromSeq.duration ?? parentDuration);
1144
1233
  if (tStart < fromStart - EPS || tEnd > fromEnd + EPS) {
1145
1234
  throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`from\` "${t.from}" (lives [${fromStart}, ${fromEnd}], so it ends at ${fromEnd})`);
1146
1235
  }
1147
1236
  const toSeq = toEntry.seq;
1148
- const toStart = chunkLBJRXU7N_cjs.resolveAt(toSeq.at, parentDuration);
1237
+ const toStart = chunkANO5R2E6_cjs.resolveAt(toSeq.at, parentDuration);
1149
1238
  const toEnd = toStart + (toSeq.duration ?? parentDuration);
1150
1239
  if (tStart < toStart - EPS || tEnd > toEnd + EPS) {
1151
1240
  throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`to\` "${t.to}" (lives [${toStart}, ${toEnd}], so it starts at ${toStart})`);
@@ -1485,9 +1574,9 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
1485
1574
  onCanvas = inter === 0 && area > 0 ? "none" : inter >= area - 1e-6 ? "full" : "partial";
1486
1575
  if (area === 0) onCanvas = "none";
1487
1576
  }
1488
- const keys = chunkLBJRXU7N_cjs.collectPropKeys(seq.spec);
1577
+ const keys = chunkANO5R2E6_cjs.collectPropKeys(seq.spec);
1489
1578
  const carried = carriers.some((c) => {
1490
- const k = chunkLBJRXU7N_cjs.collectPropKeys(c.spec);
1579
+ const k = chunkANO5R2E6_cjs.collectPropKeys(c.spec);
1491
1580
  return (c.spec.keyframes ?? []).length > 0 && (k.has("x") || k.has("y") || k.has("rotation") || k.has("scale"));
1492
1581
  });
1493
1582
  const moving = parentMoving || carried || (seq.spec.keyframes ?? []).length > 0 && (keys.has("x") || keys.has("y"));
@@ -1508,7 +1597,7 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
1508
1597
  const group = parentScene ?? (name !== void 0 && blending.has(name) ? name : void 0);
1509
1598
  if (group) scene.set(info, group);
1510
1599
  if (zero || seq.showsNothingYet) scaledToNothing.add(info);
1511
- if (seq instanceof chunkETAIVOHP_cjs.CompositionSequence) walk2(seq, prefix + label + "/", insideThreeD || threeD, visible, group, moving, zero);
1600
+ if (seq instanceof chunkJW67MDHQ_cjs.CompositionSequence) walk2(seq, prefix + label + "/", insideThreeD || threeD, visible, group, moving, zero);
1512
1601
  });
1513
1602
  };
1514
1603
  walk2(root, "", false, true);
@@ -1569,10 +1658,10 @@ function walk(comp, parentStart, parentEnd, depth, prefix, rows, transitions) {
1569
1658
  const start = parentStart + (seq.at ?? 0);
1570
1659
  const end = Math.min(parentEnd, seq.duration !== void 0 ? start + seq.duration : parentEnd);
1571
1660
  const span = end - start;
1572
- const keys = (seq.spec.keyframes ?? []).map((kf) => round(start + chunkLBJRXU7N_cjs.resolveAt(kf.at, span))).sort((a, b) => a - b).slice(0, MAX_KEYS);
1661
+ const keys = (seq.spec.keyframes ?? []).map((kf) => round(start + chunkANO5R2E6_cjs.resolveAt(kf.at, span))).sort((a, b) => a - b).slice(0, MAX_KEYS);
1573
1662
  const row = { path: prefix + name, name, type: seq.spec.type, depth, start: round(start), end: round(end), keys, detail: detailOf(seq) };
1574
1663
  const inner = [];
1575
- const isComp = seq instanceof chunkETAIVOHP_cjs.CompositionSequence;
1664
+ const isComp = seq instanceof chunkJW67MDHQ_cjs.CompositionSequence;
1576
1665
  if (isComp) walk(seq, start, end, depth + 1, prefix + name + "/", inner, transitions);
1577
1666
  entries.push({ row, inner, groupable: !isComp });
1578
1667
  });
@@ -1605,7 +1694,8 @@ function groupFamilies(entries) {
1605
1694
  start: Math.min(...members.map((x) => x.start)),
1606
1695
  end: Math.max(...members.map((x) => x.end)),
1607
1696
  keys: members.flatMap((x) => x.keys).sort((a, b) => a - b).slice(0, MAX_KEYS),
1608
- parts: members.map((x) => ({ start: x.start, end: x.end }))
1697
+ parts: members.map((x) => ({ start: x.start, end: x.end })),
1698
+ partNames: members.map((x) => x.name)
1609
1699
  });
1610
1700
  } else {
1611
1701
  out.push(e.row, ...e.inner);
@@ -2120,7 +2210,7 @@ var Movie = class {
2120
2210
  height: options.composition.height ?? this.height,
2121
2211
  duration: options.composition.duration ?? this.duration
2122
2212
  } : void 0;
2123
- await chunkLBJRXU7N_cjs.ensureFilterLibrary(seededComposition);
2213
+ await chunkANO5R2E6_cjs.ensureFilterLibrary(seededComposition);
2124
2214
  const userComposition = seededComposition ? expandTransitions(seededComposition) : void 0;
2125
2215
  const rootSeqSpec = {
2126
2216
  type: "composition",
@@ -2130,7 +2220,7 @@ var Movie = class {
2130
2220
  ...userComposition
2131
2221
  };
2132
2222
  if (userComposition) carryTransitionWindows(userComposition, rootSeqSpec);
2133
- const composition = new chunkETAIVOHP_cjs.CompositionSequence(rootSeqSpec, null, rootShape);
2223
+ const composition = new chunkJW67MDHQ_cjs.CompositionSequence(rootSeqSpec, null, rootShape);
2134
2224
  await composition.build();
2135
2225
  this._rootSequence = composition;
2136
2226
  if (composition.target) root.addChild(composition.target);
@@ -2425,6 +2515,27 @@ var Movie = class {
2425
2515
  * The soundtrack, measured: when every audio layer plays, how loud the mix is over time, and `issues`
2426
2516
  * (limiting, inaudible layers, sounds cut off by the end). Use it to CHECK sound you cannot hear.
2427
2517
  */
2518
+ /** The pictures to look at for moments such as `3.5`, `50%`, `f120`, `title@end` (comma-separated). A mistake says what could not be read. */
2519
+ resolveAt(list) {
2520
+ this._requireReady("resolveAt");
2521
+ return resolveAtList(list, { frameRate: this.frameRate, totalFrames: this.totalFrames, duration: this.duration, rows: this.timelineData().rows });
2522
+ }
2523
+ /**
2524
+ * One call that looks at everything `pixi-effects-check` looks at inside the page: layout issues over the whole timeline (every
2525
+ * scene's first and last frame and a frame every 0.25 s), fonts and the sound. See `ReviewReport`. Page warnings are in `window.__logs`. The movie is left as it was.
2526
+ */
2527
+ async review(opts = {}) {
2528
+ chunkUQBGW5DO_cjs.warnUnknownOptions("movie.review()", opts, ["at", "strict"]);
2529
+ this._requireReady("review");
2530
+ const back = this.currentFrame, wasAtPoster = this._atPoster;
2531
+ try {
2532
+ return await reviewMovie(this, opts);
2533
+ } finally {
2534
+ this.currentFrame = back;
2535
+ if (wasAtPoster) await this._showPoster();
2536
+ else await this._quietly(() => this.gotoFrame(back, true));
2537
+ }
2538
+ }
2428
2539
  /**
2429
2540
  * The fonts of the text layers: `missing` lists layers none of whose `fontFamily` entries is available in this browser (they are
2430
2541
  * drawn in a fallback font), `failed` lists web fonts (`@font-face`) whose file could not be loaded.
@@ -2916,7 +3027,7 @@ function clamp(v, lo, hi) {
2916
3027
  return Math.max(lo, Math.min(hi, v));
2917
3028
  }
2918
3029
  function parseEase(name) {
2919
- chunkLBJRXU7N_cjs.checkEase(name, "a preset");
3030
+ chunkANO5R2E6_cjs.checkEase(name, "a preset");
2920
3031
  return gsap.gsap.parseEase(name);
2921
3032
  }
2922
3033
 
@@ -2939,17 +3050,17 @@ function orbit(opts) {
2939
3050
  throw new Error("pixi-effects: orbit() cannot combine `radius` with `dollyZoom` \u2014 the radius follows the animated fov");
2940
3051
  }
2941
3052
  const [cx, cy] = opts.center ?? [width / 2, height / 2];
2942
- const fixedR = opts.radius ?? chunkLBJRXU7N_cjs.homeDistance(height, fov ?? chunkLBJRXU7N_cjs.DEFAULT_FOV);
3053
+ const fixedR = opts.radius ?? chunkANO5R2E6_cjs.homeDistance(height, fov ?? chunkANO5R2E6_cjs.DEFAULT_FOV);
2943
3054
  const start = opts.start ?? -degrees / 2;
2944
3055
  const steps = Math.max(1, Math.round(duration * stepsPerSecond));
2945
3056
  const easeFn = parseEase(ease);
2946
3057
  const dollyEase = dolly ? parseEase(dolly.ease ?? ease) : null;
2947
3058
  const pos = (i) => {
2948
3059
  const p = i / steps;
2949
- const a = (start + degrees * easeFn(p)) * chunkLBJRXU7N_cjs.DEG;
3060
+ const a = (start + degrees * easeFn(p)) * chunkANO5R2E6_cjs.DEG;
2950
3061
  if (!dolly) return { x: cx + fixedR * Math.sin(a), z: fixedR * Math.cos(a) };
2951
3062
  const f = dolly.from + (dolly.to - dolly.from) * dollyEase(p);
2952
- const R = chunkLBJRXU7N_cjs.homeDistance(height, f);
3063
+ const R = chunkANO5R2E6_cjs.homeDistance(height, f);
2953
3064
  return { x: cx + R * Math.sin(a), z: R * Math.cos(a), fov: f };
2954
3065
  };
2955
3066
  const keyframes = [];
@@ -3004,7 +3115,7 @@ function particles(opts) {
3004
3115
  const round3 = (v) => Math.round(v * 1e6) / 1e6;
3005
3116
  const out = [];
3006
3117
  for (let i = 0; i < count; i++) {
3007
- const r = chunkLBJRXU7N_cjs.random(seed * 1000003 + i * 7919 + 17);
3118
+ const r = chunkANO5R2E6_cjs.random(seed * 1000003 + i * 7919 + 17);
3008
3119
  const pick = ([a2, b]) => a2 + r() * (b - a2);
3009
3120
  const born = at + r() * emit;
3010
3121
  const lifetime = pick(life);
@@ -3017,7 +3128,7 @@ function particles(opts) {
3017
3128
  const turn = spin ? pick(spin) : 0;
3018
3129
  const startAngle = spin ? r() * 360 : 0;
3019
3130
  const swayAmp = sway?.amp ?? 0, swayFreq = sway?.freq ?? 1;
3020
- const n0 = sway ? chunkLBJRXU7N_cjs.noise(0, seed * 1000003 + i) : 0;
3131
+ const n0 = sway ? chunkANO5R2E6_cjs.noise(0, seed * 1000003 + i) : 0;
3021
3132
  const at_ = (t) => {
3022
3133
  const axis = (p0, v0, acc) => {
3023
3134
  if (drag > 0) {
@@ -3026,7 +3137,7 @@ function particles(opts) {
3026
3137
  }
3027
3138
  return p0 + v0 * t + 0.5 * acc * t * t;
3028
3139
  };
3029
- const sw = sway ? swayAmp * (chunkLBJRXU7N_cjs.noise(t * swayFreq, seed * 1000003 + i) - n0) : 0;
3140
+ const sw = sway ? swayAmp * (chunkANO5R2E6_cjs.noise(t * swayFreq, seed * 1000003 + i) - n0) : 0;
3030
3141
  return { x: axis(x0, vx, wind) + sw, y: axis(y0, vy, gravity) };
3031
3142
  };
3032
3143
  const kfs = [];
@@ -3088,7 +3199,7 @@ function followPath(opts) {
3088
3199
  if (steps > MAX_STEPS) throw new Error(`followPath(): ${steps} samples is too many (max ${MAX_STEPS}); lower frameRate or duration`);
3089
3200
  const segments = [];
3090
3201
  let total = 0;
3091
- for (const line of chunkLBJRXU7N_cjs.flattenSvgPath(d)) {
3202
+ for (const line of chunkANO5R2E6_cjs.flattenSvgPath(d)) {
3092
3203
  const p = line.closed ? [...line.pts, line.pts[0], line.pts[1]] : line.pts;
3093
3204
  for (let i = 2; i < p.length; i += 2) {
3094
3205
  const len = Math.hypot(p[i] - p[i - 2], p[i + 1] - p[i - 1]);
@@ -3241,7 +3352,7 @@ function distances(n, from, grid, seed) {
3241
3352
  if (n === 0) return [];
3242
3353
  if (from === "random") {
3243
3354
  const order = Array.from({ length: n }, (_, i) => i);
3244
- const r = chunkLBJRXU7N_cjs.random(seed);
3355
+ const r = chunkANO5R2E6_cjs.random(seed);
3245
3356
  for (let i = n - 1; i > 0; i--) {
3246
3357
  const j = Math.floor(r() * (i + 1));
3247
3358
  [order[i], order[j]] = [order[j], order[i]];
@@ -3303,7 +3414,7 @@ function wiggle(opts) {
3303
3414
  to[n] = p.around;
3304
3415
  return;
3305
3416
  }
3306
- const off = (chunkLBJRXU7N_cjs.rand(seed * 7919 + pi * 104729 + s * 31 + 1) * 2 - 1) * p.amp;
3417
+ const off = (chunkANO5R2E6_cjs.rand(seed * 7919 + pi * 104729 + s * 31 + 1) * 2 - 1) * p.amp;
3307
3418
  to[n] = typeof p.around === "number" ? p.around + off : `(${p.around}) ${off < 0 ? "-" : "+"} ${Math.abs(off)}`;
3308
3419
  });
3309
3420
  out.push({ at: at + s * stepLen, to, duration: stepLen, ease });
@@ -3768,19 +3879,19 @@ function withFade(spec, opts) {
3768
3879
 
3769
3880
  Object.defineProperty(exports, "noise", {
3770
3881
  enumerable: true,
3771
- get: function () { return chunkLBJRXU7N_cjs.noise; }
3882
+ get: function () { return chunkANO5R2E6_cjs.noise; }
3772
3883
  });
3773
3884
  Object.defineProperty(exports, "rand", {
3774
3885
  enumerable: true,
3775
- get: function () { return chunkLBJRXU7N_cjs.rand; }
3886
+ get: function () { return chunkANO5R2E6_cjs.rand; }
3776
3887
  });
3777
3888
  Object.defineProperty(exports, "random", {
3778
3889
  enumerable: true,
3779
- get: function () { return chunkLBJRXU7N_cjs.random; }
3890
+ get: function () { return chunkANO5R2E6_cjs.random; }
3780
3891
  });
3781
3892
  Object.defineProperty(exports, "registerSequenceType", {
3782
3893
  enumerable: true,
3783
- get: function () { return chunkLBJRXU7N_cjs.registerSequenceType; }
3894
+ get: function () { return chunkANO5R2E6_cjs.registerSequenceType; }
3784
3895
  });
3785
3896
  exports.Movie = Movie;
3786
3897
  exports.animateText = animateText;