@agrhub/engine-pixi 1.3.3 → 1.4.1

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/NOTICE.md CHANGED
@@ -17,3 +17,5 @@ relicense or sublicense a derivative of OpenVideo.
17
17
  - Shared MediaCache: one download per URL (in-flight dedupe + memory LRU + atomic OPFS persistence).
18
18
  - StudioBridge: patches applied in order, rebuilds coalesced, latest-wins seeking, listener-safe dispose.
19
19
  - Export: falls back to an encodable audio codec (AAC -> 44.1 kHz -> Opus) instead of failing; long audio decodes no longer abort the export.
20
+ - 1.4.0 (selected changes from OpenVideo 1.4.0; the 1.3 caption model is kept): EdgeCrop mask animation ("edgeCrop"); muted clips and tracks (preview, export and studio sync; unmuting keeps decoded audio); custom transition shader values; effect layers sized correctly when exporting at a different resolution than the project.
21
+ - 1.4.1: Caption colour/animation changes coming from Core (caption.setColors, undo) are redrawn immediately; a caption whose own colours are removed (e.g. by undo) falls back to its track colours instead of keeping stale ones; an empty wordsPerLine no longer overrides the track setting.
@@ -142,4 +142,29 @@ export declare class StarRevealAnimation extends BaseMaskAnimation {
142
142
  constructor(params: StarRevealParams, options: AnimationOptions);
143
143
  protected buildMask(progress: number): MaskTransform;
144
144
  }
145
+ export interface EdgeCropParams {
146
+ mode?: "reveal" | "conceal";
147
+ /** Edge(s) the crop is anchored to. "center" crops all four edges. Default: "center" */
148
+ origin?: "center" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
149
+ /** Horizontal crop in canvas pixels at the start of the reveal. Default: 100 */
150
+ xDistance?: number;
151
+ /** Vertical crop in canvas pixels at the start of the reveal. Default: 100 */
152
+ yDistance?: number;
153
+ /** Corner radius of the visible area. Default: 0 */
154
+ maskBorderRadius?: number;
155
+ feather?: number;
156
+ }
157
+ /**
158
+ * EdgeCrop (ported from @openvideo/engine-pixi 1.4.0)
159
+ *
160
+ * Crops the clip's edges by a fixed pixel distance and animates the crop away.
161
+ * Unlike the other masks the clip is never fully hidden: at progress 0 only the
162
+ * cropped band is removed. The distances stay in canvas pixels even while the
163
+ * clip itself is scaled by other animations.
164
+ */
165
+ export declare class EdgeCropAnimation extends BaseMaskAnimation {
166
+ readonly type = "edgeCrop";
167
+ constructor(params: EdgeCropParams, options: AnimationOptions);
168
+ protected buildMask(progress: number): MaskTransform;
169
+ }
145
170
  export {};
@@ -77,7 +77,7 @@ export type MaskPainter = (g: {
77
77
  }, width: number, height: number, progress: number) => void;
78
78
  export interface MaskTransform {
79
79
  /** Mask shape. Use "custom" and provide a `painter` for arbitrary paths. */
80
- shape: "rect" | "circle" | "ellipse" | "custom";
80
+ shape: "rect" | "circle" | "ellipse" | "custom" | "edgeCrop";
81
81
  /**
82
82
  * Normalized progress 0–1 controlling how much of the clip is revealed.
83
83
  * 0 = fully hidden, 1 = fully visible.
@@ -98,6 +98,12 @@ export interface MaskTransform {
98
98
  * initialProgress→1 so individual painters don't need to handle this.
99
99
  */
100
100
  initialProgress?: number;
101
+ /** edgeCrop: horizontal crop distance in canvas pixels at progress 0. Default: 100 */
102
+ xDistance?: number;
103
+ /** edgeCrop: vertical crop distance in canvas pixels at progress 0. Default: 100 */
104
+ yDistance?: number;
105
+ /** edgeCrop: corner radius of the visible area. Default: 0 */
106
+ maskBorderRadius?: number;
101
107
  /**
102
108
  * Custom painter for shape === "custom".
103
109
  * Draw any path into the provided Graphics object.
@@ -87,6 +87,8 @@ export declare class Caption extends BaseTextClip<ICaptionEvents> implements ICl
87
87
  private _keywordPreserveAfterSpoken;
88
88
  private _wordAnimation;
89
89
  private _wordsPerLine;
90
+ /** Track-level colours this clip inherits when it has none of its own (set by fromObject) */
91
+ private _trackCaptionColors?;
90
92
  protected _videoWidth: number;
91
93
  protected _videoHeight: number;
92
94
  protected _bottomOffset: number;
@@ -164,6 +164,10 @@ export interface IClip<T extends BaseSpriteEvents = BaseSpriteEvents> extends Om
164
164
  * Whether the clip is locked (preventing interactions)
165
165
  */
166
166
  locked: boolean;
167
+ /**
168
+ * Whether the clip's audio is muted
169
+ */
170
+ muted: boolean;
167
171
  }
168
172
  /**
169
173
  * Optional interface for clips that support HTML media element playback
@@ -26,6 +26,10 @@ export declare class Transition extends BaseClip {
26
26
  * ID of the clip to which the transition ends
27
27
  */
28
28
  toClipId: string | null;
29
+ /**
30
+ * Custom shader parameter values (uniform name -> value)
31
+ */
32
+ values: Record<string, any>;
29
33
  constructor(transitionKey: TransitionKey);
30
34
  clone(): Promise<this>;
31
35
  tick(_time: number): Promise<{
@@ -77,6 +77,7 @@ export declare class Video extends BaseClip implements IPlaybackCapable {
77
77
  private audioSamples;
78
78
  private videoFrameFinder;
79
79
  private audioFrameFinder;
80
+ protected onEffectiveVolumeChange(): void;
80
81
  private decoderConf;
81
82
  private opts;
82
83
  /**
@@ -5,7 +5,9 @@ export declare class EffectManager {
5
5
  private pixiApp;
6
6
  private effectCache;
7
7
  private effectInputTexture;
8
- constructor(pixiApp: Application, hasVideoTrack: boolean);
8
+ private scaleX;
9
+ private scaleY;
10
+ constructor(pixiApp: Application, hasVideoTrack: boolean, scaleX?: number, scaleY?: number);
9
11
  /**
10
12
  * Processes all active global and adjustment layer effects at the given timestamp.
11
13
  */