pixi-effects 0.4.0 → 0.5.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 (61) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +9 -5
  3. package/ai/SKILL.md +7 -4
  4. package/ai/reference/cheatsheet.md +16 -5
  5. package/ai/reference/pitfalls.md +15 -11
  6. package/ai/reference/recipes.md +117 -0
  7. package/ai/template.html +6 -3
  8. package/ai/tools/check.mjs +385 -0
  9. package/dist/{Base-5R7C5pHR.d.cts → Base-CPSFBkPm.d.ts} +6 -1
  10. package/dist/{Base-DhY9oMxr.d.ts → Base-DnRAxroQ.d.cts} +6 -1
  11. package/dist/Composition-63EXHNJJ.cjs +13 -0
  12. package/dist/{Composition-D7RCAGEA.cjs.map → Composition-63EXHNJJ.cjs.map} +1 -1
  13. package/dist/Composition-TUCRSMJU.js +4 -0
  14. package/dist/{Composition-RGTRZ2JX.js.map → Composition-TUCRSMJU.js.map} +1 -1
  15. package/dist/Controller.cjs +37 -13
  16. package/dist/Controller.cjs.map +1 -1
  17. package/dist/Controller.d.cts +4 -2
  18. package/dist/Controller.d.ts +4 -2
  19. package/dist/Controller.js +37 -13
  20. package/dist/Controller.js.map +1 -1
  21. package/dist/{Movie-DRZtIGU7.d.ts → Movie-CuU_aaCm.d.cts} +56 -2
  22. package/dist/{Movie-CghFXprP.d.cts → Movie-VyDiUYOj.d.ts} +56 -2
  23. package/dist/{chunk-QGBOC5YL.cjs → chunk-23M5QTWW.cjs} +33 -21
  24. package/dist/chunk-23M5QTWW.cjs.map +1 -0
  25. package/dist/{chunk-6BQ6IEW2.cjs → chunk-2RR43OIN.cjs} +143 -30
  26. package/dist/chunk-2RR43OIN.cjs.map +1 -0
  27. package/dist/{chunk-A574IA4F.js → chunk-5Q5XZG7Z.js} +18 -6
  28. package/dist/chunk-5Q5XZG7Z.js.map +1 -0
  29. package/dist/chunk-DKGG7WD4.js +61 -0
  30. package/dist/chunk-DKGG7WD4.js.map +1 -0
  31. package/dist/{chunk-ZQX7WIYL.js → chunk-UBPZLGLU.js} +143 -31
  32. package/dist/chunk-UBPZLGLU.js.map +1 -0
  33. package/dist/chunk-UQBGW5DO.cjs +64 -0
  34. package/dist/chunk-UQBGW5DO.cjs.map +1 -0
  35. package/dist/index.cjs +291 -86
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +54 -5
  38. package/dist/index.d.ts +54 -5
  39. package/dist/index.js +275 -72
  40. package/dist/index.js.map +1 -1
  41. package/dist/sfx-MZJZXYY3.cjs +446 -0
  42. package/dist/sfx-MZJZXYY3.cjs.map +1 -0
  43. package/dist/sfx-S37DDC66.js +434 -0
  44. package/dist/sfx-S37DDC66.js.map +1 -0
  45. package/dist/three.cjs +5 -5
  46. package/dist/three.d.cts +2 -2
  47. package/dist/three.d.ts +2 -2
  48. package/dist/three.js +1 -1
  49. package/dist/{types-CRE9WKd4.d.ts → types-7VtTEKUW.d.cts} +96 -6
  50. package/dist/{types-CRE9WKd4.d.cts → types-7VtTEKUW.d.ts} +96 -6
  51. package/docs/api.md +36 -0
  52. package/docs/dsl.md +44 -3
  53. package/llms-full.txt +234 -22
  54. package/llms.txt +1 -1
  55. package/package.json +2 -1
  56. package/dist/Composition-D7RCAGEA.cjs +0 -13
  57. package/dist/Composition-RGTRZ2JX.js +0 -4
  58. package/dist/chunk-6BQ6IEW2.cjs.map +0 -1
  59. package/dist/chunk-A574IA4F.js.map +0 -1
  60. package/dist/chunk-QGBOC5YL.cjs.map +0 -1
  61. package/dist/chunk-ZQX7WIYL.js.map +0 -1
@@ -0,0 +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,IAA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AA,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-5Q5XZG7Z.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 (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'];\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 { Container, Rectangle } from 'pixi.js';\nimport { Sequence } from './Base';\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\nimport type { gsap } from 'gsap';\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\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 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\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 inner.addChild(child.target);\n 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 inner.addChild(maskSeq.target);\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 mask: Container | null;\n };\n 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 child.bindTimeline(timeline, 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(timeline, childOffset);\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 /** Drawn children in stack order, with the display object that stands in for each (the mesh for a threeD layer). */\n layers(): Array<{ seq: Sequence; display: Container; threeD: boolean }> {\n return this._visual.map(v => ({\n seq: v.seq,\n display: (v.layer?.display ?? v.seq.target!) as unknown as Container,\n threeD: v.layer !== null,\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"]}
@@ -0,0 +1,61 @@
1
+ // src/core/options.ts
2
+ function distance(a, b) {
3
+ const dp = Array.from({ length: a.length + 1 }, (_, i) => [i, ...Array(b.length).fill(0)]);
4
+ for (let j = 1; j <= b.length; j++) dp[0][j] = j;
5
+ for (let i = 1; i <= a.length; i++) {
6
+ for (let j = 1; j <= b.length; j++) {
7
+ dp[i][j] = Math.min(dp[i - 1][j] + 1, dp[i][j - 1] + 1, dp[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
8
+ if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) dp[i][j] = Math.min(dp[i][j], dp[i - 2][j - 2] + 1);
9
+ }
10
+ }
11
+ return dp[a.length][b.length];
12
+ }
13
+ var isSubsequence = (small, big) => {
14
+ let i = 0;
15
+ for (const ch of big) if (i < small.length && ch === small[i]) i++;
16
+ return i === small.length;
17
+ };
18
+ var COMMON_ALIASES = {
19
+ fps: "frameRate",
20
+ framerate: "frameRate",
21
+ frame_rate: "frameRate",
22
+ bg: "background",
23
+ backgroundcolor: "background",
24
+ bgcolor: "background",
25
+ seconds: "duration",
26
+ length: "duration",
27
+ time: "duration",
28
+ w: "width",
29
+ h: "height",
30
+ cols: "columns",
31
+ sweep: "degrees",
32
+ angle: "degrees"
33
+ };
34
+ function suggestName(name, valid) {
35
+ const n = name.toLowerCase();
36
+ const alias = COMMON_ALIASES[n];
37
+ if (alias && valid.includes(alias)) return alias;
38
+ let best = null;
39
+ for (const v of valid) {
40
+ const lv = v.toLowerCase();
41
+ const d = distance(n, lv);
42
+ const close = d <= Math.max(1, Math.floor(Math.min(n.length, lv.length) / 3));
43
+ const abbreviation = n.length >= 3 && isSubsequence(n, lv) || lv.length >= 2 && n.length > lv.length && n.includes(lv);
44
+ if (!close && !abbreviation) continue;
45
+ const score = close ? d : 3 + (lv.length - n.length) / 100;
46
+ if (!best || score < best.score) best = { v, score };
47
+ }
48
+ return best ? best.v : null;
49
+ }
50
+ function warnUnknownOptions(where, opts, valid) {
51
+ if (!opts || typeof opts !== "object") return;
52
+ for (const key of Object.keys(opts)) {
53
+ if (valid.includes(key)) continue;
54
+ const guess = suggestName(key, valid);
55
+ console.warn(`pixi-effects: ${where}: unknown option "${key}"${guess ? ` \u2014 did you mean "${guess}"?` : ""} (valid: ${valid.join(", ")})`);
56
+ }
57
+ }
58
+
59
+ export { suggestName, warnUnknownOptions };
60
+ //# sourceMappingURL=chunk-DKGG7WD4.js.map
61
+ //# sourceMappingURL=chunk-DKGG7WD4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/options.ts"],"names":[],"mappings":";AACA,SAAS,QAAA,CAAS,GAAW,CAAA,EAAmB;AAC9C,EAAA,MAAM,EAAA,GAAK,MAAM,IAAA,CAAK,EAAE,QAAQ,CAAA,CAAE,MAAA,GAAS,CAAA,EAAE,EAAG,CAAC,CAAA,EAAG,MAAM,CAAC,CAAA,EAAG,GAAG,KAAA,CAAM,CAAA,CAAE,MAAM,CAAA,CAAE,IAAA,CAAK,CAAC,CAAC,CAAa,CAAA;AACrG,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,IAAK,CAAA,CAAE,MAAA,EAAQ,KAAK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AC,CAAA;AAE5E,IAAA,MAAM,eAAgB,CAAA,CAAE,MAAA,IAAU,CAAA,IAAK,aAAA,CAAc,GAAG,EAAE,CAAA,IAAO,EAAA,CAAG,MAAA,IAAU,KAAK,CAAA,CAAE,MAAA,GAAS,GAAG,MAAA,IAAU,CAAA,CAAE,SAAS,EAAE,CAAA;AACxH,IAAA,IAAI,CAAC,KAAA,IAAS,CAAC,YAAA,EAAc;AAC7B,IAAA,MAAM,QAAQ,KAAA,GAAQ,CAAA,GAAI,KAAK,EAAA,CAAG,MAAA,GAAS,EAAE,MAAA,IAAU,GAAA;AACvD,IAAA,IAAI,CAAC,QAAQ,KAAA,GAAQ,IAAA,CAAK,OAAO,IAAA,GAAO,EAAE,GAAG,KAAA,EAAM;AAAA,EACrD;AACA,EAAA,OAAO,IAAA,GAAO,KAAK,CAAA,GAAI,IAAA;AACzB;AAMO,SAAS,kBAAA,CAAmB,KAAA,EAAe,IAAA,EAAiC,KAAA,EAAgC;AACjH,EAAA,IAAI,CAAC,IAAA,IAAQ,OAAO,IAAA,KAAS,QAAA,EAAU;AACvC,EAAA,KAAA,MAAW,GAAA,IAAO,MAAA,CAAO,IAAA,CAAK,IAAI,CAAA,EAAG;AACnC,IAAA,IAAI,KAAA,CAAM,QAAA,CAAS,GAAG,CAAA,EAAG;AACzB,IAAA,MAAM,KAAA,GAAQ,WAAA,CAAY,GAAA,EAAK,KAAK,CAAA;AACpC,IAAA,OAAA,CAAQ,KAAK,CAAA,cAAA,EAAiB,KAAK,CAAA,kBAAA,EAAqB,GAAG,IAAI,KAAA,GAAQ,CAAA,sBAAA,EAAoB,KAAK,CAAA,EAAA,CAAA,GAAO,EAAE,CAAA,SAAA,EAAY,KAAA,CAAM,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAG,CAAA;AAAA,EAC1I;AACF","file":"chunk-DKGG7WD4.js","sourcesContent":["/** Edit distance, small inputs only. */\nfunction distance(a: string, b: string): number {\n const dp = Array.from({ length: a.length + 1 }, (_, i) => [i, ...Array(b.length).fill(0)] as number[]);\n for (let j = 1; j <= b.length; j++) dp[0]![j] = j;\n for (let i = 1; i <= a.length; i++) {\n for (let j = 1; j <= b.length; j++) {\n dp[i]![j] = Math.min(dp[i - 1]![j]! + 1, dp[i]![j - 1]! + 1, dp[i - 1]![j - 1]! + (a[i - 1] === b[j - 1] ? 0 : 1));\n // swapping two neighbouring letters (sacle / scale) counts as one slip\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) dp[i]![j] = Math.min(dp[i]![j]!, dp[i - 2]![j - 2]! + 1);\n }\n }\n return dp[a.length]![b.length]!;\n}\n\nconst isSubsequence = (small: string, big: string): boolean => {\n let i = 0;\n for (const ch of big) if (i < small.length && ch === small[i]) i++;\n return i === small.length;\n};\n\n/** Names AI authors commonly guess, mapped to the real option (only suggested when the real option exists here). */\nconst COMMON_ALIASES: Record<string, string> = {\n fps: 'frameRate', framerate: 'frameRate', frame_rate: 'frameRate',\n bg: 'background', backgroundcolor: 'background', bgcolor: 'background',\n seconds: 'duration', length: 'duration', time: 'duration',\n w: 'width', h: 'height', cols: 'columns', sweep: 'degrees', angle: 'degrees',\n};\n\n/** The valid name an author most likely meant by `name` (alias, typo, abbreviation or case slip), or null. */\nexport function suggestName(name: string, valid: readonly string[]): string | null {\n const n = name.toLowerCase();\n const alias = COMMON_ALIASES[n];\n if (alias && valid.includes(alias)) return alias;\n let best: { v: string; score: number } | null = null;\n for (const v of valid) {\n const lv = v.toLowerCase();\n const d = distance(n, lv);\n const close = d <= Math.max(1, Math.floor(Math.min(n.length, lv.length) / 3));\n // an abbreviation (cols → columns) or a longer phrase containing the name (fadeIn → in)\n const abbreviation = (n.length >= 3 && isSubsequence(n, lv)) || (lv.length >= 2 && n.length > lv.length && n.includes(lv));\n if (!close && !abbreviation) continue;\n const score = close ? d : 3 + (lv.length - n.length) / 100; // typos first, then abbreviations\n if (!best || score < best.score) best = { v, score };\n }\n return best ? best.v : null;\n}\n\n/**\n * Unknown option keys are silently ignored by JavaScript, which is how a guessed name like `cols`\n * or `fps` quietly does nothing. Say so, and say what was probably meant.\n */\nexport function warnUnknownOptions(where: string, opts: object | undefined | null, valid: readonly string[]): void {\n if (!opts || typeof opts !== 'object') return;\n for (const key of Object.keys(opts)) {\n if (valid.includes(key)) continue;\n const guess = suggestName(key, valid);\n console.warn(`pixi-effects: ${where}: unknown option \"${key}\"${guess ? ` — did you mean \"${guess}\"?` : ''} (valid: ${valid.join(', ')})`);\n }\n}\n"]}
@@ -739,6 +739,11 @@ var Sequence = class {
739
739
  * (not a normal child) by PIXI when `target.mask = maskSequence.target`.
740
740
  */
741
741
  maskSequence = null;
742
+ /**
743
+ * Set by the parent composition on a sprite-based (image / video) mask. PIXI hides such a mask with
744
+ * `renderable = false`; the lifespan toggles must not switch it back on, or the mask is drawn as a picture.
745
+ */
746
+ keepHidden = false;
742
747
  /**
743
748
  * Absolute start time on the global timeline (offset + at), recorded by
744
749
  * bindTimeline. Movie._awaitVideoFrames uses it to determine the correct
@@ -783,6 +788,7 @@ var Sequence = class {
783
788
  applyKeyframes(timeline, this.target, this.spec.keyframes, this.duration, scope, [], startTime, routers);
784
789
  const endTime = startTime + this.duration;
785
790
  this.absoluteStart = startTime;
791
+ if (this.keepHidden) return;
786
792
  this.target.renderable = startTime <= 0;
787
793
  timeline.set(this.target, { renderable: true }, startTime);
788
794
  timeline.set(this.target, { renderable: false }, endTime);
@@ -835,6 +841,7 @@ function lintTiming(spec, parentDuration, warn = defaultWarn) {
835
841
  if (at >= parentDuration) {
836
842
  warn(`pixi-effects: ${who} starts at ${at}s, after its composition ends (${parentDuration}s), so it is never visible`);
837
843
  }
844
+ if (spec.type === "audio" && spec.sfx !== void 0 && spec.duration === void 0) return;
838
845
  const duration = spec.duration ?? parentDuration;
839
846
  (spec.keyframes ?? []).forEach((kf, i) => {
840
847
  const kat = kf.at ?? 0;
@@ -852,6 +859,9 @@ function summarizeWarnings(messages, shown = 3) {
852
859
  }
853
860
  function lintText(spec, warn = defaultWarn) {
854
861
  if (spec.type !== "text") return;
862
+ if ((spec.text ?? "").includes("{value}") && !collectPropKeys(spec).has("value")) {
863
+ warn(`pixi-effects: ${describeLayer(spec)}: the text has a {value} placeholder but nothing sets or animates \`value\`, so it prints 0. Set initial: { value: \u2026 } or animate it; {value} is reserved for counters (there is no way to print a literal "{value}").`);
864
+ }
855
865
  if (collectPropKeys(spec).has("value") && !(spec.text ?? "").includes("{value}")) {
856
866
  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').`);
857
867
  }
@@ -1046,6 +1056,8 @@ function revertibleSet(timeline, at, read, write, value) {
1046
1056
  }
1047
1057
 
1048
1058
  // src/expr/colorInterp.ts
1059
+ var CHROMA_FLOOR = 0.03;
1060
+ var CHROMA_FULL = 0.08;
1049
1061
  function buildColorInterp(from, to, space) {
1050
1062
  const fromRGBA = parseToRGBA(from);
1051
1063
  const toRGBA = parseToRGBA(to);
@@ -1062,8 +1074,9 @@ function buildColorInterp(from, to, space) {
1062
1074
  }
1063
1075
  const fromLCH = oklabToOklch(fromOk);
1064
1076
  const toLCH = oklabToOklch(toOk);
1065
- if (fromLCH.C < 1e-4) fromLCH.h = toLCH.h;
1066
- if (toLCH.C < 1e-4) toLCH.h = fromLCH.h;
1077
+ const fromHue = fromLCH.h, toHue = toLCH.h;
1078
+ fromLCH.h = borrowHue(fromHue, fromLCH.C, toHue);
1079
+ toLCH.h = borrowHue(toHue, toLCH.C, fromHue);
1067
1080
  const hueDelta = shortestHueDelta(fromLCH.h, toLCH.h);
1068
1081
  return (t) => {
1069
1082
  const L = lerp(fromLCH.L, toLCH.L, t);
@@ -1074,6 +1087,11 @@ function buildColorInterp(from, to, space) {
1074
1087
  return rgbaString(oklabToRgb(ab), alpha);
1075
1088
  };
1076
1089
  }
1090
+ function borrowHue(own, chroma, other) {
1091
+ const u = Math.min(1, Math.max(0, (chroma - CHROMA_FLOOR) / (CHROMA_FULL - CHROMA_FLOOR)));
1092
+ const keep = u * u * (3 - 2 * u);
1093
+ return own + shortestHueDelta(own, other) * (1 - keep);
1094
+ }
1077
1095
  function parseToRGBA(input) {
1078
1096
  if (typeof input === "number") {
1079
1097
  return { r: (input >> 16 & 255) / 255, g: (input >> 8 & 255) / 255, b: (input & 255) / 255, a: 1 };
@@ -1258,6 +1276,7 @@ var ImageSequence = class extends Sequence {
1258
1276
  }
1259
1277
  this.absoluteStart = startTime;
1260
1278
  const endTime = startTime + this.duration;
1279
+ if (this.keepHidden) return;
1261
1280
  this.target.renderable = startTime <= 0;
1262
1281
  timeline.set(this.target, { renderable: true }, startTime);
1263
1282
  timeline.set(this.target, { renderable: false }, endTime);
@@ -1302,9 +1321,14 @@ var STYLE_OPAQUE_KEYS = [
1302
1321
  ];
1303
1322
  function formatValue(v, f) {
1304
1323
  const fixed = v.toFixed(Math.max(0, Math.floor(f?.decimals ?? 0)));
1305
- if (!f?.grouping) return fixed;
1306
- const [int, frac] = fixed.split(".");
1307
- return int.replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (frac !== void 0 ? "." + frac : "");
1324
+ const pad = Math.max(0, Math.floor(f?.pad ?? 0));
1325
+ if (!f?.grouping && !pad) return fixed;
1326
+ const [signed, frac] = fixed.split(".");
1327
+ const sign = signed.startsWith("-") ? "-" : "";
1328
+ let int = sign ? signed.slice(1) : signed;
1329
+ if (pad) int = int.padStart(pad, "0");
1330
+ if (f?.grouping) int = int.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1331
+ return sign + int + (frac !== void 0 ? "." + frac : "");
1308
1332
  }
1309
1333
  var TextSequence = class extends Sequence {
1310
1334
  /** Current number for the `{value}` placeholder (tweened by `value` keyframes). */
@@ -1476,28 +1500,64 @@ function pickFill(props) {
1476
1500
  }
1477
1501
  var AudioSequence = class extends Sequence {
1478
1502
  _audioBuffer = null;
1503
+ _synth = null;
1504
+ _source = "";
1479
1505
  async build() {
1480
- const data = await Assets.get(this.spec.asset);
1506
+ this.target = null;
1507
+ if (this.spec.sfx !== void 0) return this._buildSfx(this.spec);
1508
+ const spec = this.spec;
1509
+ this._source = `asset "${spec.asset}"`;
1510
+ const data = await Assets.get(spec.asset);
1481
1511
  this._audioBuffer = data.audioBuffer;
1482
1512
  if (this.duration === void 0) {
1483
1513
  const rest = Math.max(0, (this.parent?.duration ?? this.root.duration) - this.at);
1484
- this.duration = this.spec.duration ?? (this.spec.loop ? rest : data.duration) ?? this.root.duration;
1514
+ this.duration = spec.duration ?? (spec.loop ? rest : data.duration) ?? this.root.duration;
1485
1515
  }
1486
- if (!this.spec.loop && data.duration !== void 0 && this.duration > data.duration + 0.05) {
1516
+ if (!spec.loop && data.duration !== void 0 && this.duration > data.duration + 0.05) {
1487
1517
  console.warn(
1488
- `pixi-effects: ${describeLayer(this.spec)}: audio asset "${this.spec.asset}" is ${data.duration.toFixed(1)}s but the layer lasts ${this.duration.toFixed(1)}s, so it goes silent after ${data.duration.toFixed(1)}s. Add loop: true, or shorten the layer's duration.`
1518
+ `pixi-effects: ${describeLayer(spec)}: audio asset "${spec.asset}" is ${data.duration.toFixed(1)}s but the layer lasts ${this.duration.toFixed(1)}s, so it goes silent after ${data.duration.toFixed(1)}s. Add loop: true, or shorten the layer's duration.`
1489
1519
  );
1490
1520
  }
1491
- this.target = null;
1521
+ }
1522
+ async _buildSfx(spec) {
1523
+ const who = describeLayer(spec);
1524
+ const raw = spec;
1525
+ if (raw.asset !== void 0) console.warn(`pixi-effects: ${who}: has both asset and sfx \u2014 the sfx plays; remove one`);
1526
+ if (raw.loop) console.warn(`pixi-effects: ${who}: loop has no effect on an sfx \u2014 to repeat it, add one audio layer per hit (a JS loop)`);
1527
+ const { resolveSfx, renderSfx, sfxKey } = await import('./sfx-S37DDC66.js');
1528
+ const sfx = resolveSfx(spec.sfx, spec.duration, who);
1529
+ if (!sfx) return;
1530
+ this.duration = sfx.length;
1531
+ this._source = `sfx "${sfx.preset ?? "custom"}"`;
1532
+ this._synth = { key: sfxKey(sfx), render: (sr) => renderSfx(sfx, sr) };
1533
+ (spec.keyframes ?? []).forEach((kf, i) => {
1534
+ if ((kf.at ?? 0) >= sfx.length) {
1535
+ console.warn(`pixi-effects: ${who}: keyframes[${i}] starts at ${kf.at}s, after the sound ends (${sfx.length}s), so it never plays`);
1536
+ } else if ((kf.at ?? 0) < 0 && sfx.length + (kf.at ?? 0) < 0) {
1537
+ console.warn(`pixi-effects: ${who}: keyframes[${i}] starts ${-kf.at}s before the END of a ${sfx.length}s sound, which is before the sound begins (a negative \`at\` counts back from the end of the layer). Use a shorter \`at\`, or stretch the sound with \`duration\`.`);
1538
+ }
1539
+ });
1492
1540
  }
1493
1541
  bindTimeline(_timeline) {
1494
1542
  }
1495
1543
  collectAudio(out, baseTime) {
1496
- if (!this._audioBuffer) return;
1497
- const initialVolume = this.spec.volume ?? 1;
1498
- const volumeKeyframes = [];
1499
- const dur = this.duration;
1544
+ if (!this._audioBuffer && !this._synth) return;
1545
+ const initialVolume = this.spec.volume ?? this.spec.initial?.volume ?? 1;
1500
1546
  const t0 = baseTime + this.at;
1547
+ const dur = this.duration;
1548
+ out.push({
1549
+ ...this._audioBuffer ? { buffer: this._audioBuffer } : { synth: this._synth },
1550
+ layer: describeLayer(this.spec),
1551
+ source: this._source,
1552
+ loop: !this._synth && !!this.spec.loop,
1553
+ start: t0,
1554
+ end: t0 + dur,
1555
+ initialVolume,
1556
+ volumeKeyframes: this._volumePoints(t0, dur, initialVolume)
1557
+ });
1558
+ }
1559
+ _volumePoints(t0, dur, initialVolume) {
1560
+ const volumeKeyframes = [];
1501
1561
  const keyframes = (this.spec.keyframes ?? []).map((raw) => normalizeKeyframe(raw, dur)).filter((kf) => [kf.set, kf.to, kf.from].some((p) => p && "volume" in p)).sort((x, y) => x.at - y.at);
1502
1562
  let current = initialVolume;
1503
1563
  const point = (time, value) => {
@@ -1525,17 +1585,11 @@ var AudioSequence = class extends Sequence {
1525
1585
  point(end, current);
1526
1586
  }
1527
1587
  }
1528
- out.push({
1529
- buffer: this._audioBuffer,
1530
- loop: !!this.spec.loop,
1531
- start: baseTime + this.at,
1532
- end: baseTime + this.at + dur,
1533
- initialVolume,
1534
- volumeKeyframes
1535
- });
1588
+ return volumeKeyframes;
1536
1589
  }
1537
1590
  destroy() {
1538
1591
  this._audioBuffer = null;
1592
+ this._synth = null;
1539
1593
  }
1540
1594
  };
1541
1595
 
@@ -1684,6 +1738,8 @@ var VideoSequence = class extends Sequence {
1684
1738
  const initialVolume = this.spec.volume ?? 1;
1685
1739
  out.push({
1686
1740
  buffer: this._audioBuffer,
1741
+ layer: describeLayer(this.spec),
1742
+ source: `video "${this.spec.asset}"`,
1687
1743
  loop: !!this.spec.loop,
1688
1744
  start: baseTime + this.at,
1689
1745
  end: baseTime + this.at + this.duration,
@@ -1772,11 +1828,12 @@ var GEOMETRY_KEYS_BY_SHAPE = {
1772
1828
  rect: ["width", "height", "cornerRadius", "anchorX", "anchorY"],
1773
1829
  circle: ["radius", "anchorX", "anchorY"],
1774
1830
  ellipse: ["radiusX", "radiusY", "anchorX", "anchorY"],
1831
+ arc: ["radius", "innerRadius", "startAngle", "endAngle"],
1775
1832
  line: [],
1776
1833
  polygon: [],
1777
1834
  path: []
1778
1835
  };
1779
- var ANCHORED_SHAPES = /* @__PURE__ */ new Set(["rect", "circle", "ellipse"]);
1836
+ var ANCHORED_SHAPES = /* @__PURE__ */ new Set(["rect", "circle", "ellipse", "arc"]);
1780
1837
  var ShapeSequence = class extends Sequence {
1781
1838
  _state = {
1782
1839
  fillColor: void 0,
@@ -1803,6 +1860,11 @@ var ShapeSequence = class extends Sequence {
1803
1860
  for (const k of geomKeys) this._liveKeys.add(k);
1804
1861
  seedGeometry(this._state, this.spec, scope);
1805
1862
  seedStyle(this._state, this.spec.initial ?? {}, scope);
1863
+ seedStrokeStyle(this._state, this.spec, this.spec.initial ?? {}, describeLayer(this.spec));
1864
+ if (this.spec.shape === "arc") {
1865
+ this._state.startAngle ??= 0;
1866
+ this._state.endAngle ??= 360;
1867
+ }
1806
1868
  const gradientSpec = this.spec.fillGradient ?? this.spec.initial?.fillGradient;
1807
1869
  if (gradientSpec) this._state.fillStyle = makeGradientFill(gradientSpec);
1808
1870
  this._drawGeometry = makeDrawGeometry(this.spec, scope, this._state);
@@ -1871,6 +1933,21 @@ function seedGeometry(state, spec, scope) {
1871
1933
  if (v !== void 0) state[k] = num(v, scope);
1872
1934
  }
1873
1935
  }
1936
+ var STROKE_CAPS = ["butt", "round", "square"];
1937
+ var STROKE_JOINS = ["miter", "round", "bevel"];
1938
+ function seedStrokeStyle(state, spec, initial, who) {
1939
+ const top = spec;
1940
+ const ini = initial;
1941
+ const pick = (key, valid) => {
1942
+ const v = top[key] ?? ini[key];
1943
+ if (v === void 0) return void 0;
1944
+ if (valid.includes(String(v))) return String(v);
1945
+ console.warn(`pixi-effects: ${who}: ${key} "${v}" is not one of ${valid.join(", ")}; ignored`);
1946
+ return void 0;
1947
+ };
1948
+ state.strokeCap = pick("strokeCap", STROKE_CAPS);
1949
+ state.strokeJoin = pick("strokeJoin", STROKE_JOINS);
1950
+ }
1874
1951
  function seedStyle(state, initial, scope) {
1875
1952
  for (const k of STYLE_KEYS) {
1876
1953
  const v = initial[k];
@@ -1879,8 +1956,8 @@ function seedStyle(state, initial, scope) {
1879
1956
  }
1880
1957
  }
1881
1958
  function stripGradient(props) {
1882
- if (!props || !("fillGradient" in props)) return props;
1883
- const { fillGradient: _drop, ...rest } = props;
1959
+ if (!props || !("fillGradient" in props || "strokeCap" in props || "strokeJoin" in props)) return props;
1960
+ const { fillGradient: _drop, strokeCap: _cap, strokeJoin: _join, ...rest } = props;
1884
1961
  return rest;
1885
1962
  }
1886
1963
  function stripLive(props, liveKeys) {
@@ -1927,7 +2004,13 @@ function applyState(g, s) {
1927
2004
  g.fill({ color: s.fillColor, alpha: s.fillAlpha });
1928
2005
  }
1929
2006
  if (s.strokeColor !== void 0 && s.strokeWidth > 0) {
1930
- g.stroke({ color: s.strokeColor, alpha: s.strokeAlpha, width: s.strokeWidth });
2007
+ g.stroke({
2008
+ color: s.strokeColor,
2009
+ alpha: s.strokeAlpha,
2010
+ width: s.strokeWidth,
2011
+ ...s.strokeCap ? { cap: s.strokeCap } : {},
2012
+ ...s.strokeJoin ? { join: s.strokeJoin } : {}
2013
+ });
1931
2014
  }
1932
2015
  }
1933
2016
  function drawRectFromState(g, s) {
@@ -1954,6 +2037,34 @@ function drawEllipseFromState(g, s) {
1954
2037
  const ay = s.anchorY ?? 0.5;
1955
2038
  g.ellipse((0.5 - ax) * 2 * rx, (0.5 - ay) * 2 * ry, rx, ry);
1956
2039
  }
2040
+ var DEG2 = Math.PI / 180;
2041
+ function drawArcFromState(g, s) {
2042
+ const r = s.radius ?? 0;
2043
+ const ri = Math.max(0, Math.min(s.innerRadius ?? 0, r));
2044
+ const startDeg = s.startAngle ?? 0;
2045
+ let endDeg = s.endAngle ?? 360;
2046
+ if (!(r > 0) || endDeg === startDeg) return;
2047
+ const filled = !!s.fillStyle || s.fillColor !== void 0;
2048
+ if (Math.abs(endDeg - startDeg) >= 360) {
2049
+ if (!filled) {
2050
+ g.circle(0, 0, r);
2051
+ return;
2052
+ }
2053
+ endDeg = startDeg + Math.sign(endDeg - startDeg) * 359.999;
2054
+ }
2055
+ const a0 = startDeg * DEG2, a1 = endDeg * DEG2;
2056
+ const ccw = a1 < a0;
2057
+ if (filled) g.moveTo(r * Math.cos(a0), r * Math.sin(a0));
2058
+ g.arc(0, 0, r, a0, a1, ccw);
2059
+ if (!filled) return;
2060
+ if (ri > 0) {
2061
+ g.lineTo(ri * Math.cos(a1), ri * Math.sin(a1));
2062
+ g.arc(0, 0, ri, a1, a0, !ccw);
2063
+ } else {
2064
+ g.lineTo(0, 0);
2065
+ }
2066
+ g.closePath();
2067
+ }
1957
2068
  function makeLineDraw(spec, scope) {
1958
2069
  const fx = num(spec.from[0], scope);
1959
2070
  const fy = num(spec.from[1], scope);
@@ -1982,7 +2093,8 @@ function makePathDraw(spec) {
1982
2093
  var STATE_DRAWERS = {
1983
2094
  rect: drawRectFromState,
1984
2095
  circle: drawCircleFromState,
1985
- ellipse: drawEllipseFromState
2096
+ ellipse: drawEllipseFromState,
2097
+ arc: drawArcFromState
1986
2098
  };
1987
2099
  function makeDrawGeometry(spec, scope, state) {
1988
2100
  const stateDrawer = STATE_DRAWERS[spec.shape];
@@ -2071,7 +2183,7 @@ function numOrZero(v, scope) {
2071
2183
  var _CompositionSequence = null;
2072
2184
  async function getCompositionSequence() {
2073
2185
  if (!_CompositionSequence) {
2074
- _CompositionSequence = (await import('./Composition-RGTRZ2JX.js')).CompositionSequence;
2186
+ _CompositionSequence = (await import('./Composition-TUCRSMJU.js')).CompositionSequence;
2075
2187
  }
2076
2188
  return _CompositionSequence;
2077
2189
  }
@@ -2108,6 +2220,6 @@ async function buildSequenceTree(specs, parent, root) {
2108
2220
  return out;
2109
2221
  }
2110
2222
 
2111
- export { CameraSequence, DEFAULT_FOV, DEG, Sequence, buildScope, buildSequenceTree, cameraBasis, collectPropKeys, describeLayer, evaluateExpr, homeCamera, homeDistance, lintText, lintTiming, projectLayer, registerSequenceType, resolveAt, summarizeWarnings };
2112
- //# sourceMappingURL=chunk-ZQX7WIYL.js.map
2113
- //# sourceMappingURL=chunk-ZQX7WIYL.js.map
2223
+ export { CameraSequence, DEFAULT_FOV, DEG, NEAR, Sequence, buildScope, buildSequenceTree, cameraBasis, collectPropKeys, describeLayer, evaluateExpr, homeCamera, homeDistance, lintText, lintTiming, projectLayer, registerSequenceType, resolveAt, summarizeWarnings };
2224
+ //# sourceMappingURL=chunk-UBPZLGLU.js.map
2225
+ //# sourceMappingURL=chunk-UBPZLGLU.js.map