@vpmedia/phaser 1.19.0 → 1.21.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.
Files changed (101) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/phaser/core/animation.js +0 -3
  4. package/src/phaser/core/animation_manager.js +0 -2
  5. package/src/phaser/core/animation_parser.js +0 -1
  6. package/src/phaser/core/cache.js +0 -2
  7. package/src/phaser/core/dom.js +0 -1
  8. package/src/phaser/core/event_manager.js +0 -1
  9. package/src/phaser/core/factory.js +0 -1
  10. package/src/phaser/core/frame_data.js +0 -1
  11. package/src/phaser/core/input.js +0 -2
  12. package/src/phaser/core/input_handler.js +0 -4
  13. package/src/phaser/core/input_mouse.js +0 -2
  14. package/src/phaser/core/input_mspointer.js +0 -2
  15. package/src/phaser/core/input_pointer.js +0 -2
  16. package/src/phaser/core/input_touch.js +0 -2
  17. package/src/phaser/core/loader.js +0 -2
  18. package/src/phaser/core/raf.js +0 -2
  19. package/src/phaser/core/scale_manager.js +0 -1
  20. package/src/phaser/core/scene_manager.js +0 -1
  21. package/src/phaser/core/signal_binding.js +0 -2
  22. package/src/phaser/core/sound.js +0 -1
  23. package/src/phaser/core/sound_manager.js +0 -1
  24. package/src/phaser/core/sound_sprite.js +0 -3
  25. package/src/phaser/core/stage.js +0 -1
  26. package/src/phaser/core/time.js +0 -1
  27. package/src/phaser/core/timer.js +0 -1
  28. package/src/phaser/core/timer_event.js +0 -2
  29. package/src/phaser/core/tween.js +0 -3
  30. package/src/phaser/core/tween_data.js +0 -1
  31. package/src/phaser/core/tween_manager.js +0 -1
  32. package/src/phaser/core/world.js +0 -1
  33. package/src/phaser/display/bitmap_text.js +0 -1
  34. package/src/phaser/display/button.js +0 -1
  35. package/src/phaser/display/canvas/renderer.js +0 -4
  36. package/src/phaser/display/display_object.js +0 -1
  37. package/src/phaser/display/graphics.js +0 -2
  38. package/src/phaser/display/group.js +0 -1
  39. package/src/phaser/display/image.js +0 -3
  40. package/src/phaser/display/sprite_batch.js +0 -1
  41. package/src/phaser/display/sprite_util.js +0 -1
  42. package/src/phaser/display/text.js +0 -2
  43. package/src/phaser/display/webgl/fast_sprite_batch.js +0 -2
  44. package/src/phaser/display/webgl/render_texture.js +0 -2
  45. package/src/phaser/display/webgl/renderer.js +0 -5
  46. package/src/phaser/display/webgl/sprite_batch.js +0 -3
  47. package/src/phaser/display/webgl/stencil_manager.js +0 -2
  48. package/src/phaser/display/webgl/texture.js +0 -1
  49. package/typedefs/global.d.ts +1 -1
  50. package/types/phaser/core/cache.d.ts +44 -68
  51. package/types/phaser/core/cache.d.ts.map +1 -1
  52. package/types/phaser/core/dom.d.ts +6 -6
  53. package/types/phaser/core/dom.d.ts.map +1 -1
  54. package/types/phaser/core/input.d.ts +19 -20
  55. package/types/phaser/core/input.d.ts.map +1 -1
  56. package/types/phaser/core/input_handler.d.ts +4 -5
  57. package/types/phaser/core/input_handler.d.ts.map +1 -1
  58. package/types/phaser/core/input_mouse.d.ts +1 -1
  59. package/types/phaser/core/input_mouse.d.ts.map +1 -1
  60. package/types/phaser/core/input_pointer.d.ts +2 -3
  61. package/types/phaser/core/input_pointer.d.ts.map +1 -1
  62. package/types/phaser/core/loader.d.ts +103 -104
  63. package/types/phaser/core/loader.d.ts.map +1 -1
  64. package/types/phaser/core/scene_manager.d.ts +2 -2
  65. package/types/phaser/core/scene_manager.d.ts.map +1 -1
  66. package/types/phaser/core/signal_binding.d.ts +15 -23
  67. package/types/phaser/core/signal_binding.d.ts.map +1 -1
  68. package/types/phaser/core/tween.d.ts +8 -8
  69. package/types/phaser/core/tween.d.ts.map +1 -1
  70. package/types/phaser/core/tween_data.d.ts +5 -6
  71. package/types/phaser/core/tween_data.d.ts.map +1 -1
  72. package/types/phaser/display/button.d.ts +2 -3
  73. package/types/phaser/display/button.d.ts.map +1 -1
  74. package/types/phaser/display/canvas/renderer.d.ts +7 -10
  75. package/types/phaser/display/canvas/renderer.d.ts.map +1 -1
  76. package/types/phaser/display/display_object.d.ts +3 -5
  77. package/types/phaser/display/display_object.d.ts.map +1 -1
  78. package/types/phaser/display/graphics.d.ts +6 -6
  79. package/types/phaser/display/graphics.d.ts.map +1 -1
  80. package/types/phaser/display/image.d.ts +11 -14
  81. package/types/phaser/display/image.d.ts.map +1 -1
  82. package/types/phaser/display/text.d.ts +50 -61
  83. package/types/phaser/display/text.d.ts.map +1 -1
  84. package/types/phaser/display/webgl/abstract_filter.d.ts +3 -3
  85. package/types/phaser/display/webgl/abstract_filter.d.ts.map +1 -1
  86. package/types/phaser/display/webgl/fast_sprite_batch.d.ts +2 -3
  87. package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -1
  88. package/types/phaser/display/webgl/graphics.d.ts +12 -13
  89. package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
  90. package/types/phaser/display/webgl/render_texture.d.ts +3 -5
  91. package/types/phaser/display/webgl/render_texture.d.ts.map +1 -1
  92. package/types/phaser/display/webgl/renderer.d.ts +8 -12
  93. package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
  94. package/types/phaser/display/webgl/shader/normal.d.ts +2 -2
  95. package/types/phaser/display/webgl/shader/normal.d.ts.map +1 -1
  96. package/types/phaser/display/webgl/shader_manager.d.ts +5 -6
  97. package/types/phaser/display/webgl/shader_manager.d.ts.map +1 -1
  98. package/types/phaser/display/webgl/sprite_batch.d.ts +2 -3
  99. package/types/phaser/display/webgl/sprite_batch.d.ts.map +1 -1
  100. package/types/phaser/display/webgl/stencil_manager.d.ts +9 -11
  101. package/types/phaser/display/webgl/stencil_manager.d.ts.map +1 -1
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.19.0)](https://badge.fury.io/js/@vpmedia%2Fphaser)
3
+ [![npm version](https://badge.fury.io/js/@vpmedia%2Fphaser.svg?v=1.21.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.19.0",
3
+ "version": "1.21.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",
@@ -1,7 +1,4 @@
1
- import { Game } from './game';
2
1
  import { Signal } from './signal';
3
- import { FrameData } from './frame_data';
4
- import { Image } from '../display/image';
5
2
 
6
3
  export class Animation {
7
4
  /**
@@ -1,6 +1,4 @@
1
1
  import { Animation } from './animation';
2
- import { FrameData } from './frame_data';
3
- import { Image } from '../display/image';
4
2
 
5
3
  export class AnimationManager {
6
4
  /**
@@ -1,6 +1,5 @@
1
1
  import { Frame } from './frame';
2
2
  import { FrameData } from './frame_data';
3
- import { Game } from './game';
4
3
 
5
4
  /**
6
5
  * TBD.
@@ -1,12 +1,10 @@
1
1
  import { Texture } from '../display/webgl/texture';
2
2
  import { BaseTexture } from '../display/webgl/base_texture';
3
- import { RenderTexture } from '../display/webgl/render_texture';
4
3
  import { Signal } from './signal';
5
4
  import { Frame } from './frame';
6
5
  import { FrameData } from './frame_data';
7
6
  import { JSONDataHash } from './animation_parser';
8
7
  import { jsonBitmapFont, xmlBitmapFont } from './loader_parser';
9
- import { Game } from './game';
10
8
 
11
9
  export const CANVAS = 0;
12
10
  export const IMAGE = 1;
@@ -1,5 +1,4 @@
1
1
  import { Point } from '../geom/point';
2
- import { Device } from './device';
3
2
 
4
3
  class VisualBoundsDesktopRectangle {
5
4
  /**
@@ -1,5 +1,4 @@
1
1
  import { Signal } from './signal';
2
- import { DisplayObject } from '../display/display_object';
3
2
 
4
3
  export class EventManager {
5
4
  /**
@@ -4,7 +4,6 @@ import { Group } from '../display/group';
4
4
  import { Graphics } from '../display/graphics';
5
5
  import { Image } from '../display/image';
6
6
  import { Text } from '../display/text';
7
- import { Game } from './game';
8
7
 
9
8
  export class GameObjectFactory {
10
9
  /**
@@ -1,5 +1,4 @@
1
1
  import { cloneFrameData } from './frame_util';
2
- import { Frame } from './frame';
3
2
 
4
3
  export class FrameData {
5
4
  /**
@@ -1,6 +1,5 @@
1
1
  import { ArraySet } from './array_set';
2
2
  import { Graphics } from '../display/graphics';
3
- import { DisplayObject } from '../display/display_object';
4
3
  import { Image } from '../display/image';
5
4
  import { Signal } from './signal';
6
5
  import { Point } from '../geom/point';
@@ -11,7 +10,6 @@ import { Pointer } from './input_pointer';
11
10
  import { Touch } from './input_touch';
12
11
  import { POINTER_CURSOR, POINTER_CONTACT, MOUSE_TOUCH_COMBINE } from './const';
13
12
  import { create, remove } from '../display/canvas/pool';
14
- import { Game } from './game';
15
13
 
16
14
  const MAX_POINTERS = 10;
17
15
 
@@ -1,10 +1,6 @@
1
1
  import { Point } from '../geom/point';
2
2
  import { GROUP } from './const';
3
3
  import { distance } from '../util/math';
4
- import { Pointer } from './input_pointer';
5
- import { Rectangle } from '../geom/rectangle';
6
- import { Image } from '../display/image';
7
- import { DisplayObject } from '../display/display_object';
8
4
 
9
5
  export class InputHandler {
10
6
  /**
@@ -7,8 +7,6 @@ const FORWARD_BUTTON = 4;
7
7
  const WHEEL_UP = 1;
8
8
  const WHEEL_DOWN = -1; */
9
9
 
10
- import { Game } from './game';
11
-
12
10
  class WheelEventProxy {
13
11
  /**
14
12
  * TBD.
@@ -1,5 +1,3 @@
1
- import { Game } from './game';
2
-
3
1
  export class MSPointer {
4
2
  /**
5
3
  * TBD.
@@ -8,8 +8,6 @@ import {
8
8
  TOUCH_OVERRIDES_MOUSE,
9
9
  MOUSE_TOUCH_COMBINE,
10
10
  } from './const';
11
- import { Game } from './game';
12
- import { InputHandler } from './input_handler';
13
11
 
14
12
  export class Pointer {
15
13
  /**
@@ -1,5 +1,3 @@
1
- import { Game } from './game';
2
-
3
1
  export class Touch {
4
2
  /**
5
3
  * TBD.
@@ -1,8 +1,6 @@
1
1
  import { Signal } from './signal';
2
2
  import { Rectangle } from '../geom/rectangle';
3
- import { Image } from '../display/image';
4
3
  import { canPlayAudio } from './device_util';
5
- import { Game } from './game';
6
4
 
7
5
  const TEXTURE_ATLAS_JSON_HASH = 1;
8
6
 
@@ -1,5 +1,3 @@
1
- import { Game } from './game';
2
-
3
1
  export class RequestAnimationFrame {
4
2
  /**
5
3
  * TBD.
@@ -3,7 +3,6 @@ import { DOM } from './dom';
3
3
  import { Point } from '../geom/point';
4
4
  import { Rectangle } from '../geom/rectangle';
5
5
  import { SCALE_OFF, SCALE_RESIZE, SCALE_EXACT_FIT, SCALE_USER, SCALE_SHOW_ALL, RENDER_CANVAS } from './const';
6
- import { Game } from './game';
7
6
 
8
7
  export class ScaleManager {
9
8
  /**
@@ -1,4 +1,3 @@
1
- import { Game } from './game';
2
1
  import { Scene } from './scene';
3
2
 
4
3
  export class SceneManager {
@@ -1,5 +1,3 @@
1
- import { Signal } from './signal';
2
-
3
1
  export class SignalBinding {
4
2
  /**
5
3
  * TBD.
@@ -1,4 +1,3 @@
1
- import { Game } from './game';
2
1
  import { Signal } from './signal';
3
2
 
4
3
  export class Sound {
@@ -1,5 +1,4 @@
1
1
  import { ArraySet } from './array_set';
2
- import { Game } from './game';
3
2
  import { Signal } from './signal';
4
3
  import { Sound } from './sound';
5
4
  import { SoundSprite } from './sound_sprite';
@@ -1,6 +1,3 @@
1
- import { Game } from './game';
2
- import { Sound } from './sound';
3
-
4
1
  export class SoundSprite {
5
2
  /**
6
3
  * TBD.
@@ -3,7 +3,6 @@ import { DisplayObject } from '../display/display_object';
3
3
  import { setUserSelect, setTouchAction } from '../display/canvas/util';
4
4
  import { valueToColor } from '../util/math';
5
5
  import { SCALE_LINEAR, SCALE_NEAREST } from './const';
6
- import { Game } from './game';
7
6
 
8
7
  export class Stage extends DisplayObject {
9
8
  /**
@@ -1,4 +1,3 @@
1
- import { Game } from './game';
2
1
  import { Timer } from './timer';
3
2
 
4
3
  export class Time {
@@ -1,4 +1,3 @@
1
- import { Game } from './game';
2
1
  import { Signal } from './signal';
3
2
  import { TimerEvent } from './timer_event';
4
3
 
@@ -1,5 +1,3 @@
1
- import { Timer } from './timer';
2
-
3
1
  export class TimerEvent {
4
2
  /**
5
3
  * TBD.
@@ -1,10 +1,7 @@
1
1
  import { Signal } from './signal';
2
2
  import { TweenData } from './tween_data';
3
- import { TweenManager } from './tween_manager';
4
- import { DisplayObject } from '../display/display_object';
5
3
  import * as MathUtils from '../util/math';
6
4
  import { TWEEN_PENDING, TWEEN_RUNNING, TWEEN_COMPLETE, TWEEN_LOOPED } from './const';
7
- import { Game } from './game';
8
5
 
9
6
  export class Tween {
10
7
  /**
@@ -1,4 +1,3 @@
1
- import { Tween } from './tween';
2
1
  import * as MathUtils from '../util/math';
3
2
  import { TWEEN_PENDING, TWEEN_RUNNING, TWEEN_COMPLETE, TWEEN_LOOPED } from './const';
4
3
 
@@ -33,7 +33,6 @@ import {
33
33
  BounceInOut,
34
34
  } from './tween_easing';
35
35
  import { GROUP } from './const';
36
- import { Game } from './game';
37
36
 
38
37
  export class TweenManager {
39
38
  /**
@@ -1,5 +1,4 @@
1
1
  import { Group } from '../display/group';
2
- import { Game } from './game';
3
2
 
4
3
  export class World extends Group {
5
4
  /**
@@ -1,6 +1,5 @@
1
1
  import { DisplayObject } from './display_object';
2
2
  import { Image } from './image';
3
- import { Game } from '../core/game';
4
3
  import { Point } from '../geom/point';
5
4
  import { BITMAP_TEXT, SCALE_LINEAR, SCALE_NEAREST } from '../core/const';
6
5
 
@@ -1,6 +1,5 @@
1
1
  import { Image } from './image';
2
2
  import { Signal } from '../core/signal';
3
- import { Game } from '../core/game';
4
3
  import { InputHandler } from '../core/input_handler';
5
4
  import { BUTTON, POINTER_CONTACT } from '../core/const';
6
5
 
@@ -23,10 +23,6 @@ import {
23
23
  import { getSmoothingPrefix } from './util';
24
24
  import { detectCapabilities } from './tinter';
25
25
  import * as CanvasMaskManager from './masker';
26
- import { Game } from '../../core/game';
27
- import { Stage } from '../../core/stage';
28
- import { Image } from '../image';
29
- import { Matrix } from '../../geom/matrix';
30
26
 
31
27
  export class CanvasRenderer {
32
28
  /**
@@ -4,7 +4,6 @@ import { Matrix } from '../geom/matrix';
4
4
  import { getIdentityMatrix } from '../geom/util/matrix';
5
5
  import { PI_2 } from '../util/math';
6
6
  import { renderCanvas, renderWebGL } from './sprite_util';
7
- import { Graphics } from './graphics';
8
7
 
9
8
  export class DisplayObject {
10
9
  /**
@@ -1,13 +1,11 @@
1
1
  import { DisplayObject } from './display_object';
2
2
  import { Image } from './image';
3
- import { Game } from '../core/game';
4
3
  import { Rectangle } from '../geom/rectangle';
5
4
  import { RoundedRectangle } from '../geom/rounded_rectangle';
6
5
  import { Polygon } from '../geom/polygon';
7
6
  import { Circle } from '../geom/circle';
8
7
  import { Ellipse } from '../geom/ellipse';
9
8
  import { Point } from '../geom/point';
10
- import { Matrix } from '../geom/matrix';
11
9
  import { GraphicsData } from './graphics_data';
12
10
  import { CanvasBuffer } from './canvas/buffer';
13
11
  import { textureFromCanvas } from './webgl/texture_util';
@@ -1,7 +1,6 @@
1
1
  import { DisplayObject } from './display_object';
2
2
  import { Image } from './image';
3
3
  import { Signal } from '../core/signal';
4
- import { Game } from '../core/game';
5
4
  import { GROUP } from '../core/const';
6
5
 
7
6
  export const SORT_ASCENDING = -1;
@@ -1,11 +1,8 @@
1
1
  import { Texture } from './webgl/texture';
2
2
  import { AnimationManager } from '../core/animation_manager';
3
3
  import { EventManager } from '../core/event_manager';
4
- import { Frame } from '../core/frame';
5
4
  import { Rectangle } from '../geom/rectangle';
6
- import { Matrix } from '../geom/matrix';
7
5
  import { DisplayObject } from './display_object';
8
- import { Game } from '../core/game';
9
6
  import { clone } from '../geom/util/rectangle';
10
7
  import { IMAGE, PENDING_ATLAS, BLEND_NORMAL, SCALE_NEAREST } from '../core/const';
11
8
  import { setTexture, getBounds, getLocalBounds, renderCanvas, renderWebGL } from './sprite_util';
@@ -1,4 +1,3 @@
1
- import { Game } from '../core/game';
2
1
  import { DisplayObject } from './display_object';
3
2
 
4
3
  export class SpriteBatch extends DisplayObject {
@@ -1,6 +1,5 @@
1
1
  import { getTintedTexture } from './canvas/tinter';
2
2
  import { getIdentityMatrix } from '../geom/util/matrix';
3
- import { Rectangle } from '../geom/rectangle';
4
3
  import { SCALE_LINEAR } from '../core/const';
5
4
 
6
5
  /**
@@ -1,10 +1,8 @@
1
1
  import { Point } from '../geom/point';
2
2
  import { Rectangle } from '../geom/rectangle';
3
- import { Matrix } from '../geom/matrix';
4
3
  import { Image } from './image';
5
4
  import { create, remove } from './canvas/pool';
6
5
  import { textureFromCanvas } from './webgl/texture_util';
7
- import { Game } from '../core/game';
8
6
  import { TEXT } from '../core/const';
9
7
  import { snapToCeil } from '../util/math';
10
8
  import { renderCanvas, renderWebGL, getBounds } from './sprite_util';
@@ -1,5 +1,3 @@
1
- import { Image } from '../image';
2
-
3
1
  export class FastSpriteBatch {
4
2
  /**
5
3
  * TBD.
@@ -4,8 +4,6 @@ import { Texture } from './texture';
4
4
  import { BaseTexture } from './base_texture';
5
5
  import { FilterTexture } from './filter_texture';
6
6
  import { CanvasBuffer } from '../canvas/buffer';
7
- import { CanvasRenderer } from '../canvas/renderer';
8
- import { WebGLRenderer } from './renderer';
9
7
  import { RENDER_WEBGL } from '../../core/const';
10
8
 
11
9
  export class RenderTexture extends Texture {
@@ -22,17 +22,12 @@ import {
22
22
  import { remove } from '../canvas/pool';
23
23
  import { isPowerOfTwo } from '../../util/math';
24
24
  import { Point } from '../../geom/point';
25
- import { Matrix } from '../../geom/matrix';
26
25
  import { WebGLShaderManager } from './shader_manager';
27
26
  import { WebGLSpriteBatch } from './sprite_batch';
28
27
  import * as WebGLMaskManager from './mask_manager';
29
28
  import { WebGLFilterManager } from './filter_manager';
30
29
  import { WebGLStencilManager } from './stencil_manager';
31
30
  import { WebGLBlendModeManager } from './blend_manager';
32
- import { BaseTexture } from './base_texture';
33
- import { DisplayObject } from '../../display/display_object';
34
- import { Stage } from '../../core/stage';
35
- import { Game } from '../../core/game';
36
31
 
37
32
  export class WebGLRenderer {
38
33
  /**
@@ -1,8 +1,5 @@
1
1
  import { AbstractFilter } from './abstract_filter';
2
2
  import { NormalShader } from './shader/normal';
3
- import { BaseTexture } from './base_texture';
4
- import { Matrix } from '../../geom/matrix';
5
- import { Image } from '../../display/image';
6
3
 
7
4
  export class WebGLSpriteBatch {
8
5
  /**
@@ -1,6 +1,4 @@
1
1
  import { hex2rgb } from '../../util/math';
2
- import { GraphicsData } from './graphics_data';
3
- import { Graphics } from '../../display/graphics';
4
2
 
5
3
  export class WebGLStencilManager {
6
4
  /**
@@ -1,5 +1,4 @@
1
1
  import { Rectangle } from '../../geom/rectangle';
2
- import { BaseTexture } from './base_texture';
3
2
 
4
3
  export class TextureUvs {
5
4
  /**
@@ -1,6 +1,6 @@
1
1
  declare global {
2
2
  interface Window {
3
- PhaserRegistry: any;
3
+ PhaserRegistry: object;
4
4
  }
5
5
  }
6
6