@vpmedia/phaser 1.86.0 → 1.87.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 +53 -0
- package/eslint.config.js +3 -3
- package/lefthook.yml +1 -1
- package/package.json +14 -12
- package/pnpm-workspace.yaml +2 -0
- package/src/phaser/core/animation_manager.js +3 -3
- package/src/phaser/core/input_handler.js +3 -3
- package/src/phaser/core/scale_manager.js +2 -2
- package/src/phaser/display/bitmap_text.js +2 -2
- package/src/phaser/display/display_object.js +4 -4
- package/src/phaser/display/graphics.js +1 -1
- package/src/phaser/display/image.js +5 -5
- package/src/phaser/display/sprite_util.js +4 -4
- package/src/phaser/display/webgl/texture.js +15 -5
- package/src/phaser/geom/point.js +3 -3
- package/src/phaser/geom/rectangle.js +10 -10
- package/src/phaser/geom/util/point.js +1 -1
- package/types/phaser/core/animation_manager.d.ts +4 -4
- package/types/phaser/core/animation_manager.d.ts.map +1 -1
- package/types/phaser/display/display_object.d.ts +2 -2
- package/types/phaser/display/display_object.d.ts.map +1 -1
- package/types/phaser/display/image.d.ts +5 -5
- package/types/phaser/display/image.d.ts.map +1 -1
- package/types/phaser/display/sprite_util.d.ts +2 -2
- package/types/phaser/display/sprite_util.d.ts.map +1 -1
- package/types/phaser/display/webgl/texture.d.ts +16 -6
- package/types/phaser/display/webgl/texture.d.ts.map +1 -1
- package/types/phaser/geom/point.d.ts +3 -2
- package/types/phaser/geom/point.d.ts.map +1 -1
- package/types/phaser/geom/util/point.d.ts +1 -1
- package/types/phaser/geom/util/point.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
|
+
## [1.87.0] - 2025-12-11
|
|
2
|
+
|
|
3
|
+
### 💼 Other
|
|
4
|
+
|
|
5
|
+
- *(deps)* Bump dependency versions
|
|
6
|
+
- *(deps)* Bump dependency versions
|
|
7
|
+
- *(deps)* Bump dependency versions
|
|
8
|
+
- *(deps)* Bump dependency versions
|
|
9
|
+
- *(deps)* Bump dependency versions
|
|
10
|
+
- *(deps)* Bump dependency versions
|
|
11
|
+
- *(deps)* Bump dependency versions
|
|
12
|
+
- *(deps)* Bump dependency versions
|
|
13
|
+
- *(security)* Do not run ci.yml on pull requests
|
|
14
|
+
- *(deps)* Bump dependency versions
|
|
15
|
+
- *(deps)* Bump dependency versions
|
|
16
|
+
- *(deps)* Bump dependency versions
|
|
17
|
+
- *(deps)* Bump dependency versions
|
|
18
|
+
- *(deps)* Bump dependency versions
|
|
19
|
+
- *(deps)* Bumped dependency versions, added type aware lint plugins
|
|
20
|
+
|
|
21
|
+
### ⚙️ Miscellaneous Tasks
|
|
22
|
+
|
|
23
|
+
- Release
|
|
24
|
+
- Do not auto format md files (breaks changelog generator output)
|
|
25
|
+
- Generate complete changelogs
|
|
26
|
+
- *(security)* Added pnpm audit build step
|
|
27
|
+
- *(security)* Protect agains npm supply chain attacks
|
|
28
|
+
- *(lefthook)* Adjusted lefthook rule to do not fail on deleted files
|
|
29
|
+
- Improve typechecking
|
|
30
|
+
- *(release)* V1.87.0
|
|
1
31
|
## [1.86.0] - 2025-11-23
|
|
2
32
|
|
|
33
|
+
### 💼 Other
|
|
34
|
+
|
|
35
|
+
- Update dependencies
|
|
36
|
+
- Update dependencies
|
|
37
|
+
- Update dependencies
|
|
38
|
+
- Update dependencies
|
|
39
|
+
- Update dependencies
|
|
40
|
+
- Update dependencies
|
|
41
|
+
- Update dependencies
|
|
42
|
+
- Update dependencies
|
|
43
|
+
- Update dependencies
|
|
44
|
+
- Update dependencies
|
|
45
|
+
- Update dependencies
|
|
46
|
+
- *(deps)* Bump dependency versions
|
|
47
|
+
- *(deps)* Bumped github actions/checkout to v6
|
|
48
|
+
|
|
49
|
+
### 📚 Documentation
|
|
50
|
+
|
|
51
|
+
- Added changelog and license files
|
|
52
|
+
|
|
3
53
|
### ⚙️ Miscellaneous Tasks
|
|
4
54
|
|
|
55
|
+
- *(lint)* Integrated commitlint
|
|
56
|
+
- Integrated git cliff to generater changelogs
|
|
5
57
|
- Adjusted publish release commit message format
|
|
6
58
|
- *(release)* V1.86.0
|
|
59
|
+
## [1.84.0] - 2025-10-12
|
package/eslint.config.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { defineConfig } from 'eslint/config';
|
|
1
2
|
import js from '@eslint/js';
|
|
2
3
|
import jsdocPlugin from 'eslint-plugin-jsdoc';
|
|
3
4
|
import unicornPlugin from 'eslint-plugin-unicorn';
|
|
4
5
|
import globals from 'globals';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
export default [
|
|
7
|
+
export default defineConfig([
|
|
8
8
|
{
|
|
9
9
|
ignores: [
|
|
10
10
|
'.github/**/*.*',
|
|
@@ -99,4 +99,4 @@ export default [
|
|
|
99
99
|
'unicorn/switch-case-braces': 'off',
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
|
-
];
|
|
102
|
+
]);
|
package/lefthook.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.87.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",
|
|
@@ -23,25 +23,27 @@
|
|
|
23
23
|
"types": "./types/index.d.ts",
|
|
24
24
|
"type": "module",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@vpmedia/simplify": "^1.
|
|
26
|
+
"@vpmedia/simplify": "^1.46.0",
|
|
27
27
|
"uuid": "^13.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@commitlint/cli": "^20.
|
|
31
|
-
"@commitlint/config-conventional": "^20.
|
|
30
|
+
"@commitlint/cli": "^20.2.0",
|
|
31
|
+
"@commitlint/config-conventional": "^20.2.0",
|
|
32
32
|
"@eslint/js": "^9.39.1",
|
|
33
33
|
"@types/node": "^24.10.1",
|
|
34
|
-
"@vitest/coverage-v8": "^4.0.
|
|
34
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
35
35
|
"eslint": "^9.39.1",
|
|
36
|
-
"eslint-plugin-jsdoc": "^61.
|
|
37
|
-
"eslint-plugin-oxlint": "^1.
|
|
36
|
+
"eslint-plugin-jsdoc": "^61.5.0",
|
|
37
|
+
"eslint-plugin-oxlint": "^1.32.0",
|
|
38
38
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
39
39
|
"globals": "^16.5.0",
|
|
40
|
-
"jsdom": "^27.
|
|
41
|
-
"oxlint": "^1.
|
|
42
|
-
"
|
|
40
|
+
"jsdom": "^27.3.0",
|
|
41
|
+
"oxlint": "^1.32.0",
|
|
42
|
+
"oxlint-tsgolint": "^0.8.4",
|
|
43
|
+
"prettier": "^3.7.4",
|
|
43
44
|
"typescript": "^5.9.3",
|
|
44
|
-
"
|
|
45
|
+
"typescript-eslint": "^8.49.0",
|
|
46
|
+
"vitest": "^4.0.15"
|
|
45
47
|
},
|
|
46
48
|
"browserslist": [
|
|
47
49
|
"> 0.5%",
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
"scripts": {
|
|
53
55
|
"build": "exit 0",
|
|
54
56
|
"check": "pnpm lint && pnpm test && pnpm typecheck",
|
|
55
|
-
"format": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,
|
|
57
|
+
"format": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,css}\"",
|
|
56
58
|
"lint": "eslint \"**/*.{js,jsx}\"",
|
|
57
59
|
"test": "vitest --coverage --pass-with-no-tests",
|
|
58
60
|
"typecheck": "tsc"
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -100,10 +100,10 @@ export class AnimationManager {
|
|
|
100
100
|
/**
|
|
101
101
|
* TBD.
|
|
102
102
|
* @param {string} name - TBD.
|
|
103
|
-
* @param {number[]|string[]} frameList - TBD.
|
|
103
|
+
* @param {number[] | string[] | null | undefined} frameList - TBD.
|
|
104
104
|
* @param {number} frameRate - TBD.
|
|
105
105
|
* @param {boolean} loop - TBD.
|
|
106
|
-
* @param {boolean} useNumericIndex - TBD.
|
|
106
|
+
* @param {boolean | undefined} useNumericIndex - TBD.
|
|
107
107
|
* @returns {Animation} TBD.
|
|
108
108
|
*/
|
|
109
109
|
add(name, frameList, frameRate = 60, loop = false, useNumericIndex = undefined) {
|
|
@@ -136,7 +136,7 @@ export class AnimationManager {
|
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* TBD.
|
|
139
|
-
* @param {string[]|number[]} frames - TBD.
|
|
139
|
+
* @param {string[] | number[]} frames - TBD.
|
|
140
140
|
* @param {boolean} useNumericIndex - TBD.
|
|
141
141
|
* @returns {boolean} TBD.
|
|
142
142
|
*/
|
|
@@ -560,7 +560,7 @@ export class InputHandler {
|
|
|
560
560
|
data.isDown = true;
|
|
561
561
|
data.isUp = false;
|
|
562
562
|
data.timeDown = this.game.time.time;
|
|
563
|
-
this.downPoint.
|
|
563
|
+
this.downPoint.setTo(pointer.x, pointer.y);
|
|
564
564
|
// It's possible the onInputDown event creates a new Sprite that is on-top of this one, so we ought to force a Pointer update
|
|
565
565
|
pointer.dirty = true;
|
|
566
566
|
if (this.sprite && this.sprite.events) {
|
|
@@ -690,7 +690,7 @@ export class InputHandler {
|
|
|
690
690
|
this.sprite.y =
|
|
691
691
|
Math.round((this.sprite.y - (this.snapOffsetY % this.snapY)) / this.snapY) * this.snapY +
|
|
692
692
|
(this.snapOffsetY % this.snapY);
|
|
693
|
-
this.snapPoint.
|
|
693
|
+
this.snapPoint.setTo(this.sprite.x, this.sprite.y);
|
|
694
694
|
}
|
|
695
695
|
this.sprite.events.onDragUpdate.dispatch(this.sprite, pointer, px, py, this.snapPoint, fromStart);
|
|
696
696
|
return true;
|
|
@@ -833,7 +833,7 @@ export class InputHandler {
|
|
|
833
833
|
this._dragPhase = true;
|
|
834
834
|
this.sprite.parent.bringToTop(this.sprite);
|
|
835
835
|
}
|
|
836
|
-
this.dragStartPoint.
|
|
836
|
+
this.dragStartPoint.setTo(x, y);
|
|
837
837
|
this.sprite.events.onDragStart$dispatch(this.sprite, pointer, x, y);
|
|
838
838
|
this._pendingDrag = false;
|
|
839
839
|
}
|
|
@@ -182,14 +182,14 @@ export class ScaleManager {
|
|
|
182
182
|
this.parentIsWindow = true;
|
|
183
183
|
rect.width = this.dom.visualBounds.width;
|
|
184
184
|
rect.height = this.dom.visualBounds.height;
|
|
185
|
-
this.offset.
|
|
185
|
+
this.offset.setTo(0, 0);
|
|
186
186
|
} else {
|
|
187
187
|
this.parentNode = target;
|
|
188
188
|
this.parentIsWindow = false;
|
|
189
189
|
this.getParentBounds(this._parentBounds);
|
|
190
190
|
rect.width = this._parentBounds.width;
|
|
191
191
|
rect.height = this._parentBounds.height;
|
|
192
|
-
this.offset.
|
|
192
|
+
this.offset.setTo(this._parentBounds.x, this._parentBounds.y);
|
|
193
193
|
}
|
|
194
194
|
let newWidth = 0;
|
|
195
195
|
let newHeight = 0;
|
|
@@ -18,7 +18,7 @@ export class BitmapText extends DisplayObject {
|
|
|
18
18
|
super();
|
|
19
19
|
this.game = game;
|
|
20
20
|
this.type = BITMAP_TEXT;
|
|
21
|
-
this.position.
|
|
21
|
+
this.position.setTo(x, y);
|
|
22
22
|
this.textWidth = 0;
|
|
23
23
|
this.textHeight = 0;
|
|
24
24
|
this._prevAnchor = new Point();
|
|
@@ -226,7 +226,7 @@ export class BitmapText extends DisplayObject {
|
|
|
226
226
|
}
|
|
227
227
|
g.position.x = currentLine.chars[c] + align - ax;
|
|
228
228
|
g.position.y = currentLine.y + charData.yOffset * scale - ay;
|
|
229
|
-
g.scale.
|
|
229
|
+
g.scale.setTo(scale, scale);
|
|
230
230
|
g.tint = this.tint;
|
|
231
231
|
g.texture.requiresReTint = true;
|
|
232
232
|
if (!g.parent) {
|
|
@@ -223,10 +223,10 @@ export class DisplayObject {
|
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* TBD.
|
|
226
|
-
* @param {DisplayObject} parent - TBD.
|
|
226
|
+
* @param {DisplayObject | null | undefined} parent - TBD.
|
|
227
227
|
* @returns {DisplayObject} TBD.
|
|
228
228
|
*/
|
|
229
|
-
updateTransform(parent) {
|
|
229
|
+
updateTransform(parent = null) {
|
|
230
230
|
if (!parent && !this.parent) {
|
|
231
231
|
return this;
|
|
232
232
|
}
|
|
@@ -291,8 +291,8 @@ export class DisplayObject {
|
|
|
291
291
|
}
|
|
292
292
|
// Set the World values
|
|
293
293
|
this.worldAlpha = this.alpha * p.worldAlpha;
|
|
294
|
-
// this.worldPosition.
|
|
295
|
-
this.worldScale.
|
|
294
|
+
// this.worldPosition.setTo(wt.tx, wt.ty);
|
|
295
|
+
this.worldScale.setTo(
|
|
296
296
|
this.scale.x * Math.sqrt(wt.a * wt.a + wt.c * wt.c),
|
|
297
297
|
this.scale.y * Math.sqrt(wt.b * wt.b + wt.d * wt.d)
|
|
298
298
|
);
|
|
@@ -14,9 +14,9 @@ export class Image extends DisplayObject {
|
|
|
14
14
|
* @param {number} x - TBD.
|
|
15
15
|
* @param {number} y - TBD.
|
|
16
16
|
* @param {string} key - TBD.
|
|
17
|
-
* @param {string|number} frame - TBD.
|
|
17
|
+
* @param {string | number} frame - TBD.
|
|
18
18
|
*/
|
|
19
|
-
constructor(game, x, y, key, frame) {
|
|
19
|
+
constructor(game, x, y, key, frame = 0) {
|
|
20
20
|
super();
|
|
21
21
|
this.game = game;
|
|
22
22
|
this.type = IMAGE;
|
|
@@ -37,7 +37,7 @@ export class Image extends DisplayObject {
|
|
|
37
37
|
/* if (this.texture.baseTexture.hasLoaded) {
|
|
38
38
|
this.onTextureUpdate();
|
|
39
39
|
} */
|
|
40
|
-
this.position.
|
|
40
|
+
this.position.setTo(x, y);
|
|
41
41
|
this.events = new EventManager(this);
|
|
42
42
|
this.animations = new AnimationManager(this);
|
|
43
43
|
this.loadTexture(key, frame);
|
|
@@ -95,8 +95,8 @@ export class Image extends DisplayObject {
|
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* TBD.
|
|
98
|
-
* @param {string} key - TBD.
|
|
99
|
-
* @param {string|number} frame - TBD.
|
|
98
|
+
* @param {string | number | Texture} key - TBD.
|
|
99
|
+
* @param {string | number} frame - TBD.
|
|
100
100
|
* @param {boolean} stopAnimation - TBD.
|
|
101
101
|
*/
|
|
102
102
|
loadTexture(key, frame = 0, stopAnimation = true) {
|
|
@@ -125,9 +125,9 @@ export const getLocalBounds = (target) => {
|
|
|
125
125
|
* TBD.
|
|
126
126
|
* @param {import('./image.js').Image} target - TBD.
|
|
127
127
|
* @param {object} renderSession - TBD.
|
|
128
|
-
* @param {import('../geom/matrix.js').Matrix} matrix - TBD.
|
|
128
|
+
* @param {import('../geom/matrix.js').Matrix | null | undefined} matrix - TBD.
|
|
129
129
|
*/
|
|
130
|
-
export const renderWebGL = (target, renderSession, matrix) => {
|
|
130
|
+
export const renderWebGL = (target, renderSession, matrix = null) => {
|
|
131
131
|
// if the sprite is not visible or the alpha is 0 then no need to render this element
|
|
132
132
|
if (!target.visible || target.alpha <= 0 || !target.renderable) {
|
|
133
133
|
return;
|
|
@@ -174,9 +174,9 @@ export const renderWebGL = (target, renderSession, matrix) => {
|
|
|
174
174
|
* TBD.
|
|
175
175
|
* @param {import('./image.js').Image} target - TBD.
|
|
176
176
|
* @param {object} renderSession - TBD.
|
|
177
|
-
* @param {import('../geom/matrix.js').Matrix} matrix - TBD.
|
|
177
|
+
* @param {import('../geom/matrix.js').Matrix | null | undefined} matrix - TBD.
|
|
178
178
|
*/
|
|
179
|
-
export const renderCanvas = (target, renderSession, matrix) => {
|
|
179
|
+
export const renderCanvas = (target, renderSession, matrix = null) => {
|
|
180
180
|
// If the sprite is not visible or the alpha is 0 then no need to render this element
|
|
181
181
|
if (
|
|
182
182
|
!target.visible ||
|
|
@@ -20,11 +20,11 @@ export class Texture {
|
|
|
20
20
|
/**
|
|
21
21
|
* TBD.
|
|
22
22
|
* @param {import('./base_texture.js').BaseTexture} baseTexture - TBD.
|
|
23
|
-
* @param {Rectangle} frame - TBD.
|
|
24
|
-
* @param {Rectangle} crop - TBD.
|
|
25
|
-
* @param {Rectangle} trim - TBD.
|
|
23
|
+
* @param {Rectangle | null | undefined} frame - TBD.
|
|
24
|
+
* @param {Rectangle | null | undefined} crop - TBD.
|
|
25
|
+
* @param {Rectangle | null | undefined} trim - TBD.
|
|
26
26
|
*/
|
|
27
|
-
constructor(baseTexture, frame, crop, trim) {
|
|
27
|
+
constructor(baseTexture, frame = null, crop = null, trim = null) {
|
|
28
28
|
this.noFrame = false;
|
|
29
29
|
if (!frame) {
|
|
30
30
|
this.noFrame = true;
|
|
@@ -34,15 +34,25 @@ export class Texture {
|
|
|
34
34
|
baseTexture = baseTexture.baseTexture;
|
|
35
35
|
}
|
|
36
36
|
this.baseTexture = baseTexture;
|
|
37
|
+
/** @type {Rectangle} */
|
|
37
38
|
this.frame = frame;
|
|
39
|
+
/** @type {Rectangle | null | undefined} */
|
|
38
40
|
this.trim = trim;
|
|
41
|
+
/** @type {boolean} */
|
|
39
42
|
this.valid = false;
|
|
43
|
+
/** @type {boolean} */
|
|
40
44
|
this.isTiling = false;
|
|
45
|
+
/** @type {boolean} */
|
|
41
46
|
this.requiresUpdate = false;
|
|
47
|
+
/** @type {boolean} */
|
|
42
48
|
this.requiresReTint = false;
|
|
49
|
+
/** @type {TextureUvs} */
|
|
43
50
|
this._uvs = null;
|
|
51
|
+
/** @type {number} */
|
|
44
52
|
this.width = 0;
|
|
53
|
+
/** @type {number} */
|
|
45
54
|
this.height = 0;
|
|
55
|
+
/** @type {Rectangle} */
|
|
46
56
|
this.crop = crop || new Rectangle(0, 0, 1, 1);
|
|
47
57
|
if (baseTexture.hasLoaded) {
|
|
48
58
|
if (this.noFrame) {
|
|
@@ -76,7 +86,7 @@ export class Texture {
|
|
|
76
86
|
/**
|
|
77
87
|
* TBD.
|
|
78
88
|
* @param {Rectangle} frame - TBD.
|
|
79
|
-
* @throws Error.
|
|
89
|
+
* @throws {Error}.
|
|
80
90
|
*/
|
|
81
91
|
setFrame(frame) {
|
|
82
92
|
this.noFrame = false;
|
package/src/phaser/geom/point.js
CHANGED
|
@@ -47,9 +47,9 @@ export class Point {
|
|
|
47
47
|
* @param {number} x - TBD.
|
|
48
48
|
* @param {number} y - TBD.
|
|
49
49
|
* @returns {Point} TBD.
|
|
50
|
+
* @deprecated
|
|
50
51
|
*/
|
|
51
52
|
set(x, y) {
|
|
52
|
-
// deprecated, use setTo(x, y)
|
|
53
53
|
this.x = x || 0;
|
|
54
54
|
this.y = y || (y !== 0 ? this.x : 0);
|
|
55
55
|
return this;
|
|
@@ -193,10 +193,10 @@ export class Point {
|
|
|
193
193
|
* @param {number} y - TBD.
|
|
194
194
|
* @param {number} angle - TBD.
|
|
195
195
|
* @param {boolean} asDegrees - TBD.
|
|
196
|
-
* @param {number} dist - TBD.
|
|
196
|
+
* @param {number | null | undefined} dist - TBD.
|
|
197
197
|
* @returns {Point} TBD.
|
|
198
198
|
*/
|
|
199
|
-
rotate(x, y, angle, asDegrees, dist) {
|
|
199
|
+
rotate(x, y, angle, asDegrees, dist = null) {
|
|
200
200
|
return rotate(this, x, y, angle, asDegrees, dist);
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -294,25 +294,25 @@ export class Rectangle {
|
|
|
294
294
|
const result = output || new Point();
|
|
295
295
|
switch (position) {
|
|
296
296
|
case TOP_LEFT:
|
|
297
|
-
return result.
|
|
297
|
+
return result.setTo(this.x, this.y);
|
|
298
298
|
case TOP_CENTER:
|
|
299
|
-
return result.
|
|
299
|
+
return result.setTo(this.centerX, this.y);
|
|
300
300
|
case TOP_RIGHT:
|
|
301
|
-
return result.
|
|
301
|
+
return result.setTo(this.right, this.y);
|
|
302
302
|
case LEFT_CENTER:
|
|
303
|
-
return result.
|
|
303
|
+
return result.setTo(this.x, this.centerY);
|
|
304
304
|
case CENTER:
|
|
305
|
-
return result.
|
|
305
|
+
return result.setTo(this.centerX, this.centerY);
|
|
306
306
|
case RIGHT_CENTER:
|
|
307
|
-
return result.
|
|
307
|
+
return result.setTo(this.right, this.centerY);
|
|
308
308
|
case BOTTOM_LEFT:
|
|
309
|
-
return result.
|
|
309
|
+
return result.setTo(this.x, this.bottom);
|
|
310
310
|
case BOTTOM_CENTER:
|
|
311
|
-
return result.
|
|
311
|
+
return result.setTo(this.centerX, this.bottom);
|
|
312
312
|
case BOTTOM_RIGHT:
|
|
313
|
-
return result.
|
|
313
|
+
return result.setTo(this.right, this.bottom);
|
|
314
314
|
default:
|
|
315
|
-
return result.
|
|
315
|
+
return result.setTo(this.x, this.y);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
|
|
@@ -214,7 +214,7 @@ export const normalize = (a, output = null) => {
|
|
|
214
214
|
* @param {number} y - TBD.
|
|
215
215
|
* @param {number} ang - TBD.
|
|
216
216
|
* @param {boolean} asDegrees - TBD.
|
|
217
|
-
* @param {number} dist - TBD.
|
|
217
|
+
* @param {number | null | undefined} dist - TBD.
|
|
218
218
|
* @returns {object} TBD.
|
|
219
219
|
*/
|
|
220
220
|
export const rotate = (a, x, y, ang, asDegrees, dist) => {
|
|
@@ -59,16 +59,16 @@ export class AnimationManager {
|
|
|
59
59
|
/**
|
|
60
60
|
* TBD.
|
|
61
61
|
* @param {string} name - TBD.
|
|
62
|
-
* @param {number[]|string[]} frameList - TBD.
|
|
62
|
+
* @param {number[] | string[] | null | undefined} frameList - TBD.
|
|
63
63
|
* @param {number} frameRate - TBD.
|
|
64
64
|
* @param {boolean} loop - TBD.
|
|
65
|
-
* @param {boolean} useNumericIndex - TBD.
|
|
65
|
+
* @param {boolean | undefined} useNumericIndex - TBD.
|
|
66
66
|
* @returns {Animation} TBD.
|
|
67
67
|
*/
|
|
68
|
-
add(name: string, frameList: number[] | string[], frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Animation;
|
|
68
|
+
add(name: string, frameList: number[] | string[] | null | undefined, frameRate?: number, loop?: boolean, useNumericIndex?: boolean | undefined): Animation;
|
|
69
69
|
/**
|
|
70
70
|
* TBD.
|
|
71
|
-
* @param {string[]|number[]} frames - TBD.
|
|
71
|
+
* @param {string[] | number[]} frames - TBD.
|
|
72
72
|
* @param {boolean} useNumericIndex - TBD.
|
|
73
73
|
* @returns {boolean} TBD.
|
|
74
74
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/animation_manager.js"],"names":[],"mappings":"AAGA;IACE;;;OAGG;IACH,oBAFW,OAAO,qBAAqB,EAAE,KAAK,EAiB7C;IAdC,4CAAoB;IACpB,+BAAuB;IACvB,yCAAyC;IACzC,cADW,OAAO,YAAY,EAAE,KAAK,CACb;IACxB,wBAAwB;IACxB,aADW,SAAS,CACG;IACvB,yBAA2B;IAC3B,kBAAqB;IACrB,kDAAkD;IAClD,YADW,OAAO,iBAAiB,EAAE,SAAS,CACxB;IACtB,yCAAyC;IACzC,QADW;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAC,CACrB;IAChB,uBAAuB;IACvB,eADW,MAAM,EAAE,CACI;IAGzB;;OAEG;IACH,gBAYC;IAED;;;;;OAKG;IACH,yBAJW,OAAO,iBAAiB,EAAE,SAAS,SACnC,MAAM,GAAC,MAAM,GACX,OAAO,CAwBnB;IA0OD;;OAEG;IACH,iBAZa,MAAM,EAuBlB;IAzBD;;;OAGG;IACH,aAFa,MAAM,CAOlB;IA6BD;;OAEG;IACH,qBAZa,MAAM,EAwBlB;IA1BD;;;OAGG;IACH,iBAFa,MAAM,CAOlB;IAjQD;;;;;OAKG;IACH,yBAJW,OAAO,iBAAiB,EAAE,SAAS,SACnC,MAAM,GAAC,MAAM,GACX,OAAO,CAqBnB;IAED;;;;;;;;OAQG;IACH,UAPW,MAAM,aACN,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"animation_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/animation_manager.js"],"names":[],"mappings":"AAGA;IACE;;;OAGG;IACH,oBAFW,OAAO,qBAAqB,EAAE,KAAK,EAiB7C;IAdC,4CAAoB;IACpB,+BAAuB;IACvB,yCAAyC;IACzC,cADW,OAAO,YAAY,EAAE,KAAK,CACb;IACxB,wBAAwB;IACxB,aADW,SAAS,CACG;IACvB,yBAA2B;IAC3B,kBAAqB;IACrB,kDAAkD;IAClD,YADW,OAAO,iBAAiB,EAAE,SAAS,CACxB;IACtB,yCAAyC;IACzC,QADW;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAC,CACrB;IAChB,uBAAuB;IACvB,eADW,MAAM,EAAE,CACI;IAGzB;;OAEG;IACH,gBAYC;IAED;;;;;OAKG;IACH,yBAJW,OAAO,iBAAiB,EAAE,SAAS,SACnC,MAAM,GAAC,MAAM,GACX,OAAO,CAwBnB;IA0OD;;OAEG;IACH,iBAZa,MAAM,EAuBlB;IAzBD;;;OAGG;IACH,aAFa,MAAM,CAOlB;IA6BD;;OAEG;IACH,qBAZa,MAAM,EAwBlB;IA1BD;;;OAGG;IACH,iBAFa,MAAM,CAOlB;IAjQD;;;;;OAKG;IACH,yBAJW,OAAO,iBAAiB,EAAE,SAAS,SACnC,MAAM,GAAC,MAAM,GACX,OAAO,CAqBnB;IAED;;;;;;;;OAQG;IACH,UAPW,MAAM,aACN,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,cACtC,MAAM,SACN,OAAO,oBACP,OAAO,GAAG,SAAS,GACjB,SAAS,CA4BrB;IAED;;;;;OAKG;IACH,uBAJW,MAAM,EAAE,GAAG,MAAM,EAAE,oBACnB,OAAO,GACL,OAAO,CAanB;IAED;;;;;;OAMG;IACH,WALW,MAAM,cACN,MAAM,SACN,OAAO,GACL,SAAS,CAoBrB;IAED;;;;OAIG;IACH,YAHW,MAAM,eACN,OAAO,QAMjB;IAED;;;OAGG;IACH,UAFa,OAAO,CAWnB;IAED;;;OAGG;IACH,eAFW,MAAM,QAOhB;IAED;;;OAGG;IACH,mBAFW,MAAM,QAOhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,SAAS,CAOrB;IAED;;OAEG;IACH,qBAIC;IAED;;;OAGG;IACH,iBAFa,OAAO,iBAAiB,EAAE,SAAS,CAI/C;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAUD;;OAEG;IACH,kBATa,OAAO,EAWnB;IAbD;;;OAGG;IACH,cAFa,OAAO,CAInB;IASD;;;OAGG;IACH,YAFa,MAAM,CAOlB;IA+CK,oBAA0C;CASjD;0BA3VyB,gBAAgB"}
|
|
@@ -91,10 +91,10 @@ export class DisplayObject {
|
|
|
91
91
|
removeChildren(beginIndex: number, endIndex: number): DisplayObject[];
|
|
92
92
|
/**
|
|
93
93
|
* TBD.
|
|
94
|
-
* @param {DisplayObject} parent - TBD.
|
|
94
|
+
* @param {DisplayObject | null | undefined} parent - TBD.
|
|
95
95
|
* @returns {DisplayObject} TBD.
|
|
96
96
|
*/
|
|
97
|
-
updateTransform(parent
|
|
97
|
+
updateTransform(parent?: DisplayObject | null | undefined): DisplayObject;
|
|
98
98
|
rotationCache: any;
|
|
99
99
|
worldRotation: number;
|
|
100
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display_object.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/display_object.js"],"names":[],"mappings":"AAOA;IAKI,gBAAkB;IAClB,oBAAuB;IACvB,iBAAmB;IACnB,gBAA+B;IAC/B,aAA4B;IAC5B,aAA4B;IAC5B,cAA6B;IAC7B,iBAAiB;IACjB,cAAc;IACd,aAAmB;IACnB,YAAkB;IAClB,mBAAmB;IACnB,uBAAkC;IAElC,kBAAiC;IAEjC,gBAAsB;IACtB,YAAY;IACZ,YAAY;IACZ,wBAA6C;IAC7C,mBAAyB;IACzB,wCAAiB;IACjB,cAAoB;IACpB,kBAAwB;IACxB,gBAAkB;IAClB,0BAA6B;IAG/B;;OAEG;IACH,gBA6BC;IAED;;;;OAIG;IACH,gBAHW,aAAa,GACX,aAAa,CAIzB;IAED;;;;;;OAMG;IACH,kBALW,aAAa,SACb,MAAM,GACJ,aAAa,CAazB;IAED;;;;;OAKG;IACH,oBAJW,aAAa,UACb,aAAa,QAcvB;IAED;;;;;OAKG;IACH,qBAJW,aAAa,GACX,MAAM,CASlB;IAED;;;;;OAKG;IACH,qBAJW,aAAa,SACb,MAAM,QAUhB;IAED;;;;;OAKG;IACH,kBAJW,MAAM,GACJ,aAAa,CAYzB;IAED;;;;OAIG;IACH,mBAHW,aAAa,GACX,aAAa,CAQzB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,aAAa,CASzB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,YACN,MAAM,GACJ,aAAa,EAAE,CAuB3B;IAED;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"display_object.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/display_object.js"],"names":[],"mappings":"AAOA;IAKI,gBAAkB;IAClB,oBAAuB;IACvB,iBAAmB;IACnB,gBAA+B;IAC/B,aAA4B;IAC5B,aAA4B;IAC5B,cAA6B;IAC7B,iBAAiB;IACjB,cAAc;IACd,aAAmB;IACnB,YAAkB;IAClB,mBAAmB;IACnB,uBAAkC;IAElC,kBAAiC;IAEjC,gBAAsB;IACtB,YAAY;IACZ,YAAY;IACZ,wBAA6C;IAC7C,mBAAyB;IACzB,wCAAiB;IACjB,cAAoB;IACpB,kBAAwB;IACxB,gBAAkB;IAClB,0BAA6B;IAG/B;;OAEG;IACH,gBA6BC;IAED;;;;OAIG;IACH,gBAHW,aAAa,GACX,aAAa,CAIzB;IAED;;;;;;OAMG;IACH,kBALW,aAAa,SACb,MAAM,GACJ,aAAa,CAazB;IAED;;;;;OAKG;IACH,oBAJW,aAAa,UACb,aAAa,QAcvB;IAED;;;;;OAKG;IACH,qBAJW,aAAa,GACX,MAAM,CASlB;IAED;;;;;OAKG;IACH,qBAJW,aAAa,SACb,MAAM,QAUhB;IAED;;;;;OAKG;IACH,kBAJW,MAAM,GACJ,aAAa,CAYzB;IAED;;;;OAIG;IACH,mBAHW,aAAa,GACX,aAAa,CAQzB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,aAAa,CASzB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,YACN,MAAM,GACJ,aAAa,EAAE,CAuB3B;IAED;;;;OAIG;IACH,yBAHW,aAAa,GAAG,IAAI,GAAG,SAAS,GAC9B,aAAa,CAmFzB;IAtDK,mBAAkC;IA2CtC,sBAA4C;IAa9C;;;;OAIG;IACH,iCAHW,aAAa,GACX,SAAS,CAiGrB;IAED;;;OAGG;IACH,kBAFa,SAAS,CAIrB;IAED;;;;OAIG;IACH,gBAHW,aAAa,GACX,OAAO,CAUnB;IAED;;;OAGG;IACH,2BAFW,MAAM,QA8BhB;IAED;;;OAGG;IACH,4BAFW,MAAM,QAehB;IAED;;OAEG;IACH,kBAEC;IAED;;OAEG;IACH,eAEC;IAED;;OAEG;IACH,mBAEC;IAED;;;OAGG;IACH,wBAGC;IAED;;;;OAIG;IACH,mBAHW,KAAK,GACH,KAAK,CAKjB;IAED;;;;;OAKG;IACH,kBAJW,KAAK,QACL,aAAa,GACX,KAAK,CAQjB;IAED;;;OAGG;IACH,kCAFW,MAAM,QAYhB;IAED;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,4BAMC;IADC,mBAAyB;IAa3B;;OAEG;IACH,iBATa,MAAM,EAiBlB;IAnBD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAYC,eAAmB;IAWrB;;OAEG;IACH,kBATa,MAAM,EAiBlB;IAnBD;;;OAGG;IACH,cAFa,MAAM,CAIlB;IAYC,gBAAoB;IAWtB;;OAEG;IACH,aATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,SAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,aATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,SAFa,MAAM,CAIlB;IASD;;;OAGG;IACH,oBAFa,OAAO,CAiBnB;IAYD;;OAEG;IACH,gBATa,OAAO,eAAe,EAAE,QAAQ,EAiB5C;IAnBD;;;OAGG;IACH,YAFa,OAAO,eAAe,EAAE,QAAQ,CAI5C;IAiBD;;;OAGG;IACH,eAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,eAFa,MAAM,CAIlB;IAUD;;OAEG;IACH,mBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,eAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,mBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,eAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,gBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,iBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,eATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,WAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,kBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,cAFa,MAAM,CAIlB;CAQF;sBAjyBqB,kBAAkB;uBADjB,mBAAmB;0BAEhB,sBAAsB"}
|
|
@@ -5,9 +5,9 @@ export class Image extends DisplayObject {
|
|
|
5
5
|
* @param {number} x - TBD.
|
|
6
6
|
* @param {number} y - TBD.
|
|
7
7
|
* @param {string} key - TBD.
|
|
8
|
-
* @param {string|number} frame - TBD.
|
|
8
|
+
* @param {string | number} frame - TBD.
|
|
9
9
|
*/
|
|
10
|
-
constructor(game: import("../core/game.js").Game, x: number, y: number, key: string, frame
|
|
10
|
+
constructor(game: import("../core/game.js").Game, x: number, y: number, key: string, frame?: string | number);
|
|
11
11
|
game: import("../core/game.js").Game;
|
|
12
12
|
type: number;
|
|
13
13
|
key: string;
|
|
@@ -26,11 +26,11 @@ export class Image extends DisplayObject {
|
|
|
26
26
|
renderOrderID: number;
|
|
27
27
|
/**
|
|
28
28
|
* TBD.
|
|
29
|
-
* @param {string} key - TBD.
|
|
30
|
-
* @param {string|number} frame - TBD.
|
|
29
|
+
* @param {string | number | Texture} key - TBD.
|
|
30
|
+
* @param {string | number} frame - TBD.
|
|
31
31
|
* @param {boolean} stopAnimation - TBD.
|
|
32
32
|
*/
|
|
33
|
-
loadTexture(key: string, frame?: string | number, stopAnimation?: boolean): void;
|
|
33
|
+
loadTexture(key: string | number | Texture, frame?: string | number, stopAnimation?: boolean): void;
|
|
34
34
|
customRender: boolean;
|
|
35
35
|
/**
|
|
36
36
|
* TBD.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/image.js"],"names":[],"mappings":"AASA;IACE;;;;;;;OAOG;IACH,kBANW,OAAO,iBAAiB,EAAE,IAAI,KAC9B,MAAM,KACN,MAAM,OACN,MAAM,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/image.js"],"names":[],"mappings":"AASA;IACE;;;;;;;OAOG;IACH,kBANW,OAAO,iBAAiB,EAAE,IAAI,KAC9B,MAAM,KACN,MAAM,OACN,MAAM,UACN,MAAM,GAAG,MAAM,EA2BzB;IAvBC,qCAAgB;IAChB,aAAiB;IAEjB,YAAc;IACd,aAAwD;IACxD,qBAAqB;IACrB,MADW,MAAM,CACH;IAGd,aAAoB;IACpB,mBAAoB;IACpB,mBAAyB;IACzB,kBAA6B;IAC7B,YAAkB;IAClB,qDAAkB;IAClB,wBAA2B;IAK3B,qBAAoC;IACpC,6BAA4C;IAqC1C,sBAAuB;IAiB3B;;;;;OAKG;IACH,iBAJW,MAAM,GAAG,MAAM,GAAG,OAAO,UACzB,MAAM,GAAG,MAAM,kBACf,OAAO,QAsCjB;IAzBC,sBAAyB;IA2B3B;;;OAGG;IACH,gBAFW,OAAO,kBAAkB,EAAE,KAAK,QAyC1C;IAFG,wBAA0B;IAI9B;;;;;OAKG;IACH,oBAJW,aAAa,SACb,MAAM,UACN,MAAM,QAKhB;IAED;;OAEG;IACH,mBAIC;IAUD;;OAEG;IACH,iBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,qBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,iBAFa,MAAM,CAIlB;IAWD;;;;OAIG;IACH,WAHW,SAAS,SACT,OAAO,QAiBjB;IAVK,oBAAsE;IAMxE,WAAiB;IAMrB;;OAEG;IACH,mBA2BC;IAkCD;;OAEG;IACH,wBAQC;IAED;;;;OAIG;IACH,oBAHW,OAAO,gBACP,OAAO,QAIjB;IAED;;;;OAIG;IACH,mBAHW,OAAO,mBAAmB,EAAE,MAAM,GAChC,SAAS,CAIrB;IAUD;;;;OAIG;IACH,2BAHW,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,QAI5C;IAED;;;;OAIG;IACH,4BAHW,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,QAI5C;CACF;8BArX6B,qBAAqB;0BAFzB,sBAAsB;6BADnB,0BAA0B;iCAFtB,8BAA8B;wBAOvC,oBAAoB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function setTexture(target: import("./image.js").Image, texture: import("./webgl/texture.js").Texture, destroyBase?: boolean): void;
|
|
2
2
|
export function getBounds(target: import("./image.js").Image, matrix?: object): import("../geom/rectangle.js").Rectangle;
|
|
3
3
|
export function getLocalBounds(target: import("./image.js").Image): import("../geom/rectangle.js").Rectangle;
|
|
4
|
-
export function renderWebGL(target: import("./image.js").Image, renderSession: object, matrix
|
|
5
|
-
export function renderCanvas(target: import("./image.js").Image, renderSession: object, matrix
|
|
4
|
+
export function renderWebGL(target: import("./image.js").Image, renderSession: object, matrix?: import("../geom/matrix.js").Matrix | null | undefined): void;
|
|
5
|
+
export function renderCanvas(target: import("./image.js").Image, renderSession: object, matrix?: import("../geom/matrix.js").Matrix | null | undefined): void;
|
|
6
6
|
//# sourceMappingURL=sprite_util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprite_util.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/sprite_util.js"],"names":[],"mappings":"AAUO,mCAJI,OAAO,YAAY,EAAE,KAAK,WAC1B,OAAO,oBAAoB,EAAE,OAAO,gBACpC,OAAO,QAUjB;AAQM,kCAJI,OAAO,YAAY,EAAE,KAAK,WAC1B,MAAM,GACJ,OAAO,sBAAsB,EAAE,SAAS,CA6EpD;AAOM,uCAHI,OAAO,YAAY,EAAE,KAAK,GACxB,OAAO,sBAAsB,EAAE,SAAS,CAepD;AAQM,oCAJI,OAAO,YAAY,EAAE,KAAK,iBAC1B,MAAM,
|
|
1
|
+
{"version":3,"file":"sprite_util.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/sprite_util.js"],"names":[],"mappings":"AAUO,mCAJI,OAAO,YAAY,EAAE,KAAK,WAC1B,OAAO,oBAAoB,EAAE,OAAO,gBACpC,OAAO,QAUjB;AAQM,kCAJI,OAAO,YAAY,EAAE,KAAK,WAC1B,MAAM,GACJ,OAAO,sBAAsB,EAAE,SAAS,CA6EpD;AAOM,uCAHI,OAAO,YAAY,EAAE,KAAK,GACxB,OAAO,sBAAsB,EAAE,SAAS,CAepD;AAQM,oCAJI,OAAO,YAAY,EAAE,KAAK,iBAC1B,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,QA2C/D;AAQM,qCAJI,OAAO,YAAY,EAAE,KAAK,iBAC1B,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,QAyF/D"}
|
|
@@ -12,22 +12,32 @@ export class Texture {
|
|
|
12
12
|
/**
|
|
13
13
|
* TBD.
|
|
14
14
|
* @param {import('./base_texture.js').BaseTexture} baseTexture - TBD.
|
|
15
|
-
* @param {Rectangle} frame - TBD.
|
|
16
|
-
* @param {Rectangle} crop - TBD.
|
|
17
|
-
* @param {Rectangle} trim - TBD.
|
|
15
|
+
* @param {Rectangle | null | undefined} frame - TBD.
|
|
16
|
+
* @param {Rectangle | null | undefined} crop - TBD.
|
|
17
|
+
* @param {Rectangle | null | undefined} trim - TBD.
|
|
18
18
|
*/
|
|
19
|
-
constructor(baseTexture: import("./base_texture.js").BaseTexture, frame
|
|
19
|
+
constructor(baseTexture: import("./base_texture.js").BaseTexture, frame?: Rectangle | null | undefined, crop?: Rectangle | null | undefined, trim?: Rectangle | null | undefined);
|
|
20
20
|
noFrame: boolean;
|
|
21
21
|
baseTexture: import("./base_texture.js").BaseTexture;
|
|
22
|
+
/** @type {Rectangle} */
|
|
22
23
|
frame: Rectangle;
|
|
23
|
-
|
|
24
|
+
/** @type {Rectangle | null | undefined} */
|
|
25
|
+
trim: Rectangle | null | undefined;
|
|
26
|
+
/** @type {boolean} */
|
|
24
27
|
valid: boolean;
|
|
28
|
+
/** @type {boolean} */
|
|
25
29
|
isTiling: boolean;
|
|
30
|
+
/** @type {boolean} */
|
|
26
31
|
requiresUpdate: boolean;
|
|
32
|
+
/** @type {boolean} */
|
|
27
33
|
requiresReTint: boolean;
|
|
34
|
+
/** @type {TextureUvs} */
|
|
28
35
|
_uvs: TextureUvs;
|
|
36
|
+
/** @type {number} */
|
|
29
37
|
width: number;
|
|
38
|
+
/** @type {number} */
|
|
30
39
|
height: number;
|
|
40
|
+
/** @type {Rectangle} */
|
|
31
41
|
crop: Rectangle;
|
|
32
42
|
/**
|
|
33
43
|
* TBD.
|
|
@@ -41,7 +51,7 @@ export class Texture {
|
|
|
41
51
|
/**
|
|
42
52
|
* TBD.
|
|
43
53
|
* @param {Rectangle} frame - TBD.
|
|
44
|
-
* @throws Error.
|
|
54
|
+
* @throws {Error}.
|
|
45
55
|
*/
|
|
46
56
|
setFrame(frame: Rectangle): void;
|
|
47
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texture.d.ts","sourceRoot":"","sources":["../../../../src/phaser/display/webgl/texture.js"],"names":[],"mappings":"AAEA;IAKI,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;CAEd;AAED;IACE;;;;;;OAMG;IACH,yBALW,OAAO,mBAAmB,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"texture.d.ts","sourceRoot":"","sources":["../../../../src/phaser/display/webgl/texture.js"],"names":[],"mappings":"AAEA;IAKI,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;CAEd;AAED;IACE;;;;;;OAMG;IACH,yBALW,OAAO,mBAAmB,EAAE,WAAW,UACvC,SAAS,GAAG,IAAI,GAAG,SAAS,SAC5B,SAAS,GAAG,IAAI,GAAG,SAAS,SAC5B,SAAS,GAAG,IAAI,GAAG,SAAS,EAsCtC;IAnCC,iBAAoB;IAQpB,qDAA8B;IAC9B,wBAAwB;IACxB,OADW,SAAS,CACF;IAClB,2CAA2C;IAC3C,MADW,SAAS,GAAG,IAAI,GAAG,SAAS,CACvB;IAChB,sBAAsB;IACtB,OADW,OAAO,CACA;IAClB,sBAAsB;IACtB,UADW,OAAO,CACG;IACrB,sBAAsB;IACtB,gBADW,OAAO,CACS;IAC3B,sBAAsB;IACtB,gBADW,OAAO,CACS;IAC3B,yBAAyB;IACzB,MADW,UAAU,CACL;IAChB,qBAAqB;IACrB,OADW,MAAM,CACH;IACd,qBAAqB;IACrB,QADW,MAAM,CACF;IACf,wBAAwB;IACxB,MADW,SAAS,CACyB;IAS/C;;OAEG;IACH,4BAKC;IAED;;;OAGG;IACH,sBAFW,OAAO,QAOjB;IAED;;;;OAIG;IACH,gBAHW,SAAS,QAoCnB;IAED;;OAEG;IACH,mBAeC;CACF;0BAhJyB,yBAAyB"}
|
|
@@ -31,6 +31,7 @@ export class Point {
|
|
|
31
31
|
* @param {number} x - TBD.
|
|
32
32
|
* @param {number} y - TBD.
|
|
33
33
|
* @returns {Point} TBD.
|
|
34
|
+
* @deprecated
|
|
34
35
|
*/
|
|
35
36
|
set(x: number, y: number): Point;
|
|
36
37
|
/**
|
|
@@ -118,10 +119,10 @@ export class Point {
|
|
|
118
119
|
* @param {number} y - TBD.
|
|
119
120
|
* @param {number} angle - TBD.
|
|
120
121
|
* @param {boolean} asDegrees - TBD.
|
|
121
|
-
* @param {number} dist - TBD.
|
|
122
|
+
* @param {number | null | undefined} dist - TBD.
|
|
122
123
|
* @returns {Point} TBD.
|
|
123
124
|
*/
|
|
124
|
-
rotate(x: number, y: number, angle: number, asDegrees: boolean, dist
|
|
125
|
+
rotate(x: number, y: number, angle: number, asDegrees: boolean, dist?: number | null | undefined): Point;
|
|
125
126
|
/**
|
|
126
127
|
* TBD.
|
|
127
128
|
* @returns {number} TBD.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/phaser/geom/point.js"],"names":[],"mappings":"AAGA;IACE;;;;OAIG;IACH,gBAHW,MAAM,MACN,MAAM,EAMhB;IAHC,UAAU;IACV,UAAU;IACV,aAAsB;IAGxB;;;;OAIG;IACH,iBAHW,KAAK,GACH,KAAK,CAIjB;IAED;;;OAGG;IACH,UAFa,KAAK,CAIjB;IAED;;;;;OAKG;IACH,SAJW,MAAM,KACN,MAAM,GACJ,KAAK,CAMjB;IAED
|
|
1
|
+
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/phaser/geom/point.js"],"names":[],"mappings":"AAGA;IACE;;;;OAIG;IACH,gBAHW,MAAM,MACN,MAAM,EAMhB;IAHC,UAAU;IACV,UAAU;IACV,aAAsB;IAGxB;;;;OAIG;IACH,iBAHW,KAAK,GACH,KAAK,CAIjB;IAED;;;OAGG;IACH,UAFa,KAAK,CAIjB;IAED;;;;;OAKG;IACH,SAJW,MAAM,KACN,MAAM,GACJ,KAAK,CAMjB;IAED;;;;;;OAMG;IACH,OALW,MAAM,KACN,MAAM,GACJ,KAAK,CAOjB;IAED;;;;;OAKG;IACH,OAJW,MAAM,KACN,MAAM,GACJ,KAAK,CAMjB;IAED;;;;;OAKG;IACH,YAJW,MAAM,KACN,MAAM,GACJ,KAAK,CAMjB;IAED;;;;;OAKG;IACH,YAJW,MAAM,KACN,MAAM,GACJ,KAAK,CAMjB;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,GACJ,KAAK,CAMjB;IAED;;;;;OAKG;IACH,YAJW,MAAM,OACN,MAAM,GACJ,KAAK,CAKjB;IAED;;;;;OAKG;IACH,YAJW,MAAM,OACN,MAAM,GACJ,KAAK,CAKjB;IAED;;;;;OAKG;IACH,WAJW,MAAM,OACN,MAAM,GACJ,KAAK,CAMjB;IAED;;;OAGG;IACH,SAFa,KAAK,CAIjB;IAED;;;;OAIG;IACH,aAHW,KAAK,GACH,KAAK,CAMjB;IAED;;;;OAIG;IACH,YAHW,KAAK,GACH,MAAM,CAIlB;IAED;;;;OAIG;IACH,UAHW,KAAK,GACH,OAAO,CAInB;IAED;;;;;OAKG;IACH,SAJW,KAAK,cACL,OAAO,GACL,MAAM,CAOlB;IAED;;;;;;;;OAQG;IACH,UAPW,MAAM,KACN,MAAM,SACN,MAAM,aACN,OAAO,SACP,MAAM,GAAG,IAAI,GAAG,SAAS,GACvB,KAAK,CAIjB;IAED;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,KAAK,CAIjB;IAED;;;OAGG;IACH,aAFa,KAAK,CASjB;IAED;;;OAGG;IACH,UAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,OAHW,KAAK,GACH,MAAM,CAIlB;IAED;;;;OAIG;IACH,SAHW,KAAK,GACH,MAAM,CAIlB;IAED;;;OAGG;IACH,QAFa,KAAK,CAIjB;IAED;;;OAGG;IACH,SAFa,KAAK,CAIjB;IAED;;;OAGG;IACH,mBAFa,KAAK,CAIjB;IAED;;;OAGG;IACH,SAFa,KAAK,CAIjB;IAED;;;OAGG;IACH,QAFa,KAAK,CAIjB;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;CACF"}
|
|
@@ -14,7 +14,7 @@ export function project(a: Point, b: Point, output?: Point): Point;
|
|
|
14
14
|
export function projectUnit(a: Point, b: Point, output?: Point): Point;
|
|
15
15
|
export function normalRightHand(a: Point, output?: Point): Point;
|
|
16
16
|
export function normalize(a: Point, output?: Point): Point;
|
|
17
|
-
export function rotate(a: Point, x: number, y: number, ang: number, asDegrees: boolean, dist: number): object;
|
|
17
|
+
export function rotate(a: Point, x: number, y: number, ang: number, asDegrees: boolean, dist: number | null | undefined): object;
|
|
18
18
|
export function centroid(points: Point[], output?: Point): Point;
|
|
19
19
|
export function parse(obj: object, xProp?: string, yProp?: string): Point;
|
|
20
20
|
export function clone(input: Point, output?: Point): Point;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../src/phaser/geom/util/point.js"],"names":[],"mappings":"AASO,uBALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AASM,4BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AASM,4BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AASM,0BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AAQM,0BAJI,KAAK,KACL,KAAK,GACH,OAAO,CAInB;AAQM,yBAJI,KAAK,KACL,KAAK,GACH,MAAM,CAIlB;AAQM,4BAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AAUM,+BANI,KAAK,KACL,KAAK,KACL,MAAM,WACN,KAAK,GACH,KAAK,CAKjB;AAUM,+BANI,KAAK,KACL,KAAK,KACL,MAAM,WACN,KAAK,GACH,KAAK,CAKjB;AAQM,wBAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AAQM,yBAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AASM,4BALI,KAAK,KACL,KAAK,UACL,OAAO,GACL,MAAM,CAOlB;AASM,2BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CASjB;AASM,+BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CASjB;AAQM,mCAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AAQM,6BAJI,KAAK,WACL,KAAK,GACH,KAAK,CASjB;AAYM,0BARI,KAAK,KACL,MAAM,KACN,MAAM,OACN,MAAM,aACN,OAAO,QACP,MAAM,
|
|
1
|
+
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../src/phaser/geom/util/point.js"],"names":[],"mappings":"AASO,uBALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AASM,4BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AASM,4BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AASM,0BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CAOjB;AAQM,0BAJI,KAAK,KACL,KAAK,GACH,OAAO,CAInB;AAQM,yBAJI,KAAK,KACL,KAAK,GACH,MAAM,CAIlB;AAQM,4BAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AAUM,+BANI,KAAK,KACL,KAAK,KACL,MAAM,WACN,KAAK,GACH,KAAK,CAKjB;AAUM,+BANI,KAAK,KACL,KAAK,KACL,MAAM,WACN,KAAK,GACH,KAAK,CAKjB;AAQM,wBAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AAQM,yBAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AASM,4BALI,KAAK,KACL,KAAK,UACL,OAAO,GACL,MAAM,CAOlB;AASM,2BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CASjB;AASM,+BALI,KAAK,KACL,KAAK,WACL,KAAK,GACH,KAAK,CASjB;AAQM,mCAJI,KAAK,WACL,KAAK,GACH,KAAK,CAKjB;AAQM,6BAJI,KAAK,WACL,KAAK,GACH,KAAK,CASjB;AAYM,0BARI,KAAK,KACL,MAAM,KACN,MAAM,OACN,MAAM,aACN,OAAO,QACP,MAAM,GAAG,IAAI,GAAG,SAAS,GACvB,MAAM,CAoBlB;AASM,iCALI,KAAK,EAAE,WACP,KAAK,GACH,KAAK,CAkBjB;AASM,2BALI,MAAM,UACN,MAAM,UACN,MAAM,GACJ,KAAK,CAWjB;AAQM,6BAJI,KAAK,WACL,KAAK,GACH,KAAK,CAMjB;sBAnSqB,aAAa"}
|