@vpmedia/phaser 1.94.0 → 1.96.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 +41 -0
- package/package.json +11 -11
- package/src/phaser/core/animation.js +79 -56
- package/src/phaser/core/animation_manager.js +55 -55
- package/src/phaser/core/animation_parser.js +2 -2
- package/src/phaser/core/cache.js +154 -154
- package/src/phaser/core/device.js +2 -1
- package/src/phaser/core/device_util.js +27 -27
- package/src/phaser/core/dom.js +43 -43
- package/src/phaser/core/event_manager.js +63 -63
- package/src/phaser/core/factory.js +47 -47
- package/src/phaser/core/frame.js +30 -30
- package/src/phaser/core/frame_data.js +30 -28
- package/src/phaser/core/frame_util.js +8 -8
- package/src/phaser/core/game.js +35 -19
- package/src/phaser/core/input_pointer.js +18 -0
- package/src/phaser/core/loader.js +171 -171
- package/src/phaser/core/loader_parser.js +22 -22
- package/src/phaser/core/raf.js +1 -1
- package/src/phaser/core/scale_manager.js +3 -2
- package/src/phaser/core/scene.js +16 -10
- package/src/phaser/core/scene_manager.js +51 -43
- package/src/phaser/core/signal.js +56 -52
- package/src/phaser/core/sound.js +54 -54
- package/src/phaser/core/sound_manager.js +49 -49
- package/src/phaser/core/stage.js +16 -16
- package/src/phaser/core/time.js +54 -30
- package/src/phaser/core/timer.js +82 -64
- package/src/phaser/core/timer_event.js +9 -9
- package/src/phaser/core/tween.js +106 -90
- package/src/phaser/core/tween_data.js +30 -30
- package/src/phaser/core/tween_manager.js +32 -24
- package/src/phaser/core/world.js +4 -3
- package/src/phaser/display/bitmap_text.js +72 -54
- package/src/phaser/display/button.js +48 -47
- package/src/phaser/display/canvas/buffer.js +8 -8
- package/src/phaser/display/canvas/graphics.js +8 -8
- package/src/phaser/display/canvas/masker.js +5 -5
- package/src/phaser/display/canvas/pool.js +18 -18
- package/src/phaser/display/canvas/renderer.js +17 -16
- package/src/phaser/display/canvas/tinter.js +22 -22
- package/src/phaser/display/canvas/util.js +42 -42
- package/src/phaser/display/display_object.js +119 -108
- package/src/phaser/display/graphics.js +129 -112
- package/src/phaser/display/graphics_data.js +10 -10
- package/src/phaser/display/graphics_data_util.js +3 -3
- package/src/phaser/display/group.js +63 -50
- package/src/phaser/display/image.js +68 -50
- package/src/phaser/display/sprite_batch.js +2 -2
- package/src/phaser/display/sprite_util.js +19 -19
- package/src/phaser/display/text.js +217 -187
- package/src/phaser/display/webgl/abstract_filter.js +4 -4
- package/src/phaser/display/webgl/base_texture.js +9 -9
- package/src/phaser/display/webgl/blend_manager.js +7 -7
- package/src/phaser/display/webgl/earcut.js +95 -95
- package/src/phaser/display/webgl/earcut_node.js +4 -4
- package/src/phaser/display/webgl/fast_sprite_batch.js +15 -15
- package/src/phaser/display/webgl/filter_manager.js +9 -9
- package/src/phaser/display/webgl/filter_texture.js +10 -10
- package/src/phaser/display/webgl/graphics.js +37 -37
- package/src/phaser/display/webgl/graphics_data.js +4 -4
- package/src/phaser/display/webgl/mask_manager.js +6 -6
- package/src/phaser/display/webgl/render_texture.js +16 -16
- package/src/phaser/display/webgl/renderer.js +21 -20
- package/src/phaser/display/webgl/shader/complex.js +4 -4
- package/src/phaser/display/webgl/shader/fast.js +4 -4
- package/src/phaser/display/webgl/shader/normal.js +8 -8
- package/src/phaser/display/webgl/shader/primitive.js +4 -4
- package/src/phaser/display/webgl/shader/strip.js +4 -4
- package/src/phaser/display/webgl/shader_manager.js +9 -9
- package/src/phaser/display/webgl/sprite_batch.js +18 -18
- package/src/phaser/display/webgl/stencil_manager.js +16 -16
- package/src/phaser/display/webgl/texture.js +13 -13
- package/src/phaser/display/webgl/texture_util.js +8 -8
- package/src/phaser/display/webgl/util.js +25 -25
- package/src/phaser/geom/circle.js +74 -69
- package/src/phaser/geom/ellipse.js +33 -28
- package/src/phaser/geom/line.js +96 -93
- package/src/phaser/geom/matrix.js +61 -54
- package/src/phaser/geom/point.js +99 -96
- package/src/phaser/geom/polygon.js +27 -22
- package/src/phaser/geom/rectangle.js +137 -132
- package/src/phaser/geom/rounded_rectangle.js +12 -12
- package/src/phaser/geom/util/circle.js +33 -33
- package/src/phaser/geom/util/ellipse.js +5 -5
- package/src/phaser/geom/util/line.js +26 -26
- package/src/phaser/geom/util/matrix.js +8 -8
- package/src/phaser/geom/util/point.js +97 -97
- package/src/phaser/geom/util/polygon.js +4 -4
- package/src/phaser/geom/util/rectangle.js +74 -74
- package/src/phaser/geom/util/rounded_rectangle.js +4 -4
- package/src/phaser/util/math.js +81 -81
- package/types/phaser/core/animation.d.ts +79 -56
- package/types/phaser/core/animation.d.ts.map +1 -1
- package/types/phaser/core/animation_manager.d.ts +55 -55
- package/types/phaser/core/animation_parser.d.ts +3 -2
- package/types/phaser/core/animation_parser.d.ts.map +1 -1
- package/types/phaser/core/cache.d.ts +154 -154
- package/types/phaser/core/device.d.ts.map +1 -1
- package/types/phaser/core/dom.d.ts +51 -44
- package/types/phaser/core/dom.d.ts.map +1 -1
- package/types/phaser/core/event_manager.d.ts +63 -63
- package/types/phaser/core/factory.d.ts +47 -47
- package/types/phaser/core/frame.d.ts +30 -30
- package/types/phaser/core/frame_data.d.ts +28 -27
- package/types/phaser/core/frame_data.d.ts.map +1 -1
- package/types/phaser/core/game.d.ts +54 -21
- package/types/phaser/core/game.d.ts.map +1 -1
- package/types/phaser/core/input_pointer.d.ts +18 -0
- package/types/phaser/core/input_pointer.d.ts.map +1 -1
- package/types/phaser/core/loader.d.ts +175 -172
- package/types/phaser/core/loader.d.ts.map +1 -1
- package/types/phaser/core/loader_parser.d.ts.map +1 -1
- package/types/phaser/core/raf.d.ts +1 -1
- package/types/phaser/core/scale_manager.d.ts +6 -5
- package/types/phaser/core/scale_manager.d.ts.map +1 -1
- package/types/phaser/core/scene.d.ts +15 -9
- package/types/phaser/core/scene.d.ts.map +1 -1
- package/types/phaser/core/scene_manager.d.ts +51 -43
- package/types/phaser/core/scene_manager.d.ts.map +1 -1
- package/types/phaser/core/signal.d.ts +54 -51
- package/types/phaser/core/signal.d.ts.map +1 -1
- package/types/phaser/core/sound.d.ts +54 -54
- package/types/phaser/core/sound_manager.d.ts +49 -49
- package/types/phaser/core/stage.d.ts +10 -10
- package/types/phaser/core/time.d.ts +54 -30
- package/types/phaser/core/time.d.ts.map +1 -1
- package/types/phaser/core/timer.d.ts +82 -64
- package/types/phaser/core/timer.d.ts.map +1 -1
- package/types/phaser/core/timer_event.d.ts +9 -9
- package/types/phaser/core/tween.d.ts +106 -90
- package/types/phaser/core/tween.d.ts.map +1 -1
- package/types/phaser/core/tween_data.d.ts +30 -30
- package/types/phaser/core/tween_manager.d.ts +35 -67
- package/types/phaser/core/tween_manager.d.ts.map +1 -1
- package/types/phaser/core/world.d.ts +4 -3
- package/types/phaser/core/world.d.ts.map +1 -1
- package/types/phaser/display/bitmap_text.d.ts +76 -53
- package/types/phaser/display/bitmap_text.d.ts.map +1 -1
- package/types/phaser/display/button.d.ts +47 -46
- package/types/phaser/display/button.d.ts.map +1 -1
- package/types/phaser/display/canvas/buffer.d.ts +8 -8
- package/types/phaser/display/canvas/graphics.d.ts +3 -3
- package/types/phaser/display/canvas/graphics.d.ts.map +1 -1
- package/types/phaser/display/canvas/pool.d.ts +6 -3
- package/types/phaser/display/canvas/pool.d.ts.map +1 -1
- package/types/phaser/display/canvas/renderer.d.ts +18 -17
- package/types/phaser/display/canvas/renderer.d.ts.map +1 -1
- package/types/phaser/display/canvas/util.d.ts +6 -6
- package/types/phaser/display/canvas/util.d.ts.map +1 -1
- package/types/phaser/display/display_object.d.ts +119 -108
- package/types/phaser/display/display_object.d.ts.map +1 -1
- package/types/phaser/display/graphics.d.ts +118 -102
- package/types/phaser/display/graphics.d.ts.map +1 -1
- package/types/phaser/display/graphics_data.d.ts +10 -10
- package/types/phaser/display/group.d.ts +59 -47
- package/types/phaser/display/group.d.ts.map +1 -1
- package/types/phaser/display/image.d.ts +58 -45
- package/types/phaser/display/image.d.ts.map +1 -1
- package/types/phaser/display/text.d.ts +237 -188
- package/types/phaser/display/text.d.ts.map +1 -1
- package/types/phaser/display/webgl/abstract_filter.d.ts +4 -4
- package/types/phaser/display/webgl/base_texture.d.ts +10 -10
- package/types/phaser/display/webgl/base_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/blend_manager.d.ts +6 -6
- package/types/phaser/display/webgl/earcut.d.ts +95 -95
- package/types/phaser/display/webgl/earcut_node.d.ts +4 -4
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts +15 -15
- package/types/phaser/display/webgl/filter_manager.d.ts +8 -8
- package/types/phaser/display/webgl/filter_texture.d.ts +10 -10
- package/types/phaser/display/webgl/graphics.d.ts +2 -2
- package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
- package/types/phaser/display/webgl/graphics_data.d.ts +4 -4
- package/types/phaser/display/webgl/render_texture.d.ts +16 -16
- package/types/phaser/display/webgl/renderer.d.ts +21 -20
- package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/complex.d.ts +4 -4
- package/types/phaser/display/webgl/shader/fast.d.ts +4 -4
- package/types/phaser/display/webgl/shader/normal.d.ts +8 -8
- package/types/phaser/display/webgl/shader/primitive.d.ts +4 -4
- package/types/phaser/display/webgl/shader/strip.d.ts +4 -4
- package/types/phaser/display/webgl/shader_manager.d.ts +8 -8
- package/types/phaser/display/webgl/sprite_batch.d.ts +17 -17
- package/types/phaser/display/webgl/stencil_manager.d.ts +15 -15
- package/types/phaser/display/webgl/texture.d.ts +12 -12
- package/types/phaser/display/webgl/texture_util.d.ts +4 -2
- package/types/phaser/display/webgl/texture_util.d.ts.map +1 -1
- package/types/phaser/geom/circle.d.ts +74 -69
- package/types/phaser/geom/circle.d.ts.map +1 -1
- package/types/phaser/geom/ellipse.d.ts +33 -28
- package/types/phaser/geom/ellipse.d.ts.map +1 -1
- package/types/phaser/geom/line.d.ts +96 -93
- package/types/phaser/geom/line.d.ts.map +1 -1
- package/types/phaser/geom/matrix.d.ts +61 -54
- package/types/phaser/geom/matrix.d.ts.map +1 -1
- package/types/phaser/geom/point.d.ts +99 -96
- package/types/phaser/geom/point.d.ts.map +1 -1
- package/types/phaser/geom/polygon.d.ts +29 -23
- package/types/phaser/geom/polygon.d.ts.map +1 -1
- package/types/phaser/geom/rectangle.d.ts +137 -132
- package/types/phaser/geom/rectangle.d.ts.map +1 -1
- package/types/phaser/geom/rounded_rectangle.d.ts +12 -12
- package/types/phaser/geom/util/point.d.ts +1 -1
- package/types/phaser/geom/util/point.d.ts.map +1 -1
- package/pnpm-workspace.yaml +0 -4
|
@@ -1,301 +1,306 @@
|
|
|
1
1
|
export class Rectangle {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {number} x -
|
|
5
|
-
* @param {number} y -
|
|
6
|
-
* @param {number} width -
|
|
7
|
-
* @param {number} height -
|
|
3
|
+
* Creates a new Rectangle instance.
|
|
4
|
+
* @param {number} x - The x coordinate of the top-left corner of the rectangle (default: 0).
|
|
5
|
+
* @param {number} y - The y coordinate of the top-left corner of the rectangle (default: 0).
|
|
6
|
+
* @param {number} width - The width of the rectangle (default: 0).
|
|
7
|
+
* @param {number} height - The height of the rectangle (default: 0).
|
|
8
8
|
*/
|
|
9
9
|
constructor(x?: number, y?: number, width?: number, height?: number);
|
|
10
|
+
/** @type {number} */
|
|
10
11
|
x: number;
|
|
12
|
+
/** @type {number} */
|
|
11
13
|
y: number;
|
|
14
|
+
/** @type {number} */
|
|
12
15
|
width: number;
|
|
16
|
+
/** @type {number} */
|
|
13
17
|
height: number;
|
|
18
|
+
/** @type {number} */
|
|
14
19
|
type: number;
|
|
15
20
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @param {number} dx -
|
|
18
|
-
* @param {number} dy -
|
|
19
|
-
* @returns {Rectangle}
|
|
21
|
+
* Offsets the rectangle's position by the specified amounts.
|
|
22
|
+
* @param {number} dx - The amount to offset the x coordinate by.
|
|
23
|
+
* @param {number} dy - The amount to offset the y coordinate by.
|
|
24
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
20
25
|
*/
|
|
21
26
|
offset(dx: number, dy: number): Rectangle;
|
|
22
27
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {Point} point -
|
|
25
|
-
* @returns {Rectangle}
|
|
28
|
+
* Offsets the rectangle's position by the specified point coordinates.
|
|
29
|
+
* @param {Point} point - The point to offset the rectangle by.
|
|
30
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
26
31
|
*/
|
|
27
32
|
offsetPoint(point: Point): Rectangle;
|
|
28
33
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @param {number} x -
|
|
31
|
-
* @param {number} y -
|
|
32
|
-
* @param {number} width -
|
|
33
|
-
* @param {number} height -
|
|
34
|
-
* @returns {Rectangle}
|
|
34
|
+
* Sets the rectangle's position and size to new values.
|
|
35
|
+
* @param {number} x - The new x coordinate of the top-left corner of the rectangle.
|
|
36
|
+
* @param {number} y - The new y coordinate of the top-left corner of the rectangle.
|
|
37
|
+
* @param {number} width - The new width of the rectangle.
|
|
38
|
+
* @param {number} height - The new height of the rectangle.
|
|
39
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
35
40
|
*/
|
|
36
41
|
setTo(x: number, y: number, width: number, height: number): Rectangle;
|
|
37
42
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {number} x -
|
|
40
|
-
* @param {number} y -
|
|
41
|
-
* @returns {Rectangle}
|
|
43
|
+
* Scales the rectangle's size by the specified amounts.
|
|
44
|
+
* @param {number} x - The amount to scale the width by.
|
|
45
|
+
* @param {number} y - The amount to scale the height by (default: x).
|
|
46
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
42
47
|
*/
|
|
43
48
|
scale(x: number, y: number): Rectangle;
|
|
44
49
|
/**
|
|
45
|
-
*
|
|
46
|
-
* @param {number} x -
|
|
47
|
-
* @param {number} y -
|
|
48
|
-
* @returns {Rectangle}
|
|
50
|
+
* Centers the rectangle on the specified point.
|
|
51
|
+
* @param {number} x - The x coordinate to center the rectangle on.
|
|
52
|
+
* @param {number} y - The y coordinate to center the rectangle on.
|
|
53
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
49
54
|
*/
|
|
50
55
|
centerOn(x: number, y: number): Rectangle;
|
|
51
56
|
/**
|
|
52
|
-
*
|
|
57
|
+
* Sets the x coordinate of the center of this rectangle.
|
|
53
58
|
*/
|
|
54
59
|
set centerX(value: number);
|
|
55
60
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @returns {number}
|
|
61
|
+
* Gets the x coordinate of the center of this rectangle.
|
|
62
|
+
* @returns {number} The x coordinate of the center of this rectangle.
|
|
58
63
|
*/
|
|
59
64
|
get centerX(): number;
|
|
60
65
|
/**
|
|
61
|
-
*
|
|
66
|
+
* Sets the y coordinate of the center of this rectangle.
|
|
62
67
|
*/
|
|
63
68
|
set centerY(value: number);
|
|
64
69
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @returns {number}
|
|
70
|
+
* Gets the y coordinate of the center of this rectangle.
|
|
71
|
+
* @returns {number} The y coordinate of the center of this rectangle.
|
|
67
72
|
*/
|
|
68
73
|
get centerY(): number;
|
|
69
74
|
/**
|
|
70
|
-
*
|
|
75
|
+
* Floors the x and y coordinates of the rectangle (rounds down to nearest integer).
|
|
71
76
|
*/
|
|
72
77
|
floor(): void;
|
|
73
78
|
/**
|
|
74
|
-
*
|
|
79
|
+
* Floors all coordinates of the rectangle (rounds down to nearest integer).
|
|
75
80
|
*/
|
|
76
81
|
floorAll(): void;
|
|
77
82
|
/**
|
|
78
|
-
*
|
|
83
|
+
* Ceils the x and y coordinates of the rectangle (rounds up to nearest integer).
|
|
79
84
|
*/
|
|
80
85
|
ceil(): void;
|
|
81
86
|
/**
|
|
82
|
-
*
|
|
87
|
+
* Ceils all coordinates of the rectangle (rounds up to nearest integer).
|
|
83
88
|
*/
|
|
84
89
|
ceilAll(): void;
|
|
85
90
|
/**
|
|
86
|
-
*
|
|
87
|
-
* @param {Rectangle} source -
|
|
88
|
-
* @returns {Rectangle}
|
|
91
|
+
* Copies the values from another rectangle to this rectangle.
|
|
92
|
+
* @param {Rectangle} source - The rectangle to copy values from.
|
|
93
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
89
94
|
*/
|
|
90
95
|
copyFrom(source: Rectangle): Rectangle;
|
|
91
96
|
/**
|
|
92
|
-
*
|
|
93
|
-
* @param {Rectangle} dest -
|
|
94
|
-
* @returns {Rectangle}
|
|
97
|
+
* Copies the values of this rectangle to another rectangle.
|
|
98
|
+
* @param {Rectangle} dest - The rectangle to copy values to.
|
|
99
|
+
* @returns {Rectangle} The destination rectangle.
|
|
95
100
|
*/
|
|
96
101
|
copyTo(dest: Rectangle): Rectangle;
|
|
97
102
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @param {number} dx -
|
|
100
|
-
* @param {number} dy -
|
|
101
|
-
* @returns {Rectangle}
|
|
103
|
+
* Increases the size of the rectangle by the specified amounts.
|
|
104
|
+
* @param {number} dx - The amount to increase the width by.
|
|
105
|
+
* @param {number} dy - The amount to increase the height by.
|
|
106
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
102
107
|
*/
|
|
103
108
|
inflate(dx: number, dy: number): Rectangle;
|
|
104
109
|
/**
|
|
105
|
-
*
|
|
106
|
-
* @param {Point} output -
|
|
107
|
-
* @returns {Point}
|
|
110
|
+
* Gets the size of the rectangle as a point.
|
|
111
|
+
* @param {Point} output - The point to store the size in (optional).
|
|
112
|
+
* @returns {Point} The size of the rectangle as a point.
|
|
108
113
|
*/
|
|
109
114
|
size(output: Point): Point;
|
|
110
115
|
/**
|
|
111
|
-
*
|
|
112
|
-
* @param {number} width -
|
|
113
|
-
* @param {number} height -
|
|
114
|
-
* @returns {Rectangle}
|
|
116
|
+
* Resizes the rectangle to the specified dimensions.
|
|
117
|
+
* @param {number} width - The new width of the rectangle.
|
|
118
|
+
* @param {number} height - The new height of the rectangle.
|
|
119
|
+
* @returns {Rectangle} This rectangle instance for chaining.
|
|
115
120
|
*/
|
|
116
121
|
resize(width: number, height: number): Rectangle;
|
|
117
122
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @param {Rectangle} output -
|
|
120
|
-
* @returns {Rectangle}
|
|
123
|
+
* Creates a clone of this rectangle.
|
|
124
|
+
* @param {Rectangle} output - The rectangle to store the clone in (optional).
|
|
125
|
+
* @returns {Rectangle} A new rectangle with the same values as this one.
|
|
121
126
|
*/
|
|
122
127
|
clone(output: Rectangle): Rectangle;
|
|
123
128
|
/**
|
|
124
|
-
*
|
|
125
|
-
* @param {number} x -
|
|
126
|
-
* @param {number} y -
|
|
127
|
-
* @returns {boolean}
|
|
129
|
+
* Checks if the specified point is contained within this rectangle.
|
|
130
|
+
* @param {number} x - The x coordinate of the point to check.
|
|
131
|
+
* @param {number} y - The y coordinate of the point to check.
|
|
132
|
+
* @returns {boolean} True if the point is contained within this rectangle, false otherwise.
|
|
128
133
|
*/
|
|
129
134
|
contains(x: number, y: number): boolean;
|
|
130
135
|
/**
|
|
131
|
-
*
|
|
132
|
-
* @param {Rectangle} b -
|
|
133
|
-
* @returns {boolean}
|
|
136
|
+
* Checks if the specified rectangle is fully contained within this rectangle.
|
|
137
|
+
* @param {Rectangle} b - The rectangle to check if it's contained.
|
|
138
|
+
* @returns {boolean} True if the rectangle is contained within this rectangle, false otherwise.
|
|
134
139
|
*/
|
|
135
140
|
containsRect(b: Rectangle): boolean;
|
|
136
141
|
/**
|
|
137
|
-
*
|
|
138
|
-
* @param {Rectangle} b -
|
|
139
|
-
* @returns {boolean}
|
|
142
|
+
* Checks if this rectangle is equal to another rectangle.
|
|
143
|
+
* @param {Rectangle} b - The rectangle to compare with.
|
|
144
|
+
* @returns {boolean} True if the rectangles have the same values, false otherwise.
|
|
140
145
|
*/
|
|
141
146
|
equals(b: Rectangle): boolean;
|
|
142
147
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @param {Rectangle} b -
|
|
145
|
-
* @param {Rectangle} out -
|
|
146
|
-
* @returns {Rectangle}
|
|
148
|
+
* Gets the intersection of this rectangle and another rectangle.
|
|
149
|
+
* @param {Rectangle} b - The rectangle to intersect with.
|
|
150
|
+
* @param {Rectangle} out - The rectangle to store the result in (optional).
|
|
151
|
+
* @returns {Rectangle} The intersection of the two rectangles.
|
|
147
152
|
*/
|
|
148
153
|
intersection(b: Rectangle, out: Rectangle): Rectangle;
|
|
149
154
|
/**
|
|
150
|
-
*
|
|
151
|
-
* @param {Rectangle} b -
|
|
152
|
-
* @returns {boolean}
|
|
155
|
+
* Checks if this rectangle intersects with another rectangle.
|
|
156
|
+
* @param {Rectangle} b - The rectangle to check for intersection with.
|
|
157
|
+
* @returns {boolean} True if the rectangles intersect, false otherwise.
|
|
153
158
|
*/
|
|
154
159
|
intersects(b: Rectangle): boolean;
|
|
155
160
|
/**
|
|
156
|
-
*
|
|
157
|
-
* @param {number} left -
|
|
158
|
-
* @param {number} right -
|
|
159
|
-
* @param {number} top -
|
|
160
|
-
* @param {number} bottom -
|
|
161
|
-
* @param {number} tolerance -
|
|
162
|
-
* @returns {boolean}
|
|
161
|
+
* Checks if this rectangle intersects with the specified bounds.
|
|
162
|
+
* @param {number} left - The left boundary of the area to check for intersection.
|
|
163
|
+
* @param {number} right - The right boundary of the area to check for intersection.
|
|
164
|
+
* @param {number} top - The top boundary of the area to check for intersection.
|
|
165
|
+
* @param {number} bottom - The bottom boundary of the area to check for intersection.
|
|
166
|
+
* @param {number} tolerance - A tolerance value to use when checking (default: 0).
|
|
167
|
+
* @returns {boolean} True if the rectangle intersects with the bounds, false otherwise.
|
|
163
168
|
*/
|
|
164
169
|
intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number): boolean;
|
|
165
170
|
/**
|
|
166
|
-
*
|
|
167
|
-
* @param {Rectangle} b -
|
|
168
|
-
* @param {Rectangle} out -
|
|
169
|
-
* @returns {Rectangle}
|
|
171
|
+
* Gets the union of this rectangle and another rectangle.
|
|
172
|
+
* @param {Rectangle} b - The rectangle to union with.
|
|
173
|
+
* @param {Rectangle} out - The rectangle to store the result in (optional).
|
|
174
|
+
* @returns {Rectangle} The union of the two rectangles.
|
|
170
175
|
*/
|
|
171
176
|
union(b: Rectangle, out: Rectangle): Rectangle;
|
|
172
177
|
/**
|
|
173
|
-
*
|
|
174
|
-
* @param {Point} output -
|
|
175
|
-
* @returns {Point}
|
|
178
|
+
* Gets a random point within this rectangle.
|
|
179
|
+
* @param {Point} output - The point to store the result in (optional).
|
|
180
|
+
* @returns {Point} A random point within this rectangle.
|
|
176
181
|
*/
|
|
177
182
|
random(output?: Point): Point;
|
|
178
183
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @param {number} position -
|
|
181
|
-
* @param {Point} output -
|
|
182
|
-
* @returns {Point}
|
|
184
|
+
* Gets a point at a specific position on the rectangle.
|
|
185
|
+
* @param {number} position - The position to get the point for (TOP_LEFT, TOP_CENTER, etc.).
|
|
186
|
+
* @param {Point} output - The point to store the result in (optional).
|
|
187
|
+
* @returns {Point} A point at the specified position on the rectangle.
|
|
183
188
|
*/
|
|
184
189
|
getPoint(position: number, output?: Point): Point;
|
|
185
190
|
/**
|
|
186
|
-
*
|
|
187
|
-
* @returns {string}
|
|
191
|
+
* Returns a string representation of this rectangle.
|
|
192
|
+
* @returns {string} A string representation of the rectangle.
|
|
188
193
|
*/
|
|
189
194
|
toString(): string;
|
|
190
195
|
/**
|
|
191
|
-
*
|
|
192
|
-
* @returns {number}
|
|
196
|
+
* Gets half the width of this rectangle.
|
|
197
|
+
* @returns {number} Half the width of this rectangle.
|
|
193
198
|
*/
|
|
194
199
|
get halfWidth(): number;
|
|
195
200
|
/**
|
|
196
|
-
*
|
|
197
|
-
* @returns {number}
|
|
201
|
+
* Gets half the height of this rectangle.
|
|
202
|
+
* @returns {number} Half the height of this rectangle.
|
|
198
203
|
*/
|
|
199
204
|
get halfHeight(): number;
|
|
200
205
|
/**
|
|
201
|
-
*
|
|
206
|
+
* Sets the top coordinate of this rectangle.
|
|
202
207
|
*/
|
|
203
208
|
set top(value: number);
|
|
204
209
|
/**
|
|
205
|
-
*
|
|
206
|
-
* @returns {number}
|
|
210
|
+
* Gets the top coordinate of this rectangle.
|
|
211
|
+
* @returns {number} The top coordinate of this rectangle.
|
|
207
212
|
*/
|
|
208
213
|
get top(): number;
|
|
209
214
|
/**
|
|
210
|
-
*
|
|
215
|
+
* Sets the top-left point of this rectangle.
|
|
211
216
|
*/
|
|
212
217
|
set topLeft(value: Point);
|
|
213
218
|
/**
|
|
214
|
-
*
|
|
215
|
-
* @returns {Point}
|
|
219
|
+
* Gets the top-left point of this rectangle.
|
|
220
|
+
* @returns {Point} The top-left point of this rectangle.
|
|
216
221
|
*/
|
|
217
222
|
get topLeft(): Point;
|
|
218
223
|
/**
|
|
219
|
-
*
|
|
224
|
+
* Sets the top-right point of this rectangle.
|
|
220
225
|
*/
|
|
221
226
|
set topRight(value: Point);
|
|
222
227
|
/**
|
|
223
|
-
*
|
|
224
|
-
* @returns {Point}
|
|
228
|
+
* Gets the top-right point of this rectangle.
|
|
229
|
+
* @returns {Point} The top-right point of this rectangle.
|
|
225
230
|
*/
|
|
226
231
|
get topRight(): Point;
|
|
227
232
|
/**
|
|
228
|
-
*
|
|
233
|
+
* Sets the right coordinate of this rectangle.
|
|
229
234
|
*/
|
|
230
235
|
set right(value: number);
|
|
231
236
|
/**
|
|
232
|
-
*
|
|
233
|
-
* @returns {number}
|
|
237
|
+
* Gets the right coordinate of this rectangle.
|
|
238
|
+
* @returns {number} The right coordinate of this rectangle.
|
|
234
239
|
*/
|
|
235
240
|
get right(): number;
|
|
236
241
|
/**
|
|
237
|
-
*
|
|
242
|
+
* Sets the bottom coordinate of this rectangle.
|
|
238
243
|
*/
|
|
239
244
|
set bottom(value: number);
|
|
240
245
|
/**
|
|
241
|
-
*
|
|
242
|
-
* @returns {number}
|
|
246
|
+
* Gets the bottom coordinate of this rectangle.
|
|
247
|
+
* @returns {number} The bottom coordinate of this rectangle.
|
|
243
248
|
*/
|
|
244
249
|
get bottom(): number;
|
|
245
250
|
/**
|
|
246
|
-
*
|
|
251
|
+
* Sets the bottom-left point of this rectangle.
|
|
247
252
|
*/
|
|
248
253
|
set bottomLeft(value: Point);
|
|
249
254
|
/**
|
|
250
|
-
*
|
|
251
|
-
* @returns {Point}
|
|
255
|
+
* Gets the bottom-left point of this rectangle.
|
|
256
|
+
* @returns {Point} The bottom-left point of this rectangle.
|
|
252
257
|
*/
|
|
253
258
|
get bottomLeft(): Point;
|
|
254
259
|
/**
|
|
255
|
-
*
|
|
260
|
+
* Sets the bottom-right point of this rectangle.
|
|
256
261
|
*/
|
|
257
262
|
set bottomRight(value: Point);
|
|
258
263
|
/**
|
|
259
|
-
*
|
|
260
|
-
* @returns {Point}
|
|
264
|
+
* Gets the bottom-right point of this rectangle.
|
|
265
|
+
* @returns {Point} The bottom-right point of this rectangle.
|
|
261
266
|
*/
|
|
262
267
|
get bottomRight(): Point;
|
|
263
268
|
/**
|
|
264
|
-
*
|
|
269
|
+
* Sets the left coordinate of this rectangle.
|
|
265
270
|
*/
|
|
266
271
|
set left(value: number);
|
|
267
272
|
/**
|
|
268
|
-
*
|
|
269
|
-
* @returns {number}
|
|
273
|
+
* Gets the left coordinate of this rectangle.
|
|
274
|
+
* @returns {number} The left coordinate of this rectangle.
|
|
270
275
|
*/
|
|
271
276
|
get left(): number;
|
|
272
277
|
/**
|
|
273
|
-
*
|
|
274
|
-
* @returns {number}
|
|
278
|
+
* Gets the volume (area) of this rectangle.
|
|
279
|
+
* @returns {number} The volume (area) of this rectangle.
|
|
275
280
|
*/
|
|
276
281
|
get volume(): number;
|
|
277
282
|
/**
|
|
278
|
-
*
|
|
279
|
-
* @returns {number}
|
|
283
|
+
* Gets the perimeter of this rectangle.
|
|
284
|
+
* @returns {number} The perimeter of this rectangle.
|
|
280
285
|
*/
|
|
281
286
|
get perimeter(): number;
|
|
282
287
|
/**
|
|
283
|
-
*
|
|
284
|
-
* @returns {number}
|
|
288
|
+
* Gets a random x coordinate within this rectangle.
|
|
289
|
+
* @returns {number} A random x coordinate within this rectangle.
|
|
285
290
|
*/
|
|
286
291
|
get randomX(): number;
|
|
287
292
|
/**
|
|
288
|
-
*
|
|
289
|
-
* @returns {number}
|
|
293
|
+
* Gets a random y coordinate within this rectangle.
|
|
294
|
+
* @returns {number} A random y coordinate within this rectangle.
|
|
290
295
|
*/
|
|
291
296
|
get randomY(): number;
|
|
292
297
|
/**
|
|
293
|
-
*
|
|
298
|
+
* Sets whether this rectangle is empty (zero width or height).
|
|
294
299
|
*/
|
|
295
300
|
set empty(value: boolean);
|
|
296
301
|
/**
|
|
297
|
-
*
|
|
298
|
-
* @returns {boolean}
|
|
302
|
+
* Checks if this rectangle is empty (has zero width or height).
|
|
303
|
+
* @returns {boolean} True if the rectangle is empty, false otherwise.
|
|
299
304
|
*/
|
|
300
305
|
get empty(): boolean;
|
|
301
306
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rectangle.d.ts","sourceRoot":"","sources":["../../../src/phaser/geom/rectangle.js"],"names":[],"mappings":"AA0BA;IACE;;;;;;OAMG;IACH,gBALW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,
|
|
1
|
+
{"version":3,"file":"rectangle.d.ts","sourceRoot":"","sources":["../../../src/phaser/geom/rectangle.js"],"names":[],"mappings":"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"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export class RoundedRectangle {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {number} x -
|
|
5
|
-
* @param {number} y -
|
|
6
|
-
* @param {number} width -
|
|
7
|
-
* @param {number} height -
|
|
8
|
-
* @param {number} radius -
|
|
3
|
+
* Creates a new RoundedRectangle instance.
|
|
4
|
+
* @param {number} x - The x coordinate of the top-left corner of the rectangle (default: 0).
|
|
5
|
+
* @param {number} y - The y coordinate of the top-left corner of the rectangle (default: 0).
|
|
6
|
+
* @param {number} width - The width of the rectangle (default: 0).
|
|
7
|
+
* @param {number} height - The height of the rectangle (default: 0).
|
|
8
|
+
* @param {number} radius - The corner radius (default: 20).
|
|
9
9
|
*/
|
|
10
10
|
constructor(x?: number, y?: number, width?: number, height?: number, radius?: number);
|
|
11
11
|
x: number;
|
|
@@ -15,15 +15,15 @@ export class RoundedRectangle {
|
|
|
15
15
|
radius: number;
|
|
16
16
|
type: number;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {number} x -
|
|
20
|
-
* @param {number} y -
|
|
21
|
-
* @returns {boolean}
|
|
18
|
+
* Checks if the specified point is contained within this rounded rectangle.
|
|
19
|
+
* @param {number} x - The x coordinate of the point to check.
|
|
20
|
+
* @param {number} y - The y coordinate of the point to check.
|
|
21
|
+
* @returns {boolean} True if the point is contained within this rounded rectangle, false otherwise.
|
|
22
22
|
*/
|
|
23
23
|
contains(x: number, y: number): boolean;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @returns {RoundedRectangle}
|
|
25
|
+
* Creates a clone of this rounded rectangle.
|
|
26
|
+
* @returns {RoundedRectangle} A new rounded rectangle with the same values as this one.
|
|
27
27
|
*/
|
|
28
28
|
clone(): RoundedRectangle;
|
|
29
29
|
}
|
|
@@ -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 | null | undefined):
|
|
17
|
+
export function rotate(a: Point, x: number, y: number, ang: number, asDegrees: boolean, dist: number | null | undefined): Point;
|
|
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,GAAG,IAAI,GAAG,SAAS,GACvB,
|
|
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,KAAK,CAoBjB;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"}
|
package/pnpm-workspace.yaml
DELETED