holostaff-widget 2.1.3 → 2.1.5
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/{BufferResource-Drqe9ZKX.js → BufferResource-OZ5Ul2Z8.js} +2 -2
- package/dist/{BufferResource-Drqe9ZKX.js.map → BufferResource-OZ5Ul2Z8.js.map} +1 -1
- package/dist/{CanvasRenderer-COWnLCuX.js → CanvasRenderer-CD425hkf.js} +3 -3
- package/dist/{CanvasRenderer-COWnLCuX.js.map → CanvasRenderer-CD425hkf.js.map} +1 -1
- package/dist/{RenderTargetSystem-LdwnobMn.js → RenderTargetSystem-DCdLBRV6.js} +2 -2
- package/dist/{RenderTargetSystem-LdwnobMn.js.map → RenderTargetSystem-DCdLBRV6.js.map} +1 -1
- package/dist/{WebGLRenderer-clYIdI4A.js → WebGLRenderer-Dzf9OyZQ.js} +4 -4
- package/dist/{WebGLRenderer-clYIdI4A.js.map → WebGLRenderer-Dzf9OyZQ.js.map} +1 -1
- package/dist/{WebGPURenderer-JogCv1An.js → WebGPURenderer-CYMkZfQR.js} +4 -4
- package/dist/{WebGPURenderer-JogCv1An.js.map → WebGPURenderer-CYMkZfQR.js.map} +1 -1
- package/dist/{browserAll-Cn0_K3iB.js → browserAll-D-2sjrzE.js} +3 -3
- package/dist/{browserAll-Cn0_K3iB.js.map → browserAll-D-2sjrzE.js.map} +1 -1
- package/dist/hs-widget.es.js +1 -1
- package/dist/hs-widget.umd.js +28 -27
- package/dist/hs-widget.umd.js.map +1 -1
- package/dist/{index-DKhmD0G-.js → index-BFRj2AUJ.js} +166 -169
- package/dist/{index-DKhmD0G-.js.map → index-BFRj2AUJ.js.map} +1 -1
- package/dist/{webworkerAll-u4U5Puve.js → webworkerAll-BpL8oe51.js} +2 -2
- package/dist/{webworkerAll-u4U5Puve.js.map → webworkerAll-BpL8oe51.js.map} +1 -1
- package/package.json +1 -1
|
@@ -76,7 +76,7 @@ const Ms = (s) => {
|
|
|
76
76
|
else
|
|
77
77
|
throw new Error("Invalid extension type");
|
|
78
78
|
return typeof s.type == "string" && (s.type = [s.type]), s;
|
|
79
|
-
},
|
|
79
|
+
}, yi = (s, t) => Ms(s).priority ?? t, ut = {
|
|
80
80
|
/** @ignore */
|
|
81
81
|
_addHandlers: {},
|
|
82
82
|
/** @ignore */
|
|
@@ -194,7 +194,7 @@ const Ms = (s) => {
|
|
|
194
194
|
return this.handle(
|
|
195
195
|
s,
|
|
196
196
|
(i) => {
|
|
197
|
-
t.findIndex((r) => r.name === i.name) >= 0 || (t.push({ name: i.name, value: i.ref }), t.sort((r, o) =>
|
|
197
|
+
t.findIndex((r) => r.name === i.name) >= 0 || (t.push({ name: i.name, value: i.ref }), t.sort((r, o) => yi(o.value, e) - yi(r.value, e)));
|
|
198
198
|
},
|
|
199
199
|
(i) => {
|
|
200
200
|
const n = t.findIndex((r) => r.name === i.name);
|
|
@@ -214,7 +214,7 @@ const Ms = (s) => {
|
|
|
214
214
|
return this.handle(
|
|
215
215
|
s,
|
|
216
216
|
(i) => {
|
|
217
|
-
t.includes(i.ref) || (t.push(i.ref), t.sort((n, r) =>
|
|
217
|
+
t.includes(i.ref) || (t.push(i.ref), t.sort((n, r) => yi(r, e) - yi(n, e)));
|
|
218
218
|
},
|
|
219
219
|
(i) => {
|
|
220
220
|
const n = t.indexOf(i.ref);
|
|
@@ -274,7 +274,7 @@ const Ms = (s) => {
|
|
|
274
274
|
},
|
|
275
275
|
test: () => !0,
|
|
276
276
|
load: async () => {
|
|
277
|
-
await import("./browserAll-
|
|
277
|
+
await import("./browserAll-D-2sjrzE.js");
|
|
278
278
|
}
|
|
279
279
|
}, Na = {
|
|
280
280
|
extension: {
|
|
@@ -284,7 +284,7 @@ const Ms = (s) => {
|
|
|
284
284
|
},
|
|
285
285
|
test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
|
|
286
286
|
load: async () => {
|
|
287
|
-
await import("./webworkerAll-
|
|
287
|
+
await import("./webworkerAll-BpL8oe51.js");
|
|
288
288
|
}
|
|
289
289
|
};
|
|
290
290
|
class xt {
|
|
@@ -1364,13 +1364,13 @@ class q {
|
|
|
1364
1364
|
return Ga.identity();
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
|
-
const Ga = new q(), Wa = new q(), _e = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], ye = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], xe = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], be = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], ks = [], $r = [],
|
|
1367
|
+
const Ga = new q(), Wa = new q(), _e = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], ye = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], xe = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], be = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], ks = [], $r = [], xi = Math.sign;
|
|
1368
1368
|
function Ha() {
|
|
1369
1369
|
for (let s = 0; s < 16; s++) {
|
|
1370
1370
|
const t = [];
|
|
1371
1371
|
ks.push(t);
|
|
1372
1372
|
for (let e = 0; e < 16; e++) {
|
|
1373
|
-
const i =
|
|
1373
|
+
const i = xi(_e[s] * _e[e] + xe[s] * ye[e]), n = xi(ye[s] * _e[e] + be[s] * ye[e]), r = xi(_e[s] * xe[e] + xe[s] * be[e]), o = xi(ye[s] * xe[e] + be[s] * be[e]);
|
|
1374
1374
|
for (let a = 0; a < 16; a++)
|
|
1375
1375
|
if (_e[a] === i && ye[a] === n && xe[a] === r && be[a] === o) {
|
|
1376
1376
|
t.push(a);
|
|
@@ -1612,8 +1612,8 @@ const Q = {
|
|
|
1612
1612
|
o
|
|
1613
1613
|
) : i.set(n + h, r + l, o, a);
|
|
1614
1614
|
}
|
|
1615
|
-
},
|
|
1616
|
-
class
|
|
1615
|
+
}, bi = [new Et(), new Et(), new Et(), new Et()];
|
|
1616
|
+
class lt {
|
|
1617
1617
|
/**
|
|
1618
1618
|
* @param x - The X coordinate of the upper-left corner of the rectangle
|
|
1619
1619
|
* @param y - The Y coordinate of the upper-left corner of the rectangle
|
|
@@ -1746,7 +1746,7 @@ class ct {
|
|
|
1746
1746
|
* @see {@link Rectangle.isEmpty} For empty state testing
|
|
1747
1747
|
*/
|
|
1748
1748
|
static get EMPTY() {
|
|
1749
|
-
return new
|
|
1749
|
+
return new lt(0, 0, 0, 0);
|
|
1750
1750
|
}
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Creates a clone of this Rectangle
|
|
@@ -1770,7 +1770,7 @@ class ct {
|
|
|
1770
1770
|
* @see {@link Rectangle.copyTo} For copying to another rectangle
|
|
1771
1771
|
*/
|
|
1772
1772
|
clone() {
|
|
1773
|
-
return new
|
|
1773
|
+
return new lt(this.x, this.y, this.width, this.height);
|
|
1774
1774
|
}
|
|
1775
1775
|
/**
|
|
1776
1776
|
* Converts a Bounds object to a Rectangle object.
|
|
@@ -1931,7 +1931,7 @@ class ct {
|
|
|
1931
1931
|
const i = this.left, n = this.right, r = this.top, o = this.bottom;
|
|
1932
1932
|
if (n <= i || o <= r)
|
|
1933
1933
|
return !1;
|
|
1934
|
-
const a =
|
|
1934
|
+
const a = bi[0].set(t.left, t.top), h = bi[1].set(t.left, t.bottom), l = bi[2].set(t.right, t.top), c = bi[3].set(t.right, t.bottom);
|
|
1935
1935
|
if (l.x <= a.x || h.y <= a.y)
|
|
1936
1936
|
return !1;
|
|
1937
1937
|
const u = Math.sign(e.a * e.d - e.b * e.c);
|
|
@@ -2079,7 +2079,7 @@ class ct {
|
|
|
2079
2079
|
* @see {@link Rectangle.clone} For creating new copy
|
|
2080
2080
|
*/
|
|
2081
2081
|
getBounds(t) {
|
|
2082
|
-
return t || (t = new
|
|
2082
|
+
return t || (t = new lt()), t.copyFrom(this), t;
|
|
2083
2083
|
}
|
|
2084
2084
|
/**
|
|
2085
2085
|
* Determines whether another Rectangle is fully contained within this Rectangle.
|
|
@@ -2145,7 +2145,7 @@ class ct {
|
|
|
2145
2145
|
const es = {
|
|
2146
2146
|
default: -1
|
|
2147
2147
|
};
|
|
2148
|
-
function
|
|
2148
|
+
function ct(s = "default") {
|
|
2149
2149
|
return es[s] === void 0 && (es[s] = -1), ++es[s];
|
|
2150
2150
|
}
|
|
2151
2151
|
const bn = /* @__PURE__ */ new Set(), ht = "8.0.0", $a = "8.3.4", De = {
|
|
@@ -2200,7 +2200,7 @@ function Vr(s) {
|
|
|
2200
2200
|
const En = /* @__PURE__ */ Object.create(null);
|
|
2201
2201
|
function za(s) {
|
|
2202
2202
|
const t = En[s];
|
|
2203
|
-
return t === void 0 && (En[s] =
|
|
2203
|
+
return t === void 0 && (En[s] = ct("resource")), t;
|
|
2204
2204
|
}
|
|
2205
2205
|
const jr = class Yr extends Xt {
|
|
2206
2206
|
/**
|
|
@@ -2262,7 +2262,7 @@ const Xr = class qr extends Xt {
|
|
|
2262
2262
|
* @param options - options for creating a new TextureSource
|
|
2263
2263
|
*/
|
|
2264
2264
|
constructor(t = {}) {
|
|
2265
|
-
super(), this.options = t, this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.uid =
|
|
2265
|
+
super(), this.options = t, this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.uid = ct("textureSource"), this._resourceType = "textureSource", this._resourceId = ct("resource"), this.uploadMethodId = "unknown", this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1, this.sampleCount = 1, this.mipLevelCount = 1, this.autoGenerateMipmaps = !1, this.format = "rgba8unorm", this.dimension = "2d", this.viewDimension = "2d", this.arrayLayerCount = 1, this.antialias = !1, this._touched = 0, this._batchTick = -1, this._textureBindLocation = -1, t = { ...qr.defaultOptions, ...t }, this.label = t.label ?? "", this.resource = t.resource, this.autoGarbageCollect = t.autoGarbageCollect, this._resolution = t.resolution, t.width ? this.pixelWidth = t.width * this._resolution : this.pixelWidth = this.resource ? this.resourceWidth ?? 1 : 1, t.height ? this.pixelHeight = t.height * this._resolution : this.pixelHeight = this.resource ? this.resourceHeight ?? 1 : 1, this.width = this.pixelWidth / this._resolution, this.height = this.pixelHeight / this._resolution, this.format = t.format, this.dimension = t.dimensions, this.viewDimension = t.viewDimension ?? t.dimensions, this.arrayLayerCount = t.arrayLayerCount, this.mipLevelCount = t.mipLevelCount, this.autoGenerateMipmaps = t.autoGenerateMipmaps, this.sampleCount = t.sampleCount, this.antialias = t.antialias, this.alphaMode = t.alphaMode, this.style = new We(Vr(t)), this.destroyed = !1, this._refreshPOT();
|
|
2266
2266
|
}
|
|
2267
2267
|
/** returns itself */
|
|
2268
2268
|
get source() {
|
|
@@ -2353,7 +2353,7 @@ const Xr = class qr extends Xt {
|
|
|
2353
2353
|
*/
|
|
2354
2354
|
unload() {
|
|
2355
2355
|
var t, e;
|
|
2356
|
-
this._resourceId =
|
|
2356
|
+
this._resourceId = ct("resource"), this.emit("change", this), this.emit("unload", this);
|
|
2357
2357
|
for (const i in this._gpuData)
|
|
2358
2358
|
(e = (t = this._gpuData[i]) == null ? void 0 : t.destroy) == null || e.call(t);
|
|
2359
2359
|
this._gpuData = /* @__PURE__ */ Object.create(null);
|
|
@@ -2391,7 +2391,7 @@ const Xr = class qr extends Xt {
|
|
|
2391
2391
|
resize(t, e, i) {
|
|
2392
2392
|
i || (i = this._resolution), t || (t = this.width), e || (e = this.height);
|
|
2393
2393
|
const n = Math.round(t * i), r = Math.round(e * i);
|
|
2394
|
-
return this.width = n / i, this.height = r / i, this._resolution = i, this.pixelWidth === n && this.pixelHeight === r ? !1 : (this._refreshPOT(), this.pixelWidth = n, this.pixelHeight = r, this.emit("resize", this), this._resourceId =
|
|
2394
|
+
return this.width = n / i, this.height = r / i, this._resolution = i, this.pixelWidth === n && this.pixelHeight === r ? !1 : (this._refreshPOT(), this.pixelWidth = n, this.pixelHeight = r, this.emit("resize", this), this._resourceId = ct("resource"), this.emit("change", this), !0);
|
|
2395
2395
|
}
|
|
2396
2396
|
/**
|
|
2397
2397
|
* Lets the renderer know that this texture has been updated and its mipmaps should be re-generated.
|
|
@@ -2528,7 +2528,7 @@ class J extends Xt {
|
|
|
2528
2528
|
rotate: h,
|
|
2529
2529
|
dynamic: l
|
|
2530
2530
|
} = {}) {
|
|
2531
|
-
if (super(), this.uid =
|
|
2531
|
+
if (super(), this.uid = ct("texture"), this.uvs = { x0: 0, y0: 0, x1: 0, y1: 0, x2: 0, y2: 0, x3: 0, y3: 0 }, this.frame = new lt(), this.noFrame = !1, this.dynamic = !1, this.isTexture = !0, this.label = e, this.source = (t == null ? void 0 : t.source) ?? new Ut(), this.noFrame = !i, i)
|
|
2532
2532
|
this.frame.copyFrom(i);
|
|
2533
2533
|
else {
|
|
2534
2534
|
const { width: c, height: u } = this._source;
|
|
@@ -2668,7 +2668,7 @@ class Ft {
|
|
|
2668
2668
|
* @see {@link Bounds.isEmpty} For bounds validation
|
|
2669
2669
|
*/
|
|
2670
2670
|
get rectangle() {
|
|
2671
|
-
this._rectangle || (this._rectangle = new
|
|
2671
|
+
this._rectangle || (this._rectangle = new lt());
|
|
2672
2672
|
const t = this._rectangle;
|
|
2673
2673
|
return this.minX > this.maxX || this.minY > this.maxY ? (t.x = 0, t.y = 0, t.width = 0, t.height = 0) : t.copyFromBounds(this), t;
|
|
2674
2674
|
}
|
|
@@ -3236,7 +3236,7 @@ var ja = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Jt = function(s) {
|
|
|
3236
3236
|
return { r: Bt(s.r, 0, 255), g: Bt(s.g, 0, 255), b: Bt(s.b, 0, 255), a: Bt(s.a) };
|
|
3237
3237
|
}, is = function(s) {
|
|
3238
3238
|
return { r: _t(s.r), g: _t(s.g), b: _t(s.b), a: _t(s.a, 3) };
|
|
3239
|
-
}, Ya = /^#([0-9a-f]{3,8})$/i,
|
|
3239
|
+
}, Ya = /^#([0-9a-f]{3,8})$/i, Si = function(s) {
|
|
3240
3240
|
var t = s.toString(16);
|
|
3241
3241
|
return t.length < 2 ? "0" + t : t;
|
|
3242
3242
|
}, Zr = function(s) {
|
|
@@ -3312,7 +3312,7 @@ var ja = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Jt = function(s) {
|
|
|
3312
3312
|
}, s.prototype.isLight = function() {
|
|
3313
3313
|
return ns(this.rgba) >= 0.5;
|
|
3314
3314
|
}, s.prototype.toHex = function() {
|
|
3315
|
-
return t = is(this.rgba), e = t.r, i = t.g, n = t.b, o = (r = t.a) < 1 ?
|
|
3315
|
+
return t = is(this.rgba), e = t.r, i = t.g, n = t.b, o = (r = t.a) < 1 ? Si(_t(255 * r)) : "", "#" + Si(e) + Si(i) + Si(n) + o;
|
|
3316
3316
|
var t, e, i, n, r, o;
|
|
3317
3317
|
}, s.prototype.toRgb = function() {
|
|
3318
3318
|
return is(this.rgba);
|
|
@@ -4066,7 +4066,7 @@ const Pn = 500;
|
|
|
4066
4066
|
function Tt(...s) {
|
|
4067
4067
|
rs !== Pn && (rs++, rs === Pn ? console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.") : console.warn("PixiJS Warning: ", ...s));
|
|
4068
4068
|
}
|
|
4069
|
-
const
|
|
4069
|
+
const pi = {
|
|
4070
4070
|
/**
|
|
4071
4071
|
* Set of registered pools and cleanable objects.
|
|
4072
4072
|
* @private
|
|
@@ -4236,7 +4236,7 @@ class sh {
|
|
|
4236
4236
|
}
|
|
4237
4237
|
}
|
|
4238
4238
|
const Rt = new sh();
|
|
4239
|
-
|
|
4239
|
+
pi.register(Rt);
|
|
4240
4240
|
const nh = {
|
|
4241
4241
|
get isCachedAsTexture() {
|
|
4242
4242
|
var s;
|
|
@@ -4580,7 +4580,7 @@ const Nn = 16777215;
|
|
|
4580
4580
|
function Bn(s, t) {
|
|
4581
4581
|
return s === Nn ? t : t === Nn ? s : io(s, t);
|
|
4582
4582
|
}
|
|
4583
|
-
function
|
|
4583
|
+
function Ni(s) {
|
|
4584
4584
|
return ((s & 255) << 16) + (s & 65280) + (s >> 16 & 255);
|
|
4585
4585
|
}
|
|
4586
4586
|
const fh = {
|
|
@@ -4601,13 +4601,13 @@ const fh = {
|
|
|
4601
4601
|
},
|
|
4602
4602
|
getGlobalTint(s) {
|
|
4603
4603
|
if (s)
|
|
4604
|
-
return this.renderGroup ?
|
|
4604
|
+
return this.renderGroup ? Ni(this.renderGroup.worldColor) : this.parentRenderGroup ? Ni(
|
|
4605
4605
|
Bn(this.localColor, this.parentRenderGroup.worldColor)
|
|
4606
4606
|
) : this.tint;
|
|
4607
4607
|
let t = this.localColor, e = this.parent;
|
|
4608
4608
|
for (; e; )
|
|
4609
4609
|
t = Bn(t, e.localColor), e = e.parent;
|
|
4610
|
-
return
|
|
4610
|
+
return Ni(t);
|
|
4611
4611
|
}
|
|
4612
4612
|
};
|
|
4613
4613
|
function so(s, t, e) {
|
|
@@ -4721,7 +4721,7 @@ const xh = {
|
|
|
4721
4721
|
};
|
|
4722
4722
|
class en {
|
|
4723
4723
|
constructor() {
|
|
4724
|
-
this.uid =
|
|
4724
|
+
this.uid = ct("instructionSet"), this.instructions = [], this.instructionSize = 0, this.renderables = [], this.gcTick = 0;
|
|
4725
4725
|
}
|
|
4726
4726
|
/** reset the instruction set so it can be reused set size back to 0 */
|
|
4727
4727
|
reset() {
|
|
@@ -4842,7 +4842,7 @@ class Sh {
|
|
|
4842
4842
|
}
|
|
4843
4843
|
}
|
|
4844
4844
|
const zi = new Sh();
|
|
4845
|
-
|
|
4845
|
+
pi.register(zi);
|
|
4846
4846
|
class Eh {
|
|
4847
4847
|
constructor() {
|
|
4848
4848
|
this.renderPipeId = "renderGroup", this.root = null, this.canBundle = !1, this.renderGroupParent = null, this.renderGroupChildren = [], this.worldTransform = new q(), this.worldColorAlpha = 4294967295, this.worldColor = 16777215, this.worldAlpha = 1, this.childrenToUpdate = /* @__PURE__ */ Object.create(null), this.updateTick = 0, this.gcTick = 0, this.childrenRenderablesToUpdate = { list: [], index: 0 }, this.structureDidChange = !0, this.instructionSet = new en(), this._onRenderContainers = [], this.textureNeedsUpdate = !0, this.isCachedAsTexture = !1, this._matrixDirty = 7;
|
|
@@ -5002,11 +5002,11 @@ function Ch(s, t, e = {}) {
|
|
|
5002
5002
|
for (const i in t)
|
|
5003
5003
|
!e[i] && t[i] !== void 0 && (s[i] = t[i]);
|
|
5004
5004
|
}
|
|
5005
|
-
const os = new xt(null),
|
|
5005
|
+
const os = new xt(null), Ei = new xt(null), as = new xt(null, 1, 1), Ci = new xt(null), Dn = 1, wh = 2, hs = 4;
|
|
5006
5006
|
class Lt extends Xt {
|
|
5007
5007
|
constructor(t = {}) {
|
|
5008
5008
|
var e, i;
|
|
5009
|
-
super(), this.uid =
|
|
5009
|
+
super(), this.uid = ct("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.parentRenderLayer = null, this.updateTick = -1, this.localTransform = new q(), this.relativeGroupTransform = new q(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new xt(this, 0, 0), this._scale = as, this._pivot = Ei, this._origin = Ci, this._skew = os, this._cx = 1, this._sx = 0, this._cy = 0, this._sy = 1, this._rotation = 0, this.localColor = 16777215, this.localAlpha = 1, this.groupAlpha = 1, this.groupColor = 16777215, this.groupColorAlpha = 4294967295, this.localBlendMode = "inherit", this.groupBlendMode = "normal", this.localDisplayStatus = 7, this.globalDisplayStatus = 7, this._didContainerChangeTick = 0, this._didViewChangeTick = 0, this._didLocalTransformChangeId = -1, this.effects = [], Ch(this, t, {
|
|
5010
5010
|
children: !0,
|
|
5011
5011
|
parent: !0,
|
|
5012
5012
|
effects: !0
|
|
@@ -5267,10 +5267,10 @@ class Lt extends Xt {
|
|
|
5267
5267
|
* @since 4.0.0
|
|
5268
5268
|
*/
|
|
5269
5269
|
get pivot() {
|
|
5270
|
-
return this._pivot ===
|
|
5270
|
+
return this._pivot === Ei && (this._pivot = new xt(this, 0, 0)), this._pivot;
|
|
5271
5271
|
}
|
|
5272
5272
|
set pivot(t) {
|
|
5273
|
-
this._pivot ===
|
|
5273
|
+
this._pivot === Ei && (this._pivot = new xt(this, 0, 0), this._origin !== Ci && Tt("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")), typeof t == "number" ? this._pivot.set(t) : this._pivot.copyFrom(t);
|
|
5274
5274
|
}
|
|
5275
5275
|
/**
|
|
5276
5276
|
* The skew factor for the object in radians. Skewing is a transformation that distorts
|
|
@@ -5343,10 +5343,10 @@ class Lt extends Xt {
|
|
|
5343
5343
|
* ```
|
|
5344
5344
|
*/
|
|
5345
5345
|
get origin() {
|
|
5346
|
-
return this._origin ===
|
|
5346
|
+
return this._origin === Ci && (this._origin = new xt(this, 0, 0)), this._origin;
|
|
5347
5347
|
}
|
|
5348
5348
|
set origin(t) {
|
|
5349
|
-
this._origin ===
|
|
5349
|
+
this._origin === Ci && (this._origin = new xt(this, 0, 0), this._pivot !== Ei && Tt("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")), typeof t == "number" ? this._origin.set(t) : this._origin.copyFrom(t);
|
|
5350
5350
|
}
|
|
5351
5351
|
/**
|
|
5352
5352
|
* The width of the Container, setting this will actually modify the scale to achieve the value set.
|
|
@@ -5581,7 +5581,7 @@ class Lt extends Xt {
|
|
|
5581
5581
|
* @see {@link Container#visible} For visibility control
|
|
5582
5582
|
*/
|
|
5583
5583
|
get tint() {
|
|
5584
|
-
return
|
|
5584
|
+
return Ni(this.localColor);
|
|
5585
5585
|
}
|
|
5586
5586
|
// / //////////////// blend related stuff
|
|
5587
5587
|
set blendMode(t) {
|
|
@@ -6203,7 +6203,7 @@ class fo extends Ut {
|
|
|
6203
6203
|
}
|
|
6204
6204
|
}
|
|
6205
6205
|
fo.extension = j.TextureSource;
|
|
6206
|
-
class
|
|
6206
|
+
class Di extends Ut {
|
|
6207
6207
|
constructor(t) {
|
|
6208
6208
|
super(t), this.uploadMethodId = "image", this.autoGarbageCollect = !0;
|
|
6209
6209
|
}
|
|
@@ -6211,8 +6211,8 @@ class Li extends Ut {
|
|
|
6211
6211
|
return globalThis.HTMLImageElement && t instanceof HTMLImageElement || typeof ImageBitmap < "u" && t instanceof ImageBitmap || globalThis.VideoFrame && t instanceof VideoFrame;
|
|
6212
6212
|
}
|
|
6213
6213
|
}
|
|
6214
|
-
|
|
6215
|
-
var
|
|
6214
|
+
Di.extension = j.TextureSource;
|
|
6215
|
+
var Li = /* @__PURE__ */ ((s) => (s[s.INTERACTION = 50] = "INTERACTION", s[s.HIGH = 25] = "HIGH", s[s.NORMAL = 0] = "NORMAL", s[s.LOW = -25] = "LOW", s[s.UTILITY = -50] = "UTILITY", s))(Li || {});
|
|
6216
6216
|
class ls {
|
|
6217
6217
|
/**
|
|
6218
6218
|
* Constructor
|
|
@@ -6312,7 +6312,7 @@ const po = class Ot {
|
|
|
6312
6312
|
* });
|
|
6313
6313
|
* ```
|
|
6314
6314
|
*/
|
|
6315
|
-
add(t, e, i =
|
|
6315
|
+
add(t, e, i = Li.NORMAL) {
|
|
6316
6316
|
return this._addListener(new ls(t, e, i));
|
|
6317
6317
|
}
|
|
6318
6318
|
/**
|
|
@@ -6350,7 +6350,7 @@ const po = class Ot {
|
|
|
6350
6350
|
* @see {@link Ticker#add} For continuous updates
|
|
6351
6351
|
* @see {@link Ticker#remove} For removing handlers
|
|
6352
6352
|
*/
|
|
6353
|
-
addOnce(t, e, i =
|
|
6353
|
+
addOnce(t, e, i = Li.NORMAL) {
|
|
6354
6354
|
return this._addListener(new ls(t, e, i, !0));
|
|
6355
6355
|
}
|
|
6356
6356
|
/**
|
|
@@ -6986,7 +6986,7 @@ function kh(s, t = !1) {
|
|
|
6986
6986
|
}
|
|
6987
6987
|
J.from = kh;
|
|
6988
6988
|
Ut.from = go;
|
|
6989
|
-
ut.add(lo, co, uo, Ih,
|
|
6989
|
+
ut.add(lo, co, uo, Ih, Di, fo, Qs);
|
|
6990
6990
|
var _o = /* @__PURE__ */ ((s) => (s[s.Low = 0] = "Low", s[s.Normal = 1] = "Normal", s[s.High = 2] = "High", s))(_o || {});
|
|
6991
6991
|
function Gt(s) {
|
|
6992
6992
|
if (typeof s != "string")
|
|
@@ -7887,23 +7887,23 @@ const Un = (s, t) => {
|
|
|
7887
7887
|
const r = this._frameKeys[i], o = this._frames[r], a = o.frame;
|
|
7888
7888
|
if (a) {
|
|
7889
7889
|
let h = null, l = null;
|
|
7890
|
-
const c = o.trimmed !== !1 && o.sourceSize ? o.sourceSize : o.frame, u = new
|
|
7890
|
+
const c = o.trimmed !== !1 && o.sourceSize ? o.sourceSize : o.frame, u = new lt(
|
|
7891
7891
|
0,
|
|
7892
7892
|
0,
|
|
7893
7893
|
Math.floor(c.w) / this.resolution,
|
|
7894
7894
|
Math.floor(c.h) / this.resolution
|
|
7895
7895
|
);
|
|
7896
|
-
o.rotated ? h = new
|
|
7896
|
+
o.rotated ? h = new lt(
|
|
7897
7897
|
Math.floor(a.x) / this.resolution,
|
|
7898
7898
|
Math.floor(a.y) / this.resolution,
|
|
7899
7899
|
Math.floor(a.h) / this.resolution,
|
|
7900
7900
|
Math.floor(a.w) / this.resolution
|
|
7901
|
-
) : h = new
|
|
7901
|
+
) : h = new lt(
|
|
7902
7902
|
Math.floor(a.x) / this.resolution,
|
|
7903
7903
|
Math.floor(a.y) / this.resolution,
|
|
7904
7904
|
Math.floor(a.w) / this.resolution,
|
|
7905
7905
|
Math.floor(a.h) / this.resolution
|
|
7906
|
-
), o.trimmed !== !1 && o.spriteSourceSize && (l = new
|
|
7906
|
+
), o.trimmed !== !1 && o.spriteSourceSize && (l = new lt(
|
|
7907
7907
|
Math.floor(o.spriteSourceSize.x) / this.resolution,
|
|
7908
7908
|
Math.floor(o.spriteSourceSize.y) / this.resolution,
|
|
7909
7909
|
Math.floor(a.w) / this.resolution,
|
|
@@ -8099,14 +8099,14 @@ let Ie;
|
|
|
8099
8099
|
function Eo() {
|
|
8100
8100
|
return (!Ie || Ie != null && Ie.isContextLost()) && (Ie = Nt.get().createCanvas().getContext("webgl", {})), Ie;
|
|
8101
8101
|
}
|
|
8102
|
-
let
|
|
8102
|
+
let wi;
|
|
8103
8103
|
function Uh() {
|
|
8104
|
-
if (!
|
|
8105
|
-
|
|
8104
|
+
if (!wi) {
|
|
8105
|
+
wi = "mediump";
|
|
8106
8106
|
const s = Eo();
|
|
8107
|
-
s && s.getShaderPrecisionFormat && (
|
|
8107
|
+
s && s.getShaderPrecisionFormat && (wi = s.getShaderPrecisionFormat(s.FRAGMENT_SHADER, s.HIGH_FLOAT).precision ? "highp" : "mediump");
|
|
8108
8108
|
}
|
|
8109
|
-
return
|
|
8109
|
+
return wi;
|
|
8110
8110
|
}
|
|
8111
8111
|
function Gh(s, t, e) {
|
|
8112
8112
|
return t ? s : e ? (s = s.replace("out vec4 finalColor;", ""), `
|
|
@@ -8400,7 +8400,7 @@ function Qh(s, t) {
|
|
|
8400
8400
|
return { structs: n, groups: r };
|
|
8401
8401
|
}
|
|
8402
8402
|
const Ye = /* @__PURE__ */ Object.create(null);
|
|
8403
|
-
class
|
|
8403
|
+
class mi {
|
|
8404
8404
|
/**
|
|
8405
8405
|
* Create a new GpuProgram
|
|
8406
8406
|
* @param options - The options for the gpu program
|
|
@@ -8439,7 +8439,7 @@ class gi {
|
|
|
8439
8439
|
*/
|
|
8440
8440
|
static from(t) {
|
|
8441
8441
|
const e = `${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;
|
|
8442
|
-
return Ye[e] || (Ye[e] = new
|
|
8442
|
+
return Ye[e] || (Ye[e] = new mi(t), Ye[e]._cacheKey = e), Ye[e];
|
|
8443
8443
|
}
|
|
8444
8444
|
}
|
|
8445
8445
|
const wo = [
|
|
@@ -8519,7 +8519,7 @@ const To = class Ao {
|
|
|
8519
8519
|
* @param options - The optional parameters of this uniform group
|
|
8520
8520
|
*/
|
|
8521
8521
|
constructor(t, e) {
|
|
8522
|
-
this._touched = 0, this.uid =
|
|
8522
|
+
this._touched = 0, this.uid = ct("uniform"), this._resourceType = "uniformGroup", this._resourceId = ct("resource"), this.isUniformGroup = !0, this._dirtyId = 0, this.destroyed = !1, e = { ...Ao.defaultOptions, ...e }, this.uniformStructures = t;
|
|
8523
8523
|
const i = {};
|
|
8524
8524
|
for (const n in t) {
|
|
8525
8525
|
const r = t[n];
|
|
@@ -8551,7 +8551,7 @@ To.defaultOptions = {
|
|
|
8551
8551
|
isStatic: !1
|
|
8552
8552
|
};
|
|
8553
8553
|
let vo = To;
|
|
8554
|
-
class
|
|
8554
|
+
class Bi {
|
|
8555
8555
|
/**
|
|
8556
8556
|
* Create a new instance eof the Bind Group.
|
|
8557
8557
|
* @param resources - The resources that are bound together for use by a shader.
|
|
@@ -8628,7 +8628,7 @@ class Di {
|
|
|
8628
8628
|
var Ls = /* @__PURE__ */ ((s) => (s[s.WEBGL = 1] = "WEBGL", s[s.WEBGPU = 2] = "WEBGPU", s[s.CANVAS = 4] = "CANVAS", s[s.BOTH = 3] = "BOTH", s))(Ls || {});
|
|
8629
8629
|
class Yi extends Xt {
|
|
8630
8630
|
constructor(t) {
|
|
8631
|
-
super(), this.uid =
|
|
8631
|
+
super(), this.uid = ct("shader"), this._uniformBindMap = /* @__PURE__ */ Object.create(null), this._ownedBindGroups = [], this._destroyed = !1;
|
|
8632
8632
|
let {
|
|
8633
8633
|
gpuProgram: e,
|
|
8634
8634
|
glProgram: i,
|
|
@@ -8664,13 +8664,13 @@ class Yi extends Xt {
|
|
|
8664
8664
|
});
|
|
8665
8665
|
let l = 0;
|
|
8666
8666
|
for (const c in r)
|
|
8667
|
-
h[c] || (n[99] || (n[99] = new
|
|
8667
|
+
h[c] || (n[99] || (n[99] = new Bi(), this._ownedBindGroups.push(n[99])), h[c] = { group: 99, binding: l, name: c }, a[99] = a[99] || {}, a[99][l] = c, l++);
|
|
8668
8668
|
for (const c in r) {
|
|
8669
8669
|
const u = c;
|
|
8670
8670
|
let m = r[c];
|
|
8671
8671
|
!m.source && !m._resourceType && (m = new vo(m));
|
|
8672
8672
|
const p = h[u];
|
|
8673
|
-
p && (n[p.group] || (n[p.group] = new
|
|
8673
|
+
p && (n[p.group] || (n[p.group] = new Bi(), this._ownedBindGroups.push(n[p.group])), n[p.group].setResource(m, p.binding));
|
|
8674
8674
|
}
|
|
8675
8675
|
}
|
|
8676
8676
|
this.groups = n, this._uniformBindMap = a, this.resources = this._buildResourceAccessor(n, h);
|
|
@@ -8684,7 +8684,7 @@ class Yi extends Xt {
|
|
|
8684
8684
|
*/
|
|
8685
8685
|
addResource(t, e, i) {
|
|
8686
8686
|
var n, r;
|
|
8687
|
-
(n = this._uniformBindMap)[e] || (n[e] = {}), (r = this._uniformBindMap[e])[i] || (r[i] = t), this.groups[e] || (this.groups[e] = new
|
|
8687
|
+
(n = this._uniformBindMap)[e] || (n[e] = {}), (r = this._uniformBindMap[e])[i] || (r[i] = t), this.groups[e] || (this.groups[e] = new Bi(), this._ownedBindGroups.push(this.groups[e]));
|
|
8688
8688
|
}
|
|
8689
8689
|
_buildResourceAccessor(t, e) {
|
|
8690
8690
|
const i = {};
|
|
@@ -8716,7 +8716,7 @@ class Yi extends Xt {
|
|
|
8716
8716
|
static from(t) {
|
|
8717
8717
|
const { gpu: e, gl: i, ...n } = t;
|
|
8718
8718
|
let r, o;
|
|
8719
|
-
return e && (r =
|
|
8719
|
+
return e && (r = mi.from(e)), i && (o = ji.from(i)), new Yi({
|
|
8720
8720
|
gpuProgram: r,
|
|
8721
8721
|
glProgram: o,
|
|
8722
8722
|
...n
|
|
@@ -8881,7 +8881,7 @@ const Ro = class Us extends Yi {
|
|
|
8881
8881
|
static from(t) {
|
|
8882
8882
|
const { gpu: e, gl: i, ...n } = t;
|
|
8883
8883
|
let r, o;
|
|
8884
|
-
return e && (r =
|
|
8884
|
+
return e && (r = mi.from(e)), i && (o = ji.from(i)), new Us({
|
|
8885
8885
|
gpuProgram: r,
|
|
8886
8886
|
glProgram: o,
|
|
8887
8887
|
...n
|
|
@@ -9139,13 +9139,13 @@ function $e(s, t) {
|
|
|
9139
9139
|
return s.x === t.x && s.y === t.y;
|
|
9140
9140
|
}
|
|
9141
9141
|
function Po(s, t, e, i) {
|
|
9142
|
-
const n =
|
|
9143
|
-
return !!(n !== r && o !== a || n === 0 &&
|
|
9142
|
+
const n = Ai(st(s, t, e)), r = Ai(st(s, t, i)), o = Ai(st(e, i, s)), a = Ai(st(e, i, t));
|
|
9143
|
+
return !!(n !== r && o !== a || n === 0 && Ti(s, e, t) || r === 0 && Ti(s, i, t) || o === 0 && Ti(e, s, i) || a === 0 && Ti(e, t, i));
|
|
9144
9144
|
}
|
|
9145
|
-
function
|
|
9145
|
+
function Ti(s, t, e) {
|
|
9146
9146
|
return t.x <= Math.max(s.x, e.x) && t.x >= Math.min(s.x, e.x) && t.y <= Math.max(s.y, e.y) && t.y >= Math.min(s.y, e.y);
|
|
9147
9147
|
}
|
|
9148
|
-
function
|
|
9148
|
+
function Ai(s) {
|
|
9149
9149
|
return s > 0 ? 1 : s < 0 ? -1 : 0;
|
|
9150
9150
|
}
|
|
9151
9151
|
function xl(s, t) {
|
|
@@ -9302,7 +9302,7 @@ const wl = [
|
|
|
9302
9302
|
* @param config - the config for the system manager
|
|
9303
9303
|
*/
|
|
9304
9304
|
constructor(t) {
|
|
9305
|
-
super(), this.tick = 0, this.uid =
|
|
9305
|
+
super(), this.tick = 0, this.uid = ct("renderer"), this.runners = /* @__PURE__ */ Object.create(null), this.renderPipes = /* @__PURE__ */ Object.create(null), this._initOptions = {}, this._systemsHash = /* @__PURE__ */ Object.create(null), this.type = t.type, this.name = t.name, this.config = t;
|
|
9306
9306
|
const e = [...wl, ...this.config.runners ?? []];
|
|
9307
9307
|
this._addRunners(...e), this._unsafeEvalCheck();
|
|
9308
9308
|
}
|
|
@@ -9452,7 +9452,7 @@ const wl = [
|
|
|
9452
9452
|
});
|
|
9453
9453
|
}
|
|
9454
9454
|
destroy(t = !1) {
|
|
9455
|
-
this.runners.destroy.items.reverse(), this.runners.destroy.emit(t), (t === !0 || typeof t == "object" && t.releaseGlobalResources) &&
|
|
9455
|
+
this.runners.destroy.items.reverse(), this.runners.destroy.emit(t), (t === !0 || typeof t == "object" && t.releaseGlobalResources) && pi.release(), Object.values(this.runners).forEach((e) => {
|
|
9456
9456
|
e.destroy();
|
|
9457
9457
|
}), this._systemsHash = null, this.renderPipes = null, this.removeAllListeners();
|
|
9458
9458
|
}
|
|
@@ -9542,9 +9542,9 @@ Bo.defaultOptions = {
|
|
|
9542
9542
|
*/
|
|
9543
9543
|
roundPixels: !1
|
|
9544
9544
|
};
|
|
9545
|
-
let Lo = Bo,
|
|
9545
|
+
let Lo = Bo, vi;
|
|
9546
9546
|
function Tl(s) {
|
|
9547
|
-
return
|
|
9547
|
+
return vi !== void 0 || (vi = (() => {
|
|
9548
9548
|
var e;
|
|
9549
9549
|
const t = {
|
|
9550
9550
|
stencil: !0,
|
|
@@ -9563,11 +9563,11 @@ function Tl(s) {
|
|
|
9563
9563
|
} catch {
|
|
9564
9564
|
return !1;
|
|
9565
9565
|
}
|
|
9566
|
-
})()),
|
|
9566
|
+
})()), vi;
|
|
9567
9567
|
}
|
|
9568
|
-
let
|
|
9568
|
+
let Ii;
|
|
9569
9569
|
async function Al(s = {}) {
|
|
9570
|
-
return
|
|
9570
|
+
return Ii !== void 0 || (Ii = await (async () => {
|
|
9571
9571
|
const t = Nt.get().getNavigator().gpu;
|
|
9572
9572
|
if (!t)
|
|
9573
9573
|
return !1;
|
|
@@ -9576,7 +9576,7 @@ async function Al(s = {}) {
|
|
|
9576
9576
|
} catch {
|
|
9577
9577
|
return !1;
|
|
9578
9578
|
}
|
|
9579
|
-
})()),
|
|
9579
|
+
})()), Ii;
|
|
9580
9580
|
}
|
|
9581
9581
|
const Yn = ["webgl", "webgpu", "canvas"];
|
|
9582
9582
|
async function vl(s) {
|
|
@@ -9588,17 +9588,17 @@ async function vl(s) {
|
|
|
9588
9588
|
for (let r = 0; r < t.length; r++) {
|
|
9589
9589
|
const o = t[r];
|
|
9590
9590
|
if (o === "webgpu" && await Al()) {
|
|
9591
|
-
const { WebGPURenderer: a } = await import("./WebGPURenderer-
|
|
9591
|
+
const { WebGPURenderer: a } = await import("./WebGPURenderer-CYMkZfQR.js");
|
|
9592
9592
|
e = a, i = { ...s, ...s.webgpu };
|
|
9593
9593
|
break;
|
|
9594
9594
|
} else if (o === "webgl" && Tl(
|
|
9595
9595
|
s.failIfMajorPerformanceCaveat ?? Lo.defaultOptions.failIfMajorPerformanceCaveat
|
|
9596
9596
|
)) {
|
|
9597
|
-
const { WebGLRenderer: a } = await import("./WebGLRenderer-
|
|
9597
|
+
const { WebGLRenderer: a } = await import("./WebGLRenderer-Dzf9OyZQ.js");
|
|
9598
9598
|
e = a, i = { ...s, ...s.webgl };
|
|
9599
9599
|
break;
|
|
9600
9600
|
} else if (o === "canvas") {
|
|
9601
|
-
const { CanvasRenderer: a } = await import("./CanvasRenderer-
|
|
9601
|
+
const { CanvasRenderer: a } = await import("./CanvasRenderer-CD425hkf.js");
|
|
9602
9602
|
e = a, i = { ...s, ...s.canvasOptions };
|
|
9603
9603
|
break;
|
|
9604
9604
|
}
|
|
@@ -9700,7 +9700,7 @@ class Wo {
|
|
|
9700
9700
|
{
|
|
9701
9701
|
configurable: !0,
|
|
9702
9702
|
set(e) {
|
|
9703
|
-
this._ticker && this._ticker.remove(this.render, this), this._ticker = e, e && e.add(this.render, this,
|
|
9703
|
+
this._ticker && this._ticker.remove(this.render, this), this._ticker = e, e && e.add(this.render, this, Li.LOW);
|
|
9704
9704
|
},
|
|
9705
9705
|
get() {
|
|
9706
9706
|
return this._ticker;
|
|
@@ -10182,7 +10182,7 @@ class on {
|
|
|
10182
10182
|
* @see {@link Circle.contains} For point containment
|
|
10183
10183
|
*/
|
|
10184
10184
|
getBounds(t) {
|
|
10185
|
-
return t || (t = new
|
|
10185
|
+
return t || (t = new lt()), t.x = this.x - this.radius, t.y = this.y - this.radius, t.width = this.radius * 2, t.height = this.radius * 2, t;
|
|
10186
10186
|
}
|
|
10187
10187
|
/**
|
|
10188
10188
|
* Copies another circle to this one.
|
|
@@ -10337,7 +10337,7 @@ class an {
|
|
|
10337
10337
|
* @see {@link Ellipse.contains} For checking if a point is inside
|
|
10338
10338
|
*/
|
|
10339
10339
|
getBounds(t) {
|
|
10340
|
-
return t || (t = new
|
|
10340
|
+
return t || (t = new lt()), t.x = this.x - this.halfWidth, t.y = this.y - this.halfHeight, t.width = this.halfWidth * 2, t.height = this.halfHeight * 2, t;
|
|
10341
10341
|
}
|
|
10342
10342
|
/**
|
|
10343
10343
|
* Copies another ellipse to this one.
|
|
@@ -10563,7 +10563,7 @@ class ri {
|
|
|
10563
10563
|
* @see {@link Polygon.contains} For checking if a point is inside
|
|
10564
10564
|
*/
|
|
10565
10565
|
getBounds(t) {
|
|
10566
|
-
t || (t = new
|
|
10566
|
+
t || (t = new lt());
|
|
10567
10567
|
const e = this.points;
|
|
10568
10568
|
let i = 1 / 0, n = -1 / 0, r = 1 / 0, o = -1 / 0;
|
|
10569
10569
|
for (let a = 0, h = e.length; a < h; a += 2) {
|
|
@@ -10690,7 +10690,7 @@ class ri {
|
|
|
10690
10690
|
return this.points[1];
|
|
10691
10691
|
}
|
|
10692
10692
|
}
|
|
10693
|
-
const
|
|
10693
|
+
const Ri = (s, t, e, i, n, r, o) => {
|
|
10694
10694
|
const a = s - e, h = t - i, l = Math.sqrt(a * a + h * h);
|
|
10695
10695
|
return l >= n - r && l <= n + o;
|
|
10696
10696
|
};
|
|
@@ -10727,7 +10727,7 @@ class hn {
|
|
|
10727
10727
|
* @see {@link RoundedRectangle.contains} For checking if a point is inside
|
|
10728
10728
|
*/
|
|
10729
10729
|
getBounds(t) {
|
|
10730
|
-
return t || (t = new
|
|
10730
|
+
return t || (t = new lt()), t.x = this.x, t.y = this.y, t.width = this.width, t.height = this.height, t;
|
|
10731
10731
|
}
|
|
10732
10732
|
/**
|
|
10733
10733
|
* Creates a clone of this Rounded Rectangle.
|
|
@@ -10855,7 +10855,7 @@ class hn {
|
|
|
10855
10855
|
const { x: r, y: o, width: a, height: h, radius: l } = this, c = i * (1 - n), u = i - c, m = r + l, p = o + l, _ = a - l * 2, b = h - l * 2, y = r + a, S = o + h;
|
|
10856
10856
|
return (t >= r - c && t <= r + u || t >= y - u && t <= y + c) && e >= p && e <= p + b || (e >= o - c && e <= o + u || e >= S - u && e <= S + c) && t >= m && t <= m + _ ? !0 : (
|
|
10857
10857
|
// Top-left
|
|
10858
|
-
t < m && e < p &&
|
|
10858
|
+
t < m && e < p && Ri(
|
|
10859
10859
|
t,
|
|
10860
10860
|
e,
|
|
10861
10861
|
m,
|
|
@@ -10863,7 +10863,7 @@ class hn {
|
|
|
10863
10863
|
l,
|
|
10864
10864
|
u,
|
|
10865
10865
|
c
|
|
10866
|
-
) || t > y - l && e < p &&
|
|
10866
|
+
) || t > y - l && e < p && Ri(
|
|
10867
10867
|
t,
|
|
10868
10868
|
e,
|
|
10869
10869
|
y - l,
|
|
@@ -10871,7 +10871,7 @@ class hn {
|
|
|
10871
10871
|
l,
|
|
10872
10872
|
u,
|
|
10873
10873
|
c
|
|
10874
|
-
) || t > y - l && e > S - l &&
|
|
10874
|
+
) || t > y - l && e > S - l && Ri(
|
|
10875
10875
|
t,
|
|
10876
10876
|
e,
|
|
10877
10877
|
y - l,
|
|
@@ -10879,7 +10879,7 @@ class hn {
|
|
|
10879
10879
|
l,
|
|
10880
10880
|
u,
|
|
10881
10881
|
c
|
|
10882
|
-
) || t < m && e > S - l &&
|
|
10882
|
+
) || t < m && e > S - l && Ri(
|
|
10883
10883
|
t,
|
|
10884
10884
|
e,
|
|
10885
10885
|
m,
|
|
@@ -10908,7 +10908,7 @@ function Ll(s, t, e, i) {
|
|
|
10908
10908
|
const h = a < t ? s[a] : J.EMPTY.source;
|
|
10909
10909
|
n[r++] = h.source, n[r++] = h.style;
|
|
10910
10910
|
}
|
|
10911
|
-
const o = new
|
|
10911
|
+
const o = new Bi(n);
|
|
10912
10912
|
return zo[e] = o, o;
|
|
10913
10913
|
}
|
|
10914
10914
|
class qn {
|
|
@@ -11059,25 +11059,25 @@ class Vl {
|
|
|
11059
11059
|
}
|
|
11060
11060
|
}
|
|
11061
11061
|
const oi = [];
|
|
11062
|
-
let
|
|
11063
|
-
|
|
11062
|
+
let Fi = 0;
|
|
11063
|
+
pi.register({
|
|
11064
11064
|
clear: () => {
|
|
11065
11065
|
if (oi.length > 0)
|
|
11066
11066
|
for (const s of oi)
|
|
11067
11067
|
s && s.destroy();
|
|
11068
|
-
oi.length = 0,
|
|
11068
|
+
oi.length = 0, Fi = 0;
|
|
11069
11069
|
}
|
|
11070
11070
|
});
|
|
11071
11071
|
function Zn() {
|
|
11072
|
-
return
|
|
11072
|
+
return Fi > 0 ? oi[--Fi] : new Vl();
|
|
11073
11073
|
}
|
|
11074
11074
|
function Qn(s) {
|
|
11075
|
-
s.elements = null, oi[
|
|
11075
|
+
s.elements = null, oi[Fi++] = s;
|
|
11076
11076
|
}
|
|
11077
11077
|
let qe = 0;
|
|
11078
11078
|
const Vo = class jo {
|
|
11079
11079
|
constructor(t) {
|
|
11080
|
-
this.uid =
|
|
11080
|
+
this.uid = ct("batcher"), this.dirty = !0, this.batchIndex = 0, this.batches = [], this._elements = [], t = { ...jo.defaultOptions, ...t }, t.maxTextures || (K("v8.8.0", "maxTextures is a required option for Batcher now, please pass it in the options"), t.maxTextures = $l());
|
|
11081
11081
|
const { maxTextures: e, attributesInitialSize: i, indicesInitialSize: n } = t;
|
|
11082
11082
|
this.attributeBuffer = new qn(i * 4), this.indexBuffer = new Uint16Array(n), this.maxTextures = e;
|
|
11083
11083
|
}
|
|
@@ -11277,7 +11277,7 @@ class di extends Xt {
|
|
|
11277
11277
|
constructor(t) {
|
|
11278
11278
|
let { data: e, size: i } = t;
|
|
11279
11279
|
const { usage: n, label: r, shrinkToFit: o } = t;
|
|
11280
|
-
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.autoGarbageCollect = !0, this.uid =
|
|
11280
|
+
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.autoGarbageCollect = !0, this.uid = ct("buffer"), this._resourceType = "buffer", this._resourceId = ct("resource"), this._touched = 0, this._updateID = 1, this._dataInt32 = null, this.shrinkToFit = !0, this.destroyed = !1, e instanceof Array && (e = new Float32Array(e)), this._data = e, i ?? (i = e == null ? void 0 : e.byteLength);
|
|
11281
11281
|
const a = !!e;
|
|
11282
11282
|
this.descriptor = {
|
|
11283
11283
|
size: i,
|
|
@@ -11317,7 +11317,7 @@ class di extends Xt {
|
|
|
11317
11317
|
}
|
|
11318
11318
|
const n = this._data;
|
|
11319
11319
|
if (this._data = t, this._dataInt32 = null, !n || n.length !== t.length) {
|
|
11320
|
-
!this.shrinkToFit && n && t.byteLength < n.byteLength ? i && this.emit("update", this) : (this.descriptor.size = t.byteLength, this._resourceId =
|
|
11320
|
+
!this.shrinkToFit && n && t.byteLength < n.byteLength ? i && this.emit("update", this) : (this.descriptor.size = t.byteLength, this._resourceId = ct("resource"), this.emit("change", this));
|
|
11321
11321
|
return;
|
|
11322
11322
|
}
|
|
11323
11323
|
i && this.emit("update", this);
|
|
@@ -11379,7 +11379,7 @@ class ql extends Xt {
|
|
|
11379
11379
|
* @param options - The options for the geometry.
|
|
11380
11380
|
*/
|
|
11381
11381
|
constructor(t = {}) {
|
|
11382
|
-
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid =
|
|
11382
|
+
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid = ct("geometry"), this._layoutKey = 0, this.instanceCount = 1, this._bounds = new Ft(), this._boundsDirty = !0;
|
|
11383
11383
|
const { attributes: e, indexBuffer: i, topology: n } = t;
|
|
11384
11384
|
if (this.buffers = [], this.attributes = {}, e)
|
|
11385
11385
|
for (const r in e)
|
|
@@ -11809,7 +11809,7 @@ function fc({ bits: s, name: t }) {
|
|
|
11809
11809
|
...s
|
|
11810
11810
|
]
|
|
11811
11811
|
});
|
|
11812
|
-
return
|
|
11812
|
+
return mi.from({
|
|
11813
11813
|
name: t,
|
|
11814
11814
|
vertex: {
|
|
11815
11815
|
source: e.vertex,
|
|
@@ -12082,7 +12082,7 @@ Ko.extension = {
|
|
|
12082
12082
|
name: "default"
|
|
12083
12083
|
};
|
|
12084
12084
|
let Tc = Ko;
|
|
12085
|
-
class
|
|
12085
|
+
class gi {
|
|
12086
12086
|
constructor(t) {
|
|
12087
12087
|
this.items = /* @__PURE__ */ Object.create(null);
|
|
12088
12088
|
const { renderer: e, type: i, onUnload: n, priority: r, name: o } = t;
|
|
@@ -12450,7 +12450,7 @@ const Nc = [], Bc = {
|
|
|
12450
12450
|
}
|
|
12451
12451
|
}, cr = [{ offset: 0, color: "white" }, { offset: 1, color: "black" }], cn = class zs {
|
|
12452
12452
|
constructor(...t) {
|
|
12453
|
-
this.uid =
|
|
12453
|
+
this.uid = ct("fillGradient"), this._tick = 0, this.type = "linear", this.colorStops = [];
|
|
12454
12454
|
let e = Fc(t);
|
|
12455
12455
|
e = { ...e.type === "radial" ? zs.defaultRadialOptions : zs.defaultLinearOptions, ...Vr(e) }, this._textureSize = e.textureSize, this._wrapMode = e.wrapMode, e.type === "radial" ? (this.center = e.center, this.outerCenter = e.outerCenter ?? this.center, this.innerRadius = e.innerRadius, this.outerRadius = e.outerRadius, this.scale = e.scale, this.rotation = e.rotation) : (this.start = e.start, this.end = e.end), this.textureSpace = e.textureSpace, this.type = e.type, e.colorStops.forEach((n) => {
|
|
12456
12456
|
this.addColorStop(n.offset, n.color);
|
|
@@ -12486,7 +12486,7 @@ const Nc = [], Bc = {
|
|
|
12486
12486
|
}
|
|
12487
12487
|
const h = this.colorStops.length ? this.colorStops : cr, l = this._textureSize, { canvas: c, context: u } = dr(l, 1), m = a ? u.createLinearGradient(this._textureSize, 0, 0, 0) : u.createLinearGradient(0, 0, this._textureSize, 0);
|
|
12488
12488
|
ur(m, h), u.fillStyle = m, u.fillRect(0, 0, l, 1), this.texture = new J({
|
|
12489
|
-
source: new
|
|
12489
|
+
source: new Di({
|
|
12490
12490
|
resource: c,
|
|
12491
12491
|
addressMode: this._wrapMode
|
|
12492
12492
|
})
|
|
@@ -12518,7 +12518,7 @@ const Nc = [], Bc = {
|
|
|
12518
12518
|
c * p
|
|
12519
12519
|
);
|
|
12520
12520
|
ur(y, t), n.fillStyle = t[t.length - 1].color, n.fillRect(0, 0, e, e), n.fillStyle = y, n.translate(_, b), n.rotate(this.rotation), n.scale(1, this.scale), n.translate(-_, -b), n.fillRect(0, 0, e, e), this.texture = new J({
|
|
12521
|
-
source: new
|
|
12521
|
+
source: new Di({
|
|
12522
12522
|
resource: i,
|
|
12523
12523
|
addressMode: this._wrapMode
|
|
12524
12524
|
})
|
|
@@ -12581,7 +12581,7 @@ function Fc(s) {
|
|
|
12581
12581
|
textureSize: s[5] ?? ie.defaultLinearOptions.textureSize
|
|
12582
12582
|
}), t;
|
|
12583
12583
|
}
|
|
12584
|
-
const Uc = new q(), Gc = new
|
|
12584
|
+
const Uc = new q(), Gc = new lt();
|
|
12585
12585
|
function Wc(s, t, e, i) {
|
|
12586
12586
|
const n = t.matrix ? s.copyFrom(t.matrix).invert() : s.identity();
|
|
12587
12587
|
if (t.textureSpace === "local") {
|
|
@@ -12597,7 +12597,7 @@ function Wc(s, t, e, i) {
|
|
|
12597
12597
|
const Xi = {};
|
|
12598
12598
|
ut.handleByMap(j.ShapeBuilder, Xi);
|
|
12599
12599
|
ut.add(Dc, Bc, Lc, fi, Rc, Mc);
|
|
12600
|
-
const Hc = new
|
|
12600
|
+
const Hc = new lt(), $c = new q();
|
|
12601
12601
|
function zc(s, t) {
|
|
12602
12602
|
const { geometryData: e, batches: i } = t;
|
|
12603
12603
|
i.length = 0, e.indices.length = 0, e.vertices.length = 0, e.uvs.length = 0;
|
|
@@ -12708,7 +12708,7 @@ class Xc {
|
|
|
12708
12708
|
}
|
|
12709
12709
|
const un = class Vs {
|
|
12710
12710
|
constructor(t) {
|
|
12711
|
-
this._renderer = t, this._managedContexts = new
|
|
12711
|
+
this._renderer = t, this._managedContexts = new gi({ renderer: t, type: "resource", name: "graphicsContext" });
|
|
12712
12712
|
}
|
|
12713
12713
|
/**
|
|
12714
12714
|
* Runner init called, update the default options
|
|
@@ -12802,7 +12802,7 @@ un.defaultOptions = {
|
|
|
12802
12802
|
bezierSmoothness: 0.5
|
|
12803
12803
|
};
|
|
12804
12804
|
let dn = un;
|
|
12805
|
-
const qc = 8,
|
|
12805
|
+
const qc = 8, Mi = 11920929e-14, Kc = 1;
|
|
12806
12806
|
function ea(s, t, e, i, n, r, o, a, h, l) {
|
|
12807
12807
|
const u = Math.min(
|
|
12808
12808
|
0.99,
|
|
@@ -12822,17 +12822,17 @@ function js(s, t, e, i, n, r, o, a, h, l, c) {
|
|
|
12822
12822
|
if (c > 0) {
|
|
12823
12823
|
let I = o - s, L = a - t;
|
|
12824
12824
|
const P = Math.abs((e - o) * L - (i - a) * I), k = Math.abs((n - o) * L - (r - a) * I);
|
|
12825
|
-
if (P >
|
|
12825
|
+
if (P > Mi && k > Mi) {
|
|
12826
12826
|
if ((P + k) * (P + k) <= l * (I * I + L * L)) {
|
|
12827
12827
|
h.push(R, A);
|
|
12828
12828
|
return;
|
|
12829
12829
|
}
|
|
12830
|
-
} else if (P >
|
|
12830
|
+
} else if (P > Mi) {
|
|
12831
12831
|
if (P * P <= l * (I * I + L * L)) {
|
|
12832
12832
|
h.push(R, A);
|
|
12833
12833
|
return;
|
|
12834
12834
|
}
|
|
12835
|
-
} else if (k >
|
|
12835
|
+
} else if (k > Mi) {
|
|
12836
12836
|
if (k * k <= l * (I * I + L * L)) {
|
|
12837
12837
|
h.push(R, A);
|
|
12838
12838
|
return;
|
|
@@ -13057,7 +13057,7 @@ function hu(s, t, e, i) {
|
|
|
13057
13057
|
a === 0 ? s.moveTo(p.x, p.y) : s.lineTo(p.x, p.y), s.quadraticCurveTo(h.x, h.y, b.x, b.y, i);
|
|
13058
13058
|
}
|
|
13059
13059
|
}
|
|
13060
|
-
const lu = new
|
|
13060
|
+
const lu = new lt();
|
|
13061
13061
|
class cu {
|
|
13062
13062
|
constructor(t) {
|
|
13063
13063
|
this.shapePrimitives = [], this._currentPoly = null, this._bounds = new Ft(), this._graphicsPath2D = t, this.signed = t.checkForHoles;
|
|
@@ -13243,7 +13243,7 @@ class cu {
|
|
|
13243
13243
|
* @returns The instance of the current object for chaining.
|
|
13244
13244
|
*/
|
|
13245
13245
|
rect(t, e, i, n, r) {
|
|
13246
|
-
return this.drawShape(new
|
|
13246
|
+
return this.drawShape(new lt(t, e, i, n), r), this;
|
|
13247
13247
|
}
|
|
13248
13248
|
/**
|
|
13249
13249
|
* Draws a circle shape. This method adds a new circle path to the current drawing.
|
|
@@ -13485,7 +13485,7 @@ class ee {
|
|
|
13485
13485
|
* @param signed
|
|
13486
13486
|
*/
|
|
13487
13487
|
constructor(t, e = !1) {
|
|
13488
|
-
this.instructions = [], this.uid =
|
|
13488
|
+
this.instructions = [], this.uid = ct("graphicsPath"), this._dirty = !0, this.checkForHoles = e, typeof t == "string" ? Pl(t, this) : this.instructions = (t == null ? void 0 : t.slice()) ?? [];
|
|
13489
13489
|
}
|
|
13490
13490
|
/**
|
|
13491
13491
|
* Provides access to the internal shape path, ensuring it is up-to-date with the current instructions.
|
|
@@ -14042,7 +14042,7 @@ const xr = {
|
|
|
14042
14042
|
};
|
|
14043
14043
|
class qi {
|
|
14044
14044
|
constructor(t, e) {
|
|
14045
|
-
this.uid =
|
|
14045
|
+
this.uid = ct("fillPattern"), this._tick = 0, this.transform = new q(), this.texture = t, this.transform.scale(
|
|
14046
14046
|
1 / t.frame.width,
|
|
14047
14047
|
1 / t.frame.height
|
|
14048
14048
|
), e && (t.source.style.addressModeU = xr[e].addressModeU, t.source.style.addressModeV = xr[e].addressModeV);
|
|
@@ -14114,7 +14114,7 @@ function Ce(s, t) {
|
|
|
14114
14114
|
const e = {}, i = s;
|
|
14115
14115
|
return yu(s) ? bu(e, s, t) : xu(s) ? Su(e, s, t) : br(s) ? Er(e, s, t) : Sr(s) ? Cr(e, s, t) : i.fill && br(i.fill) ? Er(i, i.fill, t) : i.fill && Sr(i.fill) ? Cr(i, i.fill, t) : Eu(i, t);
|
|
14116
14116
|
}
|
|
14117
|
-
function
|
|
14117
|
+
function Ui(s, t) {
|
|
14118
14118
|
const { width: e, alignment: i, miterLimit: n, cap: r, join: o, pixelLine: a, ...h } = t, l = Ce(s, h);
|
|
14119
14119
|
return l ? {
|
|
14120
14120
|
width: e,
|
|
@@ -14151,7 +14151,7 @@ function Cu(s, t) {
|
|
|
14151
14151
|
}
|
|
14152
14152
|
const wu = new Et(), wr = new q(), fn = class Vt extends Xt {
|
|
14153
14153
|
constructor() {
|
|
14154
|
-
super(...arguments), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid =
|
|
14154
|
+
super(...arguments), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid = ct("graphicsContext"), this.dirty = !0, this.batchMode = "auto", this.instructions = [], this.destroyed = !1, this._activePath = new ee(), this._transform = new q(), this._fillStyle = { ...Vt.defaultFillStyle }, this._strokeStyle = { ...Vt.defaultStrokeStyle }, this._stateStack = [], this._tick = 0, this._bounds = new Ft(), this._boundsDirty = !0;
|
|
14155
14155
|
}
|
|
14156
14156
|
/**
|
|
14157
14157
|
* Creates a new GraphicsContext object that is a clone of this instance, copying all properties,
|
|
@@ -14178,7 +14178,7 @@ const wu = new Et(), wr = new q(), fn = class Vt extends Xt {
|
|
|
14178
14178
|
return this._strokeStyle;
|
|
14179
14179
|
}
|
|
14180
14180
|
set strokeStyle(t) {
|
|
14181
|
-
this._strokeStyle =
|
|
14181
|
+
this._strokeStyle = Ui(t, Vt.defaultStrokeStyle);
|
|
14182
14182
|
}
|
|
14183
14183
|
/**
|
|
14184
14184
|
* Sets the current fill style of the graphics context. The fill style can be a color, gradient,
|
|
@@ -14245,7 +14245,7 @@ const wu = new Et(), wr = new q(), fn = class Vt extends Xt {
|
|
|
14245
14245
|
stroke(t) {
|
|
14246
14246
|
let e;
|
|
14247
14247
|
const i = this.instructions[this.instructions.length - 1];
|
|
14248
|
-
return this._tick === 0 && (i == null ? void 0 : i.action) === "fill" ? e = i.data.path : e = this._activePath.clone(), e ? (t != null && (this._strokeStyle =
|
|
14248
|
+
return this._tick === 0 && (i == null ? void 0 : i.action) === "fill" ? e = i.data.path : e = this._activePath.clone(), e ? (t != null && (this._strokeStyle = Ui(t, Vt.defaultStrokeStyle)), this.instructions.push({
|
|
14249
14249
|
action: "stroke",
|
|
14250
14250
|
// TODO copy fill style!
|
|
14251
14251
|
data: { style: this.strokeStyle, path: e }
|
|
@@ -14831,7 +14831,7 @@ class Au {
|
|
|
14831
14831
|
}
|
|
14832
14832
|
const pn = class Xs {
|
|
14833
14833
|
constructor(t) {
|
|
14834
|
-
this._renderer = t, this._managedContexts = new
|
|
14834
|
+
this._renderer = t, this._managedContexts = new gi({ renderer: t, type: "resource", name: "graphicsContext" });
|
|
14835
14835
|
}
|
|
14836
14836
|
/**
|
|
14837
14837
|
* Runner init called, update the default options
|
|
@@ -14896,7 +14896,7 @@ pn.defaultOptions = {
|
|
|
14896
14896
|
let vu = pn;
|
|
14897
14897
|
class ra {
|
|
14898
14898
|
constructor(t, e) {
|
|
14899
|
-
this.state = rn.for2d(), this.renderer = t, this._adaptor = e, this.renderer.runners.contextChange.add(this), this._managedGraphics = new
|
|
14899
|
+
this.state = rn.for2d(), this.renderer = t, this._adaptor = e, this.renderer.runners.contextChange.add(this), this._managedGraphics = new gi({ renderer: t, type: "renderable", priority: -1, name: "graphics" });
|
|
14900
14900
|
}
|
|
14901
14901
|
contextChange() {
|
|
14902
14902
|
this._adaptor.contextChange(this.renderer);
|
|
@@ -14938,7 +14938,7 @@ class Ru {
|
|
|
14938
14938
|
}
|
|
14939
14939
|
class oa {
|
|
14940
14940
|
constructor(t, e) {
|
|
14941
|
-
this.state = rn.for2d(), this.renderer = t, this._adaptor = e, this.renderer.runners.contextChange.add(this), this._managedGraphics = new
|
|
14941
|
+
this.state = rn.for2d(), this.renderer = t, this._adaptor = e, this.renderer.runners.contextChange.add(this), this._managedGraphics = new gi({ renderer: t, type: "renderable", priority: -1, name: "graphics" });
|
|
14942
14942
|
}
|
|
14943
14943
|
contextChange() {
|
|
14944
14944
|
this._adaptor.contextChange(this.renderer);
|
|
@@ -15012,7 +15012,7 @@ ut.add(ra);
|
|
|
15012
15012
|
ut.add(oa);
|
|
15013
15013
|
ut.add(vu);
|
|
15014
15014
|
ut.add(dn);
|
|
15015
|
-
class
|
|
15015
|
+
class Gi extends sn {
|
|
15016
15016
|
/**
|
|
15017
15017
|
* Creates a new Graphics object.
|
|
15018
15018
|
* @param options - Options for the Graphics.
|
|
@@ -15707,7 +15707,7 @@ class pi extends sn {
|
|
|
15707
15707
|
* @see {@link GraphicsContext} For understanding the shared context behavior
|
|
15708
15708
|
*/
|
|
15709
15709
|
clone(t = !1) {
|
|
15710
|
-
return t ? new
|
|
15710
|
+
return t ? new Gi(this._context.clone()) : (this._ownedContext = null, new Gi(this._context));
|
|
15711
15711
|
}
|
|
15712
15712
|
// -------- v7 deprecations ---------
|
|
15713
15713
|
/**
|
|
@@ -16119,7 +16119,7 @@ class Pu {
|
|
|
16119
16119
|
}
|
|
16120
16120
|
}
|
|
16121
16121
|
const qs = new Pu();
|
|
16122
|
-
|
|
16122
|
+
pi.register(qs);
|
|
16123
16123
|
let ge = null, Qt = null;
|
|
16124
16124
|
function Ou(s, t) {
|
|
16125
16125
|
ge || (ge = Nt.get().createCanvas(256, 128), Qt = ge.getContext("2d", { willReadFrequently: !0 }), Qt.globalCompositeOperation = "copy", Qt.globalAlpha = 1), (ge.width < s || ge.height < t) && (ge.width = Ge(s), ge.height = Ge(t));
|
|
@@ -16156,11 +16156,11 @@ function Nu(...s) {
|
|
|
16156
16156
|
const h = Qt.getImageData(0, 0, n, r).data;
|
|
16157
16157
|
let l = 0, c = 0, u = n - 1, m = r - 1;
|
|
16158
16158
|
for (; c < r && Tr(h, n, c); ) ++c;
|
|
16159
|
-
if (c === r) return
|
|
16159
|
+
if (c === r) return lt.EMPTY;
|
|
16160
16160
|
for (; Tr(h, n, m); ) --m;
|
|
16161
16161
|
for (; Ar(h, n, l, c, m); ) ++l;
|
|
16162
16162
|
for (; Ar(h, n, u, c, m); ) --u;
|
|
16163
|
-
return ++u, ++m, Qt.globalCompositeOperation = "source-over", Qt.strokeRect(l, c, u - l, m - c), Qt.globalCompositeOperation = "copy", o ?? (o = new
|
|
16163
|
+
return ++u, ++m, Qt.globalCompositeOperation = "source-over", Qt.strokeRect(l, c, u - l, m - c), Qt.globalCompositeOperation = "copy", o ?? (o = new lt()), o.set(l / i, c / i, (u - l) / i, (m - c) / i), o;
|
|
16164
16164
|
}
|
|
16165
16165
|
/**
|
|
16166
16166
|
* tiny-lru
|
|
@@ -17170,7 +17170,7 @@ function Ks(s) {
|
|
|
17170
17170
|
return `${s.fontStyle} ${s.fontVariant} ${s.fontWeight} ${t} ${e.join(",")}`;
|
|
17171
17171
|
}
|
|
17172
17172
|
const Rr = 1e5;
|
|
17173
|
-
function
|
|
17173
|
+
function ki(s, t, e, i = 0, n = 0, r = 0) {
|
|
17174
17174
|
if (s.texture === J.WHITE && !s.fill)
|
|
17175
17175
|
return mt.shared.setValue(s.color).setAlpha(s.alpha ?? 1).toHexa();
|
|
17176
17176
|
if (s.fill) {
|
|
@@ -17229,7 +17229,7 @@ function Pi(s, t, e, i = 0, n = 0, r = 0) {
|
|
|
17229
17229
|
}
|
|
17230
17230
|
return Tt("FillStyle not recognised", s), "red";
|
|
17231
17231
|
}
|
|
17232
|
-
const Mr = new
|
|
17232
|
+
const Mr = new lt();
|
|
17233
17233
|
function Me(s) {
|
|
17234
17234
|
let t = 0;
|
|
17235
17235
|
for (let e = 0; e < s.length; e++)
|
|
@@ -17427,7 +17427,7 @@ class id {
|
|
|
17427
17427
|
lineHeight: Mt,
|
|
17428
17428
|
lines: [H.text]
|
|
17429
17429
|
};
|
|
17430
|
-
a.strokeStyle =
|
|
17430
|
+
a.strokeStyle = ki(
|
|
17431
17431
|
gt,
|
|
17432
17432
|
a,
|
|
17433
17433
|
qt,
|
|
@@ -17473,7 +17473,7 @@ class id {
|
|
|
17473
17473
|
lineHeight: bt,
|
|
17474
17474
|
lines: [H.text]
|
|
17475
17475
|
};
|
|
17476
|
-
a.fillStyle =
|
|
17476
|
+
a.fillStyle = ki(
|
|
17477
17477
|
H.style._fill,
|
|
17478
17478
|
a,
|
|
17479
17479
|
Mt,
|
|
@@ -17511,9 +17511,9 @@ class id {
|
|
|
17511
17511
|
*/
|
|
17512
17512
|
_setFillAndStrokeStyles(t, e, i, n, r, o = 0, a = 0) {
|
|
17513
17513
|
var h;
|
|
17514
|
-
if (t.fillStyle = e._fill ?
|
|
17514
|
+
if (t.fillStyle = e._fill ? ki(e._fill, t, i, n * 2, o, a) : null, (h = e._stroke) != null && h.width) {
|
|
17515
17515
|
const l = r + n * 2;
|
|
17516
|
-
t.strokeStyle =
|
|
17516
|
+
t.strokeStyle = ki(
|
|
17517
17517
|
e._stroke,
|
|
17518
17518
|
t,
|
|
17519
17519
|
i,
|
|
@@ -17595,7 +17595,7 @@ class id {
|
|
|
17595
17595
|
}
|
|
17596
17596
|
const Fe = new id(), mn = class Ee extends Xt {
|
|
17597
17597
|
constructor(t = {}) {
|
|
17598
|
-
super(), this.uid =
|
|
17598
|
+
super(), this.uid = ct("textStyle"), this._tick = 0, this._cachedFontString = null, sd(t), t instanceof Ee && (t = t._toObject());
|
|
17599
17599
|
const n = { ...Ee.defaultTextStyle, ...t };
|
|
17600
17600
|
for (const r in n) {
|
|
17601
17601
|
const o = r;
|
|
@@ -17813,11 +17813,11 @@ const Fe = new id(), mn = class Ee extends Xt {
|
|
|
17813
17813
|
}
|
|
17814
17814
|
set stroke(t) {
|
|
17815
17815
|
t !== this._originalStroke && (this._originalStroke = t, this._isFillStyle(t) && (this._originalStroke = this._createProxy({ ...Wt.defaultStrokeStyle, ...t }, () => {
|
|
17816
|
-
this._stroke =
|
|
17816
|
+
this._stroke = Ui(
|
|
17817
17817
|
{ ...this._originalStroke },
|
|
17818
17818
|
Wt.defaultStrokeStyle
|
|
17819
17819
|
);
|
|
17820
|
-
})), this._stroke =
|
|
17820
|
+
})), this._stroke = Ui(t, Wt.defaultStrokeStyle), this.update());
|
|
17821
17821
|
}
|
|
17822
17822
|
/**
|
|
17823
17823
|
* Custom styles to apply to specific tags within the text.
|
|
@@ -18070,7 +18070,7 @@ class od extends rd {
|
|
|
18070
18070
|
}
|
|
18071
18071
|
class fa {
|
|
18072
18072
|
constructor(t) {
|
|
18073
|
-
this._renderer = t, t.runners.resolutionChange.add(this), this._managedTexts = new
|
|
18073
|
+
this._renderer = t, t.runners.resolutionChange.add(this), this._managedTexts = new gi({
|
|
18074
18074
|
renderer: t,
|
|
18075
18075
|
type: "renderable",
|
|
18076
18076
|
onUnload: this.onTextUnload.bind(this),
|
|
@@ -18457,13 +18457,14 @@ const ud = (
|
|
|
18457
18457
|
void main(void) {
|
|
18458
18458
|
vec4 color = texture(uTexture, vTextureCoord);
|
|
18459
18459
|
float luma = dot(color.rgb, vec3(0.299, 0.587, 0.114));
|
|
18460
|
-
|
|
18460
|
+
// Invert: alpha = 1 for dark (subject), alpha = 0 for bright (white bg)
|
|
18461
|
+
float alpha = 1.0 - smoothstep(uThreshold - uSmoothness, uThreshold, luma);
|
|
18461
18462
|
finalColor = vec4(color.rgb * alpha, alpha);
|
|
18462
18463
|
}
|
|
18463
18464
|
`
|
|
18464
18465
|
);
|
|
18465
18466
|
class fd extends sl {
|
|
18466
|
-
constructor(t = 0.
|
|
18467
|
+
constructor(t = 0.97, e = 0.04) {
|
|
18467
18468
|
const i = ji.from({ vertex: ud, fragment: dd });
|
|
18468
18469
|
super({
|
|
18469
18470
|
glProgram: i,
|
|
@@ -18476,10 +18477,10 @@ class fd extends sl {
|
|
|
18476
18477
|
});
|
|
18477
18478
|
}
|
|
18478
18479
|
}
|
|
18479
|
-
const si = 200, jt = si * (
|
|
18480
|
+
const si = 200, jt = si * (480 / 854), Pr = 280;
|
|
18480
18481
|
class pd {
|
|
18481
18482
|
constructor(t, e) {
|
|
18482
|
-
this.idleSprite = null, this.idleGroup = null, this.liveSprite = null, this.
|
|
18483
|
+
this.idleSprite = null, this.idleGroup = null, this.liveSprite = null, this.videoElement = null, this.cancelGlow = null, this.cancelEntrance = null, this.visible = !1, this.stageWidth = t, this.stageHeight = e, this.container = new Lt(), this.container.visible = !1, this.container.y = e + jt;
|
|
18483
18484
|
}
|
|
18484
18485
|
/** Load the idle loop video and set up the avatar sprite with chroma-key transparency. */
|
|
18485
18486
|
async loadIdleVideo(t) {
|
|
@@ -18528,15 +18529,12 @@ class pd {
|
|
|
18528
18529
|
}
|
|
18529
18530
|
/** Make the avatar container interactive (clickable) with hover glow. */
|
|
18530
18531
|
setInteractive(t) {
|
|
18531
|
-
this.container.eventMode = "static", this.container.cursor = "pointer"
|
|
18532
|
-
const e = new pi();
|
|
18533
|
-
e.roundRect(
|
|
18532
|
+
this.container.eventMode = "static", this.container.cursor = "pointer", this.container.hitArea = new lt(
|
|
18534
18533
|
-si / 2,
|
|
18535
18534
|
-jt,
|
|
18536
18535
|
si,
|
|
18537
|
-
jt
|
|
18538
|
-
|
|
18539
|
-
), e.fill({ color: 16777215, alpha: 1e-3 }), this.container.addChildAt(e, 0), this.container.on("pointertap", t), this.container.on("pointerenter", () => {
|
|
18536
|
+
jt
|
|
18537
|
+
), this.container.on("pointertap", t), this.container.on("pointerenter", () => {
|
|
18540
18538
|
this.container && this.container.scale.set(1.04);
|
|
18541
18539
|
}), this.container.on("pointerleave", () => {
|
|
18542
18540
|
this.container && this.container.scale.set(1);
|
|
@@ -18548,7 +18546,6 @@ class pd {
|
|
|
18548
18546
|
* avoiding WebGL GL_INVALID_VALUE errors from a 0x0 source.
|
|
18549
18547
|
*/
|
|
18550
18548
|
setLiveVideo(t, e) {
|
|
18551
|
-
this.liveVideoElement = t;
|
|
18552
18549
|
const i = () => {
|
|
18553
18550
|
var h;
|
|
18554
18551
|
const n = J.from(t);
|
|
@@ -18581,7 +18578,7 @@ class pd {
|
|
|
18581
18578
|
ticker: t,
|
|
18582
18579
|
onComplete: () => {
|
|
18583
18580
|
var e;
|
|
18584
|
-
(e = this.liveSprite) == null || e.destroy(), this.liveSprite = null
|
|
18581
|
+
(e = this.liveSprite) == null || e.destroy(), this.liveSprite = null;
|
|
18585
18582
|
}
|
|
18586
18583
|
}), this.idleGroup && (this.idleGroup.visible = !0, this.idleSprite && (this.idleSprite.alpha = 1)), this.idleGroup && (this.cancelGlow = kr(this.idleGroup, t, 0.85, 1, 2500));
|
|
18587
18584
|
}
|
|
@@ -18590,14 +18587,14 @@ class pd {
|
|
|
18590
18587
|
(t = this.cancelGlow) == null || t.call(this), (e = this.cancelEntrance) == null || e.call(this), this.videoElement && (this.videoElement.pause(), this.videoElement.remove()), this.container.destroy({ children: !0 });
|
|
18591
18588
|
}
|
|
18592
18589
|
}
|
|
18593
|
-
const As = 18, Or = 12, md = 20, gd = 240,
|
|
18590
|
+
const As = 18, Or = 12, md = 20, gd = 240, Pi = 14, _d = 35, yd = 2500, Nr = 300, xd = 16777215, bd = 13160666, Sd = 1.5, Ed = 3820124, Cd = 0.1, wd = [
|
|
18594
18591
|
"Got questions? Click me!",
|
|
18595
18592
|
"I can guide you through this page",
|
|
18596
18593
|
"Need help? Let’s chat!"
|
|
18597
18594
|
];
|
|
18598
18595
|
class Td {
|
|
18599
18596
|
constructor(t, e) {
|
|
18600
|
-
this.promptIndex = 0, this.charIndex = 0, this.phase = "idle", this.phaseElapsed = 0, this.cancelFade = null, this.tickCb = null, this.running = !1, this.ticker = t, this.prompts = e != null && e.length ? e : wd, this.container = new Lt(), this.container.alpha = 0, this.container.visible = !1, this.bg = new
|
|
18597
|
+
this.promptIndex = 0, this.charIndex = 0, this.phase = "idle", this.phaseElapsed = 0, this.cancelFade = null, this.tickCb = null, this.running = !1, this.ticker = t, this.prompts = e != null && e.length ? e : wd, this.container = new Lt(), this.container.alpha = 0, this.container.visible = !1, this.bg = new Gi(), this.container.addChild(this.bg), this.label = new ld({
|
|
18601
18598
|
text: "",
|
|
18602
18599
|
style: {
|
|
18603
18600
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
@@ -18660,8 +18657,8 @@ class Td {
|
|
|
18660
18657
|
* • (points toward avatar)
|
|
18661
18658
|
*/
|
|
18662
18659
|
drawBubble() {
|
|
18663
|
-
const t = Math.max(this.label.width, 50), e = Math.max(this.label.height, 18), i = t + As * 2, n = e + Or * 2, r = md, o = 14, a = i * 0.5 - o / 2, h = i * 0.5 + o / 2, l = i * 0.48, c = n +
|
|
18664
|
-
this.bg.clear(), this.bg.roundRect(2, 3, i, n + 2, r), this.bg.fill({ color: Ed, alpha: Cd }), this.bg.moveTo(r, 0), this.bg.lineTo(i - r, 0), this.bg.quadraticCurveTo(i, 0, i, r), this.bg.lineTo(i, n - r), this.bg.quadraticCurveTo(i, n, i - r, n), this.bg.lineTo(h, n), this.bg.quadraticCurveTo(h - 2, n +
|
|
18660
|
+
const t = Math.max(this.label.width, 50), e = Math.max(this.label.height, 18), i = t + As * 2, n = e + Or * 2, r = md, o = 14, a = i * 0.5 - o / 2, h = i * 0.5 + o / 2, l = i * 0.48, c = n + Pi;
|
|
18661
|
+
this.bg.clear(), this.bg.roundRect(2, 3, i, n + 2, r), this.bg.fill({ color: Ed, alpha: Cd }), this.bg.moveTo(r, 0), this.bg.lineTo(i - r, 0), this.bg.quadraticCurveTo(i, 0, i, r), this.bg.lineTo(i, n - r), this.bg.quadraticCurveTo(i, n, i - r, n), this.bg.lineTo(h, n), this.bg.quadraticCurveTo(h - 2, n + Pi * 0.35, l, c), this.bg.quadraticCurveTo(a + 2, n + Pi * 0.55, a, n), this.bg.lineTo(r, n), this.bg.quadraticCurveTo(0, n, 0, n - r), this.bg.lineTo(0, r), this.bg.quadraticCurveTo(0, 0, r, 0), this.bg.closePath(), this.bg.fill({ color: xd, alpha: 0.97 }), this.bg.stroke({ color: bd, width: Sd, alpha: 0.6 }), this.container.pivot.x = i / 2, this.container.pivot.y = n + Pi;
|
|
18665
18662
|
}
|
|
18666
18663
|
/** Register a click handler on the bubble. */
|
|
18667
18664
|
onClick(t) {
|
|
@@ -18985,11 +18982,11 @@ function Bd() {
|
|
|
18985
18982
|
}
|
|
18986
18983
|
return Qe;
|
|
18987
18984
|
}
|
|
18988
|
-
var
|
|
18985
|
+
var Oi = {};
|
|
18989
18986
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
18990
18987
|
var Dr;
|
|
18991
18988
|
function Dd() {
|
|
18992
|
-
return Dr || (Dr = 1,
|
|
18989
|
+
return Dr || (Dr = 1, Oi.read = function(s, t, e, i, n) {
|
|
18993
18990
|
var r, o, a = n * 8 - i - 1, h = (1 << a) - 1, l = h >> 1, c = -7, u = e ? n - 1 : 0, m = e ? -1 : 1, p = s[t + u];
|
|
18994
18991
|
for (u += m, r = p & (1 << -c) - 1, p >>= -c, c += a; c > 0; r = r * 256 + s[t + u], u += m, c -= 8)
|
|
18995
18992
|
;
|
|
@@ -19003,14 +19000,14 @@ function Dd() {
|
|
|
19003
19000
|
o = o + Math.pow(2, i), r = r - l;
|
|
19004
19001
|
}
|
|
19005
19002
|
return (p ? -1 : 1) * o * Math.pow(2, r - i);
|
|
19006
|
-
},
|
|
19003
|
+
}, Oi.write = function(s, t, e, i, n, r) {
|
|
19007
19004
|
var o, a, h, l = r * 8 - n - 1, c = (1 << l) - 1, u = c >> 1, m = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = i ? 0 : r - 1, _ = i ? 1 : -1, b = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
19008
19005
|
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (a = isNaN(t) ? 1 : 0, o = c) : (o = Math.floor(Math.log(t) / Math.LN2), t * (h = Math.pow(2, -o)) < 1 && (o--, h *= 2), o + u >= 1 ? t += m / h : t += m * Math.pow(2, 1 - u), t * h >= 2 && (o++, h /= 2), o + u >= c ? (a = 0, o = c) : o + u >= 1 ? (a = (t * h - 1) * Math.pow(2, n), o = o + u) : (a = t * Math.pow(2, u - 1) * Math.pow(2, n), o = 0)); n >= 8; s[e + p] = a & 255, p += _, a /= 256, n -= 8)
|
|
19009
19006
|
;
|
|
19010
19007
|
for (o = o << n | a, l += n; l > 0; s[e + p] = o & 255, p += _, o /= 256, l -= 8)
|
|
19011
19008
|
;
|
|
19012
19009
|
s[e + p - _] |= b * 128;
|
|
19013
|
-
}),
|
|
19010
|
+
}), Oi;
|
|
19014
19011
|
}
|
|
19015
19012
|
/*!
|
|
19016
19013
|
* The buffer module from node.js, for the browser.
|
|
@@ -19412,16 +19409,16 @@ function Ld() {
|
|
|
19412
19409
|
return M;
|
|
19413
19410
|
}
|
|
19414
19411
|
function P(g, d, f, x) {
|
|
19415
|
-
return
|
|
19412
|
+
return _i(ve(d, g.length - f), g, f, x);
|
|
19416
19413
|
}
|
|
19417
19414
|
function k(g, d, f, x) {
|
|
19418
|
-
return
|
|
19415
|
+
return _i(Ji(d), g, f, x);
|
|
19419
19416
|
}
|
|
19420
19417
|
function O(g, d, f, x) {
|
|
19421
|
-
return
|
|
19418
|
+
return _i(yn(d), g, f, x);
|
|
19422
19419
|
}
|
|
19423
19420
|
function D(g, d, f, x) {
|
|
19424
|
-
return
|
|
19421
|
+
return _i(_n(d, g.length - f), g, f, x);
|
|
19425
19422
|
}
|
|
19426
19423
|
a.prototype.write = function(d, f, x, C) {
|
|
19427
19424
|
if (f === void 0)
|
|
@@ -19930,7 +19927,7 @@ function Ld() {
|
|
|
19930
19927
|
function yn(g) {
|
|
19931
19928
|
return t.toByteArray(Ki(g));
|
|
19932
19929
|
}
|
|
19933
|
-
function
|
|
19930
|
+
function _i(g, d, f, x) {
|
|
19934
19931
|
let C;
|
|
19935
19932
|
for (C = 0; C < x && !(C + f >= d.length || C >= g.length); ++C)
|
|
19936
19933
|
d[C + f] = g[C];
|
|
@@ -22890,7 +22887,7 @@ export {
|
|
|
22890
22887
|
Nt as D,
|
|
22891
22888
|
Xt as E,
|
|
22892
22889
|
ie as F,
|
|
22893
|
-
|
|
22890
|
+
Gi as G,
|
|
22894
22891
|
vo as H,
|
|
22895
22892
|
qs as I,
|
|
22896
22893
|
fc as J,
|
|
@@ -22904,9 +22901,9 @@ export {
|
|
|
22904
22901
|
Ls as R,
|
|
22905
22902
|
Ul as S,
|
|
22906
22903
|
J as T,
|
|
22907
|
-
|
|
22904
|
+
Li as U,
|
|
22908
22905
|
Va as V,
|
|
22909
|
-
|
|
22906
|
+
mi as W,
|
|
22910
22907
|
ji as X,
|
|
22911
22908
|
Tc as Y,
|
|
22912
22909
|
Rt as Z,
|
|
@@ -22922,12 +22919,12 @@ export {
|
|
|
22922
22919
|
Dn as a7,
|
|
22923
22920
|
wh as a8,
|
|
22924
22921
|
We as a9,
|
|
22925
|
-
|
|
22922
|
+
lt as aa,
|
|
22926
22923
|
so as ab,
|
|
22927
22924
|
Iu as ac,
|
|
22928
22925
|
Fo as ad,
|
|
22929
22926
|
K as ae,
|
|
22930
|
-
|
|
22927
|
+
pi as af,
|
|
22931
22928
|
ht as ag,
|
|
22932
22929
|
Il as ah,
|
|
22933
22930
|
Cl as ai,
|
|
@@ -22939,9 +22936,9 @@ export {
|
|
|
22939
22936
|
Sc as ao,
|
|
22940
22937
|
wc as ap,
|
|
22941
22938
|
Gf as aq,
|
|
22942
|
-
|
|
22939
|
+
ct as b,
|
|
22943
22940
|
Q as c,
|
|
22944
|
-
|
|
22941
|
+
Ni as d,
|
|
22945
22942
|
j as e,
|
|
22946
22943
|
Wc as f,
|
|
22947
22944
|
Yh as g,
|
|
@@ -22954,15 +22951,15 @@ export {
|
|
|
22954
22951
|
Lt as n,
|
|
22955
22952
|
Dl as o,
|
|
22956
22953
|
rn as p,
|
|
22957
|
-
|
|
22954
|
+
gi as q,
|
|
22958
22955
|
rh as r,
|
|
22959
22956
|
Xi as s,
|
|
22960
22957
|
Kn as t,
|
|
22961
22958
|
rl as u,
|
|
22962
|
-
|
|
22959
|
+
Bi as v,
|
|
22963
22960
|
Tt as w,
|
|
22964
22961
|
nn as x,
|
|
22965
22962
|
No as y,
|
|
22966
22963
|
Ut as z
|
|
22967
22964
|
};
|
|
22968
|
-
//# sourceMappingURL=index-
|
|
22965
|
+
//# sourceMappingURL=index-BFRj2AUJ.js.map
|