@vpmedia/phaser 1.1.1 → 1.1.3

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,7 +1,7 @@
1
1
  @vpmedia/phaser
2
2
  ===============
3
3
 
4
- [![npm version](https://badge.fury.io/js/@vpmedia%2Fphaser.svg?v=1.1.1)](https://badge.fury.io/js/@vpmedia%2Fphaser)
4
+ [![npm version](https://badge.fury.io/js/@vpmedia%2Fphaser.svg?v=1.1.3)](https://badge.fury.io/js/@vpmedia%2Fphaser)
5
5
  [![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)
6
6
 
7
7
  @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.1.1",
3
+ "version": "1.1.3",
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",
@@ -17,12 +17,6 @@
17
17
  ],
18
18
  "main": "./src/index.js",
19
19
  "devDependencies": {
20
- "@babel/cli": "^7.19.3",
21
- "@babel/core": "^7.20.5",
22
- "@babel/eslint-parser": "^7.19.1",
23
- "@babel/preset-env": "^7.20.2",
24
- "@babel/register": "^7.18.9",
25
- "babel-loader": "^8.3.0",
26
20
  "eslint": "^8.29.0",
27
21
  "eslint-config-prettier": "^8.5.0",
28
22
  "eslint-plugin-import": "^2.26.0",
@@ -32,19 +26,14 @@
32
26
  "husky": "^8.0.2",
33
27
  "jest": "^29.3.1",
34
28
  "lint-staged": "^13.1.0",
35
- "prettier": "^2.8.0",
36
- "webpack": "^5.75.0",
37
- "webpack-cli": "^4.10.0"
29
+ "prettier": "^2.8.0"
38
30
  },
39
31
  "scripts": {
40
- "prebuild": "rm -rf ./dist && mkdir -p ./dist",
41
- "build": "webpack --config webpack.config.babel.js --mode production",
42
- "test": "jest --passWithNoTests",
32
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests",
43
33
  "lint": "eslint \"**/*.js\"",
44
34
  "lint-fix": "eslint \"**/*.js\" --fix",
45
35
  "format": "prettier --write \"**/*.{js,json}\"",
46
- "lint-staged": "lint-staged",
47
- "prepack": "npm run build"
36
+ "lint-staged": "lint-staged"
48
37
  },
49
38
  "engines": {
50
39
  "npm": ">=7.0.0",
package/src/index.js CHANGED
@@ -10,21 +10,13 @@ import Signal from './phaser/core/signal';
10
10
  import * as MathUtils from './phaser/util/math';
11
11
  // geom
12
12
  import Circle from './phaser/geom/circle';
13
- import * as CircleUtils from './phaser/geom/util/circle';
14
13
  import Ellipse from './phaser/geom/ellipse';
15
- import * as EllipseUtils from './phaser/geom/util/ellipse';
16
14
  import Line from './phaser/geom/line';
17
- import * as LineUtils from './phaser/geom/util/line';
18
15
  import Matrix from './phaser/geom/matrix';
19
- import * as MatrixUtils from './phaser/geom/util/matrix';
20
16
  import Point from './phaser/geom/point';
21
- import * as PointUtils from './phaser/geom/util/point';
22
17
  import Polygon from './phaser/geom/polygon';
23
- import * as PolygonUtils from './phaser/geom/util/polygon';
24
18
  import Rectangle from './phaser/geom/rectangle';
25
- import * as RectangleUtils from './phaser/geom/util/rectangle';
26
19
  import RoundedRectangle from './phaser/geom/rounded_rectangle';
27
- import * as RoundedRectangleUtils from './phaser/geom/util/rounded_rectangle';
28
20
  // display
29
21
  import BitmapText from './phaser/display/bitmap_text';
30
22
  import DisplayObject from './phaser/display/display_object';
@@ -39,21 +31,13 @@ export {
39
31
  Signal,
40
32
  MathUtils,
41
33
  Circle,
42
- CircleUtils,
43
34
  Ellipse,
44
- EllipseUtils,
45
35
  Line,
46
- LineUtils,
47
36
  Matrix,
48
- MatrixUtils,
49
37
  Point,
50
- PointUtils,
51
38
  Polygon,
52
- PolygonUtils,
53
39
  Rectangle,
54
- RectangleUtils,
55
40
  RoundedRectangle,
56
- RoundedRectangleUtils,
57
41
  BitmapText,
58
42
  Button,
59
43
  DisplayObject,
@@ -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
  }