@vpmedia/phaser 1.27.0 → 1.28.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vpmedia/phaser
2
2
 
3
- [![npm version](https://badge.fury.io/js/@vpmedia%2Fphaser.svg?v=1.27.0)](https://badge.fury.io/js/@vpmedia%2Fphaser)
3
+ [![npm version](https://badge.fury.io/js/@vpmedia%2Fphaser.svg?v=1.28.0)](https://badge.fury.io/js/@vpmedia%2Fphaser)
4
4
  [![Node.js CI](https://github.com/vpmedia/phaser/actions/workflows/node.js.yml/badge.svg)](https://github.com/vpmedia/phaser/actions/workflows/node.js.yml)
5
5
 
6
6
  @vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/phaser",
3
- "version": "1.27.0",
3
+ "version": "1.28.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",
@@ -26,7 +26,7 @@
26
26
  "eslint-config-prettier": "^8.8.0",
27
27
  "eslint-plugin-import": "^2.27.5",
28
28
  "eslint-plugin-jest": "^27.2.1",
29
- "eslint-plugin-jsdoc": "^43.2.0",
29
+ "eslint-plugin-jsdoc": "^44.2.4",
30
30
  "eslint-plugin-prettier": "^4.2.1",
31
31
  "husky": "^8.0.3",
32
32
  "jest": "^29.5.0",
@@ -44,7 +44,7 @@
44
44
  "lint-staged": "lint-staged"
45
45
  },
46
46
  "engines": {
47
- "npm": ">=8.0.0",
48
- "node": ">=18.0.0"
47
+ "npm": ">=9.0.0",
48
+ "node": ">=19.0.0"
49
49
  }
50
50
  }
package/src/index.js CHANGED
@@ -3,6 +3,16 @@ import * as Const from './phaser/core/const';
3
3
  import { Game } from './phaser/core/game';
4
4
  import { Signal } from './phaser/core/signal';
5
5
  import * as MathUtils from './phaser/util/math';
6
+ // sound
7
+ import { Sound } from './phaser/core/sound';
8
+ import { SoundSprite } from './phaser/core/sound_sprite';
9
+ // time
10
+ import { Time } from './phaser/core/time';
11
+ import { Timer } from './phaser/core/timer';
12
+ import { TimerEvent } from './phaser/core/timer_event';
13
+ // tween
14
+ import { Tween } from './phaser/core/tween';
15
+ import { TweenData } from './phaser/core/tween_data';
6
16
  // texture
7
17
  import { BaseTexture } from './phaser/display/webgl/base_texture';
8
18
  import { Texture } from './phaser/display/webgl/texture';
@@ -30,6 +40,13 @@ export {
30
40
  Signal,
31
41
  MathUtils,
32
42
  BaseTexture,
43
+ Sound,
44
+ SoundSprite,
45
+ Time,
46
+ Timer,
47
+ TimerEvent,
48
+ Tween,
49
+ TweenData,
33
50
  Texture,
34
51
  Circle,
35
52
  Ellipse,
@@ -166,12 +166,16 @@ export class Button extends Image {
166
166
  * @param {string} outFrame - TBD.
167
167
  * @param {string} downFrame - TBD.
168
168
  * @param {string} upFrame - TBD.
169
+ * @param {string} disabledFrame - TBD.
169
170
  */
170
- setFrames(overFrame, outFrame, downFrame, upFrame) {
171
+ setFrames(overFrame, outFrame, downFrame, upFrame, disabledFrame) {
171
172
  this.setStateFrame(STATE_OVER, overFrame, this.input.pointerOver());
172
173
  this.setStateFrame(STATE_OUT, outFrame, !this.input.pointerOver());
173
174
  this.setStateFrame(STATE_DOWN, downFrame, this.input.pointerDown());
174
175
  this.setStateFrame(STATE_UP, upFrame, this.input.pointerUp());
176
+ if (disabledFrame) {
177
+ this.setStateFrame(STATE_DISABLED, disabledFrame, !this.input.enabled);
178
+ }
175
179
  }
176
180
 
177
181
  /**
package/types/index.d.ts CHANGED
@@ -3,6 +3,13 @@ import { Game } from './phaser/core/game';
3
3
  import { Signal } from './phaser/core/signal';
4
4
  import * as MathUtils from './phaser/util/math';
5
5
  import { BaseTexture } from './phaser/display/webgl/base_texture';
6
+ import { Sound } from './phaser/core/sound';
7
+ import { SoundSprite } from './phaser/core/sound_sprite';
8
+ import { Time } from './phaser/core/time';
9
+ import { Timer } from './phaser/core/timer';
10
+ import { TimerEvent } from './phaser/core/timer_event';
11
+ import { Tween } from './phaser/core/tween';
12
+ import { TweenData } from './phaser/core/tween_data';
6
13
  import { Texture } from './phaser/display/webgl/texture';
7
14
  import { Circle } from './phaser/geom/circle';
8
15
  import { Ellipse } from './phaser/geom/ellipse';
@@ -19,5 +26,5 @@ import { Image } from './phaser/display/image';
19
26
  import { Group } from './phaser/display/group';
20
27
  import { Text } from './phaser/display/text';
21
28
  import { Graphics } from './phaser/display/graphics';
22
- export { Const, Game, Signal, MathUtils, BaseTexture, Texture, Circle, Ellipse, Line, Matrix, Point, Polygon, Rectangle, RoundedRectangle, BitmapText, Button, DisplayObject, Image, Group, Text, Graphics };
29
+ export { Const, Game, Signal, MathUtils, BaseTexture, Sound, SoundSprite, Time, Timer, TimerEvent, Tween, TweenData, Texture, Circle, Ellipse, Line, Matrix, Point, Polygon, Rectangle, RoundedRectangle, BitmapText, Button, DisplayObject, Image, Group, Text, Graphics };
23
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"uBACuB,qBAAqB;qBACvB,oBAAoB;uBAClB,sBAAsB;2BAClB,oBAAoB;4BAEnB,qCAAqC;wBACzC,gCAAgC;uBAEjC,sBAAsB;wBACrB,uBAAuB;qBAC1B,oBAAoB;uBAClB,sBAAsB;sBACvB,qBAAqB;wBACnB,uBAAuB;0BACrB,yBAAyB;iCAClB,iCAAiC;2BAEvC,8BAA8B;uBAElC,yBAAyB;8BADlB,iCAAiC;sBAEzC,wBAAwB;sBACxB,wBAAwB;qBACzB,uBAAuB;yBACnB,2BAA2B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"uBACuB,qBAAqB;qBACvB,oBAAoB;uBAClB,sBAAsB;2BAClB,oBAAoB;4BAYnB,qCAAqC;sBAV3C,qBAAqB;4BACf,4BAA4B;qBAEnC,oBAAoB;sBACnB,qBAAqB;2BAChB,2BAA2B;sBAEhC,qBAAqB;0BACjB,0BAA0B;wBAG5B,gCAAgC;uBAEjC,sBAAsB;wBACrB,uBAAuB;qBAC1B,oBAAoB;uBAClB,sBAAsB;sBACvB,qBAAqB;wBACnB,uBAAuB;0BACrB,yBAAyB;iCAClB,iCAAiC;2BAEvC,8BAA8B;uBAElC,yBAAyB;8BADlB,iCAAiC;sBAEzC,wBAAwB;sBACxB,wBAAwB;qBACzB,uBAAuB;yBACnB,2BAA2B"}
@@ -71,8 +71,9 @@ export class Button extends Image {
71
71
  * @param {string} outFrame - TBD.
72
72
  * @param {string} downFrame - TBD.
73
73
  * @param {string} upFrame - TBD.
74
+ * @param {string} disabledFrame - TBD.
74
75
  */
75
- setFrames(overFrame: string, outFrame: string, downFrame: string, upFrame: string): void;
76
+ setFrames(overFrame: string, outFrame: string, downFrame: string, upFrame: string, disabledFrame: string): void;
76
77
  /**
77
78
  * TBD.
78
79
  * @param {object} sprite - TBD.
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/button.js"],"names":[],"mappings":"AAWA;IACE;;;;;;;;;;;;OAYG;IACH,kBAXW,OAAO,cAAc,EAAE,IAAI,MAC3B,MAAM,MACN,MAAM,QACN,MAAM,yCAEN,MAAM,cACN,MAAM,aACN,MAAM,cACN,MAAM,YACN,MAAM,EAyChB;IAzBC,kBAAwB;IACxB,iBAAuB;IACvB,kBAAwB;IACxB,gBAAsB;IACtB,sBAA4B;IAC5B,oBAA+B;IAC/B,mBAA8B;IAC9B,oBAA+B;IAC/B,kBAA6B;IAC7B,yBAA2B;IAC3B,iCAA+C;IAC/C,sBAAyB;IACzB,kBAAqB;IACrB,WAAmC;IAwCrC;;;;OAIG;IACH,sBAHW,OAAO,eACP,OAAO,QAWjB;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,yBAEC;IAuID;;OAEG;IACH,+BAWC;IAtBD;;;OAGG;IACH,4BAEC;IAnID;;;;;OAKG;IACH,qBAJW,MAAM,SACN,MAAM,sBACN,OAAO,QAYjB;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACJ,OAAO,CAiBnB;IAPG,eAAsB;IAGtB,WAAkB;IAMtB;;;;;;OAMG;IACH,qBALW,MAAM,YACN,MAAM,aACN,MAAM,WACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAchB;IAED;;;;OAIG;IACH,0BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,WACN,MAAM,UACN,OAAO,QAsBjB;CAyBF;sBA9QqB,SAAS;uBACR,gBAAgB"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/button.js"],"names":[],"mappings":"AAWA;IACE;;;;;;;;;;;;OAYG;IACH,kBAXW,OAAO,cAAc,EAAE,IAAI,MAC3B,MAAM,MACN,MAAM,QACN,MAAM,yCAEN,MAAM,cACN,MAAM,aACN,MAAM,cACN,MAAM,YACN,MAAM,EAyChB;IAzBC,kBAAwB;IACxB,iBAAuB;IACvB,kBAAwB;IACxB,gBAAsB;IACtB,sBAA4B;IAC5B,oBAA+B;IAC/B,mBAA8B;IAC9B,oBAA+B;IAC/B,kBAA6B;IAC7B,yBAA2B;IAC3B,iCAA+C;IAC/C,sBAAyB;IACzB,kBAAqB;IACrB,WAAmC;IAwCrC;;;;OAIG;IACH,sBAHW,OAAO,eACP,OAAO,QAWjB;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,yBAEC;IA2ID;;OAEG;IACH,+BAWC;IAtBD;;;OAGG;IACH,4BAEC;IAvID;;;;;OAKG;IACH,qBAJW,MAAM,SACN,MAAM,sBACN,OAAO,QAYjB;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACJ,OAAO,CAiBnB;IAPG,eAAsB;IAGtB,WAAkB;IAMtB;;;;;;;OAOG;IACH,qBANW,MAAM,YACN,MAAM,aACN,MAAM,WACN,MAAM,iBACN,MAAM,QAUhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAchB;IAED;;;;OAIG;IACH,0BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,WACN,MAAM,UACN,OAAO,QAsBjB;CAyBF;sBAlRqB,SAAS;uBACR,gBAAgB"}