@designcombo/video 0.0.1 → 0.0.3
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-BhqLJf5z.js → SharedSystems-s9Js69L7.js} +20 -20
- package/dist/{WebGLRenderer-BzdmWLtP.js → WebGLRenderer-C-0unSMy.js} +22 -22
- package/dist/{WebGPURenderer-Cypu9NWE.js → WebGPURenderer-D7pcgSJJ.js} +19 -19
- package/dist/{browserAll-7OZQazmn.js → browserAll-D5pTiGnC.js} +2 -2
- package/dist/clips/audio-clip.d.ts +1 -1
- package/dist/clips/base-clip.d.ts +1 -0
- package/dist/clips/caption-clip.d.ts +27 -0
- package/dist/clips/effect-clip.d.ts +33 -0
- package/dist/clips/iclip.d.ts +4 -0
- package/dist/clips/image-clip.d.ts +28 -1
- package/dist/clips/index.d.ts +1 -0
- package/dist/clips/text-clip.d.ts +41 -2
- package/dist/clips/video-clip.d.ts +31 -3
- package/dist/colorToUniform-C2jGzNe1.js +97 -0
- package/dist/effect/effect.d.ts +6 -0
- package/dist/effect/glsl/custom-glsl.d.ts +1017 -0
- package/dist/effect/glsl/gl-effect.d.ts +14 -0
- package/dist/effect/types.d.ts +24 -0
- package/dist/effect/vertex.d.ts +1 -0
- package/dist/event-emitter.d.ts +47 -0
- package/dist/{index-BuRTeJh6.js → index-BVO9qrk3.js} +17619 -11273
- package/dist/index.d.ts +4 -1
- package/dist/index.es.js +17 -14
- package/dist/index.umd.js +3361 -130
- package/dist/json-serialization.d.ts +25 -0
- package/dist/sprite/base-sprite.d.ts +48 -0
- package/dist/sprite/pixi-sprite-renderer.d.ts +4 -13
- package/dist/studio.d.ts +100 -2
- package/dist/{webworkerAll-DChKIQQa.js → webworkerAll-zvzmYHny.js} +70 -97
- package/package.json +3 -3
- package/dist/colorToUniform-B0NRe8Du.js +0 -274
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface GlTransition {
|
|
2
|
+
label: string;
|
|
3
|
+
fragment: string;
|
|
4
|
+
uniforms?: Record<string, {
|
|
5
|
+
value: any;
|
|
6
|
+
type: string;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export declare const GL_EFFECTS: Record<string, GlTransition>;
|
|
10
|
+
export type EffectKey = keyof typeof GL_EFFECTS;
|
|
11
|
+
export declare const GL_EFFECT_OPTIONS: Array<{
|
|
12
|
+
key: EffectKey;
|
|
13
|
+
label: string;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Renderer, RenderTexture } from 'pixi.js';
|
|
2
|
+
import { EffectKey } from './glsl/gl-effect';
|
|
3
|
+
export interface EffectOptions {
|
|
4
|
+
name: EffectKey;
|
|
5
|
+
renderer: Renderer;
|
|
6
|
+
}
|
|
7
|
+
export interface EffectRendererOptions {
|
|
8
|
+
canvasTexture: HTMLCanvasElement | ImageBitmap | HTMLImageElement | HTMLVideoElement | RenderTexture;
|
|
9
|
+
progress: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export interface GLEffect {
|
|
14
|
+
author?: string;
|
|
15
|
+
createdAt?: string;
|
|
16
|
+
glsl: string;
|
|
17
|
+
license?: string;
|
|
18
|
+
name: EffectKey;
|
|
19
|
+
updatedAt?: string;
|
|
20
|
+
defaultParams?: any;
|
|
21
|
+
paramsTypes?: any;
|
|
22
|
+
fragment?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const vertex = "\nin vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize;\nuniform vec4 uOutputFrame;\nuniform vec4 uOutputTexture;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\n\n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type EventType = string | symbol;
|
|
2
|
+
export type Handler<T = unknown> = (event: T) => void;
|
|
3
|
+
export type WildcardHandler<T = Record<string, unknown>> = (type: keyof T, event: T[keyof T]) => void;
|
|
4
|
+
export type EventHandlerList<T = unknown> = Array<Handler<T>>;
|
|
5
|
+
export type WildCardEventHandlerList<T = Record<string, unknown>> = Array<WildcardHandler<T>>;
|
|
6
|
+
export type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>>;
|
|
7
|
+
export interface Emitter<Events extends Record<EventType, unknown>> {
|
|
8
|
+
all: EventHandlerMap<Events>;
|
|
9
|
+
on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
|
|
10
|
+
on(type: '*', handler: WildcardHandler<Events>): void;
|
|
11
|
+
off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): void;
|
|
12
|
+
off(type: '*', handler: WildcardHandler<Events>): void;
|
|
13
|
+
emit<Key extends keyof Events>(type: Key, event: Events[Key]): void;
|
|
14
|
+
emit<Key extends keyof Events>(type: undefined extends Events[Key] ? Key : never): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* EventEmitter: A class-based event emitter for inheritance
|
|
18
|
+
*/
|
|
19
|
+
export default class EventEmitter<Events extends Record<EventType, unknown>> implements Emitter<Events> {
|
|
20
|
+
all: EventHandlerMap<Events>;
|
|
21
|
+
/**
|
|
22
|
+
* Register an event handler for the given type.
|
|
23
|
+
* @param {string|symbol} type Type of event to listen for, or `'*'` for all events
|
|
24
|
+
* @param {Function} handler Function to call in response to given event
|
|
25
|
+
*/
|
|
26
|
+
on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
|
|
27
|
+
on(type: '*', handler: WildcardHandler<Events>): void;
|
|
28
|
+
/**
|
|
29
|
+
* Remove an event handler for the given type.
|
|
30
|
+
* If `handler` is omitted, all handlers of the given type are removed.
|
|
31
|
+
* @param {string|symbol} type Type of event to unregister `handler` from (`'*'` to remove a wildcard handler)
|
|
32
|
+
* @param {Function} [handler] Handler function to remove
|
|
33
|
+
*/
|
|
34
|
+
off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): void;
|
|
35
|
+
off(type: '*', handler: WildcardHandler<Events>): void;
|
|
36
|
+
/**
|
|
37
|
+
* Invoke all handlers for the given type.
|
|
38
|
+
* If present, `'*'` handlers are invoked after type-matched handlers.
|
|
39
|
+
*
|
|
40
|
+
* Note: Manually firing '*' handlers is not supported.
|
|
41
|
+
*
|
|
42
|
+
* @param {string|symbol} type The event type to invoke
|
|
43
|
+
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
44
|
+
*/
|
|
45
|
+
emit<Key extends keyof Events>(type: Key, event: Events[Key]): void;
|
|
46
|
+
emit<Key extends keyof Events>(type: undefined extends Events[Key] ? Key : never): void;
|
|
47
|
+
}
|