@clypra-studio/engine 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -39
- package/dist/{chunk-LT3HTJ3X.js → chunk-3UEOLDJJ.js} +5 -829
- package/dist/chunk-3UEOLDJJ.js.map +1 -0
- package/dist/{chunk-Y4FMAOTW.js → chunk-E6O6LZME.js} +266 -1004
- package/dist/chunk-E6O6LZME.js.map +1 -0
- package/dist/chunk-PU3Q4QI7.js +833 -0
- package/dist/chunk-PU3Q4QI7.js.map +1 -0
- package/dist/{index-D6GAXDBy.d.cts → index-C18SQ-y6.d.cts} +171 -37
- package/dist/{index-D6GAXDBy.d.ts → index-C18SQ-y6.d.ts} +171 -37
- package/dist/index.cjs +12064 -19908
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3302 -7641
- package/dist/index.d.ts +3302 -7641
- package/dist/index.js +11201 -14606
- package/dist/index.js.map +1 -1
- package/dist/textEffects/index.cjs +259 -971
- package/dist/textEffects/index.cjs.map +1 -1
- package/dist/textEffects/index.d.cts +1 -1
- package/dist/textEffects/index.d.ts +1 -1
- package/dist/textEffects/index.js +1 -1
- package/dist/transitions/index.cjs +18 -2199
- package/dist/transitions/index.cjs.map +1 -1
- package/dist/transitions/index.d.cts +37 -53
- package/dist/transitions/index.d.ts +37 -53
- package/dist/transitions/index.js +3 -51
- package/dist/videoEffects/index.cjs +4 -835
- package/dist/videoEffects/index.cjs.map +1 -1
- package/dist/videoEffects/index.d.cts +9 -138
- package/dist/videoEffects/index.d.ts +9 -138
- package/dist/videoEffects/index.js +1 -15
- package/package.json +14 -17
- package/dist/TransitionDefinition-CQoSb4ZB.d.cts +0 -158
- package/dist/TransitionDefinition-CQoSb4ZB.d.ts +0 -158
- package/dist/chunk-FIJBB3MH.js +0 -2990
- package/dist/chunk-FIJBB3MH.js.map +0 -1
- package/dist/chunk-LT3HTJ3X.js.map +0 -1
- package/dist/chunk-RYA4KGDB.js +0 -690
- package/dist/chunk-RYA4KGDB.js.map +0 -1
- package/dist/chunk-Y4FMAOTW.js.map +0 -1
- package/dist/index-Da47I6aX.d.cts +0 -139
- package/dist/index-Da47I6aX.d.ts +0 -139
- package/dist/v2/backends/index.cjs +0 -693
- package/dist/v2/backends/index.cjs.map +0 -1
- package/dist/v2/backends/index.d.cts +0 -3
- package/dist/v2/backends/index.d.ts +0 -3
- package/dist/v2/backends/index.js +0 -8
- package/dist/v2/backends/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/transitions/TransitionRenderer.ts","../src/transitions/presets.ts","../src/transitions/helpers.ts","../src/transitions/index.ts"],"sourcesContent":["/**\n * Transition Renderer\n *\n * Applies transitions between two video frames.\n * These are NOT video files - they are algorithmic blends.\n *\n * Examples:\n * - fade: Crossfade opacity\n * - zoom_in: Scale up during fade\n * - wipe_left: Reveal next frame from left\n *\n * Part of @clypra-studio/engine - shared between clypra-studio and clypra app\n */\n\nimport type { TransitionRenderer as TransitionRendererType, TransitionParameters, EasingFunction } from \"./types\";\n\nexport class TransitionRenderer {\n /**\n * Render a transition between two frames\n *\n * @param ctx - Canvas 2D context\n * @param fromFrame - Canvas or image of the outgoing frame\n * @param toFrame - Canvas or image of the incoming frame\n * @param renderer - Transition type\n * @param params - Transition parameters\n * @param progress - Transition progress (0-1)\n */\n static render(ctx: CanvasRenderingContext2D, fromFrame: HTMLCanvasElement | HTMLImageElement, toFrame: HTMLCanvasElement | HTMLImageElement, renderer: TransitionRendererType, params: TransitionParameters, progress: number): void {\n const method = this.getRenderer(renderer);\n if (method) {\n // Apply easing to progress\n const easedProgress = this.applyEasing(progress, params.easing || \"ease-in-out\");\n method.call(this, ctx, fromFrame, toFrame, params, easedProgress);\n } else {\n console.warn(`Unknown transition renderer: ${renderer}`);\n // Fallback to simple fade\n this.renderFade(ctx, fromFrame, toFrame, params, progress);\n }\n }\n\n /**\n * Get the renderer function for a transition type\n */\n private static getRenderer(type: TransitionRendererType): ((ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number) => void) | null {\n const renderers: Record<TransitionRendererType, any> = {\n // Basic\n fade: this.renderFade,\n dissolve: this.renderDissolve,\n cut: this.renderCut,\n canvas: this.renderFade, // Legacy fallback for clypra app\n\n // Zoom\n zoom_in: this.renderZoomIn,\n zoom_out: this.renderZoomOut,\n zoom_blur: this.renderZoomBlur,\n\n // Slide\n slide_left: this.renderSlideLeft,\n slide_right: this.renderSlideRight,\n slide_up: this.renderSlideUp,\n slide_down: this.renderSlideDown,\n\n // Wipe\n wipe_left: this.renderWipeLeft,\n wipe_right: this.renderWipeRight,\n wipe_up: this.renderWipeUp,\n wipe_down: this.renderWipeDown,\n wipe_clockwise: this.renderWipeClockwise,\n wipe_center: this.renderWipeCenter,\n\n // Shape\n circle_expand: this.renderCircleExpand,\n circle_collapse: this.renderCircleCollapse,\n diamond_expand: this.renderDiamondExpand,\n rectangle_expand: this.renderRectangleExpand,\n\n // Blur\n blur_fade: this.renderBlurFade,\n directional_blur: this.renderDirectionalBlur,\n\n // Creative\n glitch: this.renderGlitch,\n rgb_split: this.renderRGBSplit,\n chromatic: this.renderChromatic,\n film_burn: this.renderFilmBurn,\n light_leak: this.renderLightLeak,\n whip_pan: this.renderWhipPan,\n };\n\n return renderers[type] || null;\n }\n\n // ============================================================================\n // BASIC TRANSITIONS\n // ============================================================================\n\n private static renderFade(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Draw from frame\n ctx.globalAlpha = 1 - progress;\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame\n ctx.globalAlpha = progress;\n ctx.drawImage(to, 0, 0, width, height);\n\n ctx.globalAlpha = 1;\n }\n\n private static renderDissolve(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Same as fade\n this.renderFade(ctx, from, to, params, progress);\n }\n\n private static renderCut(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Instant cut at 50% progress\n if (progress < 0.5) {\n ctx.drawImage(from, 0, 0, width, height);\n } else {\n ctx.drawImage(to, 0, 0, width, height);\n }\n }\n\n // ============================================================================\n // ZOOM TRANSITIONS\n // ============================================================================\n\n private static renderZoomIn(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const scale = params.scale || 1.3;\n\n // Zoom out from frame\n const fromScale = 1 + progress * (scale - 1);\n ctx.save();\n ctx.translate(width / 2, height / 2);\n ctx.scale(fromScale, fromScale);\n ctx.globalAlpha = 1 - progress;\n ctx.drawImage(from, -width / 2, -height / 2, width, height);\n ctx.restore();\n\n // Fade in to frame\n ctx.globalAlpha = progress;\n ctx.drawImage(to, 0, 0, width, height);\n\n ctx.globalAlpha = 1;\n }\n\n private static renderZoomOut(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const scale = params.scale || 0.7;\n\n // Zoom in from frame\n const fromScale = 1 - progress * (1 - scale);\n ctx.save();\n ctx.translate(width / 2, height / 2);\n ctx.scale(fromScale, fromScale);\n ctx.globalAlpha = 1 - progress;\n ctx.drawImage(from, -width / 2, -height / 2, width, height);\n ctx.restore();\n\n // Fade in to frame\n ctx.globalAlpha = progress;\n ctx.drawImage(to, 0, 0, width, height);\n\n ctx.globalAlpha = 1;\n }\n\n private static renderZoomBlur(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const blurAmount = (params.blurAmount || 10) * (1 - Math.abs(progress - 0.5) * 2);\n ctx.filter = `blur(${blurAmount}px)`;\n this.renderZoomIn(ctx, from, to, params, progress);\n ctx.filter = \"none\";\n }\n\n // ============================================================================\n // SLIDE TRANSITIONS\n // ============================================================================\n\n private static renderSlideLeft(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the left\n ctx.drawImage(from, -width * progress, 0, width, height);\n\n // Slide to frame in from the right\n ctx.drawImage(to, width * (1 - progress), 0, width, height);\n }\n\n private static renderSlideRight(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the right\n ctx.drawImage(from, width * progress, 0, width, height);\n\n // Slide to frame in from the left\n ctx.drawImage(to, -width * (1 - progress), 0, width, height);\n }\n\n private static renderSlideUp(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the top\n ctx.drawImage(from, 0, -height * progress, width, height);\n\n // Slide to frame in from the bottom\n ctx.drawImage(to, 0, height * (1 - progress), width, height);\n }\n\n private static renderSlideDown(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the bottom\n ctx.drawImage(from, 0, height * progress, width, height);\n\n // Slide to frame in from the top\n ctx.drawImage(to, 0, -height * (1 - progress), width, height);\n }\n\n // ============================================================================\n // WIPE TRANSITIONS\n // ============================================================================\n\n private static renderWipeLeft(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeX = width * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(0, 0, wipeX, height);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeRight(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeX = width * (1 - progress);\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(wipeX, 0, width - wipeX, height);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeUp(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeY = height * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(0, 0, width, wipeY);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeDown(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeY = height * (1 - progress);\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(0, wipeY, width, height - wipeY);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeClockwise(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const centerX = width / 2;\n const centerY = height / 2;\n const angle = progress * Math.PI * 2;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with radial clipping\n ctx.save();\n ctx.beginPath();\n ctx.moveTo(centerX, centerY);\n ctx.arc(centerX, centerY, Math.max(width, height), -Math.PI / 2, angle - Math.PI / 2);\n ctx.closePath();\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeCenter(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const centerX = width / 2;\n const centerY = height / 2;\n const radius = Math.max(width, height) * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with circular clipping\n ctx.save();\n ctx.beginPath();\n ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n // ============================================================================\n // SHAPE TRANSITIONS\n // ============================================================================\n\n private static renderCircleExpand(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n this.renderWipeCenter(ctx, from, to, params, progress);\n }\n\n private static renderCircleCollapse(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n this.renderWipeCenter(ctx, to, from, params, 1 - progress);\n }\n\n private static renderDiamondExpand(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const centerX = width / 2;\n const centerY = height / 2;\n const size = Math.max(width, height) * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with diamond clipping\n ctx.save();\n ctx.beginPath();\n ctx.moveTo(centerX, centerY - size);\n ctx.lineTo(centerX + size, centerY);\n ctx.lineTo(centerX, centerY + size);\n ctx.lineTo(centerX - size, centerY);\n ctx.closePath();\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderRectangleExpand(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const rectWidth = width * progress;\n const rectHeight = height * progress;\n const x = (width - rectWidth) / 2;\n const y = (height - rectHeight) / 2;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with rect clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(x, y, rectWidth, rectHeight);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n // ============================================================================\n // BLUR TRANSITIONS\n // ============================================================================\n\n private static renderBlurFade(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const blurAmount = (params.blurAmount || 10) * (1 - Math.abs(progress - 0.5) * 2);\n ctx.filter = `blur(${blurAmount}px)`;\n this.renderFade(ctx, from, to, params, progress);\n ctx.filter = \"none\";\n }\n\n private static renderDirectionalBlur(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Directional blur requires custom implementation\n // Fallback to blur fade\n this.renderBlurFade(ctx, from, to, params, progress);\n }\n\n // ============================================================================\n // CREATIVE TRANSITIONS\n // ============================================================================\n\n private static renderGlitch(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Combine both frames with glitch effect\n this.renderFade(ctx, from, to, params, progress);\n\n // Add glitch artifacts\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const glitchIntensity = Math.sin(progress * Math.PI) * 20;\n\n for (let i = 0; i < 5; i++) {\n const y = Math.random() * height;\n const sliceHeight = Math.random() * 20;\n const offset = (Math.random() - 0.5) * glitchIntensity;\n\n const imageData = ctx.getImageData(0, y, width, sliceHeight);\n ctx.putImageData(imageData, offset, y);\n }\n }\n\n private static renderRGBSplit(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Draw with RGB channel offset\n const offset = Math.sin(progress * Math.PI) * 10;\n\n ctx.globalCompositeOperation = \"screen\";\n ctx.globalAlpha = 0.5;\n ctx.drawImage(from, offset, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.drawImage(to, -offset, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = \"source-over\";\n }\n\n private static renderChromatic(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n this.renderRGBSplit(ctx, from, to, params, progress);\n }\n\n private static renderFilmBurn(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Add burn effect overlay\n this.renderFade(ctx, from, to, params, progress);\n\n const intensity = Math.sin(progress * Math.PI);\n ctx.fillStyle = `rgba(255, 200, 100, ${intensity * 0.5})`;\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n private static renderLightLeak(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Add light leak overlay\n this.renderFade(ctx, from, to, params, progress);\n\n const gradient = ctx.createLinearGradient(0, 0, ctx.canvas.width, ctx.canvas.height);\n const intensity = Math.sin(progress * Math.PI);\n gradient.addColorStop(0, `rgba(255, 200, 100, ${intensity * 0.4})`);\n gradient.addColorStop(1, \"rgba(255, 200, 100, 0)\");\n\n ctx.globalCompositeOperation = \"screen\";\n ctx.fillStyle = gradient;\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.globalCompositeOperation = \"source-over\";\n }\n\n private static renderWhipPan(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const blurAmount = Math.sin(progress * Math.PI) * 20;\n ctx.filter = `blur(${blurAmount}px)`;\n\n if (progress < 0.5) {\n const offset = progress * ctx.canvas.width * 2;\n ctx.drawImage(from, -offset, 0, ctx.canvas.width, ctx.canvas.height);\n } else {\n const offset = (1 - progress) * ctx.canvas.width * 2;\n ctx.drawImage(to, offset, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n ctx.filter = \"none\";\n }\n\n // ============================================================================\n // EASING FUNCTIONS\n // ============================================================================\n\n private static applyEasing(t: number, easing: EasingFunction = \"linear\"): number {\n switch (easing) {\n case \"linear\":\n return t;\n case \"ease\":\n case \"ease-in-out\":\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n case \"ease-in\":\n return t * t;\n case \"ease-out\":\n return t * (2 - t);\n case \"ease-in-quad\":\n return t * t;\n case \"ease-out-quad\":\n return t * (2 - t);\n case \"ease-in-out-quad\":\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n case \"ease-in-cubic\":\n return t * t * t;\n case \"ease-out-cubic\":\n return --t * t * t + 1;\n case \"ease-in-out-cubic\":\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n case \"ease-in-quart\":\n return t * t * t * t;\n case \"ease-out-quart\":\n return 1 - --t * t * t * t;\n case \"ease-in-out-quart\":\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n case \"spring\":\n return 1 - Math.cos(t * Math.PI * 2.5) * (1 - t);\n case \"bounce\":\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n } else if (t < 2 / 2.75) {\n return 7.5625 * (t -= 1.5 / 2.75) * t + 0.75;\n } else if (t < 2.5 / 2.75) {\n return 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375;\n } else {\n return 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;\n }\n default:\n return t;\n }\n }\n}\n","/**\n * Transition Presets\n * Professional transition definitions mapped to TransitionRenderer types\n *\n * Part of @clypra-studio/engine - shared between clypra-studio and clypra app\n */\n\nimport type { TransitionPreset, TransitionCategory } from \"./types\";\n\nexport const TRANSITION_CATEGORIES: TransitionCategory[] = [\"fade\", \"slide\", \"wipe\", \"zoom\", \"dissolve\", \"creative\"];\n\n/**\n * Professional Transition Preset Library\n * Maps UI-friendly presets to engine TransitionRenderer types\n */\nconst PRESETS_RAW: Omit<TransitionPreset, \"defaultDurationMs\">[] = [\n // ========== FADE ==========\n {\n id: \"simple-fade\",\n name: \"Simple Fade\",\n category: \"fade\",\n description: \"Classic crossfade - smooth opacity transition\",\n tags: [\"basic\", \"smooth\", \"classic\"],\n defaultDuration: 1.0,\n renderer: \"fade\",\n params: {},\n },\n {\n id: \"fade-to-black\",\n name: \"Fade to Black\",\n category: \"fade\",\n description: \"Fade out to black, then fade in from black\",\n tags: [\"dramatic\", \"black\", \"film\"],\n defaultDuration: 1.5,\n renderer: \"fade\",\n params: {\n color: \"#000000\",\n },\n },\n {\n id: \"fade-to-white\",\n name: \"Fade to White\",\n category: \"fade\",\n description: \"Bright flash transition through white\",\n tags: [\"bright\", \"flash\", \"clean\"],\n defaultDuration: 1.0,\n renderer: \"fade\",\n params: {\n color: \"#FFFFFF\",\n },\n },\n {\n id: \"dissolve\",\n name: \"Dissolve\",\n category: \"dissolve\",\n description: \"Smooth crossfade dissolution\",\n tags: [\"smooth\", \"classic\", \"blend\"],\n defaultDuration: 1.0,\n renderer: \"dissolve\",\n params: {},\n },\n\n // ========== SLIDE ==========\n {\n id: \"slide-left\",\n name: \"Slide Left\",\n category: \"slide\",\n description: \"New clip slides in from right to left\",\n tags: [\"directional\", \"smooth\", \"horizontal\"],\n defaultDuration: 0.8,\n renderer: \"slide_left\",\n params: {},\n },\n {\n id: \"slide-right\",\n name: \"Slide Right\",\n category: \"slide\",\n description: \"New clip slides in from left to right\",\n tags: [\"directional\", \"smooth\", \"horizontal\"],\n defaultDuration: 0.8,\n renderer: \"slide_right\",\n params: {},\n },\n {\n id: \"slide-up\",\n name: \"Slide Up\",\n category: \"slide\",\n description: \"New clip slides in from bottom to top\",\n tags: [\"directional\", \"smooth\", \"vertical\"],\n defaultDuration: 0.8,\n renderer: \"slide_up\",\n params: {},\n },\n {\n id: \"slide-down\",\n name: \"Slide Down\",\n category: \"slide\",\n description: \"New clip slides in from top to bottom\",\n tags: [\"directional\", \"smooth\", \"vertical\"],\n defaultDuration: 0.8,\n renderer: \"slide_down\",\n params: {},\n },\n\n // ========== WIPE ==========\n {\n id: \"wipe-left\",\n name: \"Wipe Left\",\n category: \"wipe\",\n description: \"Clean horizontal wipe from left\",\n tags: [\"directional\", \"clean\", \"horizontal\"],\n defaultDuration: 0.9,\n renderer: \"wipe_left\",\n params: {},\n },\n {\n id: \"wipe-right\",\n name: \"Wipe Right\",\n category: \"wipe\",\n description: \"Clean horizontal wipe from right\",\n tags: [\"directional\", \"clean\", \"horizontal\"],\n defaultDuration: 0.9,\n renderer: \"wipe_right\",\n params: {},\n },\n {\n id: \"wipe-up\",\n name: \"Wipe Up\",\n category: \"wipe\",\n description: \"Clean vertical wipe from bottom\",\n tags: [\"directional\", \"clean\", \"vertical\"],\n defaultDuration: 0.9,\n renderer: \"wipe_up\",\n params: {},\n },\n {\n id: \"wipe-down\",\n name: \"Wipe Down\",\n category: \"wipe\",\n description: \"Clean vertical wipe from top\",\n tags: [\"directional\", \"clean\", \"vertical\"],\n defaultDuration: 0.9,\n renderer: \"wipe_down\",\n params: {},\n },\n {\n id: \"wipe-clockwise\",\n name: \"Clock Wipe\",\n category: \"wipe\",\n description: \"Rotating clock hand wipe effect\",\n tags: [\"radial\", \"rotating\", \"clock\"],\n defaultDuration: 1.2,\n renderer: \"wipe_clockwise\",\n params: {},\n },\n {\n id: \"wipe-center\",\n name: \"Circle Wipe\",\n category: \"wipe\",\n description: \"Circular reveal from center outward\",\n tags: [\"radial\", \"reveal\", \"circular\"],\n defaultDuration: 1.0,\n renderer: \"wipe_center\",\n params: {},\n },\n\n // ========== ZOOM ==========\n {\n id: \"zoom-in\",\n name: \"Zoom In\",\n category: \"zoom\",\n description: \"Outgoing clip zooms in while new clip fades in\",\n tags: [\"scale\", \"dramatic\", \"zoom\"],\n defaultDuration: 1.0,\n renderer: \"zoom_in\",\n params: {\n scale: 1.3,\n },\n },\n {\n id: \"zoom-out\",\n name: \"Zoom Out\",\n category: \"zoom\",\n description: \"Outgoing clip zooms out while new clip fades in\",\n tags: [\"scale\", \"reveal\", \"zoom\"],\n defaultDuration: 1.0,\n renderer: \"zoom_out\",\n params: {\n scale: 0.7,\n },\n },\n {\n id: \"zoom-blur\",\n name: \"Zoom with Blur\",\n category: \"zoom\",\n description: \"Fast zoom with motion blur for energy\",\n tags: [\"fast\", \"blur\", \"energy\"],\n defaultDuration: 0.6,\n renderer: \"zoom_blur\",\n params: {\n scale: 1.3,\n blurAmount: 12,\n },\n },\n\n // ========== SHAPE ==========\n {\n id: \"circle-expand\",\n name: \"Circle Expand\",\n category: \"wipe\",\n description: \"New clip expands from center in a circle\",\n tags: [\"radial\", \"expand\", \"circle\"],\n defaultDuration: 1.0,\n renderer: \"circle_expand\",\n params: {},\n },\n {\n id: \"circle-collapse\",\n name: \"Circle Collapse\",\n category: \"wipe\",\n description: \"Old clip collapses to center in a circle\",\n tags: [\"radial\", \"collapse\", \"circle\"],\n defaultDuration: 1.0,\n renderer: \"circle_collapse\",\n params: {},\n },\n {\n id: \"diamond-expand\",\n name: \"Diamond Expand\",\n category: \"wipe\",\n description: \"New clip expands from center in a diamond shape\",\n tags: [\"geometric\", \"expand\", \"diamond\"],\n defaultDuration: 1.0,\n renderer: \"diamond_expand\",\n params: {},\n },\n {\n id: \"rectangle-expand\",\n name: \"Rectangle Expand\",\n category: \"wipe\",\n description: \"New clip expands from center in a rectangle\",\n tags: [\"geometric\", \"expand\", \"rectangle\"],\n defaultDuration: 1.0,\n renderer: \"rectangle_expand\",\n params: {},\n },\n\n // ========== BLUR ==========\n {\n id: \"blur-fade\",\n name: \"Blur Fade\",\n category: \"creative\",\n description: \"Dreamy fade with motion blur effect\",\n tags: [\"blur\", \"dreamy\", \"soft\"],\n defaultDuration: 1.2,\n renderer: \"blur_fade\",\n params: {\n blurAmount: 15,\n },\n },\n {\n id: \"directional-blur\",\n name: \"Directional Blur\",\n category: \"creative\",\n description: \"Fade with directional motion blur\",\n tags: [\"blur\", \"motion\", \"directional\"],\n defaultDuration: 1.0,\n renderer: \"directional_blur\",\n params: {\n blurAmount: 12,\n },\n },\n\n // ========== CREATIVE ==========\n {\n id: \"glitch\",\n name: \"Glitch\",\n category: \"creative\",\n description: \"Digital glitch transition with artifacts\",\n tags: [\"glitch\", \"digital\", \"distortion\"],\n defaultDuration: 0.8,\n renderer: \"glitch\",\n params: {},\n },\n {\n id: \"rgb-split\",\n name: \"RGB Split\",\n category: \"creative\",\n description: \"Chromatic aberration RGB channel split\",\n tags: [\"chromatic\", \"rgb\", \"split\"],\n defaultDuration: 0.7,\n renderer: \"rgb_split\",\n params: {},\n },\n {\n id: \"chromatic\",\n name: \"Chromatic\",\n category: \"creative\",\n description: \"Chromatic aberration effect\",\n tags: [\"chromatic\", \"aberration\", \"color\"],\n defaultDuration: 0.8,\n renderer: \"chromatic\",\n params: {},\n },\n {\n id: \"film-burn\",\n name: \"Film Burn\",\n category: \"creative\",\n description: \"Vintage film burn effect\",\n tags: [\"film\", \"burn\", \"vintage\"],\n defaultDuration: 1.2,\n renderer: \"film_burn\",\n params: {},\n },\n {\n id: \"light-leak\",\n name: \"Light Leak\",\n category: \"creative\",\n description: \"Light leak overlay transition\",\n tags: [\"light\", \"leak\", \"vintage\"],\n defaultDuration: 1.0,\n renderer: \"light_leak\",\n params: {},\n },\n {\n id: \"whip-pan\",\n name: \"Whip Pan\",\n category: \"creative\",\n description: \"Fast whip pan with motion blur\",\n tags: [\"whip\", \"fast\", \"blur\"],\n defaultDuration: 0.5,\n renderer: \"whip_pan\",\n params: {},\n },\n\n // ========== BASIC (for compatibility) ==========\n {\n id: \"cut\",\n name: \"Cut\",\n category: \"fade\",\n description: \"Instant cut (no transition)\",\n tags: [\"instant\", \"cut\", \"basic\"],\n defaultDuration: 0.0,\n renderer: \"cut\",\n params: {},\n },\n];\n\nexport const TRANSITION_PRESETS: TransitionPreset[] = PRESETS_RAW.map((p) => ({\n ...p,\n defaultDurationMs: Math.round(p.defaultDuration * 1000),\n}));\n","/**\n * Transition Helpers\n * Utility functions for working with transition presets\n *\n * Part of @clypra-studio/engine - shared between clypra-studio and clypra app\n */\n\nimport type { TransitionPreset, TransitionCategory, TransitionRenderer } from \"./types\";\nimport { TRANSITION_PRESETS, TRANSITION_CATEGORIES } from \"./presets\";\n\n/**\n * Get all available transition categories\n */\nexport function getTransitionCategories(): TransitionCategory[] {\n return [...TRANSITION_CATEGORIES];\n}\n\n/**\n * Get transitions filtered by category\n */\nexport function getTransitionsByCategory(category: TransitionCategory): TransitionPreset[] {\n return TRANSITION_PRESETS.filter((preset) => preset.category === category);\n}\n\n/**\n * Search transitions by query (name, description, or tags)\n */\nexport function searchTransitions(query: string): TransitionPreset[] {\n if (!query || query.trim() === \"\") {\n return TRANSITION_PRESETS;\n }\n\n const lowerQuery = query.toLowerCase().trim();\n\n return TRANSITION_PRESETS.filter((preset) => {\n // Search in name\n if (preset.name.toLowerCase().includes(lowerQuery)) {\n return true;\n }\n\n // Search in description\n if (preset.description.toLowerCase().includes(lowerQuery)) {\n return true;\n }\n\n // Search in tags\n if (preset.tags.some((tag) => tag.toLowerCase().includes(lowerQuery))) {\n return true;\n }\n\n // Search in renderer name\n if (preset.renderer.toLowerCase().includes(lowerQuery)) {\n return true;\n }\n\n return false;\n });\n}\n\n/**\n * Get a specific transition preset by ID\n */\nexport function getTransitionById(id: string): TransitionPreset | undefined {\n return TRANSITION_PRESETS.find((preset) => preset.id === id);\n}\n\n/**\n * Get a transition preset by renderer type\n */\nexport function getTransitionByRenderer(renderer: TransitionRenderer): TransitionPreset | undefined {\n return TRANSITION_PRESETS.find((preset) => preset.renderer === renderer);\n}\n\n/**\n * Get all transition presets\n */\nexport function getAllTransitions(): TransitionPreset[] {\n return [...TRANSITION_PRESETS];\n}\n\n/**\n * Get transition count by category\n */\nexport function getTransitionCountByCategory(): Record<TransitionCategory, number> {\n const counts = {} as Record<TransitionCategory, number>;\n\n for (const category of TRANSITION_CATEGORIES) {\n counts[category] = getTransitionsByCategory(category).length;\n }\n\n return counts;\n}\n\n/**\n * Get all unique tags from all transitions\n */\nexport function getAllTransitionTags(): string[] {\n const tagsSet = new Set<string>();\n\n for (const preset of TRANSITION_PRESETS) {\n for (const tag of preset.tags) {\n tagsSet.add(tag);\n }\n }\n\n return Array.from(tagsSet).sort();\n}\n\n/**\n * Filter transitions by multiple tags (AND logic)\n */\nexport function getTransitionsByTags(tags: string[]): TransitionPreset[] {\n if (tags.length === 0) {\n return TRANSITION_PRESETS;\n }\n\n const lowerTags = tags.map((tag) => tag.toLowerCase());\n\n return TRANSITION_PRESETS.filter((preset) => {\n const presetTags = preset.tags.map((tag) => tag.toLowerCase());\n return lowerTags.every((tag) => presetTags.includes(tag));\n });\n}\n\n/**\n * Get recommended transition duration for a preset\n */\nexport function getRecommendedDuration(presetId: string): number {\n const preset = getTransitionById(presetId);\n return preset?.defaultDuration ?? 1.0;\n}\n","/**\n * Transitions Module\n *\n * Professional transition effects for video editing\n * Part of @clypra-studio/engine - shared between clypra-studio and clypra app\n *\n * @module transitions\n */\n\n// Core renderer\nexport { TransitionRenderer } from \"./TransitionRenderer\";\n\n// Types\nexport type { TransitionRenderer as TransitionRendererType, EasingFunction, TransitionParameters, TransitionCategory, TransitionPreset, AppliedTransition } from \"./types\";\n\n// Preset library\nimport { TRANSITION_PRESETS } from \"./presets\";\nexport { TRANSITION_PRESETS, TRANSITION_CATEGORIES } from \"./presets\";\n\n// Helper functions\nexport { getTransitionCategories, getTransitionsByCategory, searchTransitions, getTransitionById, getTransitionByRenderer, getAllTransitions, getTransitionCountByCategory, getAllTransitionTags, getTransitionsByTags, getRecommendedDuration } from \"./helpers\";\n\n/**\n * Native transition metadata consumed by Studio controls. Rendering is owned\n * by the Rust/native frame contract; these records intentionally contain no\n * browser renderer or GPU object factories.\n */\nexport interface NativeTransitionParam {\n key: string;\n label: string;\n type: \"range\" | \"color\" | \"toggle\" | \"select\" | \"text\";\n value: number | string | boolean;\n min?: number;\n max?: number;\n step?: number;\n options?: string[];\n}\n\nexport interface NativeTransitionDefinition {\n id: string;\n name: string;\n category: string;\n description: string;\n tags: string[];\n defaultDurationMs: number;\n params: NativeTransitionParam[];\n renderer: string;\n}\n\nexport const ALL_TRANSITIONS: NativeTransitionDefinition[] = TRANSITION_PRESETS.map((preset) => ({\n id: preset.id,\n name: preset.name,\n category: preset.category,\n description: preset.description,\n tags: preset.tags,\n defaultDurationMs: preset.defaultDurationMs,\n renderer: preset.renderer,\n params: Object.entries(preset.params).map(([key, value]) => ({\n key,\n label: key.replace(/[-_]/g, \" \").replace(/\\b\\w/g, (letter) => letter.toUpperCase()),\n type: typeof value === \"number\" ? \"range\" : typeof value === \"boolean\" ? \"toggle\" : \"text\",\n value,\n })),\n}));\n"],"mappings":";AAgBO,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW9B,OAAO,OAAO,KAA+B,WAAiD,SAA+C,UAAkC,QAA8B,UAAwB;AACnO,UAAM,SAAS,KAAK,YAAY,QAAQ;AACxC,QAAI,QAAQ;AAEV,YAAM,gBAAgB,KAAK,YAAY,UAAU,OAAO,UAAU,aAAa;AAC/E,aAAO,KAAK,MAAM,KAAK,WAAW,SAAS,QAAQ,aAAa;AAAA,IAClE,OAAO;AACL,cAAQ,KAAK,gCAAgC,QAAQ,EAAE;AAEvD,WAAK,WAAW,KAAK,WAAW,SAAS,QAAQ,QAAQ;AAAA,IAC3D;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,OAAe,YAAY,MAAsN;AAC/O,UAAM,YAAiD;AAAA;AAAA,MAErD,MAAM,KAAK;AAAA,MACX,UAAU,KAAK;AAAA,MACf,KAAK,KAAK;AAAA,MACV,QAAQ,KAAK;AAAA;AAAA;AAAA,MAGb,SAAS,KAAK;AAAA,MACd,UAAU,KAAK;AAAA,MACf,WAAW,KAAK;AAAA;AAAA,MAGhB,YAAY,KAAK;AAAA,MACjB,aAAa,KAAK;AAAA,MAClB,UAAU,KAAK;AAAA,MACf,YAAY,KAAK;AAAA;AAAA,MAGjB,WAAW,KAAK;AAAA,MAChB,YAAY,KAAK;AAAA,MACjB,SAAS,KAAK;AAAA,MACd,WAAW,KAAK;AAAA,MAChB,gBAAgB,KAAK;AAAA,MACrB,aAAa,KAAK;AAAA;AAAA,MAGlB,eAAe,KAAK;AAAA,MACpB,iBAA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4 +1,5 @@
|
|
|
1
1
|
declare const SCENE_VERSION: 1;
|
|
2
|
+
declare const SCENE_SCHEMA_VERSION: 2;
|
|
2
3
|
/** Default canvas width in pixels. */
|
|
3
4
|
declare const DEFAULT_CANVAS_WIDTH: 800;
|
|
4
5
|
/** Default canvas height in pixels. */
|
|
@@ -9,12 +10,8 @@ declare const DEFAULT_FONT_SIZE: 80;
|
|
|
9
10
|
declare const DEFAULT_FPS: 30;
|
|
10
11
|
/** Default timeline duration in seconds for new scenes. */
|
|
11
12
|
declare const DEFAULT_DURATION: 2;
|
|
12
|
-
type EffectLayerType = "panel" | "glow" | "shadow" | "extrusion" | "duplicateStack" | "stroke" | "fill" | "mask" | "filter"
|
|
13
|
+
type EffectLayerType = "panel" | "glow" | "shadow" | "extrusion" | "duplicateStack" | "stroke" | "fill" | "mask" | "filter";
|
|
13
14
|
type LayerTarget = "text" | "panel" | "scene" | "previous";
|
|
14
|
-
type CustomEngineId = "ink";
|
|
15
|
-
declare const CUSTOM_ENGINE_IDS: CustomEngineId[];
|
|
16
|
-
declare const LEGACY_RENDERER_MAP: Record<string, CustomEngineId>;
|
|
17
|
-
declare const ENGINE_ID_TO_LEGACY: Record<CustomEngineId, string>;
|
|
18
15
|
interface CanvasBackgroundConfig {
|
|
19
16
|
type: "solid" | "gradient" | "shader" | "media";
|
|
20
17
|
color?: string;
|
|
@@ -87,14 +84,23 @@ interface Timeline {
|
|
|
87
84
|
}
|
|
88
85
|
interface SceneDocument {
|
|
89
86
|
version: typeof SCENE_VERSION;
|
|
87
|
+
/** Canonical wire/schema version. `version` is retained for legacy callers. */
|
|
88
|
+
schemaVersion?: typeof SCENE_SCHEMA_VERSION;
|
|
90
89
|
effectName: string;
|
|
91
90
|
canvas: SceneCanvas;
|
|
92
91
|
text: SceneText;
|
|
93
92
|
effectLayers: EffectLayer[];
|
|
94
|
-
customEngineId: CustomEngineId | null;
|
|
95
|
-
engineParams?: Record<string, unknown>;
|
|
96
93
|
compositor: CompositorSettings;
|
|
97
94
|
timeline: Timeline;
|
|
95
|
+
/** Immutable catalog identity when this scene is published. */
|
|
96
|
+
revision?: {
|
|
97
|
+
assetId: string;
|
|
98
|
+
revisionId: string;
|
|
99
|
+
schemaVersion: number;
|
|
100
|
+
contentHash: string;
|
|
101
|
+
rendererVersion: string;
|
|
102
|
+
createdAt: string;
|
|
103
|
+
};
|
|
98
104
|
/** Legacy flat config cache for gradual UI migration */
|
|
99
105
|
legacyConfig?: TextEffectConfig;
|
|
100
106
|
/** Deep Research extension snippet (not executed until sandboxed) */
|
|
@@ -107,7 +113,6 @@ interface StyleRecipe {
|
|
|
107
113
|
layers: EffectLayer[];
|
|
108
114
|
exposed: string[];
|
|
109
115
|
tags: string[];
|
|
110
|
-
customEngineId?: CustomEngineId | null;
|
|
111
116
|
scene?: SceneDocument;
|
|
112
117
|
}
|
|
113
118
|
declare function createEmptyScene(overrides?: Partial<SceneDocument>): SceneDocument;
|
|
@@ -135,6 +140,10 @@ interface TextEffectConfig {
|
|
|
135
140
|
fontSize: number;
|
|
136
141
|
letterSpacing: number;
|
|
137
142
|
lineHeight: number;
|
|
143
|
+
fireFlameHeight?: number;
|
|
144
|
+
iceIcicleHeight?: number;
|
|
145
|
+
iceSnowHeight?: number;
|
|
146
|
+
auraReach?: number;
|
|
138
147
|
fillType: "solid" | "linear" | "radial" | "pattern" | "none";
|
|
139
148
|
fillColor: string;
|
|
140
149
|
fillGradientAngle: number;
|
|
@@ -202,14 +211,6 @@ interface TextEffectConfig {
|
|
|
202
211
|
autoFitText?: boolean;
|
|
203
212
|
/** Wrap long lines to composition safe width */
|
|
204
213
|
wrapText?: boolean;
|
|
205
|
-
inkColor?: string;
|
|
206
|
-
bristleDensity?: number;
|
|
207
|
-
bristleSkipRate?: number;
|
|
208
|
-
dripRate?: number;
|
|
209
|
-
dripMaxLength?: number;
|
|
210
|
-
grainDensity?: number;
|
|
211
|
-
skewX?: number;
|
|
212
|
-
customRenderer?: string;
|
|
213
214
|
}
|
|
214
215
|
interface Preset {
|
|
215
216
|
id: string;
|
|
@@ -225,6 +226,15 @@ interface EffectIndexItem {
|
|
|
225
226
|
id: string;
|
|
226
227
|
name: string;
|
|
227
228
|
category: string;
|
|
229
|
+
schemaVersion?: number;
|
|
230
|
+
revisionId?: string;
|
|
231
|
+
contentHash?: string;
|
|
232
|
+
rendererVersion?: string;
|
|
233
|
+
revision?: {
|
|
234
|
+
revisionId?: string;
|
|
235
|
+
contentHash?: string;
|
|
236
|
+
rendererVersion?: string;
|
|
237
|
+
};
|
|
228
238
|
description?: string;
|
|
229
239
|
tags?: string[];
|
|
230
240
|
isPremium?: boolean;
|
|
@@ -235,6 +245,7 @@ interface EffectIndexItem {
|
|
|
235
245
|
durationMs?: number;
|
|
236
246
|
}
|
|
237
247
|
interface EffectFill {
|
|
248
|
+
enabled?: boolean;
|
|
238
249
|
type: "solid" | "linear" | "radial" | "pattern" | "none";
|
|
239
250
|
color?: string;
|
|
240
251
|
gradient?: {
|
|
@@ -249,6 +260,7 @@ interface EffectFill {
|
|
|
249
260
|
charFillColors?: string[];
|
|
250
261
|
}
|
|
251
262
|
interface EffectStroke {
|
|
263
|
+
enabled?: boolean;
|
|
252
264
|
color: string;
|
|
253
265
|
width: number;
|
|
254
266
|
position?: "outside" | "center" | "inside";
|
|
@@ -261,6 +273,7 @@ interface EffectStroke {
|
|
|
261
273
|
fadeRange?: [number, number];
|
|
262
274
|
}
|
|
263
275
|
interface EffectShadow {
|
|
276
|
+
enabled?: boolean;
|
|
264
277
|
type?: "drop" | "inner";
|
|
265
278
|
color: string;
|
|
266
279
|
blur: number;
|
|
@@ -273,6 +286,7 @@ interface EffectShadow {
|
|
|
273
286
|
opacity?: number;
|
|
274
287
|
}
|
|
275
288
|
interface EffectBevel {
|
|
289
|
+
enabled?: boolean;
|
|
276
290
|
depth: number;
|
|
277
291
|
highlight?: string;
|
|
278
292
|
highlightColor?: string;
|
|
@@ -290,6 +304,7 @@ interface EffectBevel {
|
|
|
290
304
|
focalLength?: number;
|
|
291
305
|
}
|
|
292
306
|
interface EffectGlow {
|
|
307
|
+
enabled?: boolean;
|
|
293
308
|
color: string;
|
|
294
309
|
blur: number;
|
|
295
310
|
opacity: number;
|
|
@@ -298,6 +313,7 @@ interface EffectGlow {
|
|
|
298
313
|
spread?: number;
|
|
299
314
|
}
|
|
300
315
|
interface EffectPanel {
|
|
316
|
+
enabled?: boolean;
|
|
301
317
|
color: string;
|
|
302
318
|
opacity: number;
|
|
303
319
|
radius: number;
|
|
@@ -308,11 +324,13 @@ interface EffectPanel {
|
|
|
308
324
|
paddingX?: number;
|
|
309
325
|
paddingY?: number;
|
|
310
326
|
stroke?: {
|
|
327
|
+
enabled?: boolean;
|
|
311
328
|
color: string;
|
|
312
329
|
width: number;
|
|
313
330
|
} | null;
|
|
314
331
|
}
|
|
315
332
|
interface EffectStack {
|
|
333
|
+
enabled?: boolean;
|
|
316
334
|
count: number;
|
|
317
335
|
offsetX: number;
|
|
318
336
|
offsetY: number;
|
|
@@ -323,6 +341,20 @@ interface EffectStack {
|
|
|
323
341
|
color4?: string;
|
|
324
342
|
}
|
|
325
343
|
interface EffectFullDefinition extends EffectIndexItem {
|
|
344
|
+
schemaVersion?: number;
|
|
345
|
+
revisionId?: string;
|
|
346
|
+
contentHash?: string;
|
|
347
|
+
rendererVersion?: string;
|
|
348
|
+
revision?: {
|
|
349
|
+
assetId: string;
|
|
350
|
+
revisionId: string;
|
|
351
|
+
schemaVersion: number;
|
|
352
|
+
contentHash: string;
|
|
353
|
+
rendererVersion: string;
|
|
354
|
+
createdAt: string;
|
|
355
|
+
};
|
|
356
|
+
/** Canonical scene snapshot published alongside legacy fields. */
|
|
357
|
+
scene?: SceneDocument;
|
|
326
358
|
version?: string;
|
|
327
359
|
description: string;
|
|
328
360
|
tags: string[];
|
|
@@ -462,8 +494,17 @@ interface TemplateTextLayer {
|
|
|
462
494
|
backgroundBorderWidth?: AnimatableValue<number>;
|
|
463
495
|
animation: LayerAnimation;
|
|
464
496
|
role?: "primary" | "secondary" | "accent" | "none";
|
|
497
|
+
styleRef?: {
|
|
498
|
+
effectId: string;
|
|
499
|
+
revisionId: string;
|
|
500
|
+
contentHash: string;
|
|
501
|
+
snapshot?: SceneDocument;
|
|
502
|
+
parameterOverrides?: Record<string, unknown>;
|
|
503
|
+
};
|
|
465
504
|
overflow?: "wrap" | "shrink" | "expand-panel" | "clip";
|
|
466
505
|
verticalAlign?: "top" | "middle" | "bottom";
|
|
506
|
+
/** Studio-only UI state; ignored by render/export. */
|
|
507
|
+
_paddingLinked?: boolean;
|
|
467
508
|
}
|
|
468
509
|
interface TemplateShapeLayer {
|
|
469
510
|
kind: "shape";
|
|
@@ -506,18 +547,122 @@ interface TemplateImageLayer {
|
|
|
506
547
|
type TemplateLayer = TemplateTextLayer | TemplateShapeLayer | TemplateImageLayer;
|
|
507
548
|
interface TextTemplate {
|
|
508
549
|
id: string;
|
|
550
|
+
schemaVersion?: number;
|
|
509
551
|
label: string;
|
|
510
552
|
category: TemplateCategory;
|
|
511
553
|
duration: number;
|
|
554
|
+
fps?: number;
|
|
512
555
|
canvasWidth: number;
|
|
513
556
|
canvasHeight: number;
|
|
514
557
|
thumbnail?: string;
|
|
515
558
|
preview?: string;
|
|
516
559
|
layers: TemplateLayer[];
|
|
560
|
+
dependencies?: Array<{
|
|
561
|
+
effectId: string;
|
|
562
|
+
revisionId: string;
|
|
563
|
+
contentHash: string;
|
|
564
|
+
snapshot?: SceneDocument;
|
|
565
|
+
}>;
|
|
517
566
|
published?: boolean;
|
|
567
|
+
description?: string;
|
|
568
|
+
tags?: string[];
|
|
518
569
|
creatorName?: string;
|
|
519
570
|
creatorLink?: string;
|
|
520
571
|
}
|
|
572
|
+
/** GPU/GLSL color grading uniform parameters. Keys map to shader uniforms. */
|
|
573
|
+
interface GradingParams {
|
|
574
|
+
exposure?: number;
|
|
575
|
+
brightness?: number;
|
|
576
|
+
contrast?: number;
|
|
577
|
+
saturation?: number;
|
|
578
|
+
temperature?: number;
|
|
579
|
+
tint?: number;
|
|
580
|
+
sepia?: number;
|
|
581
|
+
grayscale?: number;
|
|
582
|
+
hueRotate?: number;
|
|
583
|
+
vignette?: number;
|
|
584
|
+
invert?: number;
|
|
585
|
+
lift?: number;
|
|
586
|
+
highlights?: number;
|
|
587
|
+
shadows?: number;
|
|
588
|
+
whites?: number;
|
|
589
|
+
blacks?: number;
|
|
590
|
+
vibrance?: {
|
|
591
|
+
amount?: number;
|
|
592
|
+
protectedHue?: string;
|
|
593
|
+
[key: string]: number | string | boolean | undefined;
|
|
594
|
+
};
|
|
595
|
+
grain?: {
|
|
596
|
+
amount?: number;
|
|
597
|
+
intensity?: number;
|
|
598
|
+
size?: number;
|
|
599
|
+
roughness?: number;
|
|
600
|
+
[key: string]: number | string | boolean | undefined;
|
|
601
|
+
};
|
|
602
|
+
crossProcess?: {
|
|
603
|
+
amount?: number;
|
|
604
|
+
style?: string;
|
|
605
|
+
[key: string]: number | string | boolean | undefined;
|
|
606
|
+
};
|
|
607
|
+
channelMix?: {
|
|
608
|
+
r: number;
|
|
609
|
+
g: number;
|
|
610
|
+
b: number;
|
|
611
|
+
[key: string]: number | string | boolean;
|
|
612
|
+
};
|
|
613
|
+
duotone?: {
|
|
614
|
+
darkColor: string;
|
|
615
|
+
lightColor: string;
|
|
616
|
+
[key: string]: number | string | boolean;
|
|
617
|
+
};
|
|
618
|
+
splitTone?: {
|
|
619
|
+
shadowColor: string;
|
|
620
|
+
shadowStrength: number;
|
|
621
|
+
highlightColor: string;
|
|
622
|
+
highlightStrength: number;
|
|
623
|
+
balance: number;
|
|
624
|
+
[key: string]: number | string | boolean;
|
|
625
|
+
};
|
|
626
|
+
halation?: {
|
|
627
|
+
color: string;
|
|
628
|
+
threshold: number;
|
|
629
|
+
intensity: number;
|
|
630
|
+
[key: string]: number | string | boolean;
|
|
631
|
+
};
|
|
632
|
+
[key: string]: number | boolean | string | Record<string, number | string | boolean | undefined> | undefined;
|
|
633
|
+
}
|
|
634
|
+
/** Per-clip color adjustment values applied in the ColorAdjustmentsEffect. */
|
|
635
|
+
interface ColorAdjustments {
|
|
636
|
+
exposure?: number;
|
|
637
|
+
brightness?: number;
|
|
638
|
+
contrast?: number;
|
|
639
|
+
saturation?: number;
|
|
640
|
+
temperature?: number;
|
|
641
|
+
tint?: number;
|
|
642
|
+
highlights?: number;
|
|
643
|
+
shadows?: number;
|
|
644
|
+
whites?: number;
|
|
645
|
+
blacks?: number;
|
|
646
|
+
hueRotate?: number;
|
|
647
|
+
hue?: number;
|
|
648
|
+
blur?: number;
|
|
649
|
+
invert?: boolean | number;
|
|
650
|
+
vibrance?: {
|
|
651
|
+
amount?: number;
|
|
652
|
+
protectedHue?: string;
|
|
653
|
+
};
|
|
654
|
+
grain?: {
|
|
655
|
+
amount?: number;
|
|
656
|
+
intensity?: number;
|
|
657
|
+
size?: number;
|
|
658
|
+
roughness?: number;
|
|
659
|
+
};
|
|
660
|
+
crossProcess?: {
|
|
661
|
+
amount?: number;
|
|
662
|
+
style?: string;
|
|
663
|
+
};
|
|
664
|
+
[key: string]: number | boolean | string | Record<string, unknown> | undefined;
|
|
665
|
+
}
|
|
521
666
|
|
|
522
667
|
declare function renderTextEffectCore(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, cfg: TextEffectConfig): void;
|
|
523
668
|
declare class TextEffectRenderer {
|
|
@@ -526,6 +671,15 @@ declare class TextEffectRenderer {
|
|
|
526
671
|
|
|
527
672
|
/** Style recipes (layer graphs): see `builtInRecipes` in src/engine/recipes.ts */
|
|
528
673
|
declare const defaultConfig: TextEffectConfig;
|
|
674
|
+
/**
|
|
675
|
+
* Return a fresh, explicit blank authoring state.
|
|
676
|
+
*
|
|
677
|
+
* A blank state is intentionally different from a loosely spread object:
|
|
678
|
+
* every optional visual contributor is disabled while its parameters remain
|
|
679
|
+
* present for the controls and the canonical scene migration. This prevents
|
|
680
|
+
* object presence (panel/glow/shadow/etc.) from being interpreted as active.
|
|
681
|
+
*/
|
|
682
|
+
declare function createBlankTextEffectConfig(): TextEffectConfig;
|
|
529
683
|
declare const builtInPresets: Preset[];
|
|
530
684
|
|
|
531
685
|
/**
|
|
@@ -594,7 +748,6 @@ declare function getFontLoader(): FontLoader;
|
|
|
594
748
|
declare function resetFontLoader(): void;
|
|
595
749
|
declare function ensureFontsLoaded(descriptors: FontDescriptor[]): Promise<FontLoadResult[]>;
|
|
596
750
|
|
|
597
|
-
declare function resolveCustomEngineId(cfg: TextEffectConfig): CustomEngineId | null;
|
|
598
751
|
/** Lossless migration from flat TextEffectConfig to SceneDocument */
|
|
599
752
|
declare function textEffectConfigToScene(cfg: TextEffectConfig): SceneDocument;
|
|
600
753
|
/** Flatten SceneDocument back to TextEffectConfig for legacy controls and renderer */
|
|
@@ -617,28 +770,9 @@ declare function layerToTextEffectConfig(layer: EvaluatedTextLayer): TextEffectC
|
|
|
617
770
|
height: number;
|
|
618
771
|
};
|
|
619
772
|
|
|
620
|
-
declare class WebGLCompositor {
|
|
621
|
-
private gl;
|
|
622
|
-
private program;
|
|
623
|
-
private vao;
|
|
624
|
-
private texture;
|
|
625
|
-
readonly isSupported: boolean;
|
|
626
|
-
constructor();
|
|
627
|
-
private initProgram;
|
|
628
|
-
private compileShader;
|
|
629
|
-
renderToContext(targetCtx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, source: HTMLCanvasElement | OffscreenCanvas, settings: CompositorSettings): void;
|
|
630
|
-
dispose(): void;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
773
|
interface EvaluateOptions {
|
|
634
|
-
compositor?: WebGLCompositor | null;
|
|
635
774
|
skipPostFx?: boolean;
|
|
636
775
|
}
|
|
637
|
-
/**
|
|
638
|
-
* Dispose the shared module-level compositor and release GPU resources.
|
|
639
|
-
* Call on hot-module-reload or application teardown to prevent WebGL context leaks.
|
|
640
|
-
*/
|
|
641
|
-
declare function disposeSharedCompositor(): void;
|
|
642
776
|
/**
|
|
643
777
|
* Single source of truth for rendering a scene at time t.
|
|
644
778
|
*/
|
|
@@ -649,4 +783,4 @@ declare function getSceneTime(doc: SceneDocument): number;
|
|
|
649
783
|
declare function setSceneTime(doc: SceneDocument, time: number): void;
|
|
650
784
|
declare function resetSceneTime(doc: SceneDocument): void;
|
|
651
785
|
|
|
652
|
-
export {
|
|
786
|
+
export { type Timeline as $, type AnimTrack as A, type EffectStroke as B, type CanvasBackgroundConfig as C, DEFAULT_CANVAS_HEIGHT as D, type EffectLayer as E, type EvaluateOptions as F, type GlowLayer as G, type EvaluatedTextLayer as H, type FontDescriptor as I, type FontLoadResult as J, type Keyframe as K, FontLoader as L, type FontVariant as M, type GradingParams as N, type LayerAnimation as O, type Preset as P, type LayerTarget as Q, SCENE_SCHEMA_VERSION as R, type SceneDocument as S, type TextEffectConfig as T, SCENE_VERSION as U, type SceneCanvas as V, type SceneText as W, type TemplateImageLayer as X, type TemplateShapeLayer as Y, type TemplateTextLayer as Z, TextEffectRenderer as _, type StyleRecipe as a, _buildConfig as a0, advanceSceneTime as a1, builtInPresets as a2, checkFontVariant as a3, createBlankTextEffectConfig as a4, createEmptyScene as a5, defaultConfig as a6, ensureFontsLoaded as a7, evaluateConfig as a8, evaluateScene as a9, getFontLoader as aa, getSceneTime as ab, initializeFontSystem as ac, injectFontVariantRules as ad, layerToTextEffectConfig as ae, mergeSceneIntoConfig as af, newLayerId as ag, renderTextEffectCore as ah, resetFontLoader as ai, resetSceneTime as aj, resolveFontFamilyName as ak, sceneToConfig as al, setSceneTime as am, syncCompositorFromScene as an, textEffectConfigToScene as ao, type TextEffectDefinition as b, type GradientStop as c, type TextTemplate as d, type TemplateLayer as e, type TemplateCategory as f, type AnimatableValue as g, type TemplateEasingFunction as h, type TemplateKeyframe as i, type AnimationPreset as j, type ColorAdjustments as k, type CompositorFromScene as l, type CompositorSettings as m, DEFAULT_CANVAS_WIDTH as n, DEFAULT_DURATION as o, DEFAULT_FONT_SIZE as p, DEFAULT_FPS as q, type EffectBevel as r, type EffectFill as s, type EffectFullDefinition as t, type EffectGlow as u, type EffectIndexItem as v, type EffectLayerType as w, type EffectPanel as x, type EffectShadow as y, type EffectStack as z };
|