pixi.js 7.3.1 → 7.3.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/README.md +1 -1
- package/dist/pixi.js +65 -128
- package/dist/pixi.js.map +1 -1
- package/dist/pixi.min.js +124 -124
- package/dist/pixi.min.js.map +1 -1
- package/dist/pixi.min.mjs +56 -56
- package/dist/pixi.min.mjs.map +1 -1
- package/dist/pixi.mjs +65 -128
- package/dist/pixi.mjs.map +1 -1
- package/package.json +31 -31
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PixiJS — The HTML5 Creation Engine
|
|
2
2
|
=============
|
|
3
3
|
|
|
4
|
-

|
|
5
5
|
|
|
6
6
|
The aim of this project is to provide a fast lightweight 2D library that works
|
|
7
7
|
across all devices. The PixiJS renderer allows everyone to enjoy the power of
|
package/dist/pixi.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* pixi.js - v7.3.
|
|
3
|
-
* Compiled Fri,
|
|
2
|
+
* pixi.js - v7.3.2
|
|
3
|
+
* Compiled Fri, 20 Oct 2023 15:28:31 UTC
|
|
4
4
|
*
|
|
5
5
|
* pixi.js is licensed under the MIT License.
|
|
6
6
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -4620,7 +4620,10 @@ void main(void){
|
|
|
4620
4620
|
if (!maxFragmentPrecision) {
|
|
4621
4621
|
maxFragmentPrecision = PRECISION.MEDIUM;
|
|
4622
4622
|
const gl = getTestContext();
|
|
4623
|
-
|
|
4623
|
+
if (gl && gl.getShaderPrecisionFormat) {
|
|
4624
|
+
const shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);
|
|
4625
|
+
shaderFragment && (maxFragmentPrecision = shaderFragment.precision ? PRECISION.HIGH : PRECISION.MEDIUM);
|
|
4626
|
+
}
|
|
4624
4627
|
}
|
|
4625
4628
|
return maxFragmentPrecision;
|
|
4626
4629
|
}
|
|
@@ -8292,7 +8295,7 @@ void main(void)
|
|
|
8292
8295
|
*/
|
|
8293
8296
|
run(options) {
|
|
8294
8297
|
const { renderer } = this;
|
|
8295
|
-
renderer.runners.init.emit(renderer.options), options.hello && console.log(`PixiJS 7.3.
|
|
8298
|
+
renderer.runners.init.emit(renderer.options), options.hello && console.log(`PixiJS 7.3.2 - ${renderer.rendererLogId} - https://pixijs.com`), renderer.resize(renderer.screen.width, renderer.screen.height);
|
|
8296
8299
|
}
|
|
8297
8300
|
destroy() {
|
|
8298
8301
|
}
|
|
@@ -10659,7 +10662,7 @@ void main(void)
|
|
|
10659
10662
|
*/
|
|
10660
10663
|
_isSourcePlaying() {
|
|
10661
10664
|
const source = this.source;
|
|
10662
|
-
return !source.paused && !source.ended
|
|
10665
|
+
return !source.paused && !source.ended;
|
|
10663
10666
|
}
|
|
10664
10667
|
/**
|
|
10665
10668
|
* Returns true if the underlying source is ready for playing.
|
|
@@ -10762,7 +10765,7 @@ void main(void)
|
|
|
10762
10765
|
this.disposeRunner.emit(this, !1);
|
|
10763
10766
|
}
|
|
10764
10767
|
}
|
|
10765
|
-
const VERSION = "7.3.
|
|
10768
|
+
const VERSION = "7.3.2";
|
|
10766
10769
|
class Bounds {
|
|
10767
10770
|
constructor() {
|
|
10768
10771
|
this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0, this.rect = null, this.updateID = -1;
|
|
@@ -13766,7 +13769,7 @@ void main()
|
|
|
13766
13769
|
}
|
|
13767
13770
|
}
|
|
13768
13771
|
const isInteractiveMode = this._isInteractive(eventMode), isInteractiveTarget = currentTarget.isInteractive();
|
|
13769
|
-
return
|
|
13772
|
+
return isInteractiveMode && isInteractiveTarget && this._allInteractiveElements.push(currentTarget), ignore || this._hitElements.length > 0 ? null : shouldReturn ? this._hitElements : isInteractiveMode && !pruneFn(currentTarget, location) && testFn(currentTarget, location) ? isInteractiveTarget ? [currentTarget] : [] : null;
|
|
13770
13773
|
}
|
|
13771
13774
|
/**
|
|
13772
13775
|
* Recursive implementation for {@link PIXI.EventBoundary.hitTest hitTest}.
|
|
@@ -15723,6 +15726,10 @@ ${e2}`);
|
|
|
15723
15726
|
let fontFamilyName = nameTokens.join(" ");
|
|
15724
15727
|
return valid || (fontFamilyName = `"${fontFamilyName.replace(/[\\"]/g, "\\$&")}"`), fontFamilyName;
|
|
15725
15728
|
}
|
|
15729
|
+
const validURICharactersRegex = /^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;
|
|
15730
|
+
function encodeURIWhenNeeded(uri) {
|
|
15731
|
+
return validURICharactersRegex.test(uri) ? uri : encodeURI(uri);
|
|
15732
|
+
}
|
|
15726
15733
|
const loadWebFont = {
|
|
15727
15734
|
extension: {
|
|
15728
15735
|
type: ExtensionType.LoadParser,
|
|
@@ -15738,7 +15745,7 @@ ${e2}`);
|
|
|
15738
15745
|
if (fonts) {
|
|
15739
15746
|
const fontFaces = [], name = (_b = (_a2 = options.data) == null ? void 0 : _a2.family) != null ? _b : getFontFamilyName(url2), weights = (_e = (_d = (_c = options.data) == null ? void 0 : _c.weights) == null ? void 0 : _d.filter((weight) => validWeights.includes(weight))) != null ? _e : ["normal"], data = (_f = options.data) != null ? _f : {};
|
|
15740
15747
|
for (let i2 = 0; i2 < weights.length; i2++) {
|
|
15741
|
-
const weight = weights[i2], font = new FontFace(name, `url(${
|
|
15748
|
+
const weight = weights[i2], font = new FontFace(name, `url(${encodeURIWhenNeeded(url2)})`, __spreadProps$2(__spreadValues$8({}, data), {
|
|
15742
15749
|
weight
|
|
15743
15750
|
}));
|
|
15744
15751
|
await font.load(), fonts.add(font), fontFaces.push(font);
|
|
@@ -16237,38 +16244,6 @@ ${e2}`);
|
|
|
16237
16244
|
assetNames.push(...aliases);
|
|
16238
16245
|
}), this._bundles[bundleId] = assetNames;
|
|
16239
16246
|
}
|
|
16240
|
-
/**
|
|
16241
|
-
* Tells the resolver what keys are associated with witch asset.
|
|
16242
|
-
* The most important thing the resolver does
|
|
16243
|
-
* @example
|
|
16244
|
-
* // Single key, single asset:
|
|
16245
|
-
* resolver.add({alias: 'foo', src: 'bar.png');
|
|
16246
|
-
* resolver.resolveUrl('foo') // => 'bar.png'
|
|
16247
|
-
*
|
|
16248
|
-
* // Multiple keys, single asset:
|
|
16249
|
-
* resolver.add({alias: ['foo', 'boo'], src: 'bar.png'});
|
|
16250
|
-
* resolver.resolveUrl('foo') // => 'bar.png'
|
|
16251
|
-
* resolver.resolveUrl('boo') // => 'bar.png'
|
|
16252
|
-
*
|
|
16253
|
-
* // Multiple keys, multiple assets:
|
|
16254
|
-
* resolver.add({alias: ['foo', 'boo'], src: ['bar.png', 'bar.webp']});
|
|
16255
|
-
* resolver.resolveUrl('foo') // => 'bar.png'
|
|
16256
|
-
*
|
|
16257
|
-
* // Add custom data attached to the resolver
|
|
16258
|
-
* Resolver.add({
|
|
16259
|
-
* alias: 'bunnyBooBooSmooth',
|
|
16260
|
-
* src: 'bunny{png,webp}',
|
|
16261
|
-
* data: { scaleMode:SCALE_MODES.NEAREST }, // Base texture options
|
|
16262
|
-
* });
|
|
16263
|
-
*
|
|
16264
|
-
* resolver.resolve('bunnyBooBooSmooth') // => { src: 'bunny.png', data: { scaleMode: SCALE_MODES.NEAREST } }
|
|
16265
|
-
* @param aliases - the key or keys that you will reference when loading this asset
|
|
16266
|
-
* @param srcs - the asset or assets that will be chosen from when loading via the specified key
|
|
16267
|
-
* @param data - asset-specific data that will be passed to the loaders
|
|
16268
|
-
* - Useful if you want to initiate loaded objects with specific data
|
|
16269
|
-
* @param format - the format of the asset
|
|
16270
|
-
* @param loadParser - the name of the load parser to use
|
|
16271
|
-
*/
|
|
16272
16247
|
add(aliases, srcs, data, format2, loadParser) {
|
|
16273
16248
|
const assets = [];
|
|
16274
16249
|
typeof aliases == "string" || Array.isArray(aliases) && typeof aliases[0] == "string" ? (deprecation("7.2.0", `Assets.add now uses an object instead of individual parameters.
|
|
@@ -16323,12 +16298,12 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16323
16298
|
* name: 'load-screen',
|
|
16324
16299
|
* assets: [
|
|
16325
16300
|
* {
|
|
16326
|
-
*
|
|
16327
|
-
*
|
|
16301
|
+
* alias: 'background',
|
|
16302
|
+
* src: 'sunset.png',
|
|
16328
16303
|
* },
|
|
16329
16304
|
* {
|
|
16330
|
-
*
|
|
16331
|
-
*
|
|
16305
|
+
* alias: 'bar',
|
|
16306
|
+
* src: 'load-bar.{png,webp}',
|
|
16332
16307
|
* },
|
|
16333
16308
|
* ],
|
|
16334
16309
|
* },
|
|
@@ -16336,12 +16311,12 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16336
16311
|
* name: 'game-screen',
|
|
16337
16312
|
* assets: [
|
|
16338
16313
|
* {
|
|
16339
|
-
*
|
|
16340
|
-
*
|
|
16314
|
+
* alias: 'character',
|
|
16315
|
+
* src: 'robot.png',
|
|
16341
16316
|
* },
|
|
16342
16317
|
* {
|
|
16343
|
-
*
|
|
16344
|
-
*
|
|
16318
|
+
* alias: 'enemy',
|
|
16319
|
+
* src: 'bad-guy.png',
|
|
16345
16320
|
* },
|
|
16346
16321
|
* ],
|
|
16347
16322
|
* },
|
|
@@ -16448,7 +16423,7 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16448
16423
|
buildResolvedAsset(formattedAsset, data) {
|
|
16449
16424
|
var _a2;
|
|
16450
16425
|
const { aliases, data: assetData, loadParser, format: format2 } = data;
|
|
16451
|
-
return (this._basePath || this._rootPath) && (formattedAsset.src = path.toAbsolute(formattedAsset.src, this._basePath, this._rootPath)), formattedAsset.alias = (_a2 = aliases != null ? aliases : formattedAsset.alias) != null ? _a2 : [formattedAsset.src], formattedAsset.src = this._appendDefaultSearchParams(formattedAsset.src), formattedAsset.data = __spreadValues$4(__spreadValues$4({}, assetData || {}), formattedAsset.data), formattedAsset.loadParser = loadParser != null ? loadParser : formattedAsset.loadParser, formattedAsset.format = format2 != null ? format2 : formattedAsset.src
|
|
16426
|
+
return (this._basePath || this._rootPath) && (formattedAsset.src = path.toAbsolute(formattedAsset.src, this._basePath, this._rootPath)), formattedAsset.alias = (_a2 = aliases != null ? aliases : formattedAsset.alias) != null ? _a2 : [formattedAsset.src], formattedAsset.src = this._appendDefaultSearchParams(formattedAsset.src), formattedAsset.data = __spreadValues$4(__spreadValues$4({}, assetData || {}), formattedAsset.data), formattedAsset.loadParser = loadParser != null ? loadParser : formattedAsset.loadParser, formattedAsset.format = format2 != null ? format2 : path.extname(formattedAsset.src).slice(1), formattedAsset.srcs = formattedAsset.src, formattedAsset.name = formattedAsset.alias, formattedAsset;
|
|
16452
16427
|
}
|
|
16453
16428
|
}
|
|
16454
16429
|
class AssetsClass {
|
|
@@ -16484,51 +16459,6 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16484
16459
|
}
|
|
16485
16460
|
}), options.preferences && this.setPreferences(options.preferences);
|
|
16486
16461
|
}
|
|
16487
|
-
/**
|
|
16488
|
-
* Allows you to specify how to resolve any assets load requests.
|
|
16489
|
-
* There are a few ways to add things here as shown below:
|
|
16490
|
-
* @example
|
|
16491
|
-
* import { Assets } from 'pixi.js';
|
|
16492
|
-
*
|
|
16493
|
-
* // Simple
|
|
16494
|
-
* Assets.add({alias: 'bunnyBooBoo', src: 'bunny.png'});
|
|
16495
|
-
* const bunny = await Assets.load('bunnyBooBoo');
|
|
16496
|
-
*
|
|
16497
|
-
* // Multiple keys:
|
|
16498
|
-
* Assets.add({alias: ['burger', 'chicken'], src: 'bunny.png'});
|
|
16499
|
-
*
|
|
16500
|
-
* const bunny = await Assets.load('burger');
|
|
16501
|
-
* const bunny2 = await Assets.load('chicken');
|
|
16502
|
-
*
|
|
16503
|
-
* // passing options to to the object
|
|
16504
|
-
* Assets.add({
|
|
16505
|
-
* alias: 'bunnyBooBooSmooth',
|
|
16506
|
-
* src: 'bunny{png,webp}',
|
|
16507
|
-
* data: { scaleMode: SCALE_MODES.NEAREST }, // Base texture options
|
|
16508
|
-
* });
|
|
16509
|
-
*
|
|
16510
|
-
* // Multiple assets
|
|
16511
|
-
*
|
|
16512
|
-
* // The following all do the same thing:
|
|
16513
|
-
*
|
|
16514
|
-
* Assets.add({alias: 'bunnyBooBoo', src: 'bunny{png,webp}'});
|
|
16515
|
-
*
|
|
16516
|
-
* Assets.add({
|
|
16517
|
-
* alias: 'bunnyBooBoo',
|
|
16518
|
-
* src: [
|
|
16519
|
-
* 'bunny.png',
|
|
16520
|
-
* 'bunny.webp',
|
|
16521
|
-
* ],
|
|
16522
|
-
* });
|
|
16523
|
-
*
|
|
16524
|
-
* const bunny = await Assets.load('bunnyBooBoo'); // Will try to load WebP if available
|
|
16525
|
-
* @param aliases - the key or keys that you will reference when loading this asset
|
|
16526
|
-
* @param srcs - the asset or assets that will be chosen from when loading via the specified key
|
|
16527
|
-
* @param data - asset-specific data that will be passed to the loaders
|
|
16528
|
-
* - Useful if you want to initiate loaded objects with specific data
|
|
16529
|
-
* @param format - the format of the asset
|
|
16530
|
-
* @param loadParser - the name of the load parser to use
|
|
16531
|
-
*/
|
|
16532
16462
|
add(aliases, srcs, data, format2, loadParser) {
|
|
16533
16463
|
this.resolver.add(aliases, srcs, data, format2, loadParser);
|
|
16534
16464
|
}
|
|
@@ -16576,12 +16506,12 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16576
16506
|
* name: 'load-screen',
|
|
16577
16507
|
* assets: [
|
|
16578
16508
|
* {
|
|
16579
|
-
*
|
|
16580
|
-
*
|
|
16509
|
+
* alias: 'background',
|
|
16510
|
+
* src: 'sunset.png',
|
|
16581
16511
|
* },
|
|
16582
16512
|
* {
|
|
16583
|
-
*
|
|
16584
|
-
*
|
|
16513
|
+
* alias: 'bar',
|
|
16514
|
+
* src: 'load-bar.{png,webp}',
|
|
16585
16515
|
* },
|
|
16586
16516
|
* ],
|
|
16587
16517
|
* },
|
|
@@ -16589,12 +16519,12 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16589
16519
|
* name: 'game-screen',
|
|
16590
16520
|
* assets: [
|
|
16591
16521
|
* {
|
|
16592
|
-
*
|
|
16593
|
-
*
|
|
16522
|
+
* alias: 'character',
|
|
16523
|
+
* src: 'robot.png',
|
|
16594
16524
|
* },
|
|
16595
16525
|
* {
|
|
16596
|
-
*
|
|
16597
|
-
*
|
|
16526
|
+
* alias: 'enemy',
|
|
16527
|
+
* src: 'bad-guy.png',
|
|
16598
16528
|
* },
|
|
16599
16529
|
* ],
|
|
16600
16530
|
* },
|
|
@@ -16831,22 +16761,36 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16831
16761
|
}
|
|
16832
16762
|
};
|
|
16833
16763
|
extensions$1.add(cacheTextureArray);
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
type: ExtensionType.DetectionParser,
|
|
16837
|
-
priority: 1
|
|
16838
|
-
},
|
|
16839
|
-
test: async () => {
|
|
16840
|
-
const avifData = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=";
|
|
16764
|
+
async function testImageFormat(imageData) {
|
|
16765
|
+
if ("Image" in globalThis)
|
|
16841
16766
|
return new Promise((resolve2) => {
|
|
16842
|
-
const
|
|
16843
|
-
|
|
16767
|
+
const image = new Image();
|
|
16768
|
+
image.onload = () => {
|
|
16844
16769
|
resolve2(!0);
|
|
16845
|
-
},
|
|
16770
|
+
}, image.onerror = () => {
|
|
16846
16771
|
resolve2(!1);
|
|
16847
|
-
},
|
|
16772
|
+
}, image.src = imageData;
|
|
16848
16773
|
});
|
|
16774
|
+
if ("createImageBitmap" in globalThis && "fetch" in globalThis) {
|
|
16775
|
+
try {
|
|
16776
|
+
const blob = await (await fetch(imageData)).blob();
|
|
16777
|
+
await createImageBitmap(blob);
|
|
16778
|
+
} catch (e2) {
|
|
16779
|
+
return !1;
|
|
16780
|
+
}
|
|
16781
|
+
return !0;
|
|
16782
|
+
}
|
|
16783
|
+
return !1;
|
|
16784
|
+
}
|
|
16785
|
+
const detectAvif = {
|
|
16786
|
+
extension: {
|
|
16787
|
+
type: ExtensionType.DetectionParser,
|
|
16788
|
+
priority: 1
|
|
16849
16789
|
},
|
|
16790
|
+
test: async () => testImageFormat(
|
|
16791
|
+
// eslint-disable-next-line max-len
|
|
16792
|
+
"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="
|
|
16793
|
+
),
|
|
16850
16794
|
add: async (formats2) => [...formats2, "avif"],
|
|
16851
16795
|
remove: async (formats2) => formats2.filter((f2) => f2 !== "avif")
|
|
16852
16796
|
};
|
|
@@ -16856,17 +16800,9 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16856
16800
|
type: ExtensionType.DetectionParser,
|
|
16857
16801
|
priority: 0
|
|
16858
16802
|
},
|
|
16859
|
-
test: async () =>
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
const webp = new Image();
|
|
16863
|
-
webp.onload = () => {
|
|
16864
|
-
resolve2(!0);
|
|
16865
|
-
}, webp.onerror = () => {
|
|
16866
|
-
resolve2(!1);
|
|
16867
|
-
}, webp.src = webpData;
|
|
16868
|
-
});
|
|
16869
|
-
},
|
|
16803
|
+
test: async () => testImageFormat(
|
|
16804
|
+
"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="
|
|
16805
|
+
),
|
|
16870
16806
|
add: async (formats2) => [...formats2, "webp"],
|
|
16871
16807
|
remove: async (formats2) => formats2.filter((f2) => f2 !== "webp")
|
|
16872
16808
|
};
|
|
@@ -16922,7 +16858,7 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
16922
16858
|
var _a2, _b;
|
|
16923
16859
|
return {
|
|
16924
16860
|
resolution: parseFloat((_b = (_a2 = settings.RETINA_PREFIX.exec(value)) == null ? void 0 : _a2[1]) != null ? _b : "1"),
|
|
16925
|
-
format:
|
|
16861
|
+
format: path.extname(value).slice(1),
|
|
16926
16862
|
src: value
|
|
16927
16863
|
};
|
|
16928
16864
|
}
|
|
@@ -17443,12 +17379,13 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
17443
17379
|
const resolveCompressedTextureUrl = {
|
|
17444
17380
|
extension: ExtensionType.ResolveParser,
|
|
17445
17381
|
test: (value) => {
|
|
17446
|
-
const extension =
|
|
17382
|
+
const extension = path.extname(value).slice(1);
|
|
17447
17383
|
return ["basis", "ktx", "dds"].includes(extension);
|
|
17448
17384
|
},
|
|
17449
17385
|
parse: (value) => {
|
|
17450
17386
|
var _a2, _b, _c, _d;
|
|
17451
|
-
|
|
17387
|
+
const extension = path.extname(value).slice(1);
|
|
17388
|
+
if (extension === "ktx") {
|
|
17452
17389
|
const extensions2 = [
|
|
17453
17390
|
".s3tc.ktx",
|
|
17454
17391
|
".s3tc_sRGB.ktx",
|
|
@@ -17467,7 +17404,7 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), asse
|
|
|
17467
17404
|
}
|
|
17468
17405
|
return {
|
|
17469
17406
|
resolution: parseFloat((_d = (_c = settings.RETINA_PREFIX.exec(value)) == null ? void 0 : _c[1]) != null ? _d : "1"),
|
|
17470
|
-
format:
|
|
17407
|
+
format: extension,
|
|
17471
17408
|
src: value
|
|
17472
17409
|
};
|
|
17473
17410
|
}
|