@designcombo/video 0.0.0 → 0.0.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/dist/{SharedSystems-BSw9neqH.js → SharedSystems-BhqLJf5z.js} +2 -2
- package/dist/{WebGLRenderer-BrabW-VK.js → WebGLRenderer-BzdmWLtP.js} +3 -3
- package/dist/{WebGPURenderer-BKwBKkzk.js → WebGPURenderer-Cypu9NWE.js} +3 -3
- package/dist/{browserAll-C7HVZtqZ.js → browserAll-7OZQazmn.js} +2 -2
- package/dist/clips/audio-clip.d.ts +1 -1
- package/dist/clips/iclip.d.ts +16 -4
- package/dist/clips/text-clip.d.ts +29 -0
- package/dist/{colorToUniform-Du0ROyNd.js → colorToUniform-B0NRe8Du.js} +1 -1
- package/dist/{index-CjzowIhV.js → index-BuRTeJh6.js} +2609 -2269
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +105 -105
- package/dist/json-serialization.d.ts +7 -0
- package/dist/sprite/pixi-sprite-renderer.d.ts +3 -3
- package/dist/studio.d.ts +15 -0
- package/dist/transfomer/parts/wireframe.d.ts +1 -1
- package/dist/transfomer/transformer.d.ts +5 -0
- package/dist/utils/audio-codec-detector.d.ts +28 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/{webworkerAll-DsE6HIYE.js → webworkerAll-DChKIQQa.js} +2 -2
- package/package.json +10 -9
|
@@ -55,6 +55,9 @@ export interface TextStyleJSON {
|
|
|
55
55
|
stroke?: {
|
|
56
56
|
color: string;
|
|
57
57
|
width: number;
|
|
58
|
+
join?: 'miter' | 'round' | 'bevel';
|
|
59
|
+
cap?: 'butt' | 'round' | 'square';
|
|
60
|
+
miterLimit?: number;
|
|
58
61
|
};
|
|
59
62
|
shadow?: {
|
|
60
63
|
color: string;
|
|
@@ -63,6 +66,10 @@ export interface TextStyleJSON {
|
|
|
63
66
|
offsetX: number;
|
|
64
67
|
offsetY: number;
|
|
65
68
|
};
|
|
69
|
+
wordWrap?: boolean;
|
|
70
|
+
wordWrapWidth?: number;
|
|
71
|
+
lineHeight?: number;
|
|
72
|
+
letterSpacing?: number;
|
|
66
73
|
}
|
|
67
74
|
export interface TextClipJSON extends BaseClipJSON {
|
|
68
75
|
type: 'Text';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Application, Sprite, Texture } from 'pixi.js';
|
|
1
|
+
import { Application, Sprite, Texture, Container } from 'pixi.js';
|
|
2
2
|
import { IClip } from '../clips/iclip';
|
|
3
3
|
/**
|
|
4
4
|
* Update sprite transform based on clip properties
|
|
@@ -12,14 +12,14 @@ export declare function updateSpriteTransform(clip: IClip, sprite: Sprite): void
|
|
|
12
12
|
* This matches the pattern used in other video rendering libraries
|
|
13
13
|
*/
|
|
14
14
|
export declare class PixiSpriteRenderer {
|
|
15
|
-
private pixiApp;
|
|
16
15
|
private sprite;
|
|
16
|
+
private targetContainer;
|
|
17
17
|
private pixiSprite;
|
|
18
18
|
private texture;
|
|
19
19
|
private canvas;
|
|
20
20
|
private context;
|
|
21
21
|
private destroyed;
|
|
22
|
-
constructor(pixiApp: Application, sprite: IClip);
|
|
22
|
+
constructor(pixiApp: Application | null, sprite: IClip, targetContainer?: Container | null);
|
|
23
23
|
/**
|
|
24
24
|
* Update the sprite with a new video frame or Texture
|
|
25
25
|
* @param frame ImageBitmap, Texture, or null to render
|
package/dist/studio.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ export declare class Studio {
|
|
|
27
27
|
private pixiApp;
|
|
28
28
|
private clips;
|
|
29
29
|
private spriteRenderers;
|
|
30
|
+
private artboard;
|
|
31
|
+
private clipContainer;
|
|
32
|
+
private artboardMask;
|
|
33
|
+
private artboardBg;
|
|
30
34
|
private activeTransformer;
|
|
31
35
|
private selectedClips;
|
|
32
36
|
private interactiveClips;
|
|
@@ -44,11 +48,14 @@ export declare class Studio {
|
|
|
44
48
|
* Convert hex color string to number
|
|
45
49
|
*/
|
|
46
50
|
private hexToNumber;
|
|
51
|
+
ready: Promise<void>;
|
|
47
52
|
/**
|
|
48
53
|
* Create a new Studio instance
|
|
49
54
|
*/
|
|
50
55
|
constructor(opts: IStudioOpts);
|
|
51
56
|
private initPixiApp;
|
|
57
|
+
private handleResize;
|
|
58
|
+
private updateArtboardLayout;
|
|
52
59
|
/**
|
|
53
60
|
* Get the canvas element (creates one if not provided)
|
|
54
61
|
*/
|
|
@@ -120,6 +127,14 @@ export declare class Studio {
|
|
|
120
127
|
* Create transformer for currently selected clips
|
|
121
128
|
*/
|
|
122
129
|
private createTransformer;
|
|
130
|
+
private isUpdatingTextClipRealtime;
|
|
131
|
+
private textClipResizedWidth;
|
|
132
|
+
/**
|
|
133
|
+
* Sync sprite transforms in real-time during drag (for TextClip reflow)
|
|
134
|
+
* This is called during the drag operation to prevent visual scaling
|
|
135
|
+
* Only works for mid-right handle (mr)
|
|
136
|
+
*/
|
|
137
|
+
private syncSelectedClipsTransformsRealtime;
|
|
123
138
|
/**
|
|
124
139
|
* Sync sprite transforms back to clip properties for all selected clips
|
|
125
140
|
* This ensures clip properties are always up-to-date during transformations
|
|
@@ -18,4 +18,9 @@ export declare class Transformer extends Container {
|
|
|
18
18
|
centeredScaling?: boolean;
|
|
19
19
|
clip?: any;
|
|
20
20
|
});
|
|
21
|
+
/**
|
|
22
|
+
* Public method to update transformer bounds without recreating it
|
|
23
|
+
* Useful for updating bounds after clip dimensions change
|
|
24
|
+
*/
|
|
25
|
+
updateBounds(): void;
|
|
21
26
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audio codec detection utility
|
|
3
|
+
* Detects the best supported audio codec based on browser capabilities
|
|
4
|
+
*/
|
|
5
|
+
export interface AudioCodecConfig {
|
|
6
|
+
codec: string;
|
|
7
|
+
codecType: 'aac' | 'opus';
|
|
8
|
+
sampleRate: number;
|
|
9
|
+
channelCount: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Get the default audio codec configuration based on browser support
|
|
13
|
+
* Prefers AAC (mp4a.40.2) but falls back to Opus if not supported
|
|
14
|
+
*
|
|
15
|
+
* @returns Promise resolving to the best supported audio codec configuration
|
|
16
|
+
*/
|
|
17
|
+
export declare function getDefaultAudioCodec(): Promise<AudioCodecConfig>;
|
|
18
|
+
/**
|
|
19
|
+
* Synchronously get the cached codec configuration
|
|
20
|
+
* Returns null if detection hasn't been performed yet
|
|
21
|
+
*
|
|
22
|
+
* @returns The cached audio codec configuration or null
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCachedAudioCodec(): AudioCodecConfig | null;
|
|
25
|
+
/**
|
|
26
|
+
* Reset the cached codec (useful for testing)
|
|
27
|
+
*/
|
|
28
|
+
export declare function resetCodecCache(): void;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as p, U as $e, T as ee, G as he, a as fe, M as P, m as C, h as pe, F as v, t as w, a6 as N, R as $, w as Y, z as me, a3 as G, a4 as ge, d as F, B as T, D as j, x as M, ad as je, ae as q, J as L, af as U, S as Q, _ as qe, Z as X, o as xe, s as _e, a8 as be, ab as ye, p as Qe, q as Je, a9 as Ze, aa as et, ac as tt, ag as rt, ah as nt, ai as st, aj as H, ak as it, al as at, n as ve, am as te, an as k, e as b, ao as ot } from "./index-
|
|
2
|
-
import { F as ut, S as D, c as z, a as lt, b as ct, B as Te } from "./colorToUniform-
|
|
1
|
+
import { E as p, U as $e, T as ee, G as he, a as fe, M as P, m as C, h as pe, F as v, t as w, a6 as N, R as $, w as Y, z as me, a3 as G, a4 as ge, d as F, B as T, D as j, x as M, ad as je, ae as q, J as L, af as U, S as Q, _ as qe, Z as X, o as xe, s as _e, a8 as be, ab as ye, p as Qe, q as Je, a9 as Ze, aa as et, ac as tt, ag as rt, ah as nt, ai as st, aj as H, ak as it, al as at, n as ve, am as te, an as k, e as b, ao as ot } from "./index-BuRTeJh6.js";
|
|
2
|
+
import { F as ut, S as D, c as z, a as lt, b as ct, B as Te } from "./colorToUniform-B0NRe8Du.js";
|
|
3
3
|
class Pe {
|
|
4
4
|
/**
|
|
5
5
|
* Initialize the plugin with scope of application instance
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designcombo/video",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Video rendering and processing library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,9 +32,13 @@
|
|
|
32
32
|
"require": "./dist/index.umd.js"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"dev": "vite",
|
|
37
|
+
"build": "tsc && vite build"
|
|
38
|
+
},
|
|
35
39
|
"devDependencies": {
|
|
36
|
-
"@types/rollup-plugin-peer-deps-external": "^2.2.6",
|
|
37
40
|
"@types/dom-webcodecs": "^0.1.17",
|
|
41
|
+
"@types/rollup-plugin-peer-deps-external": "^2.2.6",
|
|
38
42
|
"@webav/mp4box.js": "^0.5.7",
|
|
39
43
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
40
44
|
"typescript": "~5.9.2",
|
|
@@ -42,12 +46,9 @@
|
|
|
42
46
|
"vite-plugin-dts": "^4.5.4"
|
|
43
47
|
},
|
|
44
48
|
"dependencies": {
|
|
45
|
-
"
|
|
49
|
+
"@pixi/layout": "^3.2.0",
|
|
46
50
|
"opfs-tools": "^0.7.2",
|
|
47
|
-
"pixi.js": "^8.14.3"
|
|
48
|
-
|
|
49
|
-
"scripts": {
|
|
50
|
-
"dev": "vite",
|
|
51
|
-
"build": "tsc && vite build"
|
|
51
|
+
"pixi.js": "^8.14.3",
|
|
52
|
+
"wave-resampler": "^1.0.0"
|
|
52
53
|
}
|
|
53
|
-
}
|
|
54
|
+
}
|