@pixi/assets
Advanced tools
Comparing version 7.4.0 to 7.4.2
@@ -22,5 +22,5 @@ "use strict"; | ||
let WORKER_URL = null; | ||
class WorkerInstance extends Worker { | ||
class WorkerInstance { | ||
constructor() { | ||
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), super(WORKER_URL); | ||
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), this.worker = new Worker(WORKER_URL); | ||
} | ||
@@ -27,0 +27,0 @@ } |
@@ -31,5 +31,5 @@ "use strict"; | ||
let WORKER_URL = null; | ||
class WorkerInstance extends Worker { | ||
class WorkerInstance { | ||
constructor() { | ||
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), super(WORKER_URL); | ||
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), this.worker = new Worker(WORKER_URL); | ||
} | ||
@@ -36,0 +36,0 @@ } |
@@ -10,3 +10,3 @@ "use strict"; | ||
return this._isImageBitmapSupported !== void 0 ? this._isImageBitmapSupported : (this._isImageBitmapSupported = new Promise((resolve) => { | ||
const worker = new checkImageBitmap_worker.default(); | ||
const { worker } = new checkImageBitmap_worker.default(); | ||
worker.addEventListener("message", (event) => { | ||
@@ -26,3 +26,3 @@ worker.terminate(), checkImageBitmap_worker.default.revokeObjectURL(), resolve(event.data); | ||
let worker = this.workerPool.pop(); | ||
return !worker && this._createdWorkers < MAX_WORKERS && (this._createdWorkers++, worker = new loadImageBitmap_worker.default(), worker.addEventListener("message", (event) => { | ||
return !worker && this._createdWorkers < MAX_WORKERS && (this._createdWorkers++, worker = new loadImageBitmap_worker.default().worker, worker.addEventListener("message", (event) => { | ||
this.complete(event.data), this.returnWorker(event.target), this.next(); | ||
@@ -29,0 +29,0 @@ })), worker; |
@@ -383,3 +383,3 @@ "use strict"; | ||
const { aliases, data: assetData, loadParser, format } = data; | ||
return (this._basePath || this._rootPath) && (formattedAsset.src = core.utils.path.toAbsolute(formattedAsset.src, this._basePath, this._rootPath)), formattedAsset.alias = aliases ?? formattedAsset.alias ?? [formattedAsset.src], formattedAsset.src = this._appendDefaultSearchParams(formattedAsset.src), formattedAsset.data = { ...assetData || {}, ...formattedAsset.data }, formattedAsset.loadParser = loadParser ?? formattedAsset.loadParser, formattedAsset.format = format ?? core.utils.path.extname(formattedAsset.src).slice(1), formattedAsset.srcs = formattedAsset.src, formattedAsset.name = formattedAsset.alias, formattedAsset; | ||
return (this._basePath || this._rootPath) && (formattedAsset.src = core.utils.path.toAbsolute(formattedAsset.src, this._basePath, this._rootPath)), formattedAsset.alias = aliases ?? formattedAsset.alias ?? [formattedAsset.src], formattedAsset.src = this._appendDefaultSearchParams(formattedAsset.src), formattedAsset.data = { ...assetData || {}, ...formattedAsset.data }, formattedAsset.loadParser = loadParser ?? formattedAsset.loadParser, formattedAsset.format = format ?? formattedAsset.format ?? core.utils.path.extname(formattedAsset.src).slice(1), formattedAsset.srcs = formattedAsset.src, formattedAsset.name = formattedAsset.alias, formattedAsset; | ||
} | ||
@@ -386,0 +386,0 @@ } |
{ | ||
"name": "@pixi/assets", | ||
"version": "7.4.0", | ||
"version": "7.4.2", | ||
"description": "Asset manager for PixiJS, loading resolving and Cacheing", | ||
@@ -50,4 +50,4 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@pixi/core": "7.4.0" | ||
"@pixi/core": "7.4.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
512914
61163