@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { F as Ie, u as Ee, l as se, M as v, G as De, v as Oe, S as Fe, x as ae, E as u, e as D, y as S, z as Le, H as O, I as b, R as F, J as ne, K as He, t as m, b as f, i as B, w as L, L as K, N as We, c as Y, B as y, j as U, O as ze, Q as C, k as M, V as w, W as Ve, a as Ne, X as ie, Y as oe, Z as le, _ as ue, C as P, $ as je, a0 as A, a1 as J, D as H, a2 as $e, a3 as qe, P as Ke, d as Ye, T as X, a4 as Q, a5 as Je, a6 as Xe, a7 as Qe } from "./index-BVO9qrk3.js";
|
|
2
|
+
import { B as de, c as Ze } from "./colorToUniform-C2jGzNe1.js";
|
|
3
3
|
var et = `in vec2 vMaskCoord;
|
|
4
4
|
in vec2 vTextureCoord;
|
|
5
5
|
|
|
@@ -170,14 +170,14 @@ fn mainFragment(
|
|
|
170
170
|
return source * a;
|
|
171
171
|
}
|
|
172
172
|
`;
|
|
173
|
-
class rt extends
|
|
173
|
+
class rt extends Ie {
|
|
174
174
|
constructor(e) {
|
|
175
|
-
const { sprite: t, ...r } = e, s = new
|
|
175
|
+
const { sprite: t, ...r } = e, s = new Ee(t.texture), n = new se({
|
|
176
176
|
uFilterMatrix: { value: new v(), type: "mat3x3<f32>" },
|
|
177
177
|
uMaskClamp: { value: s.uClampFrame, type: "vec4<f32>" },
|
|
178
178
|
uAlpha: { value: 1, type: "f32" },
|
|
179
179
|
uInverse: { value: e.inverse ? 1 : 0, type: "f32" }
|
|
180
|
-
}), i =
|
|
180
|
+
}), i = De.from({
|
|
181
181
|
vertex: {
|
|
182
182
|
source: Z,
|
|
183
183
|
entryPoint: "mainVertex"
|
|
@@ -186,7 +186,7 @@ class rt extends Xe {
|
|
|
186
186
|
source: Z,
|
|
187
187
|
entryPoint: "mainFragment"
|
|
188
188
|
}
|
|
189
|
-
}), o =
|
|
189
|
+
}), o = Oe.from({
|
|
190
190
|
vertex: tt,
|
|
191
191
|
fragment: et,
|
|
192
192
|
name: "mask-filter"
|
|
@@ -217,7 +217,7 @@ class rt extends Xe {
|
|
|
217
217
|
}
|
|
218
218
|
const W = class ce {
|
|
219
219
|
constructor(e, t) {
|
|
220
|
-
this.state =
|
|
220
|
+
this.state = Fe.for2d(), this._batchersByInstructionSet = /* @__PURE__ */ Object.create(null), this._activeBatches = /* @__PURE__ */ Object.create(null), this.renderer = e, this._adaptor = t, this._adaptor.init?.(this);
|
|
221
221
|
}
|
|
222
222
|
static getBatcher(e) {
|
|
223
223
|
return new this._availableBatchers[e]();
|
|
@@ -356,7 +356,7 @@ const Bt = {
|
|
|
356
356
|
class at extends ne {
|
|
357
357
|
constructor() {
|
|
358
358
|
super(), this.filters = [new rt({
|
|
359
|
-
sprite: new
|
|
359
|
+
sprite: new He(m.EMPTY),
|
|
360
360
|
inverse: !1,
|
|
361
361
|
resolution: "inherit",
|
|
362
362
|
antialias: "inherit"
|
|
@@ -420,7 +420,7 @@ class fe {
|
|
|
420
420
|
const s = S.get(at);
|
|
421
421
|
if (s.inverse = e.inverse, r) {
|
|
422
422
|
e.mask.mask.measurable = !0;
|
|
423
|
-
const n =
|
|
423
|
+
const n = Le(e.mask.mask, !0, st);
|
|
424
424
|
e.mask.mask.measurable = !1, n.ceil();
|
|
425
425
|
const i = t.renderTarget.renderTarget.colorTexture.source, o = b.getOptimalTexture(
|
|
426
426
|
n.width,
|
|
@@ -665,7 +665,7 @@ class Gt {
|
|
|
665
665
|
* @private
|
|
666
666
|
*/
|
|
667
667
|
_systemCheck() {
|
|
668
|
-
if (!
|
|
668
|
+
if (!We())
|
|
669
669
|
throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.");
|
|
670
670
|
}
|
|
671
671
|
ensureUniformGroup(e) {
|
|
@@ -944,7 +944,7 @@ function ot(a, e, t, r, s, n) {
|
|
|
944
944
|
return a.identity(), a.a = 1 / r * 2, a.d = i * (1 / s * 2), a.tx = -1 - e * a.a, a.ty = -i - t * a.d, a;
|
|
945
945
|
}
|
|
946
946
|
const x = /* @__PURE__ */ new Map();
|
|
947
|
-
|
|
947
|
+
ze.register(x);
|
|
948
948
|
function ve(a, e) {
|
|
949
949
|
if (!x.has(a)) {
|
|
950
950
|
const t = new m({
|
|
@@ -1061,7 +1061,7 @@ ge.defaultOptions = {
|
|
|
1061
1061
|
let G = ge;
|
|
1062
1062
|
class Dt {
|
|
1063
1063
|
constructor(e) {
|
|
1064
|
-
this.rootViewPort = new w(), this.viewport = new w(), this.onRenderTargetChange = new
|
|
1064
|
+
this.rootViewPort = new w(), this.viewport = new w(), this.onRenderTargetChange = new Ve("onRenderTargetChange"), this.projectionMatrix = new v(), this.defaultClearColor = [0, 0, 0, 0], this._renderSurfaceToRenderTargetHash = /* @__PURE__ */ new Map(), this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null), this._renderTargetStack = [], this._renderer = e, e.renderableGC.addManagedHash(this, "_gpuRenderTargetHash");
|
|
1065
1065
|
}
|
|
1066
1066
|
/** called when dev wants to finish a render pass */
|
|
1067
1067
|
finishRenderPass() {
|
|
@@ -1244,7 +1244,7 @@ class Dt {
|
|
|
1244
1244
|
this.renderTarget = null, this.renderSurface = null;
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
|
-
class Ot extends
|
|
1247
|
+
class Ot extends Ne {
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Create a new Buffer Resource.
|
|
1250
1250
|
* @param options - The options for the buffer resource
|
|
@@ -1471,7 +1471,7 @@ class ke {
|
|
|
1471
1471
|
i,
|
|
1472
1472
|
o
|
|
1473
1473
|
);
|
|
1474
|
-
d._source.style = new
|
|
1474
|
+
d._source.style = new je({ scaleMode: l }), e.texture = d, e._textureBounds || (e._textureBounds = new O()), e._textureBounds.copyFrom(r), s !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0);
|
|
1475
1475
|
}
|
|
1476
1476
|
} else e.texture && (b.returnTexture(e.texture, !0), e.texture = null);
|
|
1477
1477
|
}
|
|
@@ -2107,9 +2107,9 @@ class Pe {
|
|
|
2107
2107
|
const t = e.resolution || this._renderer.resolution, r = e.antialias || this._renderer.view.antialias, s = e.target;
|
|
2108
2108
|
let n = e.clearColor;
|
|
2109
2109
|
n ? n = Array.isArray(n) && n.length === 4 ? n : A.shared.setValue(n).toArray() : n = xt;
|
|
2110
|
-
const i = e.frame?.copyTo(vt) ||
|
|
2110
|
+
const i = e.frame?.copyTo(vt) || $e(s, gt).rectangle;
|
|
2111
2111
|
i.width = Math.max(i.width, 1 / t) | 0, i.height = Math.max(i.height, 1 / t) | 0;
|
|
2112
|
-
const o =
|
|
2112
|
+
const o = qe.create({
|
|
2113
2113
|
...e.textureSourceOptions,
|
|
2114
2114
|
width: i.width,
|
|
2115
2115
|
height: i.height,
|
|
@@ -2159,7 +2159,7 @@ class Re {
|
|
|
2159
2159
|
const i = this._renderer.renderTarget.renderTarget, o = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {
|
|
2160
2160
|
worldTransformMatrix: new v(),
|
|
2161
2161
|
worldColor: 4294967295,
|
|
2162
|
-
offset: new
|
|
2162
|
+
offset: new Ke()
|
|
2163
2163
|
}, l = {
|
|
2164
2164
|
projectionMatrix: t || this._renderer.renderTarget.projectionMatrix,
|
|
2165
2165
|
resolution: e || i.size,
|
|
@@ -2176,7 +2176,7 @@ class Re {
|
|
|
2176
2176
|
0
|
|
2177
2177
|
), d.update();
|
|
2178
2178
|
let h;
|
|
2179
|
-
this._renderer.renderPipes.uniformBatch ? h = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d, !1) : (h = this._bindGroupPool.pop() || new
|
|
2179
|
+
this._renderer.renderPipes.uniformBatch ? h = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d, !1) : (h = this._bindGroupPool.pop() || new Ye(), this._activeBindGroups.push(h), h.setResource(d, 0)), l.bindGroup = h, this._currentGlobalUniformData = l;
|
|
2180
2180
|
}
|
|
2181
2181
|
push(e) {
|
|
2182
2182
|
this.bind(e), this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;
|
|
@@ -2593,7 +2593,7 @@ const q = class Ge {
|
|
|
2593
2593
|
e = {
|
|
2594
2594
|
...Ge.defaultOptions,
|
|
2595
2595
|
...e
|
|
2596
|
-
}, e.view && (
|
|
2596
|
+
}, e.view && (Je(Xe, "ViewSystem.view has been renamed to ViewSystem.canvas"), e.canvas = e.view), this.screen = new w(0, 0, e.width, e.height), this.canvas = e.canvas || H.get().createCanvas(), this.antialias = !!e.antialias, this.texture = ve(this.canvas, e), this.renderTarget = new G({
|
|
2597
2597
|
colorTextures: [this.texture],
|
|
2598
2598
|
depth: !!e.depth,
|
|
2599
2599
|
isRoot: !0
|
|
@@ -2661,7 +2661,7 @@ const Ft = [
|
|
|
2661
2661
|
Mt,
|
|
2662
2662
|
Pe,
|
|
2663
2663
|
mt,
|
|
2664
|
-
|
|
2664
|
+
Qe,
|
|
2665
2665
|
Ct,
|
|
2666
2666
|
Be
|
|
2667
2667
|
], Lt = [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as d, B as v, w as m, D as S,
|
|
2
|
-
import {
|
|
3
|
-
import { e as Ge, G as Ue, c as Fe, b as Oe, U as Pe, R as Me, B as Z, d as N, f as Le, S as He, a as we } from "./SharedSystems-
|
|
4
|
-
class
|
|
1
|
+
import { S as G, E as d, B as v, w as m, D as S, L as j, v as ve, s as U, t as b, a8 as Be, k as K, a9 as Ae, b as p, V as L, j as B, i as A, l as F, M as $, aa as z, ab as Ne, ac as ye, ad as Y, ae as Ce, A as De, R as Ie, e as T } from "./index-BVO9qrk3.js";
|
|
2
|
+
import { b as q } from "./colorToUniform-C2jGzNe1.js";
|
|
3
|
+
import { e as Ge, G as Ue, c as Fe, b as Oe, U as Pe, R as Me, B as Z, d as N, f as Le, S as He, a as we } from "./SharedSystems-s9Js69L7.js";
|
|
4
|
+
class Q {
|
|
5
5
|
constructor() {
|
|
6
|
-
this._tempState =
|
|
6
|
+
this._tempState = G.for2d(), this._didUploadHash = {};
|
|
7
7
|
}
|
|
8
8
|
init(e) {
|
|
9
9
|
e.renderer.runners.contextChange.add(this);
|
|
@@ -24,7 +24,7 @@ class J {
|
|
|
24
24
|
s.geometry.draw(r.topology, r.size, r.start);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
Q.extension = {
|
|
28
28
|
type: [
|
|
29
29
|
d.WebGLPipesAdaptor
|
|
30
30
|
],
|
|
@@ -36,7 +36,7 @@ class Ve {
|
|
|
36
36
|
this._lastBindBaseLocation = -1, this._lastBindCallId = -1, this.buffer = e || null, this.updateID = -1, this.byteLength = -1, this.type = r;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class J {
|
|
40
40
|
/**
|
|
41
41
|
* @param {Renderer} renderer - The renderer this System works for.
|
|
42
42
|
*/
|
|
@@ -154,7 +154,7 @@ class Q {
|
|
|
154
154
|
this._boundBufferBases = /* @__PURE__ */ Object.create(null);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
J.extension = {
|
|
158
158
|
type: [
|
|
159
159
|
d.WebGLSystem
|
|
160
160
|
],
|
|
@@ -618,7 +618,7 @@ const je = new Be({
|
|
|
618
618
|
}
|
|
619
619
|
init(e = {}) {
|
|
620
620
|
const { useBackBuffer: r, antialias: s } = { ...se.defaultOptions, ...e };
|
|
621
|
-
this.useBackBuffer = r, this._antialias = s, this._renderer.context.supports.msaa || (m("antialiasing, is not supported on when using the back buffer"), this._antialias = !1), this._state =
|
|
621
|
+
this.useBackBuffer = r, this._antialias = s, this._renderer.context.supports.msaa || (m("antialiasing, is not supported on when using the back buffer"), this._antialias = !1), this._state = G.for2d();
|
|
622
622
|
const n = new ve({
|
|
623
623
|
vertex: `
|
|
624
624
|
attribute vec2 aPosition;
|
|
@@ -643,7 +643,7 @@ const je = new Be({
|
|
|
643
643
|
}`,
|
|
644
644
|
name: "big-triangle"
|
|
645
645
|
});
|
|
646
|
-
this._bigTriangleShader = new
|
|
646
|
+
this._bigTriangleShader = new U({
|
|
647
647
|
glProgram: n,
|
|
648
648
|
resources: {
|
|
649
649
|
uTexture: b.WHITE.source
|
|
@@ -1109,7 +1109,7 @@ _e.extension = {
|
|
|
1109
1109
|
type: [d.WebGLSystem],
|
|
1110
1110
|
name: "renderTarget"
|
|
1111
1111
|
};
|
|
1112
|
-
function
|
|
1112
|
+
function Qe(t, e) {
|
|
1113
1113
|
const r = [], s = [`
|
|
1114
1114
|
var g = s.groups;
|
|
1115
1115
|
var sS = r.shader;
|
|
@@ -1126,7 +1126,7 @@ function Je(t, e) {
|
|
|
1126
1126
|
`);
|
|
1127
1127
|
for (const _ in u.resources) {
|
|
1128
1128
|
const f = u.resources[_];
|
|
1129
|
-
if (f instanceof
|
|
1129
|
+
if (f instanceof F)
|
|
1130
1130
|
if (f.ubo) {
|
|
1131
1131
|
const l = t._uniformBindMap[c][Number(_)];
|
|
1132
1132
|
r.push(`
|
|
@@ -1163,7 +1163,7 @@ function Je(t, e) {
|
|
|
1163
1163
|
`);
|
|
1164
1164
|
return new Function("r", "s", "sD", o);
|
|
1165
1165
|
}
|
|
1166
|
-
class
|
|
1166
|
+
class Je {
|
|
1167
1167
|
/**
|
|
1168
1168
|
* Makes a new Pixi program.
|
|
1169
1169
|
* @param program - webgl program
|
|
@@ -1418,7 +1418,7 @@ function at(t, e) {
|
|
|
1418
1418
|
value: he(u.type, u.size)
|
|
1419
1419
|
};
|
|
1420
1420
|
}
|
|
1421
|
-
return new
|
|
1421
|
+
return new Je(n, a);
|
|
1422
1422
|
}
|
|
1423
1423
|
const R = {
|
|
1424
1424
|
textureCount: 0,
|
|
@@ -1500,7 +1500,7 @@ class le {
|
|
|
1500
1500
|
* @ignore
|
|
1501
1501
|
*/
|
|
1502
1502
|
_generateShaderSync(e, r) {
|
|
1503
|
-
return
|
|
1503
|
+
return Qe(e, r);
|
|
1504
1504
|
}
|
|
1505
1505
|
resetState() {
|
|
1506
1506
|
this._activeProgram = null;
|
|
@@ -1636,7 +1636,7 @@ function ut(t, e) {
|
|
|
1636
1636
|
`];
|
|
1637
1637
|
for (const s in t.uniforms) {
|
|
1638
1638
|
if (!e[s]) {
|
|
1639
|
-
t.uniforms[s] instanceof
|
|
1639
|
+
t.uniforms[s] instanceof F ? t.uniforms[s].ubo ? r.push(`
|
|
1640
1640
|
renderer.shader.bindUniformBlock(uv.${s}, "${s}");
|
|
1641
1641
|
`) : r.push(`
|
|
1642
1642
|
renderer.shader.updateUniformGroup(uv.${s});
|
|
@@ -1737,7 +1737,7 @@ function _t(t) {
|
|
|
1737
1737
|
}
|
|
1738
1738
|
const ht = 0, ft = 1, lt = 2, dt = 3, mt = 4, Et = 5, me = class I {
|
|
1739
1739
|
constructor(e) {
|
|
1740
|
-
this._invertFrontFace = !1, this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = "none", this._blendEq = !1, this.map = [], this.map[ht] = this.setBlend, this.map[ft] = this.setOffset, this.map[lt] = this.setCullFace, this.map[dt] = this.setDepthTest, this.map[mt] = this.setFrontFace, this.map[Et] = this.setDepthMask, this.checks = [], this.defaultState =
|
|
1740
|
+
this._invertFrontFace = !1, this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = "none", this._blendEq = !1, this.map = [], this.map[ht] = this.setBlend, this.map[ft] = this.setOffset, this.map[lt] = this.setCullFace, this.map[dt] = this.setDepthTest, this.map[mt] = this.setFrontFace, this.map[Et] = this.setDepthMask, this.checks = [], this.defaultState = G.for2d(), e.renderTarget.onRenderTargetChange.add(this);
|
|
1741
1741
|
}
|
|
1742
1742
|
onRenderTargetChange(e) {
|
|
1743
1743
|
this._invertFrontFace = !e.isRoot, this._cullFace ? this.setFrontFace(this._frontFace) : this._frontFaceDirty = !0;
|
|
@@ -2505,7 +2505,7 @@ be.extension = {
|
|
|
2505
2505
|
};
|
|
2506
2506
|
class Se {
|
|
2507
2507
|
contextChange(e) {
|
|
2508
|
-
const r = new
|
|
2508
|
+
const r = new F({
|
|
2509
2509
|
uColor: { value: new Float32Array([1, 1, 1, 1]), type: "vec4<f32>" },
|
|
2510
2510
|
uTransformMatrix: { value: new $(), type: "mat3x3<f32>" },
|
|
2511
2511
|
uRound: { value: 0, type: "f32" }
|
|
@@ -2518,7 +2518,7 @@ class Se {
|
|
|
2518
2518
|
Y
|
|
2519
2519
|
]
|
|
2520
2520
|
});
|
|
2521
|
-
this.shader = new
|
|
2521
|
+
this.shader = new U({
|
|
2522
2522
|
glProgram: n,
|
|
2523
2523
|
resources: {
|
|
2524
2524
|
localUniforms: r,
|
|
@@ -2562,7 +2562,7 @@ class pe {
|
|
|
2562
2562
|
Y
|
|
2563
2563
|
]
|
|
2564
2564
|
});
|
|
2565
|
-
this._shader = new
|
|
2565
|
+
this._shader = new U({
|
|
2566
2566
|
glProgram: e,
|
|
2567
2567
|
resources: {
|
|
2568
2568
|
uTexture: b.EMPTY.source,
|
|
@@ -2607,7 +2607,7 @@ const Ct = [
|
|
|
2607
2607
|
Ke,
|
|
2608
2608
|
ke,
|
|
2609
2609
|
ae,
|
|
2610
|
-
|
|
2610
|
+
J,
|
|
2611
2611
|
be,
|
|
2612
2612
|
_e,
|
|
2613
2613
|
re,
|
|
@@ -2617,7 +2617,7 @@ const Ct = [
|
|
|
2617
2617
|
bt,
|
|
2618
2618
|
oe,
|
|
2619
2619
|
ne
|
|
2620
|
-
], Dt = [...we], It = [
|
|
2620
|
+
], Dt = [...we], It = [Q, pe, Se], ge = [], Re = [], xe = [];
|
|
2621
2621
|
T.handleByNamedList(d.WebGLSystem, ge);
|
|
2622
2622
|
T.handleByNamedList(d.WebGLPipes, Re);
|
|
2623
2623
|
T.handleByNamedList(d.WebGLPipesAdaptor, xe);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { c as _e, u as be, U as xe, B as ye, G as Ge, e as Se, R as Be, t as Pe, S as Te, a as Ce } from "./SharedSystems-
|
|
4
|
-
const y =
|
|
1
|
+
import { S as E, g as A, E as p, f as ae, D as S, b as C, B as T, c as ue, d as L, h as M, w as v, i as x, j as ce, k as de, l as k, m as w, M as D, n as H, o as he, p as pe, q as z, s as F, t as R, A as le, R as fe, e as B } from "./index-BVO9qrk3.js";
|
|
2
|
+
import { l as ge, a as me } from "./colorToUniform-C2jGzNe1.js";
|
|
3
|
+
import { c as _e, u as be, U as xe, B as ye, G as Ge, e as Se, R as Be, t as Pe, S as Te, a as Ce } from "./SharedSystems-s9Js69L7.js";
|
|
4
|
+
const y = E.for2d();
|
|
5
5
|
class O {
|
|
6
6
|
start(e, t, r) {
|
|
7
7
|
const s = e.renderer, i = s.encoder, n = r.gpuProgram;
|
|
@@ -17,7 +17,7 @@ class O {
|
|
|
17
17
|
const r = this._shader.gpuProgram, s = e.renderer, i = s.encoder;
|
|
18
18
|
if (!t.bindGroup) {
|
|
19
19
|
const u = t.textures;
|
|
20
|
-
t.bindGroup =
|
|
20
|
+
t.bindGroup = A(
|
|
21
21
|
u.textures,
|
|
22
22
|
u.count,
|
|
23
23
|
s.limits.maxBatchableTextures
|
|
@@ -577,7 +577,7 @@ class Y {
|
|
|
577
577
|
}
|
|
578
578
|
_getBindGroup(e) {
|
|
579
579
|
if (!this._bindGroups[e]) {
|
|
580
|
-
const t = new
|
|
580
|
+
const t = new L({
|
|
581
581
|
0: this._getBufferResource(e)
|
|
582
582
|
});
|
|
583
583
|
this._bindGroups[e] = t;
|
|
@@ -1124,7 +1124,7 @@ g.max = {
|
|
|
1124
1124
|
};
|
|
1125
1125
|
class J {
|
|
1126
1126
|
constructor() {
|
|
1127
|
-
this.defaultState = new
|
|
1127
|
+
this.defaultState = new E(), this.defaultState.blend = !0;
|
|
1128
1128
|
}
|
|
1129
1129
|
contextChange(e) {
|
|
1130
1130
|
this.gpu = e;
|
|
@@ -1437,10 +1437,10 @@ class te {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
_createTextureBindGroup(e) {
|
|
1439
1439
|
const t = e.source;
|
|
1440
|
-
return this._bindGroupHash[e.uid] = new
|
|
1440
|
+
return this._bindGroupHash[e.uid] = new L({
|
|
1441
1441
|
0: t,
|
|
1442
1442
|
1: t.style,
|
|
1443
|
-
2: new
|
|
1443
|
+
2: new k({
|
|
1444
1444
|
uTextureMatrix: { type: "mat3x3<f32>", value: e.textureMatrix.mapCoord }
|
|
1445
1445
|
})
|
|
1446
1446
|
}), this._bindGroupHash[e.uid];
|
|
@@ -1500,22 +1500,22 @@ class re {
|
|
|
1500
1500
|
this._maxTextures = 0;
|
|
1501
1501
|
}
|
|
1502
1502
|
contextChange(e) {
|
|
1503
|
-
const t = new
|
|
1504
|
-
uTransformMatrix: { value: new
|
|
1503
|
+
const t = new k({
|
|
1504
|
+
uTransformMatrix: { value: new D(), type: "mat3x3<f32>" },
|
|
1505
1505
|
uColor: { value: new Float32Array([1, 1, 1, 1]), type: "vec4<f32>" },
|
|
1506
1506
|
uRound: { value: 0, type: "f32" }
|
|
1507
1507
|
});
|
|
1508
1508
|
this._maxTextures = e.limits.maxBatchableTextures;
|
|
1509
|
-
const r =
|
|
1509
|
+
const r = H({
|
|
1510
1510
|
name: "graphics",
|
|
1511
1511
|
bits: [
|
|
1512
1512
|
he,
|
|
1513
1513
|
pe(this._maxTextures),
|
|
1514
1514
|
ge,
|
|
1515
|
-
|
|
1515
|
+
z
|
|
1516
1516
|
]
|
|
1517
1517
|
});
|
|
1518
|
-
this.shader = new
|
|
1518
|
+
this.shader = new F({
|
|
1519
1519
|
gpuProgram: r,
|
|
1520
1520
|
resources: {
|
|
1521
1521
|
// added on the fly!
|
|
@@ -1544,7 +1544,7 @@ class re {
|
|
|
1544
1544
|
m.topology
|
|
1545
1545
|
)), s.groups[1] = m.bindGroup, !m.gpuBindGroup) {
|
|
1546
1546
|
const P = m.textures;
|
|
1547
|
-
m.bindGroup =
|
|
1547
|
+
m.bindGroup = A(
|
|
1548
1548
|
P.textures,
|
|
1549
1549
|
P.count,
|
|
1550
1550
|
this._maxTextures
|
|
@@ -1569,21 +1569,21 @@ re.extension = {
|
|
|
1569
1569
|
};
|
|
1570
1570
|
class se {
|
|
1571
1571
|
init() {
|
|
1572
|
-
const e =
|
|
1572
|
+
const e = H({
|
|
1573
1573
|
name: "mesh",
|
|
1574
1574
|
bits: [
|
|
1575
1575
|
me,
|
|
1576
1576
|
Pe,
|
|
1577
|
-
|
|
1577
|
+
z
|
|
1578
1578
|
]
|
|
1579
1579
|
});
|
|
1580
|
-
this._shader = new
|
|
1580
|
+
this._shader = new F({
|
|
1581
1581
|
gpuProgram: e,
|
|
1582
1582
|
resources: {
|
|
1583
1583
|
uTexture: R.EMPTY._source,
|
|
1584
1584
|
uSampler: R.EMPTY._source.style,
|
|
1585
1585
|
textureUniforms: {
|
|
1586
|
-
uTextureMatrix: { type: "mat3x3<f32>", value: new
|
|
1586
|
+
uTextureMatrix: { type: "mat3x3<f32>", value: new D() }
|
|
1587
1587
|
}
|
|
1588
1588
|
}
|
|
1589
1589
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as M, U as Z, P as m, r as te, E as y,
|
|
2
|
-
import "./webworkerAll-
|
|
1
|
+
import { T as M, U as Z, P as m, r as te, E as y, a as ie, w as g, e as P, C as V } from "./index-BVO9qrk3.js";
|
|
2
|
+
import "./webworkerAll-zvzmYHny.js";
|
|
3
3
|
class q {
|
|
4
4
|
constructor(e) {
|
|
5
5
|
this._lastTransform = "", this._observer = null, this._tickerAttached = !1, this.updateTranslation = () => {
|
|
@@ -21,6 +21,7 @@ interface IAudioClipOpts {
|
|
|
21
21
|
* }),
|
|
22
22
|
*/
|
|
23
23
|
export declare class AudioClip extends BaseClip implements IPlaybackCapable {
|
|
24
|
+
readonly type = "Audio";
|
|
24
25
|
static ctx: AudioContext | null;
|
|
25
26
|
ready: IClip['ready'];
|
|
26
27
|
private _meta;
|
|
@@ -50,7 +51,6 @@ export declare class AudioClip extends BaseClip implements IPlaybackCapable {
|
|
|
50
51
|
/**
|
|
51
52
|
* Audio volume level (0-1) (hybrid JSON structure)
|
|
52
53
|
*/
|
|
53
|
-
volume: number;
|
|
54
54
|
/**
|
|
55
55
|
* Load an audio clip from a URL
|
|
56
56
|
* @param url Audio URL
|
|
@@ -163,6 +163,7 @@ export interface ICaptionClipOpts {
|
|
|
163
163
|
* captionClip.duration = 3e6; // 3 seconds
|
|
164
164
|
*/
|
|
165
165
|
export declare class CaptionClip extends BaseClip implements IClip {
|
|
166
|
+
readonly type = "Caption";
|
|
166
167
|
ready: IClip['ready'];
|
|
167
168
|
private _meta;
|
|
168
169
|
get meta(): {
|
|
@@ -216,6 +217,20 @@ export declare class CaptionClip extends BaseClip implements IClip {
|
|
|
216
217
|
* Bottom offset from video bottom (hybrid JSON structure)
|
|
217
218
|
*/
|
|
218
219
|
bottomOffset?: number;
|
|
220
|
+
/**
|
|
221
|
+
* Unique identifier for this clip instance
|
|
222
|
+
*/
|
|
223
|
+
id: string;
|
|
224
|
+
/**
|
|
225
|
+
* Array of effects to be applied to this clip
|
|
226
|
+
* Each effect specifies key, startTime, duration, and optional targets
|
|
227
|
+
*/
|
|
228
|
+
effects: Array<{
|
|
229
|
+
id: string;
|
|
230
|
+
key: string;
|
|
231
|
+
startTime: number;
|
|
232
|
+
duration: number;
|
|
233
|
+
}>;
|
|
219
234
|
private opts;
|
|
220
235
|
private pixiTextContainer;
|
|
221
236
|
private renderTexture;
|
|
@@ -245,6 +260,18 @@ export declare class CaptionClip extends BaseClip implements IClip {
|
|
|
245
260
|
state: 'success';
|
|
246
261
|
}>;
|
|
247
262
|
split(_time: number): Promise<[this, this]>;
|
|
263
|
+
addEffect(effect: {
|
|
264
|
+
id: string;
|
|
265
|
+
key: string;
|
|
266
|
+
startTime: number;
|
|
267
|
+
duration: number;
|
|
268
|
+
}): void;
|
|
269
|
+
editEffect(effectId: string, newEffectData: Partial<{
|
|
270
|
+
key: string;
|
|
271
|
+
startTime: number;
|
|
272
|
+
duration: number;
|
|
273
|
+
}>): void;
|
|
274
|
+
removeEffect(effectId: string): void;
|
|
248
275
|
clone(): Promise<this>;
|
|
249
276
|
destroy(): void;
|
|
250
277
|
toJSON(main?: boolean): CaptionClipJSON;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseClip } from './base-clip';
|
|
2
|
+
import { IClip } from './iclip';
|
|
3
|
+
import { EffectKey } from '../effect/glsl/gl-effect';
|
|
4
|
+
export declare class EffectClip extends BaseClip {
|
|
5
|
+
readonly type = "Effect";
|
|
6
|
+
ready: IClip['ready'];
|
|
7
|
+
private _meta;
|
|
8
|
+
get meta(): {
|
|
9
|
+
duration: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Unique identifier for this clip instance
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* The effect configuration
|
|
19
|
+
*/
|
|
20
|
+
effect: {
|
|
21
|
+
id: string;
|
|
22
|
+
key: EffectKey;
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
25
|
+
constructor(effectKey: EffectKey);
|
|
26
|
+
clone(): Promise<this>;
|
|
27
|
+
tick(_time: number): Promise<{
|
|
28
|
+
video: ImageBitmap | undefined;
|
|
29
|
+
state: 'success';
|
|
30
|
+
}>;
|
|
31
|
+
split(_time: number): Promise<[this, this]>;
|
|
32
|
+
toJSON(main?: boolean): any;
|
|
33
|
+
}
|
package/dist/clips/iclip.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface IClipMeta {
|
|
|
18
18
|
export interface IClip extends Omit<BaseSprite, 'destroy' | 'ready'> {
|
|
19
19
|
destroy: () => void;
|
|
20
20
|
readonly ready: Promise<IClipMeta>;
|
|
21
|
+
/**
|
|
22
|
+
* Clip type (e.g., 'video', 'image', 'text', 'audio')
|
|
23
|
+
*/
|
|
24
|
+
readonly type: string;
|
|
21
25
|
/**
|
|
22
26
|
* Extract data from clip at specified time
|
|
23
27
|
* @param time Time in microseconds
|
|
@@ -26,7 +26,8 @@ type AnimateImgType = 'avif' | 'webp' | 'png' | 'gif';
|
|
|
26
26
|
*
|
|
27
27
|
* @see [Video composition](https://webav-tech.github.io/WebAV/demo/2_1-concat-video)
|
|
28
28
|
*/
|
|
29
|
-
export declare class ImageClip extends BaseClip {
|
|
29
|
+
export declare class ImageClip extends BaseClip implements IClip {
|
|
30
|
+
readonly type = "Image";
|
|
30
31
|
ready: IClip['ready'];
|
|
31
32
|
private _meta;
|
|
32
33
|
/**
|
|
@@ -43,6 +44,20 @@ export declare class ImageClip extends BaseClip {
|
|
|
43
44
|
private img;
|
|
44
45
|
private pixiTexture;
|
|
45
46
|
private frames;
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for this clip instance
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
/**
|
|
52
|
+
* Array of effects to be applied to this clip
|
|
53
|
+
* Each effect specifies key, startTime, duration, and optional targets
|
|
54
|
+
*/
|
|
55
|
+
effects: Array<{
|
|
56
|
+
id: string;
|
|
57
|
+
key: string;
|
|
58
|
+
startTime: number;
|
|
59
|
+
duration: number;
|
|
60
|
+
}>;
|
|
46
61
|
/**
|
|
47
62
|
* Load an image clip from a URL using PixiJS Assets
|
|
48
63
|
* This is optimized for Studio as it uses Texture directly
|
|
@@ -77,6 +92,18 @@ export declare class ImageClip extends BaseClip {
|
|
|
77
92
|
}>;
|
|
78
93
|
split(time: number): Promise<[this, this]>;
|
|
79
94
|
clone(): Promise<this>;
|
|
95
|
+
addEffect(effect: {
|
|
96
|
+
id: string;
|
|
97
|
+
key: string;
|
|
98
|
+
startTime: number;
|
|
99
|
+
duration: number;
|
|
100
|
+
}): void;
|
|
101
|
+
editEffect(effectId: string, newEffectData: Partial<{
|
|
102
|
+
key: string;
|
|
103
|
+
startTime: number;
|
|
104
|
+
duration: number;
|
|
105
|
+
}>): void;
|
|
106
|
+
removeEffect(effectId: string): void;
|
|
80
107
|
destroy(): void;
|
|
81
108
|
toJSON(main?: boolean): ImageClipJSON;
|
|
82
109
|
/**
|
package/dist/clips/index.d.ts
CHANGED