@vpmedia/phaser 1.99.0 → 1.100.0
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/CHANGELOG.md +16 -0
- package/package.json +8 -8
- package/src/index.js +5 -0
- package/src/phaser/core/sound_manager.js +22 -19
- package/types/index.d.ts +3 -0
- package/types/phaser/core/sound_manager.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.100.0] - 2026-01-05
|
|
2
|
+
|
|
3
|
+
### 🐛 Bug Fixes
|
|
4
|
+
|
|
5
|
+
- Remove audio from decode watchlist if decode fails
|
|
6
|
+
|
|
7
|
+
### 💼 Other
|
|
8
|
+
|
|
9
|
+
- *(deps)* Bump dependency versions
|
|
10
|
+
- *(deps)* Bump dependency versions
|
|
11
|
+
- *(deps)* Bump dependency versions
|
|
12
|
+
|
|
13
|
+
### ⚙️ Miscellaneous Tasks
|
|
14
|
+
|
|
15
|
+
- Release
|
|
16
|
+
- *(release)* V1.100.0
|
|
1
17
|
## [1.99.0] - 2025-12-29
|
|
2
18
|
|
|
3
19
|
### 💼 Other
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.100.0",
|
|
4
4
|
"description": "@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2",
|
|
5
5
|
"author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"uuid": "^13.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@commitlint/cli": "^20.
|
|
31
|
-
"@commitlint/config-conventional": "^20.
|
|
30
|
+
"@commitlint/cli": "^20.3.0",
|
|
31
|
+
"@commitlint/config-conventional": "^20.3.0",
|
|
32
32
|
"@eslint/js": "^9.39.2",
|
|
33
33
|
"@types/node": "^25.0.3",
|
|
34
34
|
"@vitest/coverage-v8": "^4.0.16",
|
|
35
35
|
"eslint": "^9.39.2",
|
|
36
36
|
"eslint-plugin-jsdoc": "^61.5.0",
|
|
37
|
-
"eslint-plugin-oxlint": "^1.
|
|
37
|
+
"eslint-plugin-oxlint": "^1.36.0",
|
|
38
38
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
39
|
-
"globals": "^
|
|
39
|
+
"globals": "^17.0.0",
|
|
40
40
|
"jsdom": "^27.4.0",
|
|
41
|
-
"oxlint": "^1.
|
|
42
|
-
"oxlint-tsgolint": "^0.10.
|
|
41
|
+
"oxlint": "^1.36.0",
|
|
42
|
+
"oxlint-tsgolint": "^0.10.1",
|
|
43
43
|
"prettier": "^3.7.4",
|
|
44
44
|
"typescript": "^5.9.3",
|
|
45
|
-
"typescript-eslint": "^8.
|
|
45
|
+
"typescript-eslint": "^8.51.0",
|
|
46
46
|
"vitest": "^4.0.16"
|
|
47
47
|
},
|
|
48
48
|
"browserslist": [
|
package/src/index.js
CHANGED
|
@@ -4,6 +4,11 @@ export { GameObjectFactory } from './phaser/core/factory.js';
|
|
|
4
4
|
export { Game } from './phaser/core/game.js';
|
|
5
5
|
export { Signal } from './phaser/core/signal.js';
|
|
6
6
|
export * as MathUtils from './phaser/util/math.js';
|
|
7
|
+
// scale
|
|
8
|
+
export { ScaleManager } from './phaser/core/scale_manager.js';
|
|
9
|
+
// scene
|
|
10
|
+
export { Scene } from './phaser/core/scene.js';
|
|
11
|
+
export { SceneManager } from './phaser/core/scene_manager.js';
|
|
7
12
|
// sound
|
|
8
13
|
export { Sound } from './phaser/core/sound.js';
|
|
9
14
|
export { SoundManager } from './phaser/core/sound_manager.js';
|
|
@@ -252,25 +252,29 @@ export class SoundManager {
|
|
|
252
252
|
*/
|
|
253
253
|
decode(key) {
|
|
254
254
|
const soundData = this.game.cache.getSoundData(key);
|
|
255
|
-
if (soundData) {
|
|
256
|
-
|
|
257
|
-
this.game.cache.updateSound(key, 'isDecoding', true);
|
|
258
|
-
this.context
|
|
259
|
-
.decodeAudioData(soundData)
|
|
260
|
-
.then((buffer) => {
|
|
261
|
-
this.game.cache.decodedSound(key, buffer);
|
|
262
|
-
})
|
|
263
|
-
.catch((error) => {
|
|
264
|
-
const typedError = error instanceof Error ? error : new Error(String(error));
|
|
265
|
-
this.game.logger.exception('SoundManager', typedError, { tags: { 'asset.key': key } });
|
|
266
|
-
if (typedError.name === 'InvalidStateError') {
|
|
267
|
-
addPageLifecycleCallback(PAGE_LIFECYCLE_STATE_ACTIVE, () => {
|
|
268
|
-
this.decode(key);
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
}
|
|
255
|
+
if (!soundData) {
|
|
256
|
+
return;
|
|
273
257
|
}
|
|
258
|
+
if (this.game.cache.isSoundDecoded(key) === true) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
this.game.cache.updateSound(key, 'isDecoding', true);
|
|
262
|
+
this.context
|
|
263
|
+
.decodeAudioData(soundData)
|
|
264
|
+
.then((buffer) => {
|
|
265
|
+
this.game.cache.decodedSound(key, buffer);
|
|
266
|
+
})
|
|
267
|
+
.catch((error) => {
|
|
268
|
+
const typedError = error instanceof Error ? error : new Error(String(error));
|
|
269
|
+
this.game.logger.exception('SoundManager', typedError, { tags: { 'asset.key': key } });
|
|
270
|
+
if (typedError.name === 'InvalidStateError') {
|
|
271
|
+
addPageLifecycleCallback(PAGE_LIFECYCLE_STATE_ACTIVE, () => {
|
|
272
|
+
this.decode(key);
|
|
273
|
+
});
|
|
274
|
+
} else if (typedError.name === 'EncodingError') {
|
|
275
|
+
this._watchList.remove(key);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
274
278
|
}
|
|
275
279
|
|
|
276
280
|
/**
|
|
@@ -295,7 +299,6 @@ export class SoundManager {
|
|
|
295
299
|
}
|
|
296
300
|
// All decoded already?
|
|
297
301
|
if (this._watchList.total === 0) {
|
|
298
|
-
this.game.logger.info('All sounds decoded');
|
|
299
302
|
this._watching = false;
|
|
300
303
|
callback.call(callbackContext);
|
|
301
304
|
} else {
|
package/types/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export { GameObjectFactory } from "./phaser/core/factory.js";
|
|
|
3
3
|
export { Game } from "./phaser/core/game.js";
|
|
4
4
|
export { Signal } from "./phaser/core/signal.js";
|
|
5
5
|
export * as MathUtils from "./phaser/util/math.js";
|
|
6
|
+
export { ScaleManager } from "./phaser/core/scale_manager.js";
|
|
7
|
+
export { Scene } from "./phaser/core/scene.js";
|
|
8
|
+
export { SceneManager } from "./phaser/core/scene_manager.js";
|
|
6
9
|
export { Sound } from "./phaser/core/sound.js";
|
|
7
10
|
export { SoundManager } from "./phaser/core/sound_manager.js";
|
|
8
11
|
export { SoundSprite } from "./phaser/core/sound_sprite.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sound_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/sound_manager.js"],"names":[],"mappings":"AAaA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAuBlC;IApBC,+BAAgB;IAChB,iBAA4B;IAC5B,2BAA2B;IAC3B,SADW,YAAY,CACJ;IACnB,oBAAoB;IACpB,iBAAoB;IACpB,aAA0B;IAC1B,yBAA2B;IAC3B,kBAAqB;IAErB,oBAAuB;IACvB,gBAAmB;IACnB,mBAAyB;IACzB,gBAAgB;IAChB,sBAAsB;IACtB,SADW,KAAK,EAAE,CACD;IACjB,qBAAgC;IAChC,mBAAsB;IACtB,yBAA0B;IAC1B,mBAAyB;IAG3B;;OAEG;IACH,aAqDC;IAbG,gBAA+C;IAenD;;OAEG;IACH,kCAIE;IAEF;;OAEG;IACH,iCAME;IAEF;;OAEG;IACH,gCAUE;IAEF;;OAEG;IACH,8BASE;IAEF;;OAEG;IACH,iCASE;IAEF;;;OAGG;IACH,gBAAiB,OAFN,KAEW,UAsCpB;IAEF;;OAEG;IACH,gBASC;IAED;;OAEG;IACH,iBASC;IAED;;OAEG;IACH,kBASC;IAED;;;OAGG;IACH,YAFW,MAAM,
|
|
1
|
+
{"version":3,"file":"sound_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/sound_manager.js"],"names":[],"mappings":"AAaA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAuBlC;IApBC,+BAAgB;IAChB,iBAA4B;IAC5B,2BAA2B;IAC3B,SADW,YAAY,CACJ;IACnB,oBAAoB;IACpB,iBAAoB;IACpB,aAA0B;IAC1B,yBAA2B;IAC3B,kBAAqB;IAErB,oBAAuB;IACvB,gBAAmB;IACnB,mBAAyB;IACzB,gBAAgB;IAChB,sBAAsB;IACtB,SADW,KAAK,EAAE,CACD;IACjB,qBAAgC;IAChC,mBAAsB;IACtB,yBAA0B;IAC1B,mBAAyB;IAG3B;;OAEG;IACH,aAqDC;IAbG,gBAA+C;IAenD;;OAEG;IACH,kCAIE;IAEF;;OAEG;IACH,iCAME;IAEF;;OAEG;IACH,gCAUE;IAEF;;OAEG;IACH,8BASE;IAEF;;OAEG;IACH,iCASE;IAEF;;;OAGG;IACH,gBAAiB,OAFN,KAEW,UAsCpB;IAEF;;OAEG;IACH,gBASC;IAED;;OAEG;IACH,iBASC;IAED;;OAEG;IACH,kBASC;IAED;;;OAGG;IACH,YAFW,MAAM,QA2BhB;IAED;;;;;OAKG;IACH,0BAJW,KAAK,EAAE,GAAC,MAAM,EAAE,uCAEhB,MAAM,QAyBhB;IAED;;OAEG;IACH,eAqBC;IAED;;;;;;;OAOG;IACH,SANW,MAAM,WACN,MAAM,SACN,OAAO,YACP,OAAO,GACL,KAAK,CAMjB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,WAAW,CAIvB;IAED;;;;OAIG;IACH,cAHW,KAAK,GAAG,IAAI,GAAG,SAAS,GACtB,OAAO,CAanB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,MAAM,CAclB;IAED;;;;;;OAMG;IACH,UALW,MAAM,WACN,MAAM,SACN,OAAO,GACL,KAAK,CASjB;IAED;;OAEG;IACH,gBAUC;IAJG,iBAA6C;IAMjD;;OAEG;IACH,kBASC;IAED;;OAEG;IACH,gBAYC;IAUD;;OAEG;IACH,gBATa,OAAO,EAuBnB;IAzBD;;;OAGG;IACH,YAFa,OAAO,CAInB;IA6BD;;OAEG;IACH,kBATa,MAAM,EAqBlB;IAvBD;;;OAGG;IACH,cAFa,MAAM,CAIlB;CAkBF;uBApfsB,aAAa;sBACd,YAAY;yBAJT,gBAAgB;4BAKb,mBAAmB"}
|