pixi.js 7.2.0 → 7.2.2
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/pixi.js +44 -11
- package/dist/pixi.js.map +1 -1
- package/dist/pixi.min.js +30 -30
- package/dist/pixi.min.js.map +1 -1
- package/dist/pixi.min.mjs +22 -22
- package/dist/pixi.min.mjs.map +1 -1
- package/dist/pixi.mjs +44 -11
- package/dist/pixi.mjs.map +1 -1
- package/package.json +31 -31
package/dist/pixi.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* pixi.js - v7.2.
|
|
3
|
-
* Compiled Tue,
|
|
2
|
+
* pixi.js - v7.2.2
|
|
3
|
+
* Compiled Tue, 21 Mar 2023 12:27:22 UTC
|
|
4
4
|
*
|
|
5
5
|
* pixi.js is licensed under the MIT License.
|
|
6
6
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -3348,19 +3348,51 @@ const _Color = class {
|
|
|
3348
3348
|
}
|
|
3349
3349
|
set value(value) {
|
|
3350
3350
|
if (value instanceof _Color) {
|
|
3351
|
-
this._value = value._value;
|
|
3351
|
+
this._value = this.cloneSource(value._value);
|
|
3352
3352
|
this._int = value._int;
|
|
3353
3353
|
this._components.set(value._components);
|
|
3354
3354
|
} else if (value === null) {
|
|
3355
3355
|
throw new Error("Cannot set PIXI.Color#value to null");
|
|
3356
|
-
} else if (this._value
|
|
3356
|
+
} else if (this._value === null || !this.isSourceEqual(this._value, value)) {
|
|
3357
3357
|
this.normalize(value);
|
|
3358
|
-
this._value = value;
|
|
3358
|
+
this._value = this.cloneSource(value);
|
|
3359
3359
|
}
|
|
3360
3360
|
}
|
|
3361
3361
|
get value() {
|
|
3362
3362
|
return this._value;
|
|
3363
3363
|
}
|
|
3364
|
+
cloneSource(value) {
|
|
3365
|
+
if (typeof value === "string" || typeof value === "number" || value instanceof Number || value === null) {
|
|
3366
|
+
return value;
|
|
3367
|
+
} else if (Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
3368
|
+
return value.slice(0);
|
|
3369
|
+
} else if (typeof value === "object" && value !== null) {
|
|
3370
|
+
return { ...value };
|
|
3371
|
+
}
|
|
3372
|
+
return value;
|
|
3373
|
+
}
|
|
3374
|
+
isSourceEqual(value1, value2) {
|
|
3375
|
+
const type1 = typeof value1;
|
|
3376
|
+
const type2 = typeof value2;
|
|
3377
|
+
if (type1 !== type2) {
|
|
3378
|
+
return false;
|
|
3379
|
+
} else if (type1 === "number" || type1 === "string" || value1 instanceof Number) {
|
|
3380
|
+
return value1 === value2;
|
|
3381
|
+
} else if (Array.isArray(value1) && Array.isArray(value2) || ArrayBuffer.isView(value1) && ArrayBuffer.isView(value2)) {
|
|
3382
|
+
if (value1.length !== value2.length) {
|
|
3383
|
+
return false;
|
|
3384
|
+
}
|
|
3385
|
+
return value1.every((v, i) => v === value2[i]);
|
|
3386
|
+
} else if (value1 !== null && value2 !== null) {
|
|
3387
|
+
const keys1 = Object.keys(value1);
|
|
3388
|
+
const keys2 = Object.keys(value2);
|
|
3389
|
+
if (keys1.length !== keys2.length) {
|
|
3390
|
+
return false;
|
|
3391
|
+
}
|
|
3392
|
+
return keys1.every((key) => value1[key] === value2[key]);
|
|
3393
|
+
}
|
|
3394
|
+
return value1 === value2;
|
|
3395
|
+
}
|
|
3364
3396
|
toRgba() {
|
|
3365
3397
|
const [r, g, b, a] = this._components;
|
|
3366
3398
|
return { r, g, b, a };
|
|
@@ -3502,6 +3534,7 @@ const _Color = class {
|
|
|
3502
3534
|
}
|
|
3503
3535
|
}
|
|
3504
3536
|
refreshInt() {
|
|
3537
|
+
this._components.forEach((value, i) => this._components[i] = Math.min(Math.max(value, 0), 1));
|
|
3505
3538
|
const [r, g, b] = this._components;
|
|
3506
3539
|
this._int = (r * 255 << 16) + (g * 255 << 8) + (b * 255 | 0);
|
|
3507
3540
|
}
|
|
@@ -10355,7 +10388,7 @@ class StartupSystem {
|
|
|
10355
10388
|
const { renderer } = this;
|
|
10356
10389
|
renderer.runners.init.emit(renderer.options);
|
|
10357
10390
|
if (options.hello) {
|
|
10358
|
-
console.log(`PixiJS ${"7.2.
|
|
10391
|
+
console.log(`PixiJS ${"7.2.2"} - ${renderer.rendererLogId} - https://pixijs.com`);
|
|
10359
10392
|
}
|
|
10360
10393
|
renderer.resize(renderer.screen.width, renderer.screen.height);
|
|
10361
10394
|
}
|
|
@@ -12541,7 +12574,7 @@ class TransformFeedback {
|
|
|
12541
12574
|
}
|
|
12542
12575
|
}
|
|
12543
12576
|
|
|
12544
|
-
const VERSION = "7.2.
|
|
12577
|
+
const VERSION = "7.2.2";
|
|
12545
12578
|
|
|
12546
12579
|
class Bounds {
|
|
12547
12580
|
constructor() {
|
|
@@ -14986,10 +15019,10 @@ class FederatedEvent {
|
|
|
14986
15019
|
this.propagationImmediatelyStopped = false;
|
|
14987
15020
|
this.layer = new Point();
|
|
14988
15021
|
this.page = new Point();
|
|
14989
|
-
this.AT_TARGET = 1;
|
|
14990
|
-
this.BUBBLING_PHASE = 2;
|
|
14991
|
-
this.CAPTURING_PHASE = 3;
|
|
14992
15022
|
this.NONE = 0;
|
|
15023
|
+
this.CAPTURING_PHASE = 1;
|
|
15024
|
+
this.AT_TARGET = 2;
|
|
15025
|
+
this.BUBBLING_PHASE = 3;
|
|
14993
15026
|
this.manager = manager;
|
|
14994
15027
|
}
|
|
14995
15028
|
get layerX() {
|
|
@@ -15297,7 +15330,7 @@ class EventBoundary {
|
|
|
15297
15330
|
if (displayObject.isMask) {
|
|
15298
15331
|
return true;
|
|
15299
15332
|
}
|
|
15300
|
-
if (this._collectInteractiveElements
|
|
15333
|
+
if (this._collectInteractiveElements)
|
|
15301
15334
|
return false;
|
|
15302
15335
|
if (displayObject.hitArea) {
|
|
15303
15336
|
displayObject.worldTransform.applyInverse(location, tempLocalMapping);
|