@vpmedia/phaser 1.1.0 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/phaser",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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",
package/src/index.js CHANGED
@@ -3,38 +3,12 @@
3
3
  * @author Richard Davey <rich@photonstorm.com>
4
4
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
5
5
  */
6
+ // core
6
7
  import * as Const from './phaser/core/const';
7
- import AnimationManager from './phaser/core/animation_manager';
8
- import * as AnimationParser from './phaser/core/animation_parser';
9
- import ArraySet from './phaser/core/array_set';
10
- import Device from './phaser/core/device';
11
- import * as DeviceUtils from './phaser/core/device_util';
12
- import DOM from './phaser/core/dom';
13
- import EventManager from './phaser/core/event_manager';
14
- import Frame from './phaser/core/frame';
15
- import FrameData from './phaser/core/frame_data';
16
- import InputManager from './phaser/core/input';
17
- import InputMouse from './phaser/core/input_mouse';
18
- import InputMSPointer from './phaser/core/input_mspointer';
19
- import InputPointer from './phaser/core/input_pointer';
20
- import InputTouch from './phaser/core/input_touch';
21
- import Loader from './phaser/core/loader';
22
- import GameLoopRAF from './phaser/core/raf';
23
- import ScaleManager from './phaser/core/scale_manager';
24
- import Scene from './phaser/core/scene';
25
- import SceneManager from './phaser/core/scene_manager';
8
+ import Game from './phaser/core/game';
26
9
  import Signal from './phaser/core/signal';
27
- import SignalBinding from './phaser/core/signal_binding';
28
- import Sound from './phaser/core/sound';
29
- import SoundSprite from './phaser/core/sound_sprite';
30
- import SoundManager from './phaser/core/sound_manager';
31
- import Time from './phaser/core/time';
32
- import Timer from './phaser/core/timer';
33
- import TimerEvent from './phaser/core/timer_event';
34
- import Tween from './phaser/core/tween';
35
- import TweenData from './phaser/core/tween_data';
36
- import * as TweenEasing from './phaser/core/tween_easing';
37
- import TweenManager from './phaser/core/tween_manager';
10
+ import * as MathUtils from './phaser/util/math';
11
+ // geom
38
12
  import Circle from './phaser/geom/circle';
39
13
  import Ellipse from './phaser/geom/ellipse';
40
14
  import Line from './phaser/geom/line';
@@ -42,95 +16,28 @@ import Matrix from './phaser/geom/matrix';
42
16
  import Point from './phaser/geom/point';
43
17
  import Polygon from './phaser/geom/polygon';
44
18
  import Rectangle from './phaser/geom/rectangle';
45
- import * as MathUtils from './phaser/util/math';
46
- import * as StringUtils from './phaser/util/string';
47
19
  import RoundedRectangle from './phaser/geom/rounded_rectangle';
48
- import * as CircleUtils from './phaser/geom/util/circle';
49
- import * as EllipseUtils from './phaser/geom/util/ellipse';
50
- import * as LineUtils from './phaser/geom/util/line';
51
- import * as MatrixUtils from './phaser/geom/util/matrix';
52
- import * as PointUtils from './phaser/geom/util/point';
53
- import * as PolygonUtils from './phaser/geom/util/polygon';
54
- import * as RectangleUtils from './phaser/geom/util/rectangle';
55
- import * as RoundedRectangleUtils from './phaser/geom/util/rounded_rectangle';
56
- import GraphicsData from './phaser/display/graphics_data';
57
- import * as CanvasPool from './phaser/display/canvas/pool';
58
- import * as CanvasUtils from './phaser/display/canvas/util';
59
- import * as CanvasTinter from './phaser/display/canvas/tinter';
60
- import * as CanvasMasker from './phaser/display/canvas/masker';
61
- import * as CanvasGraphics from './phaser/display/canvas/graphics';
62
- import CanvasBuffer from './phaser/display/canvas/buffer';
63
- import CanvasRenderer from './phaser/display/canvas/renderer';
64
- import * as EarCut from './phaser/display/webgl/earcut';
65
- import Game from './phaser/core/game';
20
+ // display
66
21
  import BitmapText from './phaser/display/bitmap_text';
67
22
  import DisplayObject from './phaser/display/display_object';
68
23
  import Button from './phaser/display/button';
69
24
  import Image from './phaser/display/image';
70
25
  import Group from './phaser/display/group';
71
26
  import Text from './phaser/display/text';
72
-
27
+ // exports
73
28
  export {
74
29
  Const,
75
- AnimationManager,
76
- AnimationParser,
77
- ArraySet,
78
- DOM,
79
- Device,
80
- DeviceUtils,
81
- EventManager,
82
- Frame,
83
- FrameData,
84
- InputManager,
85
- InputMouse,
86
- InputMSPointer,
87
- InputPointer,
88
- InputTouch,
89
- Loader,
90
- GameLoopRAF,
91
- MathUtils,
92
- StringUtils,
93
- ScaleManager,
94
- Scene,
95
- SceneManager,
30
+ Game,
96
31
  Signal,
97
- SignalBinding,
98
- Sound,
99
- SoundSprite,
100
- SoundManager,
101
- Time,
102
- Timer,
103
- TimerEvent,
104
- Tween,
105
- TweenData,
106
- TweenEasing,
107
- TweenManager,
32
+ MathUtils,
108
33
  Circle,
109
- CircleUtils,
110
34
  Ellipse,
111
- EllipseUtils,
112
35
  Line,
113
- LineUtils,
114
36
  Matrix,
115
- MatrixUtils,
116
37
  Point,
117
- PointUtils,
118
38
  Polygon,
119
- PolygonUtils,
120
39
  Rectangle,
121
- RectangleUtils,
122
40
  RoundedRectangle,
123
- RoundedRectangleUtils,
124
- Game,
125
- GraphicsData,
126
- CanvasPool,
127
- CanvasUtils,
128
- CanvasBuffer,
129
- CanvasTinter,
130
- CanvasMasker,
131
- CanvasGraphics,
132
- CanvasRenderer,
133
- EarCut,
134
41
  BitmapText,
135
42
  Button,
136
43
  DisplayObject,
@@ -4,7 +4,6 @@
4
4
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
5
5
  */
6
6
  import Scene from './scene';
7
- import { RENDER_CANVAS } from './const';
8
7
 
9
8
  export default class {
10
9
 
@@ -4,7 +4,7 @@
4
4
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
5
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import { generateShaderID } from '../../../util/string';
7
+ import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
9
9
 
10
10
  // the next one is used for rendering triangle strips
@@ -4,7 +4,7 @@
4
4
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
5
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import { generateShaderID } from '../../../util/string';
7
+ import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
9
9
 
10
10
  // this shader is used for the fast sprite rendering
@@ -4,7 +4,7 @@
4
4
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
5
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import { generateShaderID } from '../../../util/string';
7
+ import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
9
9
 
10
10
  const defaultVertexSrc = [
@@ -4,7 +4,7 @@
4
4
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
5
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import { generateShaderID } from '../../../util/string';
7
+ import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
9
9
 
10
10
  // the next one is used for rendering primitives
@@ -4,7 +4,7 @@
4
4
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
5
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import { generateShaderID } from '../../../util/string';
7
+ import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
9
9
 
10
10
  // the next one is used for rendering triangle strips
@@ -293,5 +293,22 @@ export function valueToColor(value, out) {
293
293
  out.color = getColor(out.r, out.g, out.b);
294
294
  out.color32 = getColor32(out.a * 255, out.r, out.g, out.b);
295
295
  return out;
296
+ }
296
297
 
298
+ /**
299
+ * TBD
300
+ *
301
+ * @returns {string} TBD
302
+ */
303
+ export function generateID() {
304
+ return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
305
+ }
306
+
307
+ /**
308
+ * TBD
309
+ *
310
+ * @returns {string} TBD
311
+ */
312
+ export function generateShaderID() {
313
+ return (`${generateID()}${generateID()}-${generateID()}`).toLowerCase();
297
314
  }
@@ -1,32 +0,0 @@
1
- /**
2
- * @author Andras Csizmadia <andras@vpmedia.hu>
3
- * @author Richard Davey <rich@photonstorm.com>
4
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
5
- */
6
-
7
- /**
8
- * TBD
9
- *
10
- * @returns {string} TBD
11
- */
12
- export function generateID() {
13
- return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
14
- }
15
-
16
- /**
17
- * TBD
18
- *
19
- * @returns {string} TBD
20
- */
21
- export function generateUUID() {
22
- return (`${generateID()}${generateID()}-${generateID()}-4${generateID().substr(0, 3)}-${generateID()}-${generateID()}${generateID()}${generateID()}`).toLowerCase();
23
- }
24
-
25
- /**
26
- * TBD
27
- *
28
- * @returns {string} TBD
29
- */
30
- export function generateShaderID() {
31
- return (`${generateID()}${generateID()}-${generateID()}`).toLowerCase();
32
- }