aoi-comp 1.0.7 → 1.0.9
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/README.md +14 -1
- package/dist/{BufferResource-DFDBAnSq.js → BufferResource-o2LGGq1U.js} +2 -2
- package/dist/{CanvasPool-BsgAe0a6.js → CanvasPool-x1nSZDIx.js} +1 -1
- package/dist/{Geometry-aazo6sAf.js → Geometry-BM7su788.js} +3 -3
- package/dist/{RenderTargetSystem-CZF50Fmm.js → RenderTargetSystem-BNp9VOlY.js} +245 -245
- package/dist/{browserAll-DaWcejVe.js → browserAll-EL05LSIx.js} +11 -11
- package/dist/{canvasUtils-De2q5tyg.js → canvasUtils-C0wKvLC1.js} +1 -1
- package/dist/comps.js +19300 -16632
- package/dist/{getTextureBatchBindGroup-DQkuEaQe.js → getTextureBatchBindGroup-BFZcnSby.js} +1 -1
- package/dist/{hooks-CdZsOQlG.js → hooks-MstF8Y3K.js} +158 -158
- package/dist/hooks.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{init-DVx9p_OT.js → init-C4yLp8yD.js} +17 -17
- package/dist/{init-Dhh1Ipn5.js → init-CCTyMlTU.js} +16 -15
- package/dist/{packages-CZzUFKwt.js → packages-C9qBCygN.js} +475 -437
- package/dist/style.css +1 -1
- package/dist/utils.js +2 -2
- package/dist/webworkerAll-CytR-OcT.js +2 -0
- package/package.json +6 -6
- package/dist/webworkerAll-c3PtPRAK.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as e, R as t, T as n, V as r,
|
|
2
|
-
import { t as m } from "./canvasUtils-
|
|
3
|
-
import { t as h } from "./CanvasPool-
|
|
1
|
+
import { B as e, R as t, T as n, V as r, at as i, d as a, et as o, f as s, i as c, it as l, l as u, m as d, t as f, u as p } from "./Geometry-BM7su788.js";
|
|
2
|
+
import { t as m } from "./canvasUtils-C0wKvLC1.js";
|
|
3
|
+
import { t as h } from "./CanvasPool-x1nSZDIx.js";
|
|
4
4
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/bounds/getRenderableBounds.mjs
|
|
5
|
-
var g = new
|
|
5
|
+
var g = new o();
|
|
6
6
|
function _(e, t) {
|
|
7
7
|
t.clear();
|
|
8
8
|
let n = t.matrix;
|
|
@@ -128,14 +128,14 @@ var x = class {
|
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
S.extension = {
|
|
131
|
-
type: [
|
|
131
|
+
type: [l.CanvasSystem],
|
|
132
132
|
name: "filter"
|
|
133
133
|
};
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/filters/defaults/defaultFilter.vert.mjs
|
|
136
|
-
var C = "in 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", w = "in vec2 vTextureCoord;\nout vec4 finalColor;\nuniform sampler2D uTexture;\nvoid main() {\n finalColor = texture(uTexture, vTextureCoord);\n}\n", T = "struct GlobalFilterUniforms {\n uInputSize: vec4<f32>,\n uInputPixel: vec4<f32>,\n uInputClamp: vec4<f32>,\n uOutputFrame: vec4<f32>,\n uGlobalFrame: vec4<f32>,\n uOutputTexture: vec4<f32>,\n};\n\n@group(0) @binding(0) var <uniform> gfu: GlobalFilterUniforms;\n@group(0) @binding(1) var uTexture: texture_2d<f32>;\n@group(0) @binding(2) var uSampler: sampler;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv: vec2<f32>\n};\n\nfn filterVertexPosition(aPosition: vec2<f32>) -> vec4<f32>\n{\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\n\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0 * gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nfn filterTextureCoord(aPosition: vec2<f32>) -> vec2<f32>\n{\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\n}\n\n@vertex\nfn mainVertex(\n @location(0) aPosition: vec2<f32>,\n) -> VSOutput {\n return VSOutput(\n filterVertexPosition(aPosition),\n filterTextureCoord(aPosition)\n );\n}\n\n@fragment\nfn mainFragment(\n @location(0) uv: vec2<f32>,\n) -> @location(0) vec4<f32> {\n return textureSample(uTexture, uSampler, uv);\n}\n", E = class extends
|
|
136
|
+
var C = "in 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", w = "in vec2 vTextureCoord;\nout vec4 finalColor;\nuniform sampler2D uTexture;\nvoid main() {\n finalColor = texture(uTexture, vTextureCoord);\n}\n", T = "struct GlobalFilterUniforms {\n uInputSize: vec4<f32>,\n uInputPixel: vec4<f32>,\n uInputClamp: vec4<f32>,\n uOutputFrame: vec4<f32>,\n uGlobalFrame: vec4<f32>,\n uOutputTexture: vec4<f32>,\n};\n\n@group(0) @binding(0) var <uniform> gfu: GlobalFilterUniforms;\n@group(0) @binding(1) var uTexture: texture_2d<f32>;\n@group(0) @binding(2) var uSampler: sampler;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv: vec2<f32>\n};\n\nfn filterVertexPosition(aPosition: vec2<f32>) -> vec4<f32>\n{\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\n\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0 * gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nfn filterTextureCoord(aPosition: vec2<f32>) -> vec2<f32>\n{\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\n}\n\n@vertex\nfn mainVertex(\n @location(0) aPosition: vec2<f32>,\n) -> VSOutput {\n return VSOutput(\n filterVertexPosition(aPosition),\n filterTextureCoord(aPosition)\n );\n}\n\n@fragment\nfn mainFragment(\n @location(0) uv: vec2<f32>,\n) -> @location(0) vec4<f32> {\n return textureSample(uTexture, uSampler, uv);\n}\n", E = class extends c {
|
|
137
137
|
constructor() {
|
|
138
|
-
let e =
|
|
138
|
+
let e = s.from({
|
|
139
139
|
vertex: {
|
|
140
140
|
source: T,
|
|
141
141
|
entryPoint: "mainVertex"
|
|
@@ -145,7 +145,7 @@ var C = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize;
|
|
|
145
145
|
entryPoint: "mainFragment"
|
|
146
146
|
},
|
|
147
147
|
name: "passthrough-filter"
|
|
148
|
-
}), t =
|
|
148
|
+
}), t = d.from({
|
|
149
149
|
vertex: C,
|
|
150
150
|
fragment: w,
|
|
151
151
|
name: "passthrough-filter"
|
|
@@ -184,9 +184,9 @@ var C = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize;
|
|
|
184
184
|
};
|
|
185
185
|
D.extension = {
|
|
186
186
|
type: [
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
l.WebGLPipes,
|
|
188
|
+
l.WebGPUPipes,
|
|
189
|
+
l.CanvasPipes
|
|
190
190
|
],
|
|
191
191
|
name: "filter"
|
|
192
192
|
};
|
|
@@ -227,7 +227,7 @@ var O = new f({
|
|
|
227
227
|
}
|
|
228
228
|
}, A = class {
|
|
229
229
|
constructor(e) {
|
|
230
|
-
this._filterStackIndex = 0, this._filterStack = [], this._filterGlobalUniforms = new
|
|
230
|
+
this._filterStackIndex = 0, this._filterStack = [], this._filterGlobalUniforms = new a({
|
|
231
231
|
uInputSize: {
|
|
232
232
|
value: /* @__PURE__ */ new Float32Array(4),
|
|
233
233
|
type: "vec4<f32>"
|
|
@@ -312,8 +312,8 @@ var O = new f({
|
|
|
312
312
|
this._setupBindGroupsAndRender(d, t, i);
|
|
313
313
|
}
|
|
314
314
|
calculateSpriteMatrix(e, t) {
|
|
315
|
-
let n = this._activeFilterData, r = e.set(n.inputTexture._source.width, 0, 0, n.inputTexture._source.height, n.bounds.minX, n.bounds.minY), i = t.worldTransform.copyTo(
|
|
316
|
-
return
|
|
315
|
+
let n = this._activeFilterData, r = e.set(n.inputTexture._source.width, 0, 0, n.inputTexture._source.height, n.bounds.minX, n.bounds.minY), i = t.worldTransform.copyTo(o.shared), a = t.renderGroup || t.parentRenderGroup;
|
|
316
|
+
return a && a.cacheToLocalTransform && i.prepend(a.cacheToLocalTransform), i.invert(), r.prepend(i), r.scale(1 / t.texture.orig.width, 1 / t.texture.orig.height), r.translate(t.anchor.x, t.anchor.y), r;
|
|
317
317
|
}
|
|
318
318
|
destroy() {
|
|
319
319
|
this._passthroughFilter?.destroy(!0), this._passthroughFilter = null;
|
|
@@ -331,7 +331,7 @@ var O = new f({
|
|
|
331
331
|
shader: e,
|
|
332
332
|
state: e._state,
|
|
333
333
|
topology: "triangle-list"
|
|
334
|
-
}), n.type ===
|
|
334
|
+
}), n.type === u.WEBGL && n.renderTarget.finishRenderPass();
|
|
335
335
|
}
|
|
336
336
|
_setupFilterTextures(e, t, i, a) {
|
|
337
337
|
if (e.backTexture = r.EMPTY, e.inputTexture = n.getOptimalTexture(t.width, t.height, e.resolution, e.antialias), e.blendRequired) {
|
|
@@ -440,7 +440,7 @@ var O = new f({
|
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
A.extension = {
|
|
443
|
-
type: [
|
|
443
|
+
type: [l.WebGLSystem, l.WebGPUSystem],
|
|
444
444
|
name: "filter"
|
|
445
|
-
},
|
|
445
|
+
}, i.add(A, S), i.add(D);
|
|
446
446
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as e, C as t, D as n, M as r, N as i, Q as a, R as o, U as s, V as c, W as l, _ as u,
|
|
2
|
-
import { r as _ } from "./canvasUtils-
|
|
1
|
+
import { B as e, C as t, D as n, M as r, N as i, Q as a, R as o, U as s, V as c, W as l, _ as u, at as d, b as f, it as p, j as m, x as h, y as g } from "./Geometry-BM7su788.js";
|
|
2
|
+
import { r as _ } from "./canvasUtils-C0wKvLC1.js";
|
|
3
3
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/utils/addMaskBounds.mjs
|
|
4
4
|
var v = new e();
|
|
5
5
|
function y(e, t, n) {
|
|
6
6
|
let r = v;
|
|
7
|
-
e.measurable = !0,
|
|
7
|
+
e.measurable = !0, m(e, n, r), t.addBoundsMask(r), e.measurable = !1;
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/utils/addMaskLocalBounds.mjs
|
|
@@ -46,7 +46,7 @@ var S = class {
|
|
|
46
46
|
return e instanceof h;
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
S.extension =
|
|
49
|
+
S.extension = p.MaskEffect;
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/color/ColorMask.mjs
|
|
52
52
|
var C = class {
|
|
@@ -61,7 +61,7 @@ var C = class {
|
|
|
61
61
|
return typeof e == "number";
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
C.extension =
|
|
64
|
+
C.extension = p.MaskEffect;
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/stencil/StencilMask.mjs
|
|
67
67
|
var w = class {
|
|
@@ -91,13 +91,13 @@ var w = class {
|
|
|
91
91
|
return e instanceof t;
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
w.extension =
|
|
94
|
+
w.extension = p.MaskEffect;
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/browser/detectVideoAlphaMode.mjs
|
|
97
97
|
var T;
|
|
98
98
|
async function E() {
|
|
99
99
|
return T ??= (async () => {
|
|
100
|
-
let e =
|
|
100
|
+
let e = f.get().createCanvas(1, 1).getContext("webgl");
|
|
101
101
|
if (!e) return "premultiply-alpha-on-upload";
|
|
102
102
|
let t = await new Promise((e) => {
|
|
103
103
|
let t = document.createElement("video");
|
|
@@ -201,7 +201,7 @@ var D = class e extends l {
|
|
|
201
201
|
return globalThis.HTMLVideoElement && e instanceof HTMLVideoElement;
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
D.extension =
|
|
204
|
+
D.extension = p.TextureSource, D.defaultOptions = {
|
|
205
205
|
...l.defaultOptions,
|
|
206
206
|
autoLoad: !0,
|
|
207
207
|
autoPlay: !0,
|
|
@@ -270,7 +270,7 @@ var O = D, k = (e, t, n = !1) => (Array.isArray(e) || (e = [e]), t ? e.map((e) =
|
|
|
270
270
|
return this._parsers;
|
|
271
271
|
}
|
|
272
272
|
}(), j = [];
|
|
273
|
-
|
|
273
|
+
d.handleByList(p.TextureSource, j);
|
|
274
274
|
function M(e = {}) {
|
|
275
275
|
let t = e && e.resource, n = t ? e.resource : e, r = t ? e : { resource: e };
|
|
276
276
|
for (let e = 0; e < j.length; e++) {
|
|
@@ -292,7 +292,7 @@ function P(e, t = !1) {
|
|
|
292
292
|
}
|
|
293
293
|
//#endregion
|
|
294
294
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/init.mjs
|
|
295
|
-
c.from = P, l.from = M,
|
|
295
|
+
c.from = P, l.from = M, d.add(S, C, w, O, _, g, s);
|
|
296
296
|
//#endregion
|
|
297
297
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/assets/loader/parsers/LoaderParser.mjs
|
|
298
298
|
var F = /* @__PURE__ */ ((e) => (e[e.Low = 0] = "Low", e[e.Normal = 1] = "Normal", e[e.High = 2] = "High", e))(F || {});
|
|
@@ -364,7 +364,7 @@ var V = {
|
|
|
364
364
|
},
|
|
365
365
|
toAbsolute(e, t, n) {
|
|
366
366
|
if (I(e), this.isDataUrl(e) || this.isBlobUrl(e)) return e;
|
|
367
|
-
let r = L(this.toPosix(t ??
|
|
367
|
+
let r = L(this.toPosix(t ?? f.get().getBaseUrl())), i = L(this.toPosix(n ?? this.rootname(r)));
|
|
368
368
|
return e = this.toPosix(e), e.startsWith("/") ? V.join(i, e.slice(1)) : this.isAbsolute(e) ? e : this.join(r, e);
|
|
369
369
|
},
|
|
370
370
|
normalize(e) {
|
|
@@ -800,14 +800,14 @@ function Z(e, t, n) {
|
|
|
800
800
|
return r;
|
|
801
801
|
}
|
|
802
802
|
var Q = {
|
|
803
|
-
extension:
|
|
803
|
+
extension: p.Asset,
|
|
804
804
|
cache: {
|
|
805
805
|
test: (e) => e instanceof Y,
|
|
806
806
|
getCacheableAssets: (e, t) => Z(e, t, !1)
|
|
807
807
|
},
|
|
808
808
|
resolver: {
|
|
809
809
|
extension: {
|
|
810
|
-
type:
|
|
810
|
+
type: p.ResolveParser,
|
|
811
811
|
name: "resolveSpritesheet"
|
|
812
812
|
},
|
|
813
813
|
test: (e) => {
|
|
@@ -827,7 +827,7 @@ var Q = {
|
|
|
827
827
|
name: "spritesheetLoader",
|
|
828
828
|
id: "spritesheet",
|
|
829
829
|
extension: {
|
|
830
|
-
type:
|
|
830
|
+
type: p.LoadParser,
|
|
831
831
|
priority: F.Normal,
|
|
832
832
|
name: "spritesheetLoader"
|
|
833
833
|
},
|
|
@@ -880,5 +880,6 @@ var Q = {
|
|
|
880
880
|
};
|
|
881
881
|
//#endregion
|
|
882
882
|
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/spritesheet/init.mjs
|
|
883
|
-
|
|
883
|
+
d.add(Q);
|
|
884
884
|
//#endregion
|
|
885
|
+
export { A as t };
|