openvideo 0.2.15 → 0.2.17
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/dist/{browserAll-1klNNaYF.js → browserAll-CRgUZ3hq.js} +2 -2
- package/dist/clips/base-clip.d.ts +4 -0
- package/dist/clips/caption-clip.d.ts +43 -43
- package/dist/clips/iclip.d.ts +9 -0
- package/dist/clips/video-clip.d.ts +4 -4
- package/dist/compositor.d.ts +17 -0
- package/dist/effect/glsl/custom-glsl.d.ts +1 -0
- package/dist/{index-CqBdAdbt.js → index-Gj63TxQW.js} +10482 -10097
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +413 -341
- package/dist/json-serialization.d.ts +3 -0
- package/dist/sprite/base-sprite.d.ts +2 -0
- package/dist/sprite/pixi-sprite-renderer.d.ts +1 -0
- package/dist/studio.d.ts +17 -0
- package/dist/utils/color-adjustment.d.ts +53 -0
- package/dist/{webworkerAll-05Hpn3rq.js → webworkerAll-S6vnaIy0.js} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IClip, ITransitionInfo } from './clips';
|
|
2
|
+
import { ColorAdjustment } from './utils/color-adjustment';
|
|
2
3
|
interface BaseClipJSON {
|
|
3
4
|
id?: string;
|
|
4
5
|
name?: string;
|
|
6
|
+
metadata?: Record<string, any>;
|
|
5
7
|
effects?: Array<{
|
|
6
8
|
id: string;
|
|
7
9
|
key: string;
|
|
@@ -31,6 +33,7 @@ interface BaseClipJSON {
|
|
|
31
33
|
transition?: ITransitionInfo;
|
|
32
34
|
style?: any;
|
|
33
35
|
locked?: boolean;
|
|
36
|
+
colorAdjustment?: ColorAdjustment;
|
|
34
37
|
animation?: {
|
|
35
38
|
keyFrames: Record<string, Partial<{
|
|
36
39
|
x: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as EventEmitter } from '../event-emitter';
|
|
2
2
|
import { IAnimation, AnimationTransform } from '../animation';
|
|
3
3
|
import { IChromaKeyOpts } from '../clips/iclip';
|
|
4
|
+
import { ColorAdjustment } from '../utils/color-adjustment';
|
|
4
5
|
type IRectBaseProps = any;
|
|
5
6
|
interface IAnimationOpts {
|
|
6
7
|
duration: number;
|
|
@@ -149,6 +150,7 @@ export declare abstract class BaseSprite<T extends BaseSpriteEvents = BaseSprite
|
|
|
149
150
|
* Chroma key settings (green screen removal)
|
|
150
151
|
*/
|
|
151
152
|
chromaKey: IChromaKeyOpts;
|
|
153
|
+
colorAdjustment: ColorAdjustment;
|
|
152
154
|
/**
|
|
153
155
|
* Styling properties (e.g., stroke, dropShadow, borderRadius)
|
|
154
156
|
* This is a generic object to hold visual styles across different clip types
|
package/dist/studio.d.ts
CHANGED
|
@@ -333,6 +333,23 @@ export declare class Studio extends EventEmitter<StudioEvents> {
|
|
|
333
333
|
* Move to the previous frame
|
|
334
334
|
*/
|
|
335
335
|
framePrev(): Promise<void>;
|
|
336
|
+
/**
|
|
337
|
+
* Renders the frame at the given time and returns it as a base64-encoded PNG.
|
|
338
|
+
*
|
|
339
|
+
* The artboard is temporarily reset to 1:1 scale during extraction so the
|
|
340
|
+
* output image always matches the project's configured width × height,
|
|
341
|
+
* regardless of the current viewport zoom.
|
|
342
|
+
*
|
|
343
|
+
* @param timeMs Time in milliseconds
|
|
344
|
+
* @returns Base64 data-URL string (e.g. "data:image/png;base64,...")
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* await studio.ready;
|
|
348
|
+
* const frame = await studio.renderFrame(1500); // frame at 1.5 s
|
|
349
|
+
* const img = document.createElement('img');
|
|
350
|
+
* img.src = frame;
|
|
351
|
+
*/
|
|
352
|
+
renderFrame(timeMs: number): Promise<string>;
|
|
336
353
|
/**
|
|
337
354
|
* Get current playback time (in microseconds)
|
|
338
355
|
*/
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ColorMatrixFilter } from 'pixi.js';
|
|
2
|
+
export interface ColorAdjustmentBasic {
|
|
3
|
+
saturation?: number;
|
|
4
|
+
temperature?: number;
|
|
5
|
+
hue?: number;
|
|
6
|
+
brightness?: number;
|
|
7
|
+
contrast?: number;
|
|
8
|
+
shine?: number;
|
|
9
|
+
highlight?: number;
|
|
10
|
+
shadow?: number;
|
|
11
|
+
sharpness?: number;
|
|
12
|
+
vignette?: number;
|
|
13
|
+
fade?: number;
|
|
14
|
+
grain?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ColorAdjustmentHsl {
|
|
17
|
+
hue?: number;
|
|
18
|
+
saturation?: number;
|
|
19
|
+
lightness?: number;
|
|
20
|
+
selectedColor?: string;
|
|
21
|
+
byColor?: Record<string, {
|
|
22
|
+
hue?: number;
|
|
23
|
+
saturation?: number;
|
|
24
|
+
lightness?: number;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export interface CurvePoint {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ColorAdjustmentCurves {
|
|
32
|
+
rgb?: CurvePoint[];
|
|
33
|
+
red?: CurvePoint[];
|
|
34
|
+
green?: CurvePoint[];
|
|
35
|
+
blue?: CurvePoint[];
|
|
36
|
+
}
|
|
37
|
+
export interface ColorAdjustment {
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
type?: "basic" | "hsl" | "curves";
|
|
40
|
+
basic?: ColorAdjustmentBasic;
|
|
41
|
+
hsl?: ColorAdjustmentHsl;
|
|
42
|
+
curves?: ColorAdjustmentCurves;
|
|
43
|
+
}
|
|
44
|
+
export interface ActiveSelectiveHslAdjustment {
|
|
45
|
+
targetColor: string;
|
|
46
|
+
hue: number;
|
|
47
|
+
saturation: number;
|
|
48
|
+
lightness: number;
|
|
49
|
+
}
|
|
50
|
+
export declare function hasColorAdjustment(adjustment?: ColorAdjustment): boolean;
|
|
51
|
+
export declare function getActiveSelectiveHsl(adjustment?: ColorAdjustment): ActiveSelectiveHslAdjustment | null;
|
|
52
|
+
export declare function getAllSelectiveHsl(adjustment?: ColorAdjustment): ActiveSelectiveHslAdjustment[];
|
|
53
|
+
export declare function applyColorAdjustmentToMatrix(matrix: ColorMatrixFilter, adjustment?: ColorAdjustment, animationBrightnessMultiplier?: number): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as a, R as e, T as d, G as i, b as s, M as t, c as p, d as P, f as n, g as r, B as T, H as l, h as c, i as m, N as x, j as S, k as o } from "./index-
|
|
1
|
+
import { e as a, R as e, T as d, G as i, b as s, M as t, c as p, d as P, f as n, g as r, B as T, H as l, h as c, i as m, N as x, j as S, k as o } from "./index-Gj63TxQW.js";
|
|
2
2
|
a.add(e);
|
|
3
3
|
a.add(d);
|
|
4
4
|
a.add(i);
|