@clypra-studio/engine 0.1.2 → 1.0.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 (41) hide show
  1. package/dist/TransitionDefinition-CC6oSTYB.d.cts +158 -0
  2. package/dist/TransitionDefinition-CC6oSTYB.d.ts +158 -0
  3. package/dist/chunk-4Y7ZSGHJ.js +2990 -0
  4. package/dist/chunk-4Y7ZSGHJ.js.map +1 -0
  5. package/dist/chunk-AUMNXFYQ.js +667 -0
  6. package/dist/chunk-AUMNXFYQ.js.map +1 -0
  7. package/dist/{chunk-CJRH4PAV.js → chunk-LGW5SSLZ.js} +292 -61
  8. package/dist/chunk-LGW5SSLZ.js.map +1 -0
  9. package/dist/{chunk-EVQAI3P3.js → chunk-S24UVNPZ.js} +5 -1
  10. package/dist/{chunk-EVQAI3P3.js.map → chunk-S24UVNPZ.js.map} +1 -1
  11. package/dist/{index-BWo6qV_z.d.cts → index-BP1N8Yg7.d.cts} +2 -2
  12. package/dist/{index-BWo6qV_z.d.ts → index-BP1N8Yg7.d.ts} +2 -2
  13. package/dist/index.cjs +3882 -1366
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +428 -3798
  16. package/dist/index.d.ts +428 -3798
  17. package/dist/index.js +1373 -1498
  18. package/dist/index.js.map +1 -1
  19. package/dist/textEffects/index.cjs.map +1 -1
  20. package/dist/textEffects/index.js +1 -1
  21. package/dist/transitions/index.cjs +2207 -3
  22. package/dist/transitions/index.cjs.map +1 -1
  23. package/dist/transitions/index.d.cts +54 -5
  24. package/dist/transitions/index.d.ts +54 -5
  25. package/dist/transitions/index.js +53 -3
  26. package/dist/v2/backends/index.cjs +246 -33
  27. package/dist/v2/backends/index.cjs.map +1 -1
  28. package/dist/v2/backends/index.d.cts +1 -1
  29. package/dist/v2/backends/index.d.ts +1 -1
  30. package/dist/v2/backends/index.js +1 -1
  31. package/dist/videoEffects/index.cjs +287 -62
  32. package/dist/videoEffects/index.cjs.map +1 -1
  33. package/dist/videoEffects/index.d.cts +31 -134
  34. package/dist/videoEffects/index.d.ts +31 -134
  35. package/dist/videoEffects/index.js +1 -1
  36. package/package.json +2 -2
  37. package/dist/chunk-5JOAEDIQ.js +0 -446
  38. package/dist/chunk-5JOAEDIQ.js.map +0 -1
  39. package/dist/chunk-CJRH4PAV.js.map +0 -1
  40. package/dist/chunk-QMRMNH52.js +0 -811
  41. package/dist/chunk-QMRMNH52.js.map +0 -1
@@ -1,4 +1,6 @@
1
- import { Filter, Application, Container, Ticker, Sprite } from 'pixi.js';
1
+ import { E as EffectDefinition, e as ParamValues, i as TransitionDefinition, P as PixiEffectDefinition } from '../TransitionDefinition-CC6oSTYB.cjs';
2
+ export { C as Canvas2DEffectDefinition, a as Canvas2DEngine, b as Canvas2DEngineConstructor, c as ParamSchema, d as ParamType, f as PixiEffectContext, g as PixiEffectSubtype, h as PixiFilterSpec, j as isCanvas2DEffect, k as isCompositeEffect, l as isFilterEffect, m as isMotionEffect, n as isPixiEffect } from '../TransitionDefinition-CC6oSTYB.cjs';
3
+ import { Application, Sprite, Container, Texture } from 'pixi.js';
2
4
 
3
5
  /**
4
6
  * Video Effects Type System
@@ -9,7 +11,7 @@ import { Filter, Application, Container, Ticker, Sprite } from 'pixi.js';
9
11
  *
10
12
  * NOTE: Transitions have been moved to @clypra/engine/transitions
11
13
  */
12
- type EffectCategory$1 = "overlay" | "effect" | "filter";
14
+ type EffectCategory = "overlay" | "effect" | "filter";
13
15
  interface OverlayAsset {
14
16
  id: string;
15
17
  name: string;
@@ -107,7 +109,7 @@ type VideoEffectItem = OverlayAsset | EffectPreset | FilterAsset;
107
109
  interface VideoEffectCategory {
108
110
  id: string;
109
111
  name: string;
110
- type: EffectCategory$1;
112
+ type: EffectCategory;
111
113
  description: string;
112
114
  thumbnail: string;
113
115
  itemCount: number;
@@ -177,131 +179,6 @@ declare class EffectRenderer {
177
179
  static apply(ctx: CanvasRenderingContext2D, renderer: EffectRenderer$1, params: EffectParameters, intensity?: number, time?: number, bodyMask?: ImageData): void;
178
180
  }
179
181
 
180
- /**
181
- * @clypra/engine — EffectDefinition
182
- *
183
- * Unified type system for all Clypra video effects.
184
- * Supports two rendering backends:
185
- * - 'canvas2d' → existing text/overlay effects (EffectEngine class pattern)
186
- * - 'pixi' → new GPU-accelerated video/motion/filter effects (PixiJS)
187
- *
188
- * Both backends are consumed identically by EffectGraph and EffectRenderer.
189
- * The Studio and Desktop Editor import from this single package — same code, same output.
190
- */
191
-
192
- type ParamType = 'range' | 'color' | 'toggle' | 'select' | 'text';
193
- interface ParamSchema {
194
- key: string;
195
- label: string;
196
- type: ParamType;
197
- value: number | string | boolean;
198
- min?: number;
199
- max?: number;
200
- step?: number;
201
- options?: string[];
202
- }
203
- type ParamValues = Record<string, number | string | boolean>;
204
- type EffectCategory = 'light' | 'glitch' | 'cinematic' | 'neon' | 'retro' | 'motion' | 'color' | 'blur' | 'distortion' | 'particle' | 'custom';
205
- interface Canvas2DEngine {
206
- /** Advance internal animation state by N steps */
207
- advanceSteps(steps: number): void;
208
- /** Draw one frame onto the provided context */
209
- drawFrame(ctx: CanvasRenderingContext2D, ghostFrames?: ImageData[]): void;
210
- }
211
- type Canvas2DEngineConstructor = new (config: ParamValues) => Canvas2DEngine;
212
- interface Canvas2DEffectDefinition {
213
- backend: 'canvas2d';
214
- id: string;
215
- name: string;
216
- category: EffectCategory;
217
- description: string;
218
- tags: string[];
219
- thumbnail?: string;
220
- /** Static param schema — parsed by Studio to build sliders */
221
- params: ParamSchema[];
222
- /** The engine class that renders this effect */
223
- engineClass: Canvas2DEngineConstructor;
224
- }
225
- /**
226
- * PixiJS effect subtypes:
227
- *
228
- * 'filter' — one or more GLSL shaders applied as a filter chain on a sprite/container.
229
- * Pure GPU, no per-frame JS. Uniform values are updated from param changes.
230
- *
231
- * 'motion' — animated overlay managed via PixiJS Ticker. Particles, sweeps, pulses.
232
- * Has full scene-graph access (can add/remove children).
233
- *
234
- * 'composite' — combines filter + motion in one effect (e.g. neon glow + particle burst).
235
- */
236
- type PixiEffectSubtype = 'filter' | 'motion' | 'composite';
237
- /** Context passed to every PixiJS effect lifecycle method */
238
- interface PixiEffectContext {
239
- /** The PixiJS Application instance (shared, do not destroy) */
240
- app: Application;
241
- /** The container to attach overlays or receive filters */
242
- container: Container;
243
- /** PixiJS ticker — subscribe for per-frame updates */
244
- ticker: Ticker;
245
- /** Current param values (updated when user moves a slider) */
246
- params: ParamValues;
247
- /** Canvas dimensions */
248
- width: number;
249
- height: number;
250
- }
251
- /** A single PixiJS Filter definition (for 'filter' and 'composite' subtypes) */
252
- interface PixiFilterSpec {
253
- /**
254
- * Factory that returns a configured PixiJS Filter.
255
- * Called once on mount, and again when params change significantly.
256
- * Import Filter types lazily inside the factory to keep the engine tree-shakeable.
257
- */
258
- create: (params: ParamValues) => Filter | Filter[];
259
- /**
260
- * Called every frame (if the filter has animated uniforms).
261
- * Mutate filter.resources / uniforms here instead of re-creating the filter.
262
- * Return false to skip uniform update this frame (for static filters).
263
- */
264
- updateUniforms?: (filter: Filter | Filter[], params: ParamValues, elapsed: number) => void;
265
- }
266
- interface PixiEffectDefinition {
267
- backend: 'pixi';
268
- subtype: PixiEffectSubtype;
269
- id: string;
270
- name: string;
271
- category: EffectCategory;
272
- description: string;
273
- tags: string[];
274
- thumbnail?: string;
275
- /** Static param schema — same shape as Canvas2D, drives Studio sliders */
276
- params: ParamSchema[];
277
- /**
278
- * Filter spec — required for 'filter' and 'composite' subtypes.
279
- * For 'motion' only, omit this.
280
- */
281
- filterSpec?: PixiFilterSpec;
282
- /**
283
- * Lifecycle hooks for motion and composite subtypes.
284
- * mount → called once when effect is activated (add sprites, subscribe ticker)
285
- * unmount → called when effect is removed (clean up ALL resources — critical)
286
- * update → called when param values change (slider moved)
287
- */
288
- mount?: (ctx: PixiEffectContext) => void;
289
- unmount?: (ctx: PixiEffectContext) => void;
290
- onParamChange?: (ctx: PixiEffectContext, key: string, value: ParamValues[string]) => void;
291
- }
292
- type EffectDefinition = Canvas2DEffectDefinition | PixiEffectDefinition;
293
- declare function isCanvas2DEffect(e: EffectDefinition): e is Canvas2DEffectDefinition;
294
- declare function isPixiEffect(e: EffectDefinition): e is PixiEffectDefinition;
295
- declare function isFilterEffect(e: EffectDefinition): e is PixiEffectDefinition & {
296
- subtype: 'filter';
297
- };
298
- declare function isMotionEffect(e: EffectDefinition): e is PixiEffectDefinition & {
299
- subtype: 'motion';
300
- };
301
- declare function isCompositeEffect(e: EffectDefinition): e is PixiEffectDefinition & {
302
- subtype: 'composite';
303
- };
304
-
305
182
  /**
306
183
  * @clypra/engine — EffectGraph
307
184
  *
@@ -605,9 +482,20 @@ declare function generateEffectsManifest(): {
605
482
  declare class PixiRenderer {
606
483
  private app;
607
484
  private videoSprite;
485
+ private transitionSprite;
486
+ private _activeTransition;
487
+ private fromRenderTexture;
488
+ private toRenderTexture;
489
+ private blitSprite;
490
+ private _transitionFromTex;
491
+ private _transitionToTex;
608
492
  private overlayContainer;
493
+ private baseMediaContainer;
609
494
  private mounted;
610
495
  private initialized;
496
+ private initializing;
497
+ private _activeSource;
498
+ private _fitMode;
611
499
  /**
612
500
  * Initialize the PixiJS Application.
613
501
  * Call once, reuse across effect changes.
@@ -617,12 +505,8 @@ declare class PixiRenderer {
617
505
  * @param height Canvas height in pixels
618
506
  */
619
507
  init(canvas: HTMLCanvasElement, width: number, height: number): Promise<void>;
620
- /**
621
- * Point the video sprite at a live HTMLVideoElement.
622
- * PixiJS polls the video element each frame automatically.
623
- */
624
508
  setVideoSource(video: HTMLVideoElement): void;
625
- setImageSource(image: HTMLImageElement): void;
509
+ setImageSource(image: HTMLImageElement | HTMLCanvasElement): void;
626
510
  /**
627
511
  * Mount a resolved set of PixiJS graph nodes.
628
512
  * Builds filter chains and initialises motion effects.
@@ -651,6 +535,10 @@ declare class PixiRenderer {
651
535
  * Resize the renderer (e.g. when project resolution changes).
652
536
  */
653
537
  resize(width: number, height: number): void;
538
+ setFitMode(mode: "stretch" | "fit" | "crop"): void;
539
+ resizeSprites(): void;
540
+ private _getElementDimensions;
541
+ private _resizeSprite;
654
542
  /**
655
543
  * Full teardown — unmounts all effects, destroys the PixiJS Application.
656
544
  * Call when the editor session ends or the Studio workspace unmounts.
@@ -660,7 +548,16 @@ declare class PixiRenderer {
660
548
  private _defaultParams;
661
549
  getApp(): Application | null;
662
550
  getVideoSprite(): Sprite | null;
551
+ getTransitionSprite(): Sprite | null;
552
+ getBaseMediaContainer(): Container | null;
553
+ getOverlayContainer(): Container | null;
663
554
  get isReady(): boolean;
555
+ private _ensureRenderTextures;
556
+ private _blitTransitionFrames;
557
+ mountTransition(definition: TransitionDefinition, fromTexture: Texture, toTexture: Texture, params: ParamValues): void;
558
+ getActiveTransitionId(): string | null;
559
+ updateTransitionProgress(id: string, progress: number, params?: ParamValues): void;
560
+ unmountTransition(): void;
664
561
  }
665
562
 
666
563
  /**
@@ -798,4 +695,4 @@ declare namespace index {
798
695
  export { index_renderDustParticles as renderDustParticles, index_renderFire as renderFire, index_renderFlash as renderFlash, index_renderFlicker as renderFlicker, index_renderGlow as renderGlow, index_renderLightLeak as renderLightLeak, index_renderLightLeak2 as renderLightLeak2, index_renderParticles as renderParticles, index_renderVignette as renderVignette };
799
696
  }
800
697
 
801
- export { type AppliedEffect, type AppliedOverlay, type BlendMode, index$1 as CameraEffects, type Canvas2DEffectDefinition, type Canvas2DEngine, type Canvas2DEngineConstructor, EFFECTS_REGISTRY, type EffectCategory$1 as EffectCategory, type EffectDefinition, EffectEngine, EffectGraph, type EffectMetadata, type EffectParameters, type EffectPreset, EffectRenderer, type EffectRenderer$1 as EffectRendererType, example as ExamplePixiEffects, type FilterAsset, type GraphDefinition, index as LightEffects, type OverlayAsset, type ParamSchema, type ParamType, type ParamValues, type PixiEffectContext, type PixiEffectDefinition, type PixiEffectSubtype, type PixiFilterSpec, PixiRenderer, type VideoEffectApiDefinition, type VideoEffectCategory, type VideoEffectItem, type VideoEffectManifest, type VideoEffectState, addNoise, blendColors, clearCanvas, effectMetadataToApi, generateEffectsManifest, getAllEffectsForApi, getEffectByIdForApi, getEffectCategoriesSummary, getEffectMetadata, getEffectPreviewUrl, getEffectRenderer, getEffectsByCategory, getEffectsByCategoryForApi, hexToRgba, isCanvas2DEffect, isCompositeEffect, isFilterEffect, isMotionEffect, isPixiEffect, rgbaToComponents, searchEffects, searchEffectsForApi, withContext };
698
+ export { type AppliedEffect, type AppliedOverlay, type BlendMode, index$1 as CameraEffects, EFFECTS_REGISTRY, type EffectCategory, EffectDefinition, EffectEngine, EffectGraph, type EffectMetadata, type EffectParameters, type EffectPreset, EffectRenderer, type EffectRenderer$1 as EffectRendererType, example as ExamplePixiEffects, type FilterAsset, type GraphDefinition, index as LightEffects, type OverlayAsset, ParamValues, PixiEffectDefinition, PixiRenderer, type VideoEffectApiDefinition, type VideoEffectCategory, type VideoEffectItem, type VideoEffectManifest, type VideoEffectState, addNoise, blendColors, clearCanvas, effectMetadataToApi, generateEffectsManifest, getAllEffectsForApi, getEffectByIdForApi, getEffectCategoriesSummary, getEffectMetadata, getEffectPreviewUrl, getEffectRenderer, getEffectsByCategory, getEffectsByCategoryForApi, hexToRgba, rgbaToComponents, searchEffects, searchEffectsForApi, withContext };
@@ -1,4 +1,6 @@
1
- import { Filter, Application, Container, Ticker, Sprite } from 'pixi.js';
1
+ import { E as EffectDefinition, e as ParamValues, i as TransitionDefinition, P as PixiEffectDefinition } from '../TransitionDefinition-CC6oSTYB.js';
2
+ export { C as Canvas2DEffectDefinition, a as Canvas2DEngine, b as Canvas2DEngineConstructor, c as ParamSchema, d as ParamType, f as PixiEffectContext, g as PixiEffectSubtype, h as PixiFilterSpec, j as isCanvas2DEffect, k as isCompositeEffect, l as isFilterEffect, m as isMotionEffect, n as isPixiEffect } from '../TransitionDefinition-CC6oSTYB.js';
3
+ import { Application, Sprite, Container, Texture } from 'pixi.js';
2
4
 
3
5
  /**
4
6
  * Video Effects Type System
@@ -9,7 +11,7 @@ import { Filter, Application, Container, Ticker, Sprite } from 'pixi.js';
9
11
  *
10
12
  * NOTE: Transitions have been moved to @clypra/engine/transitions
11
13
  */
12
- type EffectCategory$1 = "overlay" | "effect" | "filter";
14
+ type EffectCategory = "overlay" | "effect" | "filter";
13
15
  interface OverlayAsset {
14
16
  id: string;
15
17
  name: string;
@@ -107,7 +109,7 @@ type VideoEffectItem = OverlayAsset | EffectPreset | FilterAsset;
107
109
  interface VideoEffectCategory {
108
110
  id: string;
109
111
  name: string;
110
- type: EffectCategory$1;
112
+ type: EffectCategory;
111
113
  description: string;
112
114
  thumbnail: string;
113
115
  itemCount: number;
@@ -177,131 +179,6 @@ declare class EffectRenderer {
177
179
  static apply(ctx: CanvasRenderingContext2D, renderer: EffectRenderer$1, params: EffectParameters, intensity?: number, time?: number, bodyMask?: ImageData): void;
178
180
  }
179
181
 
180
- /**
181
- * @clypra/engine — EffectDefinition
182
- *
183
- * Unified type system for all Clypra video effects.
184
- * Supports two rendering backends:
185
- * - 'canvas2d' → existing text/overlay effects (EffectEngine class pattern)
186
- * - 'pixi' → new GPU-accelerated video/motion/filter effects (PixiJS)
187
- *
188
- * Both backends are consumed identically by EffectGraph and EffectRenderer.
189
- * The Studio and Desktop Editor import from this single package — same code, same output.
190
- */
191
-
192
- type ParamType = 'range' | 'color' | 'toggle' | 'select' | 'text';
193
- interface ParamSchema {
194
- key: string;
195
- label: string;
196
- type: ParamType;
197
- value: number | string | boolean;
198
- min?: number;
199
- max?: number;
200
- step?: number;
201
- options?: string[];
202
- }
203
- type ParamValues = Record<string, number | string | boolean>;
204
- type EffectCategory = 'light' | 'glitch' | 'cinematic' | 'neon' | 'retro' | 'motion' | 'color' | 'blur' | 'distortion' | 'particle' | 'custom';
205
- interface Canvas2DEngine {
206
- /** Advance internal animation state by N steps */
207
- advanceSteps(steps: number): void;
208
- /** Draw one frame onto the provided context */
209
- drawFrame(ctx: CanvasRenderingContext2D, ghostFrames?: ImageData[]): void;
210
- }
211
- type Canvas2DEngineConstructor = new (config: ParamValues) => Canvas2DEngine;
212
- interface Canvas2DEffectDefinition {
213
- backend: 'canvas2d';
214
- id: string;
215
- name: string;
216
- category: EffectCategory;
217
- description: string;
218
- tags: string[];
219
- thumbnail?: string;
220
- /** Static param schema — parsed by Studio to build sliders */
221
- params: ParamSchema[];
222
- /** The engine class that renders this effect */
223
- engineClass: Canvas2DEngineConstructor;
224
- }
225
- /**
226
- * PixiJS effect subtypes:
227
- *
228
- * 'filter' — one or more GLSL shaders applied as a filter chain on a sprite/container.
229
- * Pure GPU, no per-frame JS. Uniform values are updated from param changes.
230
- *
231
- * 'motion' — animated overlay managed via PixiJS Ticker. Particles, sweeps, pulses.
232
- * Has full scene-graph access (can add/remove children).
233
- *
234
- * 'composite' — combines filter + motion in one effect (e.g. neon glow + particle burst).
235
- */
236
- type PixiEffectSubtype = 'filter' | 'motion' | 'composite';
237
- /** Context passed to every PixiJS effect lifecycle method */
238
- interface PixiEffectContext {
239
- /** The PixiJS Application instance (shared, do not destroy) */
240
- app: Application;
241
- /** The container to attach overlays or receive filters */
242
- container: Container;
243
- /** PixiJS ticker — subscribe for per-frame updates */
244
- ticker: Ticker;
245
- /** Current param values (updated when user moves a slider) */
246
- params: ParamValues;
247
- /** Canvas dimensions */
248
- width: number;
249
- height: number;
250
- }
251
- /** A single PixiJS Filter definition (for 'filter' and 'composite' subtypes) */
252
- interface PixiFilterSpec {
253
- /**
254
- * Factory that returns a configured PixiJS Filter.
255
- * Called once on mount, and again when params change significantly.
256
- * Import Filter types lazily inside the factory to keep the engine tree-shakeable.
257
- */
258
- create: (params: ParamValues) => Filter | Filter[];
259
- /**
260
- * Called every frame (if the filter has animated uniforms).
261
- * Mutate filter.resources / uniforms here instead of re-creating the filter.
262
- * Return false to skip uniform update this frame (for static filters).
263
- */
264
- updateUniforms?: (filter: Filter | Filter[], params: ParamValues, elapsed: number) => void;
265
- }
266
- interface PixiEffectDefinition {
267
- backend: 'pixi';
268
- subtype: PixiEffectSubtype;
269
- id: string;
270
- name: string;
271
- category: EffectCategory;
272
- description: string;
273
- tags: string[];
274
- thumbnail?: string;
275
- /** Static param schema — same shape as Canvas2D, drives Studio sliders */
276
- params: ParamSchema[];
277
- /**
278
- * Filter spec — required for 'filter' and 'composite' subtypes.
279
- * For 'motion' only, omit this.
280
- */
281
- filterSpec?: PixiFilterSpec;
282
- /**
283
- * Lifecycle hooks for motion and composite subtypes.
284
- * mount → called once when effect is activated (add sprites, subscribe ticker)
285
- * unmount → called when effect is removed (clean up ALL resources — critical)
286
- * update → called when param values change (slider moved)
287
- */
288
- mount?: (ctx: PixiEffectContext) => void;
289
- unmount?: (ctx: PixiEffectContext) => void;
290
- onParamChange?: (ctx: PixiEffectContext, key: string, value: ParamValues[string]) => void;
291
- }
292
- type EffectDefinition = Canvas2DEffectDefinition | PixiEffectDefinition;
293
- declare function isCanvas2DEffect(e: EffectDefinition): e is Canvas2DEffectDefinition;
294
- declare function isPixiEffect(e: EffectDefinition): e is PixiEffectDefinition;
295
- declare function isFilterEffect(e: EffectDefinition): e is PixiEffectDefinition & {
296
- subtype: 'filter';
297
- };
298
- declare function isMotionEffect(e: EffectDefinition): e is PixiEffectDefinition & {
299
- subtype: 'motion';
300
- };
301
- declare function isCompositeEffect(e: EffectDefinition): e is PixiEffectDefinition & {
302
- subtype: 'composite';
303
- };
304
-
305
182
  /**
306
183
  * @clypra/engine — EffectGraph
307
184
  *
@@ -605,9 +482,20 @@ declare function generateEffectsManifest(): {
605
482
  declare class PixiRenderer {
606
483
  private app;
607
484
  private videoSprite;
485
+ private transitionSprite;
486
+ private _activeTransition;
487
+ private fromRenderTexture;
488
+ private toRenderTexture;
489
+ private blitSprite;
490
+ private _transitionFromTex;
491
+ private _transitionToTex;
608
492
  private overlayContainer;
493
+ private baseMediaContainer;
609
494
  private mounted;
610
495
  private initialized;
496
+ private initializing;
497
+ private _activeSource;
498
+ private _fitMode;
611
499
  /**
612
500
  * Initialize the PixiJS Application.
613
501
  * Call once, reuse across effect changes.
@@ -617,12 +505,8 @@ declare class PixiRenderer {
617
505
  * @param height Canvas height in pixels
618
506
  */
619
507
  init(canvas: HTMLCanvasElement, width: number, height: number): Promise<void>;
620
- /**
621
- * Point the video sprite at a live HTMLVideoElement.
622
- * PixiJS polls the video element each frame automatically.
623
- */
624
508
  setVideoSource(video: HTMLVideoElement): void;
625
- setImageSource(image: HTMLImageElement): void;
509
+ setImageSource(image: HTMLImageElement | HTMLCanvasElement): void;
626
510
  /**
627
511
  * Mount a resolved set of PixiJS graph nodes.
628
512
  * Builds filter chains and initialises motion effects.
@@ -651,6 +535,10 @@ declare class PixiRenderer {
651
535
  * Resize the renderer (e.g. when project resolution changes).
652
536
  */
653
537
  resize(width: number, height: number): void;
538
+ setFitMode(mode: "stretch" | "fit" | "crop"): void;
539
+ resizeSprites(): void;
540
+ private _getElementDimensions;
541
+ private _resizeSprite;
654
542
  /**
655
543
  * Full teardown — unmounts all effects, destroys the PixiJS Application.
656
544
  * Call when the editor session ends or the Studio workspace unmounts.
@@ -660,7 +548,16 @@ declare class PixiRenderer {
660
548
  private _defaultParams;
661
549
  getApp(): Application | null;
662
550
  getVideoSprite(): Sprite | null;
551
+ getTransitionSprite(): Sprite | null;
552
+ getBaseMediaContainer(): Container | null;
553
+ getOverlayContainer(): Container | null;
663
554
  get isReady(): boolean;
555
+ private _ensureRenderTextures;
556
+ private _blitTransitionFrames;
557
+ mountTransition(definition: TransitionDefinition, fromTexture: Texture, toTexture: Texture, params: ParamValues): void;
558
+ getActiveTransitionId(): string | null;
559
+ updateTransitionProgress(id: string, progress: number, params?: ParamValues): void;
560
+ unmountTransition(): void;
664
561
  }
665
562
 
666
563
  /**
@@ -798,4 +695,4 @@ declare namespace index {
798
695
  export { index_renderDustParticles as renderDustParticles, index_renderFire as renderFire, index_renderFlash as renderFlash, index_renderFlicker as renderFlicker, index_renderGlow as renderGlow, index_renderLightLeak as renderLightLeak, index_renderLightLeak2 as renderLightLeak2, index_renderParticles as renderParticles, index_renderVignette as renderVignette };
799
696
  }
800
697
 
801
- export { type AppliedEffect, type AppliedOverlay, type BlendMode, index$1 as CameraEffects, type Canvas2DEffectDefinition, type Canvas2DEngine, type Canvas2DEngineConstructor, EFFECTS_REGISTRY, type EffectCategory$1 as EffectCategory, type EffectDefinition, EffectEngine, EffectGraph, type EffectMetadata, type EffectParameters, type EffectPreset, EffectRenderer, type EffectRenderer$1 as EffectRendererType, example as ExamplePixiEffects, type FilterAsset, type GraphDefinition, index as LightEffects, type OverlayAsset, type ParamSchema, type ParamType, type ParamValues, type PixiEffectContext, type PixiEffectDefinition, type PixiEffectSubtype, type PixiFilterSpec, PixiRenderer, type VideoEffectApiDefinition, type VideoEffectCategory, type VideoEffectItem, type VideoEffectManifest, type VideoEffectState, addNoise, blendColors, clearCanvas, effectMetadataToApi, generateEffectsManifest, getAllEffectsForApi, getEffectByIdForApi, getEffectCategoriesSummary, getEffectMetadata, getEffectPreviewUrl, getEffectRenderer, getEffectsByCategory, getEffectsByCategoryForApi, hexToRgba, isCanvas2DEffect, isCompositeEffect, isFilterEffect, isMotionEffect, isPixiEffect, rgbaToComponents, searchEffects, searchEffectsForApi, withContext };
698
+ export { type AppliedEffect, type AppliedOverlay, type BlendMode, index$1 as CameraEffects, EFFECTS_REGISTRY, type EffectCategory, EffectDefinition, EffectEngine, EffectGraph, type EffectMetadata, type EffectParameters, type EffectPreset, EffectRenderer, type EffectRenderer$1 as EffectRendererType, example as ExamplePixiEffects, type FilterAsset, type GraphDefinition, index as LightEffects, type OverlayAsset, ParamValues, PixiEffectDefinition, PixiRenderer, type VideoEffectApiDefinition, type VideoEffectCategory, type VideoEffectItem, type VideoEffectManifest, type VideoEffectState, addNoise, blendColors, clearCanvas, effectMetadataToApi, generateEffectsManifest, getAllEffectsForApi, getEffectByIdForApi, getEffectCategoriesSummary, getEffectMetadata, getEffectPreviewUrl, getEffectRenderer, getEffectsByCategory, getEffectsByCategoryForApi, hexToRgba, rgbaToComponents, searchEffects, searchEffectsForApi, withContext };
@@ -30,7 +30,7 @@ import {
30
30
  searchEffects,
31
31
  searchEffectsForApi,
32
32
  withContext
33
- } from "../chunk-CJRH4PAV.js";
33
+ } from "../chunk-LGW5SSLZ.js";
34
34
  import "../chunk-PZ5AY32C.js";
35
35
  export {
36
36
  camera_exports as CameraEffects,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clypra-studio/engine",
3
- "version": "0.1.2",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -66,7 +66,7 @@
66
66
  "pixi-filters": "^6.0.0",
67
67
  "pixi.js": "^8.0.0",
68
68
  "zod": "^4.4.3",
69
- "@clypra-studio/types": "^0.1.1"
69
+ "@clypra-studio/types": "^0.2.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@napi-rs/canvas": "^0.1.70",