melonjs 10.9.0 → 10.10.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.
@@ -906,7 +906,7 @@ export class Camera2d extends Renderable {
906
906
  * @param {number} h deadzone height
907
907
  */
908
908
  setDeadzone(w: number, h: number): void;
909
- deadzone: Rect;
909
+ deadzone: Rect$1;
910
910
  /**
911
911
  * resize the camera
912
912
  * @name resize
@@ -1116,7 +1116,7 @@ export class CanvasRenderer extends Renderer {
1116
1116
  /**
1117
1117
  * Reset the canvas transform to identity
1118
1118
  * @name resetTransform
1119
- * @memberof CanvasRenderer.prototype
1119
+ * @memberof CanvasRenderer
1120
1120
  * @function
1121
1121
  */
1122
1122
  resetTransform(): void;
@@ -1133,7 +1133,7 @@ export class CanvasRenderer extends Renderer {
1133
1133
  * <img src="images/screen-blendmode.png" width="510"/> <br>
1134
1134
  * @name setBlendMode
1135
1135
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
1136
- * @memberof CanvasRenderer.prototype
1136
+ * @memberof CanvasRenderer
1137
1137
  * @function
1138
1138
  * @param {string} [mode="normal"] blend mode : "normal", "multiply", "lighter, "additive", "screen"
1139
1139
  * @param {CanvasRenderingContext2D} [context]
@@ -1142,14 +1142,14 @@ export class CanvasRenderer extends Renderer {
1142
1142
  /**
1143
1143
  * render the main framebuffer on screen
1144
1144
  * @name flush
1145
- * @memberof CanvasRenderer.prototype
1145
+ * @memberof CanvasRenderer
1146
1146
  * @function
1147
1147
  */
1148
1148
  flush(): void;
1149
1149
  /**
1150
1150
  * Clears the main framebuffer with the given color
1151
1151
  * @name clearColor
1152
- * @memberof CanvasRenderer.prototype
1152
+ * @memberof CanvasRenderer
1153
1153
  * @function
1154
1154
  * @param {Color|string} [color="#000000"] CSS color.
1155
1155
  * @param {boolean} [opaque=false] Allow transparency [default] or clear the surface completely [true]
@@ -1158,7 +1158,7 @@ export class CanvasRenderer extends Renderer {
1158
1158
  /**
1159
1159
  * Erase the pixels in the given rectangular area by setting them to transparent black (rgba(0,0,0,0)).
1160
1160
  * @name clearRect
1161
- * @memberof CanvasRenderer.prototype
1161
+ * @memberof CanvasRenderer
1162
1162
  * @function
1163
1163
  * @param {number} x x axis of the coordinate for the rectangle starting point.
1164
1164
  * @param {number} y y axis of the coordinate for the rectangle starting point.
@@ -1169,7 +1169,7 @@ export class CanvasRenderer extends Renderer {
1169
1169
  /**
1170
1170
  * Create a pattern with the specified repetition
1171
1171
  * @name createPattern
1172
- * @memberof CanvasRenderer.prototype
1172
+ * @memberof CanvasRenderer
1173
1173
  * @function
1174
1174
  * @param {Image} image Source image
1175
1175
  * @param {string} repeat Define how the pattern should be repeated
@@ -1185,7 +1185,7 @@ export class CanvasRenderer extends Renderer {
1185
1185
  /**
1186
1186
  * Draw an image onto the main using the canvas api
1187
1187
  * @name drawImage
1188
- * @memberof CanvasRenderer.prototype
1188
+ * @memberof CanvasRenderer
1189
1189
  * @function
1190
1190
  * @param {Image} image An element to draw into the context. The specification permits any canvas image source (CanvasImageSource), specifically, a CSSImageValue, an HTMLImageElement, an SVGImageElement, an HTMLVideoElement, an HTMLCanvasElement, an ImageBitmap, or an OffscreenCanvas.
1191
1191
  * @param {number} sx The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
@@ -1208,7 +1208,7 @@ export class CanvasRenderer extends Renderer {
1208
1208
  /**
1209
1209
  * Draw a pattern within the given rectangle.
1210
1210
  * @name drawPattern
1211
- * @memberof CanvasRenderer.prototype
1211
+ * @memberof CanvasRenderer
1212
1212
  * @function
1213
1213
  * @param {CanvasPattern} pattern Pattern object
1214
1214
  * @param {number} x
@@ -1221,7 +1221,7 @@ export class CanvasRenderer extends Renderer {
1221
1221
  /**
1222
1222
  * Stroke an arc at the specified coordinates with given radius, start and end points
1223
1223
  * @name strokeArc
1224
- * @memberof CanvasRenderer.prototype
1224
+ * @memberof CanvasRenderer
1225
1225
  * @function
1226
1226
  * @param {number} x arc center point x-axis
1227
1227
  * @param {number} y arc center point y-axis
@@ -1235,7 +1235,7 @@ export class CanvasRenderer extends Renderer {
1235
1235
  /**
1236
1236
  * Fill an arc at the specified coordinates with given radius, start and end points
1237
1237
  * @name fillArc
1238
- * @memberof CanvasRenderer.prototype
1238
+ * @memberof CanvasRenderer
1239
1239
  * @function
1240
1240
  * @param {number} x arc center point x-axis
1241
1241
  * @param {number} y arc center point y-axis
@@ -1248,7 +1248,7 @@ export class CanvasRenderer extends Renderer {
1248
1248
  /**
1249
1249
  * Stroke an ellipse at the specified coordinates with given radius
1250
1250
  * @name strokeEllipse
1251
- * @memberof CanvasRenderer.prototype
1251
+ * @memberof CanvasRenderer
1252
1252
  * @function
1253
1253
  * @param {number} x ellipse center point x-axis
1254
1254
  * @param {number} y ellipse center point y-axis
@@ -1260,7 +1260,7 @@ export class CanvasRenderer extends Renderer {
1260
1260
  /**
1261
1261
  * Fill an ellipse at the specified coordinates with given radius
1262
1262
  * @name fillEllipse
1263
- * @memberof CanvasRenderer.prototype
1263
+ * @memberof CanvasRenderer
1264
1264
  * @function
1265
1265
  * @param {number} x ellipse center point x-axis
1266
1266
  * @param {number} y ellipse center point y-axis
@@ -1271,7 +1271,7 @@ export class CanvasRenderer extends Renderer {
1271
1271
  /**
1272
1272
  * Stroke a line of the given two points
1273
1273
  * @name strokeLine
1274
- * @memberof CanvasRenderer.prototype
1274
+ * @memberof CanvasRenderer
1275
1275
  * @function
1276
1276
  * @param {number} startX the start x coordinate
1277
1277
  * @param {number} startY the start y coordinate
@@ -1282,7 +1282,7 @@ export class CanvasRenderer extends Renderer {
1282
1282
  /**
1283
1283
  * Fill a line of the given two points
1284
1284
  * @name fillLine
1285
- * @memberof CanvasRenderer.prototype
1285
+ * @memberof CanvasRenderer
1286
1286
  * @function
1287
1287
  * @param {number} startX the start x coordinate
1288
1288
  * @param {number} startY the start y coordinate
@@ -1293,7 +1293,7 @@ export class CanvasRenderer extends Renderer {
1293
1293
  /**
1294
1294
  * Stroke the given me.Polygon on the screen
1295
1295
  * @name strokePolygon
1296
- * @memberof CanvasRenderer.prototype
1296
+ * @memberof CanvasRenderer
1297
1297
  * @function
1298
1298
  * @param {Polygon} poly the shape to draw
1299
1299
  * @param {boolean} [fill=false] also fill the shape with the current color if true
@@ -1302,7 +1302,7 @@ export class CanvasRenderer extends Renderer {
1302
1302
  /**
1303
1303
  * Fill the given me.Polygon on the screen
1304
1304
  * @name fillPolygon
1305
- * @memberof CanvasRenderer.prototype
1305
+ * @memberof CanvasRenderer
1306
1306
  * @function
1307
1307
  * @param {Polygon} poly the shape to draw
1308
1308
  */
@@ -1310,7 +1310,7 @@ export class CanvasRenderer extends Renderer {
1310
1310
  /**
1311
1311
  * Stroke a rectangle at the specified coordinates
1312
1312
  * @name strokeRect
1313
- * @memberof CanvasRenderer.prototype
1313
+ * @memberof CanvasRenderer
1314
1314
  * @function
1315
1315
  * @param {number} x
1316
1316
  * @param {number} y
@@ -1322,7 +1322,7 @@ export class CanvasRenderer extends Renderer {
1322
1322
  /**
1323
1323
  * Draw a filled rectangle at the specified coordinates
1324
1324
  * @name fillRect
1325
- * @memberof CanvasRenderer.prototype
1325
+ * @memberof CanvasRenderer
1326
1326
  * @function
1327
1327
  * @param {number} x
1328
1328
  * @param {number} y
@@ -1333,7 +1333,7 @@ export class CanvasRenderer extends Renderer {
1333
1333
  /**
1334
1334
  * Stroke a rounded rectangle at the specified coordinates
1335
1335
  * @name strokeRoundRect
1336
- * @memberof CanvasRenderer.prototype
1336
+ * @memberof CanvasRenderer
1337
1337
  * @function
1338
1338
  * @param {number} x
1339
1339
  * @param {number} y
@@ -1346,7 +1346,7 @@ export class CanvasRenderer extends Renderer {
1346
1346
  /**
1347
1347
  * Draw a rounded filled rectangle at the specified coordinates
1348
1348
  * @name fillRoundRect
1349
- * @memberof CanvasRenderer.prototype
1349
+ * @memberof CanvasRenderer
1350
1350
  * @function
1351
1351
  * @param {number} x
1352
1352
  * @param {number} y
@@ -1358,7 +1358,7 @@ export class CanvasRenderer extends Renderer {
1358
1358
  /**
1359
1359
  * return a reference to the system 2d Context
1360
1360
  * @name getContext
1361
- * @memberof CanvasRenderer.prototype
1361
+ * @memberof CanvasRenderer
1362
1362
  * @function
1363
1363
  * @returns {CanvasRenderingContext2D}
1364
1364
  */
@@ -1371,21 +1371,21 @@ export class CanvasRenderer extends Renderer {
1371
1371
  /**
1372
1372
  * save the canvas context
1373
1373
  * @name save
1374
- * @memberof CanvasRenderer.prototype
1374
+ * @memberof CanvasRenderer
1375
1375
  * @function
1376
1376
  */
1377
1377
  save(): void;
1378
1378
  /**
1379
1379
  * restores the canvas context
1380
1380
  * @name restore
1381
- * @memberof CanvasRenderer.prototype
1381
+ * @memberof CanvasRenderer
1382
1382
  * @function
1383
1383
  */
1384
1384
  restore(): void;
1385
1385
  /**
1386
1386
  * rotates the canvas context
1387
1387
  * @name rotate
1388
- * @memberof CanvasRenderer.prototype
1388
+ * @memberof CanvasRenderer
1389
1389
  * @function
1390
1390
  * @param {number} angle in radians
1391
1391
  */
@@ -1393,7 +1393,7 @@ export class CanvasRenderer extends Renderer {
1393
1393
  /**
1394
1394
  * scales the canvas context
1395
1395
  * @name scale
1396
- * @memberof CanvasRenderer.prototype
1396
+ * @memberof CanvasRenderer
1397
1397
  * @function
1398
1398
  * @param {number} x
1399
1399
  * @param {number} y
@@ -1403,7 +1403,7 @@ export class CanvasRenderer extends Renderer {
1403
1403
  * Set the current fill & stroke style color.
1404
1404
  * By default, or upon reset, the value is set to #000000.
1405
1405
  * @name setColor
1406
- * @memberof CanvasRenderer.prototype
1406
+ * @memberof CanvasRenderer
1407
1407
  * @function
1408
1408
  * @param {Color|string} color css color value
1409
1409
  */
@@ -1411,7 +1411,7 @@ export class CanvasRenderer extends Renderer {
1411
1411
  /**
1412
1412
  * Set the global alpha
1413
1413
  * @name setGlobalAlpha
1414
- * @memberof CanvasRenderer.prototype
1414
+ * @memberof CanvasRenderer
1415
1415
  * @function
1416
1416
  * @param {number} alpha 0.0 to 1.0 values accepted.
1417
1417
  */
@@ -1419,7 +1419,7 @@ export class CanvasRenderer extends Renderer {
1419
1419
  /**
1420
1420
  * Return the global alpha
1421
1421
  * @name getGlobalAlpha
1422
- * @memberof CanvasRenderer.prototype
1422
+ * @memberof CanvasRenderer
1423
1423
  * @function
1424
1424
  * @returns {number} global alpha value
1425
1425
  */
@@ -1427,7 +1427,7 @@ export class CanvasRenderer extends Renderer {
1427
1427
  /**
1428
1428
  * Set the line width on the context
1429
1429
  * @name setLineWidth
1430
- * @memberof CanvasRenderer.prototype
1430
+ * @memberof CanvasRenderer
1431
1431
  * @function
1432
1432
  * @param {number} width Line width
1433
1433
  */
@@ -1436,7 +1436,7 @@ export class CanvasRenderer extends Renderer {
1436
1436
  * Reset (overrides) the renderer transformation matrix to the
1437
1437
  * identity one, and then apply the given transformation matrix.
1438
1438
  * @name setTransform
1439
- * @memberof CanvasRenderer.prototype
1439
+ * @memberof CanvasRenderer
1440
1440
  * @function
1441
1441
  * @param {Matrix2d} mat2d Matrix to transform by
1442
1442
  */
@@ -1444,7 +1444,7 @@ export class CanvasRenderer extends Renderer {
1444
1444
  /**
1445
1445
  * Multiply given matrix into the renderer tranformation matrix
1446
1446
  * @name transform
1447
- * @memberof CanvasRenderer.prototype
1447
+ * @memberof CanvasRenderer
1448
1448
  * @function
1449
1449
  * @param {Matrix2d} mat2d Matrix to transform by
1450
1450
  */
@@ -1452,7 +1452,7 @@ export class CanvasRenderer extends Renderer {
1452
1452
  /**
1453
1453
  * Translates the context to the given position
1454
1454
  * @name translate
1455
- * @memberof CanvasRenderer.prototype
1455
+ * @memberof CanvasRenderer
1456
1456
  * @function
1457
1457
  * @param {number} x
1458
1458
  * @param {number} y
@@ -1465,7 +1465,7 @@ export class CanvasRenderer extends Renderer {
1465
1465
  * and restore it (with the restore() method) any time in the future.
1466
1466
  * (<u>this is an experimental feature !</u>)
1467
1467
  * @name clipRect
1468
- * @memberof CanvasRenderer.prototype
1468
+ * @memberof CanvasRenderer
1469
1469
  * @function
1470
1470
  * @param {number} x
1471
1471
  * @param {number} y
@@ -1473,6 +1473,17 @@ export class CanvasRenderer extends Renderer {
1473
1473
  * @param {number} height
1474
1474
  */
1475
1475
  clipRect(x: number, y: number, width: number, height: number): void;
1476
+ /**
1477
+ * A mask limits rendering elements to the shape and position of the given mask object.
1478
+ * So, if the renderable is larger than the mask, only the intersecting part of the renderable will be visible.
1479
+ * Mask are not preserved through renderer context save and restore.
1480
+ * @name setMask
1481
+ * @memberof CanvasRenderer
1482
+ * @function
1483
+ * @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] the shape defining the mask to be applied
1484
+ * @param {boolean} [invert=false] either the given shape should define what is visible (default) or the opposite
1485
+ */
1486
+ setMask(mask?: Rect | RoundRect | Polygon | Line | Ellipse, invert?: boolean): void;
1476
1487
  }
1477
1488
  /**
1478
1489
  * @classdesc
@@ -1684,7 +1695,7 @@ export class Color {
1684
1695
  * @function
1685
1696
  * @returns {string}
1686
1697
  */
1687
- toHex8(): string;
1698
+ toHex8(alpha?: number): string;
1688
1699
  /**
1689
1700
  * Get the color in "rgb(R,G,B)" format
1690
1701
  * @name toRGB
@@ -1698,9 +1709,10 @@ export class Color {
1698
1709
  * @name toRGBA
1699
1710
  * @memberof Color
1700
1711
  * @function
1712
+ * @param {number} [alpha=1.0] alpha value [0.0 .. 1.0]
1701
1713
  * @returns {string}
1702
1714
  */
1703
- toRGBA(): string;
1715
+ toRGBA(alpha?: number): string;
1704
1716
  }
1705
1717
  /**
1706
1718
  * @classdesc
@@ -1736,7 +1748,7 @@ export class ColorLayer extends Renderable {
1736
1748
  }
1737
1749
  /**
1738
1750
  * @classdesc
1739
- * me.Container represents a collection of child objects
1751
+ * Container represents a collection of child objects
1740
1752
  * @augments Renderable
1741
1753
  */
1742
1754
  export class Container extends Renderable {
@@ -1855,7 +1867,7 @@ export class Container extends Renderable {
1855
1867
  * orginal container. Then when the me.game.world.reset() is called the renderable
1856
1868
  * will not be in any container.
1857
1869
  * @name addChild
1858
- * @memberof Container.prototype
1870
+ * @memberof Container
1859
1871
  * @function
1860
1872
  * @param {Renderable} child
1861
1873
  * @param {number} [z] forces the z index of the child to the specified value
@@ -1866,7 +1878,7 @@ export class Container extends Renderable {
1866
1878
  * Add a child to the container at the specified index<br>
1867
1879
  * (the list won't be sorted after insertion)
1868
1880
  * @name addChildAt
1869
- * @memberof Container.prototype
1881
+ * @memberof Container
1870
1882
  * @function
1871
1883
  * @param {Renderable} child
1872
1884
  * @param {number} index
@@ -1880,7 +1892,7 @@ export class Container extends Renderable {
1880
1892
  * - The index of element in the array. <br>
1881
1893
  * - The array forEach() was called upon. <br>
1882
1894
  * @name forEach
1883
- * @memberof Container.prototype
1895
+ * @memberof Container
1884
1896
  * @function
1885
1897
  * @param {Function} callback fnction to execute on each element
1886
1898
  * @param {object} [thisArg] value to use as this(i.e reference Object) when executing callback.
@@ -1898,7 +1910,7 @@ export class Container extends Renderable {
1898
1910
  /**
1899
1911
  * Swaps the position (z-index) of 2 children
1900
1912
  * @name swapChildren
1901
- * @memberof Container.prototype
1913
+ * @memberof Container
1902
1914
  * @function
1903
1915
  * @param {Renderable} child
1904
1916
  * @param {Renderable} child2
@@ -1907,7 +1919,7 @@ export class Container extends Renderable {
1907
1919
  /**
1908
1920
  * Returns the Child at the specified index
1909
1921
  * @name getChildAt
1910
- * @memberof Container.prototype
1922
+ * @memberof Container
1911
1923
  * @function
1912
1924
  * @param {number} index
1913
1925
  * @returns {Renderable} the child at the specified index
@@ -1916,7 +1928,7 @@ export class Container extends Renderable {
1916
1928
  /**
1917
1929
  * Returns the index of the given Child
1918
1930
  * @name getChildIndex
1919
- * @memberof Container.prototype
1931
+ * @memberof Container
1920
1932
  * @function
1921
1933
  * @param {Renderable} child
1922
1934
  * @returns {number} index
@@ -1934,7 +1946,7 @@ export class Container extends Renderable {
1934
1946
  /**
1935
1947
  * Returns true if contains the specified Child
1936
1948
  * @name hasChild
1937
- * @memberof Container.prototype
1949
+ * @memberof Container
1938
1950
  * @function
1939
1951
  * @param {Renderable} child
1940
1952
  * @returns {boolean}
@@ -1945,7 +1957,7 @@ export class Container extends Renderable {
1945
1957
  * note : avoid calling this function every frame since
1946
1958
  * it parses the whole object tree each time
1947
1959
  * @name getChildByProp
1948
- * @memberof Container.prototype
1960
+ * @memberof Container
1949
1961
  * @public
1950
1962
  * @function
1951
1963
  * @param {string} prop Property name
@@ -1970,7 +1982,7 @@ export class Container extends Renderable {
1970
1982
  /**
1971
1983
  * returns the list of childs with the specified class type
1972
1984
  * @name getChildByType
1973
- * @memberof Container.prototype
1985
+ * @memberof Container
1974
1986
  * @public
1975
1987
  * @function
1976
1988
  * @param {object} classType
@@ -1983,7 +1995,7 @@ export class Container extends Renderable {
1983
1995
  * note : avoid calling this function every frame since
1984
1996
  * it parses the whole object list each time
1985
1997
  * @name getChildByName
1986
- * @memberof Container.prototype
1998
+ * @memberof Container
1987
1999
  * @public
1988
2000
  * @function
1989
2001
  * @param {string|RegExp|number|boolean} name child name
@@ -1995,7 +2007,7 @@ export class Container extends Renderable {
1995
2007
  * note : avoid calling this function every frame since
1996
2008
  * it parses the whole object list each time
1997
2009
  * @name getChildByGUID
1998
- * @memberof Container.prototype
2010
+ * @memberof Container
1999
2011
  * @public
2000
2012
  * @function
2001
2013
  * @param {string|RegExp|number|boolean} guid child GUID
@@ -2005,7 +2017,7 @@ export class Container extends Renderable {
2005
2017
  /**
2006
2018
  * return all child in this container
2007
2019
  * @name getChildren
2008
- * @memberof Container.prototype
2020
+ * @memberof Container
2009
2021
  * @public
2010
2022
  * @function
2011
2023
  * @returns {Renderable[]} an array of renderable object
@@ -2015,7 +2027,7 @@ export class Container extends Renderable {
2015
2027
  * update the bounding box for this shape.
2016
2028
  * @ignore
2017
2029
  * @name updateBounds
2018
- * @memberof Renderable.prototype
2030
+ * @memberof Renderable
2019
2031
  * @function
2020
2032
  * @returns {Bounds} this shape bounding box Rectangle object
2021
2033
  */
@@ -2024,7 +2036,7 @@ export class Container extends Renderable {
2024
2036
  * Checks if this container is root or if it's attached to the root container.
2025
2037
  * @private
2026
2038
  * @name isAttachedToRoot
2027
- * @memberof Container.prototype
2039
+ * @memberof Container
2028
2040
  * @function
2029
2041
  * @returns {boolean}
2030
2042
  */
@@ -2033,7 +2045,7 @@ export class Container extends Renderable {
2033
2045
  * update the cointainer's bounding rect (private)
2034
2046
  * @ignore
2035
2047
  * @name updateBoundsPos
2036
- * @memberof Container.prototype
2048
+ * @memberof Container
2037
2049
  * @function
2038
2050
  */
2039
2051
  updateBoundsPos(newX: any, newY: any): Bounds;
@@ -2044,7 +2056,7 @@ export class Container extends Renderable {
2044
2056
  /**
2045
2057
  * Invokes the removeChildNow in a defer, to ensure the child is removed safely after the update & draw stack has completed
2046
2058
  * @name removeChild
2047
- * @memberof Container.prototype
2059
+ * @memberof Container
2048
2060
  * @public
2049
2061
  * @function
2050
2062
  * @param {Renderable} child
@@ -2056,7 +2068,7 @@ export class Container extends Renderable {
2056
2068
  * (removal is immediate and unconditional)<br>
2057
2069
  * Never use keepalive=true with objects from {@link pool}. Doing so will create a memory leak.
2058
2070
  * @name removeChildNow
2059
- * @memberof Container.prototype
2071
+ * @memberof Container
2060
2072
  * @function
2061
2073
  * @param {Renderable} child
2062
2074
  * @param {boolean} [keepalive=False] True to prevent calling child.destroy()
@@ -2065,7 +2077,7 @@ export class Container extends Renderable {
2065
2077
  /**
2066
2078
  * Automatically set the specified property of all childs to the given value
2067
2079
  * @name setChildsProperty
2068
- * @memberof Container.prototype
2080
+ * @memberof Container
2069
2081
  * @function
2070
2082
  * @param {string} prop property name
2071
2083
  * @param {object} value property value
@@ -2075,7 +2087,7 @@ export class Container extends Renderable {
2075
2087
  /**
2076
2088
  * Move the child in the group one step forward (z depth).
2077
2089
  * @name moveUp
2078
- * @memberof Container.prototype
2090
+ * @memberof Container
2079
2091
  * @function
2080
2092
  * @param {Renderable} child
2081
2093
  */
@@ -2083,7 +2095,7 @@ export class Container extends Renderable {
2083
2095
  /**
2084
2096
  * Move the child in the group one step backward (z depth).
2085
2097
  * @name moveDown
2086
- * @memberof Container.prototype
2098
+ * @memberof Container
2087
2099
  * @function
2088
2100
  * @param {Renderable} child
2089
2101
  */
@@ -2091,7 +2103,7 @@ export class Container extends Renderable {
2091
2103
  /**
2092
2104
  * Move the specified child to the top(z depth).
2093
2105
  * @name moveToTop
2094
- * @memberof Container.prototype
2106
+ * @memberof Container
2095
2107
  * @function
2096
2108
  * @param {Renderable} child
2097
2109
  */
@@ -2099,7 +2111,7 @@ export class Container extends Renderable {
2099
2111
  /**
2100
2112
  * Move the specified child the bottom (z depth).
2101
2113
  * @name moveToBottom
2102
- * @memberof Container.prototype
2114
+ * @memberof Container
2103
2115
  * @function
2104
2116
  * @param {Renderable} child
2105
2117
  */
@@ -2107,7 +2119,7 @@ export class Container extends Renderable {
2107
2119
  /**
2108
2120
  * Manually trigger the sort of all the childs in the container</p>
2109
2121
  * @name sort
2110
- * @memberof Container.prototype
2122
+ * @memberof Container
2111
2123
  * @public
2112
2124
  * @function
2113
2125
  * @param {boolean} [recursive=false] recursively sort all containers if true
@@ -2141,7 +2153,7 @@ export class Container extends Renderable {
2141
2153
  * draw the container. <br>
2142
2154
  * automatically called by the game manager {@link game}
2143
2155
  * @name draw
2144
- * @memberof Container.prototype
2156
+ * @memberof Container
2145
2157
  * @function
2146
2158
  * @protected
2147
2159
  * @param {CanvasRenderer|WebGLRenderer} renderer a renderer object
@@ -2321,7 +2333,7 @@ export class Ellipse {
2321
2333
  * @public
2322
2334
  * @type {Vector2d}
2323
2335
  * @name pos
2324
- * @memberof Ellipse.prototype
2336
+ * @memberof Ellipse
2325
2337
  */
2326
2338
  public pos: Vector2d;
2327
2339
  /**
@@ -2334,7 +2346,7 @@ export class Ellipse {
2334
2346
  * @public
2335
2347
  * @type {number}
2336
2348
  * @name radius
2337
- * @memberof Ellipse.prototype
2349
+ * @memberof Ellipse
2338
2350
  */
2339
2351
  public radius: number;
2340
2352
  /**
@@ -2342,7 +2354,7 @@ export class Ellipse {
2342
2354
  * @public
2343
2355
  * @type {Vector2d}
2344
2356
  * @name radiusV
2345
- * @memberof Ellipse.prototype
2357
+ * @memberof Ellipse
2346
2358
  */
2347
2359
  public radiusV: Vector2d;
2348
2360
  /**
@@ -2350,7 +2362,7 @@ export class Ellipse {
2350
2362
  * @public
2351
2363
  * @type {Vector2d}
2352
2364
  * @name radiusSq
2353
- * @memberof Ellipse.prototype
2365
+ * @memberof Ellipse
2354
2366
  */
2355
2367
  public radiusSq: Vector2d;
2356
2368
  /**
@@ -2358,7 +2370,7 @@ export class Ellipse {
2358
2370
  * @public
2359
2371
  * @type {Vector2d}
2360
2372
  * @name ratio
2361
- * @memberof Ellipse.prototype
2373
+ * @memberof Ellipse
2362
2374
  */
2363
2375
  public ratio: Vector2d;
2364
2376
  shapeType: string;
@@ -2367,7 +2379,7 @@ export class Ellipse {
2367
2379
  /**
2368
2380
  * set new value to the Ellipse shape
2369
2381
  * @name setShape
2370
- * @memberof Ellipse.prototype
2382
+ * @memberof Ellipse
2371
2383
  * @function
2372
2384
  * @param {number} x the center x coordinate of the ellipse
2373
2385
  * @param {number} y the center y coordinate of the ellipse
@@ -2379,7 +2391,7 @@ export class Ellipse {
2379
2391
  /**
2380
2392
  * Rotate this Ellipse (counter-clockwise) by the specified angle (in radians).
2381
2393
  * @name rotate
2382
- * @memberof Ellipse.prototype
2394
+ * @memberof Ellipse
2383
2395
  * @function
2384
2396
  * @param {number} angle The angle to rotate (in radians)
2385
2397
  * @param {Vector2d|ObservableVector2d} [v] an optional point to rotate around
@@ -2389,7 +2401,7 @@ export class Ellipse {
2389
2401
  /**
2390
2402
  * Scale this Ellipse by the specified scalar.
2391
2403
  * @name scale
2392
- * @memberof Ellipse.prototype
2404
+ * @memberof Ellipse
2393
2405
  * @function
2394
2406
  * @param {number} x
2395
2407
  * @param {number} [y=x]
@@ -2399,7 +2411,7 @@ export class Ellipse {
2399
2411
  /**
2400
2412
  * Scale this Ellipse by the specified vector.
2401
2413
  * @name scale
2402
- * @memberof Ellipse.prototype
2414
+ * @memberof Ellipse
2403
2415
  * @function
2404
2416
  * @param {Vector2d} v
2405
2417
  * @returns {Ellipse} Reference to this object for method chaining
@@ -2408,7 +2420,7 @@ export class Ellipse {
2408
2420
  /**
2409
2421
  * apply the given transformation matrix to this ellipse
2410
2422
  * @name transform
2411
- * @memberof Ellipse.prototype
2423
+ * @memberof Ellipse
2412
2424
  * @function
2413
2425
  * @param {Matrix2d} matrix the transformation matrix
2414
2426
  * @returns {Polygon} Reference to this object for method chaining
@@ -2417,7 +2429,7 @@ export class Ellipse {
2417
2429
  /**
2418
2430
  * translate the circle/ellipse by the specified offset
2419
2431
  * @name translate
2420
- * @memberof Ellipse.prototype
2432
+ * @memberof Ellipse
2421
2433
  * @function
2422
2434
  * @param {number} x x offset
2423
2435
  * @param {number} y y offset
@@ -2426,7 +2438,7 @@ export class Ellipse {
2426
2438
  /**
2427
2439
  * translate the circle/ellipse by the specified vector
2428
2440
  * @name translate
2429
- * @memberof Ellipse.prototype
2441
+ * @memberof Ellipse
2430
2442
  * @function
2431
2443
  * @param {Vector2d} v vector offset
2432
2444
  * @returns {Ellipse} this ellipse
@@ -2435,7 +2447,7 @@ export class Ellipse {
2435
2447
  /**
2436
2448
  * check if this circle/ellipse contains the specified point
2437
2449
  * @name contains
2438
- * @memberof Ellipse.prototype
2450
+ * @memberof Ellipse
2439
2451
  * @function
2440
2452
  * @param {Vector2d} point
2441
2453
  * @returns {boolean} true if contains
@@ -2443,7 +2455,7 @@ export class Ellipse {
2443
2455
  /**
2444
2456
  * check if this circle/ellipse contains the specified point
2445
2457
  * @name contains
2446
- * @memberof Ellipse.prototype
2458
+ * @memberof Ellipse
2447
2459
  * @function
2448
2460
  * @param {number} x x coordinate
2449
2461
  * @param {number} y y coordinate
@@ -2453,7 +2465,7 @@ export class Ellipse {
2453
2465
  /**
2454
2466
  * returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
2455
2467
  * @name getBounds
2456
- * @memberof Ellipse.prototype
2468
+ * @memberof Ellipse
2457
2469
  * @function
2458
2470
  * @returns {Bounds} this shape bounding box Rectangle object
2459
2471
  */
@@ -2461,7 +2473,7 @@ export class Ellipse {
2461
2473
  /**
2462
2474
  * clone this Ellipse
2463
2475
  * @name clone
2464
- * @memberof Ellipse.prototype
2476
+ * @memberof Ellipse
2465
2477
  * @function
2466
2478
  * @returns {Ellipse} new Ellipse
2467
2479
  */
@@ -2785,7 +2797,7 @@ export class GUI_Object extends Sprite {
2785
2797
  /**
2786
2798
  * function called when the object is pressed (to be extended)
2787
2799
  * @name onClick
2788
- * @memberof GUI_Object.prototype
2800
+ * @memberof GUI_Object
2789
2801
  * @public
2790
2802
  * @function
2791
2803
  * @param {Pointer} event the event object
@@ -2800,7 +2812,7 @@ export class GUI_Object extends Sprite {
2800
2812
  /**
2801
2813
  * function called when the pointer is over the object
2802
2814
  * @name onOver
2803
- * @memberof GUI_Object.prototype
2815
+ * @memberof GUI_Object
2804
2816
  * @public
2805
2817
  * @function
2806
2818
  * @param {Pointer} event the event object
@@ -2814,7 +2826,7 @@ export class GUI_Object extends Sprite {
2814
2826
  /**
2815
2827
  * function called when the pointer is leaving the object area
2816
2828
  * @name onOut
2817
- * @memberof GUI_Object.prototype
2829
+ * @memberof GUI_Object
2818
2830
  * @public
2819
2831
  * @function
2820
2832
  * @param {Pointer} event the event object
@@ -2828,7 +2840,7 @@ export class GUI_Object extends Sprite {
2828
2840
  /**
2829
2841
  * function called when the object is pressed and released (to be extended)
2830
2842
  * @name onRelease
2831
- * @memberof GUI_Object.prototype
2843
+ * @memberof GUI_Object
2832
2844
  * @public
2833
2845
  * @function
2834
2846
  * @returns {boolean} return false if we need to stop propagating the event
@@ -2843,7 +2855,7 @@ export class GUI_Object extends Sprite {
2843
2855
  * function called when the object is pressed and held<br>
2844
2856
  * to be extended <br>
2845
2857
  * @name onHold
2846
- * @memberof GUI_Object.prototype
2858
+ * @memberof GUI_Object
2847
2859
  * @public
2848
2860
  * @function
2849
2861
  */
@@ -2925,7 +2937,7 @@ export class ImageLayer extends Renderable {
2925
2937
  /**
2926
2938
  * resize the Image Layer to match the given size
2927
2939
  * @name resize
2928
- * @memberof ImageLayer.prototype
2940
+ * @memberof ImageLayer
2929
2941
  * @function
2930
2942
  * @param {number} w new width
2931
2943
  * @param {number} h new height
@@ -2957,6 +2969,63 @@ export class ImageLayer extends Renderable {
2957
2969
  */
2958
2970
  destroy(): void;
2959
2971
  }
2972
+ /**
2973
+ * @classdesc
2974
+ * A 2D point light.
2975
+ * Note: this is a very experimental and work in progress feature, that provides a simple spot light effect.
2976
+ * The light effect is best rendered in WebGL, as they are few limitations when using the Canvas Renderer
2977
+ * (multiple lights are not supported, alpha component of the ambient light is ignored)
2978
+ * @see stage.lights
2979
+ */
2980
+ export class Light2d extends Renderable {
2981
+ /**
2982
+ * @param {number} x - The horizontal position of the light.
2983
+ * @param {number} y - The vertical position of the light.
2984
+ * @param {number} radius - The radius of the light.
2985
+ * @param {Color|string} [color="#FFF"] the color of the light
2986
+ * @param {number} [intensity=0.7] - The intensity of the light.
2987
+ */
2988
+ constructor(x: number, y: number, radius: number, color?: Color | string, intensity?: number);
2989
+ /**
2990
+ * the color of the light
2991
+ * @type {Color}
2992
+ * @default "#FFF"
2993
+ */
2994
+ color: Color;
2995
+ /**
2996
+ * The radius of the light
2997
+ * @type {number}
2998
+ */
2999
+ radius: number;
3000
+ /**
3001
+ * The intensity of the light
3002
+ * @type {number}
3003
+ * @default 0.7
3004
+ */
3005
+ intensity: number;
3006
+ /** @ignore */
3007
+ visibleArea: any;
3008
+ /** @ignore */
3009
+ texture: any;
3010
+ /**
3011
+ * returns a geometry representing the visible area of this light
3012
+ * @name getVisibleArea
3013
+ * @memberof Light2d
3014
+ * @function
3015
+ * @returns {Ellipse} the light visible mask
3016
+ */
3017
+ getVisibleArea(): Ellipse;
3018
+ /**
3019
+ * object draw (Called internally by the engine).
3020
+ * @ignore
3021
+ */
3022
+ draw(renderer: any): void;
3023
+ /**
3024
+ * Destroy function<br>
3025
+ * @ignore
3026
+ */
3027
+ destroy(): void;
3028
+ }
2960
3029
  /**
2961
3030
  * @classdesc
2962
3031
  * a line segment Object
@@ -5048,6 +5117,7 @@ export class ParticleEmitter extends Container {
5048
5117
  */
5049
5118
  framesToSkip: number;
5050
5119
  }): void;
5120
+ _defaultParticle: any;
5051
5121
  /**
5052
5122
  * returns a random point on the x axis within the bounds of this emitter
5053
5123
  * @returns {number}
@@ -5405,7 +5475,7 @@ export class Polygon {
5405
5475
  * @public
5406
5476
  * @type {Vector2d}
5407
5477
  * @name pos
5408
- * @memberof Polygon.prototype
5478
+ * @memberof Polygon
5409
5479
  */
5410
5480
  public pos: Vector2d;
5411
5481
  /**
@@ -5413,7 +5483,7 @@ export class Polygon {
5413
5483
  * @ignore
5414
5484
  * @type {Bounds}
5415
5485
  * @name _bounds
5416
- * @memberof Polygon.prototype
5486
+ * @memberof Polygon
5417
5487
  */
5418
5488
  _bounds: Bounds;
5419
5489
  /**
@@ -5422,7 +5492,7 @@ export class Polygon {
5422
5492
  * @public
5423
5493
  * @type {Vector2d[]}
5424
5494
  * @name points
5425
- * @memberof Polygon.prototype
5495
+ * @memberof Polygon
5426
5496
  */
5427
5497
  public points: Vector2d[];
5428
5498
  /**
@@ -5450,7 +5520,7 @@ export class Polygon {
5450
5520
  /**
5451
5521
  * set new value to the Polygon
5452
5522
  * @name setShape
5453
- * @memberof Polygon.prototype
5523
+ * @memberof Polygon
5454
5524
  * @function
5455
5525
  * @param {number} x position of the Polygon
5456
5526
  * @param {number} y position of the Polygon
@@ -5461,7 +5531,7 @@ export class Polygon {
5461
5531
  /**
5462
5532
  * set the vertices defining this Polygon
5463
5533
  * @name setVertices
5464
- * @memberof Polygon.prototype
5534
+ * @memberof Polygon
5465
5535
  * @function
5466
5536
  * @param {Vector2d[]} vertices array of vector or vertice defining the Polygon
5467
5537
  * @returns {Polygon} this instance for objecf chaining
@@ -5470,7 +5540,7 @@ export class Polygon {
5470
5540
  /**
5471
5541
  * apply the given transformation matrix to this Polygon
5472
5542
  * @name transform
5473
- * @memberof Polygon.prototype
5543
+ * @memberof Polygon
5474
5544
  * @function
5475
5545
  * @param {Matrix2d} m the transformation matrix
5476
5546
  * @returns {Polygon} Reference to this object for method chaining
@@ -5479,7 +5549,7 @@ export class Polygon {
5479
5549
  /**
5480
5550
  * apply an isometric projection to this shape
5481
5551
  * @name toIso
5482
- * @memberof Polygon.prototype
5552
+ * @memberof Polygon
5483
5553
  * @function
5484
5554
  * @returns {Polygon} Reference to this object for method chaining
5485
5555
  */
@@ -5487,7 +5557,7 @@ export class Polygon {
5487
5557
  /**
5488
5558
  * apply a 2d projection to this shape
5489
5559
  * @name to2d
5490
- * @memberof Polygon.prototype
5560
+ * @memberof Polygon
5491
5561
  * @function
5492
5562
  * @returns {Polygon} Reference to this object for method chaining
5493
5563
  */
@@ -5495,7 +5565,7 @@ export class Polygon {
5495
5565
  /**
5496
5566
  * Rotate this Polygon (counter-clockwise) by the specified angle (in radians).
5497
5567
  * @name rotate
5498
- * @memberof Polygon.prototype
5568
+ * @memberof Polygon
5499
5569
  * @function
5500
5570
  * @param {number} angle The angle to rotate (in radians)
5501
5571
  * @param {Vector2d|ObservableVector2d} [v] an optional point to rotate around
@@ -5505,7 +5575,7 @@ export class Polygon {
5505
5575
  /**
5506
5576
  * Scale this Polygon by the given scalar.
5507
5577
  * @name scale
5508
- * @memberof Polygon.prototype
5578
+ * @memberof Polygon
5509
5579
  * @function
5510
5580
  * @param {number} x
5511
5581
  * @param {number} [y=x]
@@ -5515,7 +5585,7 @@ export class Polygon {
5515
5585
  /**
5516
5586
  * Scale this Polygon by the given vector
5517
5587
  * @name scaleV
5518
- * @memberof Polygon.prototype
5588
+ * @memberof Polygon
5519
5589
  * @function
5520
5590
  * @param {Vector2d} v
5521
5591
  * @returns {Polygon} Reference to this object for method chaining
@@ -5525,7 +5595,7 @@ export class Polygon {
5525
5595
  * Computes the calculated collision polygon.
5526
5596
  * This **must** be called if the `points` array, `angle`, or `offset` is modified manually.
5527
5597
  * @name recalc
5528
- * @memberof Polygon.prototype
5598
+ * @memberof Polygon
5529
5599
  * @function
5530
5600
  * @returns {Polygon} Reference to this object for method chaining
5531
5601
  */
@@ -5533,7 +5603,7 @@ export class Polygon {
5533
5603
  /**
5534
5604
  * returns a list of indices for all triangles defined in this polygon
5535
5605
  * @name getIndices
5536
- * @memberof Polygon.prototype
5606
+ * @memberof Polygon
5537
5607
  * @function
5538
5608
  * @returns {Array} an array of vertex indices for all triangles forming this polygon.
5539
5609
  */
@@ -5541,7 +5611,7 @@ export class Polygon {
5541
5611
  /**
5542
5612
  * Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
5543
5613
  * @name isConvex
5544
- * @memberof Polygon.prototype
5614
+ * @memberof Polygon
5545
5615
  * @function
5546
5616
  * @returns {boolean} true if the vertices are convex, false if not, null if not computable
5547
5617
  */
@@ -5549,7 +5619,7 @@ export class Polygon {
5549
5619
  /**
5550
5620
  * translate the Polygon by the specified offset
5551
5621
  * @name translate
5552
- * @memberof Polygon.prototype
5622
+ * @memberof Polygon
5553
5623
  * @function
5554
5624
  * @param {number} x x offset
5555
5625
  * @param {number} y y offset
@@ -5558,7 +5628,7 @@ export class Polygon {
5558
5628
  /**
5559
5629
  * translate the Polygon by the specified vector
5560
5630
  * @name translate
5561
- * @memberof Polygon.prototype
5631
+ * @memberof Polygon
5562
5632
  * @function
5563
5633
  * @param {Vector2d} v vector offset
5564
5634
  * @returns {Polygon} Reference to this object for method chaining
@@ -5567,14 +5637,14 @@ export class Polygon {
5567
5637
  /**
5568
5638
  * Shifts the Polygon to the given position vector.
5569
5639
  * @name shift
5570
- * @memberof Polygon.prototype
5640
+ * @memberof Polygon
5571
5641
  * @function
5572
5642
  * @param {Vector2d} position
5573
5643
  */
5574
5644
  /**
5575
5645
  * Shifts the Polygon to the given x, y position.
5576
5646
  * @name shift
5577
- * @memberof Polygon.prototype
5647
+ * @memberof Polygon
5578
5648
  * @function
5579
5649
  * @param {number} x
5580
5650
  * @param {number} y
@@ -5585,7 +5655,7 @@ export class Polygon {
5585
5655
  * (Note: it is highly recommended to first do a hit test on the corresponding <br>
5586
5656
  * bounding rect, as the function can be highly consuming with complex shapes)
5587
5657
  * @name contains
5588
- * @memberof Polygon.prototype
5658
+ * @memberof Polygon
5589
5659
  * @function
5590
5660
  * @param {Vector2d} point
5591
5661
  * @returns {boolean} true if contains
@@ -5595,7 +5665,7 @@ export class Polygon {
5595
5665
  * (Note: it is highly recommended to first do a hit test on the corresponding <br>
5596
5666
  * bounding rect, as the function can be highly consuming with complex shapes)
5597
5667
  * @name contains
5598
- * @memberof Polygon.prototype
5668
+ * @memberof Polygon
5599
5669
  * @function
5600
5670
  * @param {number} x x coordinate
5601
5671
  * @param {number} y y coordinate
@@ -5605,7 +5675,7 @@ export class Polygon {
5605
5675
  /**
5606
5676
  * returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
5607
5677
  * @name getBounds
5608
- * @memberof Polygon.prototype
5678
+ * @memberof Polygon
5609
5679
  * @function
5610
5680
  * @returns {Bounds} this shape bounding box Rectangle object
5611
5681
  */
@@ -5614,7 +5684,7 @@ export class Polygon {
5614
5684
  * update the bounding box for this shape.
5615
5685
  * @ignore
5616
5686
  * @name updateBounds
5617
- * @memberof Polygon.prototype
5687
+ * @memberof Polygon
5618
5688
  * @function
5619
5689
  * @returns {Bounds} this shape bounding box Rectangle object
5620
5690
  */
@@ -5622,7 +5692,7 @@ export class Polygon {
5622
5692
  /**
5623
5693
  * clone this Polygon
5624
5694
  * @name clone
5625
- * @memberof Polygon.prototype
5695
+ * @memberof Polygon
5626
5696
  * @function
5627
5697
  * @returns {Polygon} new Polygon
5628
5698
  */
@@ -5717,7 +5787,7 @@ export class QuadTree {
5717
5787
  * a rectangle Object
5718
5788
  * @augments Polygon
5719
5789
  */
5720
- export class Rect extends Polygon {
5790
+ declare class Rect$1 extends Polygon {
5721
5791
  /**
5722
5792
  * @param {number} x position of the Rectangle
5723
5793
  * @param {number} y position of the Rectangle
@@ -5730,7 +5800,7 @@ export class Rect extends Polygon {
5730
5800
  /**
5731
5801
  * set new value to the rectangle shape
5732
5802
  * @name setShape
5733
- * @memberof Rect.prototype
5803
+ * @memberof Rect
5734
5804
  * @function
5735
5805
  * @param {number} x position of the Rectangle
5736
5806
  * @param {number} y position of the Rectangle
@@ -5744,7 +5814,7 @@ export class Rect extends Polygon {
5744
5814
  * @public
5745
5815
  * @type {number}
5746
5816
  * @name left
5747
- * @memberof Rect.prototype
5817
+ * @memberof Rect
5748
5818
  */
5749
5819
  public get left(): number;
5750
5820
  /**
@@ -5752,7 +5822,7 @@ export class Rect extends Polygon {
5752
5822
  * @public
5753
5823
  * @type {number}
5754
5824
  * @name right
5755
- * @memberof Rect.prototype
5825
+ * @memberof Rect
5756
5826
  */
5757
5827
  public get right(): number;
5758
5828
  /**
@@ -5760,7 +5830,7 @@ export class Rect extends Polygon {
5760
5830
  * @public
5761
5831
  * @type {number}
5762
5832
  * @name top
5763
- * @memberof Rect.prototype
5833
+ * @memberof Rect
5764
5834
  */
5765
5835
  public get top(): number;
5766
5836
  /**
@@ -5768,7 +5838,7 @@ export class Rect extends Polygon {
5768
5838
  * @public
5769
5839
  * @type {number}
5770
5840
  * @name bottom
5771
- * @memberof Rect.prototype
5841
+ * @memberof Rect
5772
5842
  */
5773
5843
  public get bottom(): number;
5774
5844
  public set width(arg: number);
@@ -5777,7 +5847,7 @@ export class Rect extends Polygon {
5777
5847
  * @public
5778
5848
  * @type {number}
5779
5849
  * @name width
5780
- * @memberof Rect.prototype
5850
+ * @memberof Rect
5781
5851
  */
5782
5852
  public get width(): number;
5783
5853
  public set height(arg: number);
@@ -5786,7 +5856,7 @@ export class Rect extends Polygon {
5786
5856
  * @public
5787
5857
  * @type {number}
5788
5858
  * @name height
5789
- * @memberof Rect.prototype
5859
+ * @memberof Rect
5790
5860
  */
5791
5861
  public get height(): number;
5792
5862
  public set centerX(arg: number);
@@ -5795,7 +5865,7 @@ export class Rect extends Polygon {
5795
5865
  * @public
5796
5866
  * @type {number}
5797
5867
  * @name centerX
5798
- * @memberof Rect.prototype
5868
+ * @memberof Rect
5799
5869
  */
5800
5870
  public get centerX(): number;
5801
5871
  public set centerY(arg: number);
@@ -5804,13 +5874,13 @@ export class Rect extends Polygon {
5804
5874
  * @public
5805
5875
  * @type {number}
5806
5876
  * @name centerY
5807
- * @memberof Rect.prototype
5877
+ * @memberof Rect
5808
5878
  */
5809
5879
  public get centerY(): number;
5810
5880
  /**
5811
5881
  * center the rectangle position around the given coordinates
5812
5882
  * @name centerOn
5813
- * @memberof Rect.prototype
5883
+ * @memberof Rect
5814
5884
  * @function
5815
5885
  * @param {number} x the x coordinate around which to center this rectangle
5816
5886
  * @param {number} x the y coordinate around which to center this rectangle
@@ -5820,7 +5890,7 @@ export class Rect extends Polygon {
5820
5890
  /**
5821
5891
  * resize the rectangle
5822
5892
  * @name resize
5823
- * @memberof Rect.prototype
5893
+ * @memberof Rect
5824
5894
  * @function
5825
5895
  * @param {number} w new width of the rectangle
5826
5896
  * @param {number} h new height of the rectangle
@@ -5830,7 +5900,7 @@ export class Rect extends Polygon {
5830
5900
  /**
5831
5901
  * scale the rectangle
5832
5902
  * @name scale
5833
- * @memberof Rect.prototype
5903
+ * @memberof Rect
5834
5904
  * @function
5835
5905
  * @param {number} x a number representing the abscissa of the scaling vector.
5836
5906
  * @param {number} [y=x] a number representing the ordinate of the scaling vector.
@@ -5840,7 +5910,7 @@ export class Rect extends Polygon {
5840
5910
  /**
5841
5911
  * clone this rectangle
5842
5912
  * @name clone
5843
- * @memberof Rect.prototype
5913
+ * @memberof Rect
5844
5914
  * @function
5845
5915
  * @returns {Rect} new rectangle
5846
5916
  */
@@ -5848,7 +5918,7 @@ export class Rect extends Polygon {
5848
5918
  /**
5849
5919
  * copy the position and size of the given rectangle into this one
5850
5920
  * @name copy
5851
- * @memberof Rect.prototype
5921
+ * @memberof Rect
5852
5922
  * @function
5853
5923
  * @param {Rect} rect Source rectangle
5854
5924
  * @returns {Rect} new rectangle
@@ -5857,7 +5927,7 @@ export class Rect extends Polygon {
5857
5927
  /**
5858
5928
  * merge this rectangle with another one
5859
5929
  * @name union
5860
- * @memberof Rect.prototype
5930
+ * @memberof Rect
5861
5931
  * @function
5862
5932
  * @param {Rect} rect other rectangle to union with
5863
5933
  * @returns {Rect} the union(ed) rectangle
@@ -5866,7 +5936,7 @@ export class Rect extends Polygon {
5866
5936
  /**
5867
5937
  * check if this rectangle is intersecting with the specified one
5868
5938
  * @name overlaps
5869
- * @memberof Rect.prototype
5939
+ * @memberof Rect
5870
5940
  * @function
5871
5941
  * @param {Rect} rect
5872
5942
  * @returns {boolean} true if overlaps
@@ -5875,7 +5945,7 @@ export class Rect extends Polygon {
5875
5945
  /**
5876
5946
  * check if this rectangle is identical to the specified one
5877
5947
  * @name equals
5878
- * @memberof Rect.prototype
5948
+ * @memberof Rect
5879
5949
  * @function
5880
5950
  * @param {Rect} rect
5881
5951
  * @returns {boolean} true if equals
@@ -5884,7 +5954,7 @@ export class Rect extends Polygon {
5884
5954
  /**
5885
5955
  * determines whether all coordinates of this rectangle are finite numbers.
5886
5956
  * @name isFinite
5887
- * @memberof Rect.prototype
5957
+ * @memberof Rect
5888
5958
  * @function
5889
5959
  * @returns {boolean} false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
5890
5960
  */
@@ -5892,7 +5962,7 @@ export class Rect extends Polygon {
5892
5962
  /**
5893
5963
  * Returns a polygon whose edges are the same as this box.
5894
5964
  * @name toPolygon
5895
- * @memberof Rect.prototype
5965
+ * @memberof Rect
5896
5966
  * @function
5897
5967
  * @returns {Polygon} a new Polygon that represents this rectangle.
5898
5968
  */
@@ -5903,7 +5973,14 @@ export class Rect extends Polygon {
5903
5973
  * A base class for renderable objects.
5904
5974
  * @augments Rect
5905
5975
  */
5906
- export class Renderable extends Rect {
5976
+ export class Renderable {
5977
+ /**
5978
+ * @param {number} x position of the renderable object (accessible through inherited pos.x property)
5979
+ * @param {number} y position of the renderable object (accessible through inherited pos.y property)
5980
+ * @param {number} width object width
5981
+ * @param {number} height object height
5982
+ */
5983
+ constructor(x: number, y: number, width: number, height: number);
5907
5984
  /**
5908
5985
  * to identify the object as a renderable object
5909
5986
  * @ignore
@@ -6200,10 +6277,18 @@ export class Renderable extends Rect {
6200
6277
  * @memberof Renderable
6201
6278
  */
6202
6279
  public get isFlippedY(): boolean;
6280
+ /**
6281
+ * returns the bounding box for this renderable
6282
+ * @name getBounds
6283
+ * @memberof Renderable
6284
+ * @function
6285
+ * @returns {Bounds} bounding box Rectangle object
6286
+ */
6287
+ getBounds(): Bounds;
6203
6288
  /**
6204
6289
  * get the renderable alpha channel value<br>
6205
6290
  * @name getOpacity
6206
- * @memberof Renderable.prototype
6291
+ * @memberof Renderable
6207
6292
  * @function
6208
6293
  * @returns {number} current opacity value between 0 and 1
6209
6294
  */
@@ -6211,7 +6296,7 @@ export class Renderable extends Rect {
6211
6296
  /**
6212
6297
  * set the renderable alpha channel value<br>
6213
6298
  * @name setOpacity
6214
- * @memberof Renderable.prototype
6299
+ * @memberof Renderable
6215
6300
  * @function
6216
6301
  * @param {number} alpha opacity value between 0.0 and 1.0
6217
6302
  */
@@ -6220,7 +6305,7 @@ export class Renderable extends Rect {
6220
6305
  * flip the renderable on the horizontal axis (around the center of the renderable)
6221
6306
  * @see Matrix2d#scaleX
6222
6307
  * @name flipX
6223
- * @memberof Renderable.prototype
6308
+ * @memberof Renderable
6224
6309
  * @function
6225
6310
  * @param {boolean} [flip=true] `true` to flip this renderable.
6226
6311
  * @returns {Renderable} Reference to this object for method chaining
@@ -6230,7 +6315,7 @@ export class Renderable extends Rect {
6230
6315
  * flip the renderable on the vertical axis (around the center of the renderable)
6231
6316
  * @see Matrix2d#scaleY
6232
6317
  * @name flipY
6233
- * @memberof Renderable.prototype
6318
+ * @memberof Renderable
6234
6319
  * @function
6235
6320
  * @param {boolean} [flip=true] `true` to flip this renderable.
6236
6321
  * @returns {Renderable} Reference to this object for method chaining
@@ -6239,7 +6324,7 @@ export class Renderable extends Rect {
6239
6324
  /**
6240
6325
  * multiply the renderable currentTransform with the given matrix
6241
6326
  * @name transform
6242
- * @memberof Renderable.prototype
6327
+ * @memberof Renderable
6243
6328
  * @see Renderable#currentTransform
6244
6329
  * @function
6245
6330
  * @param {Matrix2d} m the transformation matrix
@@ -6267,7 +6352,7 @@ export class Renderable extends Rect {
6267
6352
  /**
6268
6353
  * Rotate this renderable towards the given target.
6269
6354
  * @name lookAt
6270
- * @memberof Renderable.prototype
6355
+ * @memberof Renderable
6271
6356
  * @function
6272
6357
  * @param {Renderable|Vector2d|Vector3d} target the renderable or position to look at
6273
6358
  * @returns {Renderable} Reference to this object for method chaining
@@ -6276,7 +6361,7 @@ export class Renderable extends Rect {
6276
6361
  /**
6277
6362
  * Rotate this renderable by the specified angle (in radians).
6278
6363
  * @name rotate
6279
- * @memberof Renderable.prototype
6364
+ * @memberof Renderable
6280
6365
  * @function
6281
6366
  * @param {number} angle The angle to rotate (in radians)
6282
6367
  * @param {Vector2d|ObservableVector2d} [v] an optional point to rotate around
@@ -6290,7 +6375,7 @@ export class Renderable extends Rect {
6290
6375
  * is an image, the image.width and image.height properties are unaltered but the currentTransform
6291
6376
  * member will be changed.
6292
6377
  * @name scale
6293
- * @memberof Renderable.prototype
6378
+ * @memberof Renderable
6294
6379
  * @function
6295
6380
  * @param {number} x a number representing the abscissa of the scaling vector.
6296
6381
  * @param {number} [y=x] a number representing the ordinate of the scaling vector.
@@ -6300,7 +6385,7 @@ export class Renderable extends Rect {
6300
6385
  /**
6301
6386
  * scale the renderable around his anchor point
6302
6387
  * @name scaleV
6303
- * @memberof Renderable.prototype
6388
+ * @memberof Renderable
6304
6389
  * @function
6305
6390
  * @param {Vector2d} v scaling vector
6306
6391
  * @returns {Renderable} Reference to this object for method chaining
@@ -6310,25 +6395,34 @@ export class Renderable extends Rect {
6310
6395
  * update function. <br>
6311
6396
  * automatically called by the game manager {@link game}
6312
6397
  * @name update
6313
- * @memberof Renderable.prototype
6398
+ * @memberof Renderable
6314
6399
  * @function
6315
6400
  * @protected
6316
6401
  * @param {number} dt time since the last update in milliseconds.
6317
6402
  * @returns {boolean} true if the renderable is dirty
6318
6403
  */
6319
6404
  protected update(dt: number): boolean;
6405
+ /**
6406
+ * update the bounding box for this shape.
6407
+ * @ignore
6408
+ * @name updateBounds
6409
+ * @memberof Renderable
6410
+ * @function
6411
+ * @returns {Bounds} this shape bounding box Rectangle object
6412
+ */
6413
+ updateBounds(): Bounds;
6320
6414
  /**
6321
6415
  * update the renderable's bounding rect (private)
6322
6416
  * @ignore
6323
6417
  * @name updateBoundsPos
6324
- * @memberof Renderable.prototype
6418
+ * @memberof Renderable
6325
6419
  * @function
6326
6420
  */
6327
6421
  updateBoundsPos(newX: any, newY: any): void;
6328
6422
  /**
6329
6423
  * return the renderable absolute position in the game world
6330
6424
  * @name getAbsolutePosition
6331
- * @memberof Renderable.prototype
6425
+ * @memberof Renderable
6332
6426
  * @function
6333
6427
  * @returns {Vector2d}
6334
6428
  */
@@ -6338,7 +6432,7 @@ export class Renderable extends Rect {
6338
6432
  * called when the anchor point value is changed
6339
6433
  * @private
6340
6434
  * @name onAnchorUpdate
6341
- * @memberof Renderable.prototype
6435
+ * @memberof Renderable
6342
6436
  * @function
6343
6437
  * @param {number} x the new X value to be set for the anchor
6344
6438
  * @param {number} y the new Y value to be set for the anchor
@@ -6349,7 +6443,7 @@ export class Renderable extends Rect {
6349
6443
  * (apply defined transforms, anchor point). <br>
6350
6444
  * automatically called by the game manager {@link game}
6351
6445
  * @name preDraw
6352
- * @memberof Renderable.prototype
6446
+ * @memberof Renderable
6353
6447
  * @function
6354
6448
  * @protected
6355
6449
  * @param {CanvasRenderer|WebGLRenderer} renderer a renderer object
@@ -6359,7 +6453,7 @@ export class Renderable extends Rect {
6359
6453
  * object draw. <br>
6360
6454
  * automatically called by the game manager {@link game}
6361
6455
  * @name draw
6362
- * @memberof Renderable.prototype
6456
+ * @memberof Renderable
6363
6457
  * @function
6364
6458
  * @protected
6365
6459
  * @param {CanvasRenderer|WebGLRenderer} renderer a renderer object
@@ -6369,7 +6463,7 @@ export class Renderable extends Rect {
6369
6463
  * restore the rendering context after drawing. <br>
6370
6464
  * automatically called by the game manager {@link game}
6371
6465
  * @name postDraw
6372
- * @memberof Renderable.prototype
6466
+ * @memberof Renderable
6373
6467
  * @function
6374
6468
  * @protected
6375
6469
  * @param {CanvasRenderer|WebGLRenderer} renderer a renderer object
@@ -6379,7 +6473,7 @@ export class Renderable extends Rect {
6379
6473
  * onCollision callback, triggered in case of collision,
6380
6474
  * when this renderable body is colliding with another one
6381
6475
  * @name onCollision
6382
- * @memberof Renderable.prototype
6476
+ * @memberof Renderable
6383
6477
  * @function
6384
6478
  * @param {collision.ResponseObject} response the collision response object
6385
6479
  * @param {Renderable} other the other renderable touching this one (a reference to response.a or response.b)
@@ -6404,6 +6498,7 @@ export class Renderable extends Rect {
6404
6498
  * @ignore
6405
6499
  */
6406
6500
  destroy(...args: any[]): void;
6501
+ _bounds: any;
6407
6502
  /**
6408
6503
  * OnDestroy Notification function<br>
6409
6504
  * Called by engine before deleting the object
@@ -6487,6 +6582,10 @@ export class Renderer {
6487
6582
  * @ignore
6488
6583
  */
6489
6584
  currentScissor: Int32Array;
6585
+ /**
6586
+ * @ignore
6587
+ */
6588
+ maskLevel: number;
6490
6589
  /**
6491
6590
  * @ignore
6492
6591
  */
@@ -6501,21 +6600,21 @@ export class Renderer {
6501
6600
  /**
6502
6601
  * prepare the framebuffer for drawing a new frame
6503
6602
  * @name clear
6504
- * @memberof Renderer.prototype
6603
+ * @memberof Renderer
6505
6604
  * @function
6506
6605
  */
6507
6606
  clear(): void;
6508
6607
  /**
6509
6608
  * Reset context state
6510
6609
  * @name reset
6511
- * @memberof Renderer.prototype
6610
+ * @memberof Renderer
6512
6611
  * @function
6513
6612
  */
6514
6613
  reset(): void;
6515
6614
  /**
6516
6615
  * return a reference to the system canvas
6517
6616
  * @name getCanvas
6518
- * @memberof Renderer.prototype
6617
+ * @memberof Renderer
6519
6618
  * @function
6520
6619
  * @returns {HTMLCanvasElement}
6521
6620
  */
@@ -6523,7 +6622,7 @@ export class Renderer {
6523
6622
  /**
6524
6623
  * return a reference to the screen canvas
6525
6624
  * @name getScreenCanvas
6526
- * @memberof Renderer.prototype
6625
+ * @memberof Renderer
6527
6626
  * @function
6528
6627
  * @returns {HTMLCanvasElement}
6529
6628
  */
@@ -6532,7 +6631,7 @@ export class Renderer {
6532
6631
  * return a reference to the screen canvas corresponding 2d Context<br>
6533
6632
  * (will return buffered context if double buffering is enabled, or a reference to the Screen Context)
6534
6633
  * @name getScreenContext
6535
- * @memberof Renderer.prototype
6634
+ * @memberof Renderer
6536
6635
  * @function
6537
6636
  * @returns {CanvasRenderingContext2D}
6538
6637
  */
@@ -6540,7 +6639,7 @@ export class Renderer {
6540
6639
  /**
6541
6640
  * returns the current blend mode for this renderer
6542
6641
  * @name getBlendMode
6543
- * @memberof Renderer.prototype
6642
+ * @memberof Renderer
6544
6643
  * @function
6545
6644
  * @returns {string} blend mode
6546
6645
  */
@@ -6549,7 +6648,7 @@ export class Renderer {
6549
6648
  * Returns the 2D Context object of the given Canvas<br>
6550
6649
  * Also configures anti-aliasing and blend modes based on constructor options.
6551
6650
  * @name getContext2d
6552
- * @memberof Renderer.prototype
6651
+ * @memberof Renderer
6553
6652
  * @function
6554
6653
  * @param {HTMLCanvasElement} canvas
6555
6654
  * @param {boolean} [transparent=true] use false to disable transparency
@@ -6559,7 +6658,7 @@ export class Renderer {
6559
6658
  /**
6560
6659
  * return the width of the system Canvas
6561
6660
  * @name getWidth
6562
- * @memberof Renderer.prototype
6661
+ * @memberof Renderer
6563
6662
  * @function
6564
6663
  * @returns {number}
6565
6664
  */
@@ -6567,7 +6666,7 @@ export class Renderer {
6567
6666
  /**
6568
6667
  * return the height of the system Canvas
6569
6668
  * @name getHeight
6570
- * @memberof Renderer.prototype
6669
+ * @memberof Renderer
6571
6670
  * @function
6572
6671
  * @returns {number} height of the system Canvas
6573
6672
  */
@@ -6575,7 +6674,7 @@ export class Renderer {
6575
6674
  /**
6576
6675
  * get the current fill & stroke style color.
6577
6676
  * @name getColor
6578
- * @memberof Renderer.prototype
6677
+ * @memberof Renderer
6579
6678
  * @function
6580
6679
  * @returns {Color} current global color
6581
6680
  */
@@ -6583,7 +6682,7 @@ export class Renderer {
6583
6682
  /**
6584
6683
  * return the current global alpha
6585
6684
  * @name globalAlpha
6586
- * @memberof Renderer.prototype
6685
+ * @memberof Renderer
6587
6686
  * @function
6588
6687
  * @returns {number}
6589
6688
  */
@@ -6591,7 +6690,7 @@ export class Renderer {
6591
6690
  /**
6592
6691
  * check if the given rect or bounds overlaps with the renderer screen coordinates
6593
6692
  * @name overlaps
6594
- * @memberof Renderer.prototype
6693
+ * @memberof Renderer
6595
6694
  * @function
6596
6695
  * @param {Rect|Bounds} bounds
6597
6696
  * @returns {boolean} true if overlaps
@@ -6600,7 +6699,7 @@ export class Renderer {
6600
6699
  /**
6601
6700
  * resizes the system canvas
6602
6701
  * @name resize
6603
- * @memberof Renderer.prototype
6702
+ * @memberof Renderer
6604
6703
  * @function
6605
6704
  * @param {number} width new width of the canvas
6606
6705
  * @param {number} height new height of the canvas
@@ -6609,7 +6708,7 @@ export class Renderer {
6609
6708
  /**
6610
6709
  * enable/disable image smoothing (scaling interpolation) for the given context
6611
6710
  * @name setAntiAlias
6612
- * @memberof Renderer.prototype
6711
+ * @memberof Renderer
6613
6712
  * @function
6614
6713
  * @param {CanvasRenderingContext2D} context
6615
6714
  * @param {boolean} [enable=false]
@@ -6618,7 +6717,7 @@ export class Renderer {
6618
6717
  /**
6619
6718
  * set/change the current projection matrix (WebGL only)
6620
6719
  * @name setProjection
6621
- * @memberof Renderer.prototype
6720
+ * @memberof Renderer
6622
6721
  * @function
6623
6722
  * @param {Matrix3d} matrix
6624
6723
  */
@@ -6626,7 +6725,7 @@ export class Renderer {
6626
6725
  /**
6627
6726
  * stroke the given shape
6628
6727
  * @name stroke
6629
- * @memberof Renderer.prototype
6728
+ * @memberof Renderer
6630
6729
  * @function
6631
6730
  * @param {Rect|RoundRect|Polygon|Line|Ellipse} shape a shape object to stroke
6632
6731
  * @param {boolean} [fill=false] fill the shape with the current color if true
@@ -6635,7 +6734,7 @@ export class Renderer {
6635
6734
  /**
6636
6735
  * fill the given shape
6637
6736
  * @name fill
6638
- * @memberof Renderer.prototype
6737
+ * @memberof Renderer
6639
6738
  * @function
6640
6739
  * @param {Rect|RoundRect|Polygon|Line|Ellipse} shape a shape object to fill
6641
6740
  */
@@ -6643,7 +6742,7 @@ export class Renderer {
6643
6742
  /**
6644
6743
  * tint the given image or canvas using the given color
6645
6744
  * @name tint
6646
- * @memberof Renderer.prototype
6745
+ * @memberof Renderer
6647
6746
  * @function
6648
6747
  * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas} src the source image to be tinted
6649
6748
  * @param {Color|string} color the color that will be used to tint the image
@@ -6656,23 +6755,24 @@ export class Renderer {
6656
6755
  * So, if the renderable is larger than the mask, only the intersecting part of the renderable will be visible.
6657
6756
  * Mask are not preserved through renderer context save and restore.
6658
6757
  * @name setMask
6659
- * @memberof Renderer.prototype
6758
+ * @memberof Renderer
6660
6759
  * @function
6661
6760
  * @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] the shape defining the mask to be applied
6761
+ * @param {boolean} [invert=false] either the given shape should define what is visible (default) or the opposite
6662
6762
  */
6663
6763
  setMask(mask?: Rect | RoundRect | Polygon | Line | Ellipse): void;
6664
6764
  /**
6665
6765
  * disable (remove) the rendering mask set through setMask.
6666
6766
  * @name clearMask
6667
6767
  * @see Renderer#setMask
6668
- * @memberof Renderer.prototype
6768
+ * @memberof Renderer
6669
6769
  * @function
6670
6770
  */
6671
6771
  clearMask(): void;
6672
6772
  /**
6673
6773
  * set a coloring tint for sprite based renderables
6674
6774
  * @name setTint
6675
- * @memberof Renderer.prototype
6775
+ * @memberof Renderer
6676
6776
  * @function
6677
6777
  * @param {Color} tint the tint color
6678
6778
  * @param {number} [alpha] an alpha value to be applied to the tint
@@ -6682,7 +6782,7 @@ export class Renderer {
6682
6782
  * clear the rendering tint set through setTint.
6683
6783
  * @name clearTint
6684
6784
  * @see Renderer#setTint
6685
- * @memberof Renderer.prototype
6785
+ * @memberof Renderer
6686
6786
  * @function
6687
6787
  */
6688
6788
  clearTint(): void;
@@ -6697,7 +6797,7 @@ export class Renderer {
6697
6797
  * a rectangle object with rounded corners
6698
6798
  * @augments Rect
6699
6799
  */
6700
- export class RoundRect extends Rect {
6800
+ export class RoundRect {
6701
6801
  /**
6702
6802
  * @param {number} x position of the rounded rectangle
6703
6803
  * @param {number} y position of the rounded rectangle
@@ -6713,7 +6813,7 @@ export class RoundRect extends Rect {
6713
6813
  * @type {number}
6714
6814
  * @default 20
6715
6815
  * @name radius
6716
- * @memberof RoundRect.prototype
6816
+ * @memberof RoundRect
6717
6817
  */
6718
6818
  public get radius(): number;
6719
6819
  /** @ignore */
@@ -6722,16 +6822,34 @@ export class RoundRect extends Rect {
6722
6822
  /**
6723
6823
  * copy the position, size and radius of the given rounded rectangle into this one
6724
6824
  * @name copy
6725
- * @memberof RoundRect.prototype
6825
+ * @memberof RoundRect
6726
6826
  * @function
6727
6827
  * @param {RoundRect} rrect source rounded rectangle
6728
6828
  * @returns {RoundRect} new rectangle
6729
6829
  */
6730
6830
  copy(rrect: RoundRect): RoundRect;
6831
+ /**
6832
+ * Returns true if the rounded rectangle contains the given point
6833
+ * @name contains
6834
+ * @memberof RoundRect
6835
+ * @function
6836
+ * @param {number} x x coordinate
6837
+ * @param {number} y y coordinate
6838
+ * @returns {boolean} true if contains
6839
+ */
6840
+ /**
6841
+ * Returns true if the rounded rectangle contains the given point
6842
+ * @name contains
6843
+ * @memberof RoundRect
6844
+ * @function
6845
+ * @param {Vector2d} point
6846
+ * @returns {boolean} true if contains
6847
+ */
6848
+ contains(...args: any[]): boolean;
6731
6849
  /**
6732
6850
  * check if this RoundRect is identical to the specified one
6733
6851
  * @name equals
6734
- * @memberof RoundRect.prototype
6852
+ * @memberof RoundRect
6735
6853
  * @function
6736
6854
  * @param {RoundRect} rrect
6737
6855
  * @returns {boolean} true if equals
@@ -6740,7 +6858,7 @@ export class RoundRect extends Rect {
6740
6858
  /**
6741
6859
  * clone this RoundRect
6742
6860
  * @name clone
6743
- * @memberof RoundRect.prototype
6861
+ * @memberof RoundRect
6744
6862
  * @function
6745
6863
  * @returns {RoundRect} new RoundRect
6746
6864
  */
@@ -6849,10 +6967,12 @@ export class Sprite extends Renderable {
6849
6967
  image: HTMLCanvasElement | HTMLImageElement;
6850
6968
  textureAtlas: any;
6851
6969
  atlasIndices: any;
6970
+ width: number;
6971
+ height: number;
6852
6972
  /**
6853
6973
  * return the flickering state of the object
6854
6974
  * @name isFlickering
6855
- * @memberof Sprite.prototype
6975
+ * @memberof Sprite
6856
6976
  * @function
6857
6977
  * @returns {boolean}
6858
6978
  */
@@ -6860,7 +6980,7 @@ export class Sprite extends Renderable {
6860
6980
  /**
6861
6981
  * make the object flicker
6862
6982
  * @name flicker
6863
- * @memberof Sprite.prototype
6983
+ * @memberof Sprite
6864
6984
  * @function
6865
6985
  * @param {number} duration expressed in milliseconds
6866
6986
  * @param {Function} callback Function to call when flickering ends
@@ -6879,7 +6999,7 @@ export class Sprite extends Renderable {
6879
6999
  * logic as per the following example :<br>
6880
7000
  * <img src="images/spritesheet_grid.png"/>
6881
7001
  * @name addAnimation
6882
- * @memberof Sprite.prototype
7002
+ * @memberof Sprite
6883
7003
  * @function
6884
7004
  * @param {string} name animation id
6885
7005
  * @param {number[]|string[]|object[]} index list of sprite index or name
@@ -6912,7 +7032,7 @@ export class Sprite extends Renderable {
6912
7032
  * set the current animation
6913
7033
  * this will always change the animation & set the frame to zero
6914
7034
  * @name setCurrentAnimation
6915
- * @memberof Sprite.prototype
7035
+ * @memberof Sprite
6916
7036
  * @function
6917
7037
  * @param {string} name animation id
6918
7038
  * @param {string|Function} [resetAnim] animation id to switch to when complete, or callback
@@ -6952,7 +7072,7 @@ export class Sprite extends Renderable {
6952
7072
  /**
6953
7073
  * reverse the given or current animation if none is specified
6954
7074
  * @name reverseAnimation
6955
- * @memberof Sprite.prototype
7075
+ * @memberof Sprite
6956
7076
  * @function
6957
7077
  * @param {string} [name] animation id
6958
7078
  * @returns {Sprite} Reference to this object for method chaining
@@ -6962,7 +7082,7 @@ export class Sprite extends Renderable {
6962
7082
  /**
6963
7083
  * return true if the specified animation is the current one.
6964
7084
  * @name isCurrentAnimation
6965
- * @memberof Sprite.prototype
7085
+ * @memberof Sprite
6966
7086
  * @function
6967
7087
  * @param {string} name animation id
6968
7088
  * @returns {boolean}
@@ -6976,7 +7096,7 @@ export class Sprite extends Renderable {
6976
7096
  * change the current texture atlas region for this sprite
6977
7097
  * @see Texture.getRegion
6978
7098
  * @name setRegion
6979
- * @memberof Sprite.prototype
7099
+ * @memberof Sprite
6980
7100
  * @function
6981
7101
  * @param {object} region typically returned through me.Texture.getRegion()
6982
7102
  * @returns {Sprite} Reference to this object for method chaining
@@ -6988,7 +7108,7 @@ export class Sprite extends Renderable {
6988
7108
  /**
6989
7109
  * force the current animation frame index.
6990
7110
  * @name setAnimationFrame
6991
- * @memberof Sprite.prototype
7111
+ * @memberof Sprite
6992
7112
  * @function
6993
7113
  * @param {number} [idx=0] animation frame index
6994
7114
  * @returns {Sprite} Reference to this object for method chaining
@@ -7000,7 +7120,7 @@ export class Sprite extends Renderable {
7000
7120
  /**
7001
7121
  * return the current animation frame index.
7002
7122
  * @name getCurrentAnimationFrame
7003
- * @memberof Sprite.prototype
7123
+ * @memberof Sprite
7004
7124
  * @function
7005
7125
  * @returns {number} current animation frame index
7006
7126
  */
@@ -7008,7 +7128,7 @@ export class Sprite extends Renderable {
7008
7128
  /**
7009
7129
  * Returns the frame object by the index.
7010
7130
  * @name getAnimationFrameObjectByIndex
7011
- * @memberof Sprite.prototype
7131
+ * @memberof Sprite
7012
7132
  * @function
7013
7133
  * @ignore
7014
7134
  * @param {number} id the frame id
@@ -7050,6 +7170,38 @@ export class Stage {
7050
7170
  * @memberof Stage
7051
7171
  */
7052
7172
  public cameras: Map<Camera2d, any>;
7173
+ /**
7174
+ * The list of active lights in this stage.
7175
+ * (Note: Canvas Renderering mode will only properly support one light per stage)
7176
+ * @public
7177
+ * @type {Map<Light2d>}
7178
+ * @name lights
7179
+ * @memberof Stage
7180
+ * @see Light2d
7181
+ * @see Stage.ambientLight
7182
+ * @example
7183
+ * // create a white spot light
7184
+ * var whiteLight = new me.Light2d(0, 0, 140, "#fff", 0.7);
7185
+ * // and add the light to this current stage
7186
+ * this.lights.set("whiteLight", whiteLight);
7187
+ * // set a dark ambient light
7188
+ * this.ambientLight.parseCSS("#1117");
7189
+ * // make the light follow the mouse
7190
+ * me.input.registerPointerEvent("pointermove", me.game.viewport, (event) => {
7191
+ * whiteLight.centerOn(event.gameX, event.gameY);
7192
+ * });
7193
+ */
7194
+ public lights: Map<Light2d, any>;
7195
+ /**
7196
+ * an ambient light that will be added to the stage rendering
7197
+ * @public
7198
+ * @type {Color}
7199
+ * @name ambientLight
7200
+ * @memberof Stage
7201
+ * @default "#000000"
7202
+ * @see Light2d
7203
+ */
7204
+ public ambientLight: Color;
7053
7205
  /**
7054
7206
  * The given constructor options
7055
7207
  * @public
@@ -7286,6 +7438,8 @@ export class TMXLayer extends Renderable {
7286
7438
  name: any;
7287
7439
  cols: number;
7288
7440
  rows: number;
7441
+ width: number;
7442
+ height: number;
7289
7443
  preRender: boolean;
7290
7444
  onActivateEvent(): void;
7291
7445
  canvasRenderer: CanvasRenderer;
@@ -7935,8 +8089,7 @@ export class Text extends Renderable {
7935
8089
  * @default 10
7936
8090
  */
7937
8091
  public fontSize: number;
7938
- canvas: HTMLCanvasElement | OffscreenCanvas;
7939
- context: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
8092
+ canvasTexture: any;
7940
8093
  metrics: TextMetrics;
7941
8094
  /** @ignore */
7942
8095
  onDeactivateEvent(): void;
@@ -7962,6 +8115,7 @@ export class Text extends Renderable {
7962
8115
  * font.setFont("Arial", "1.5em");
7963
8116
  */
7964
8117
  setFont(font: string, size?: number | string): Text;
8118
+ height: number;
7965
8119
  /**
7966
8120
  * change the text to be displayed
7967
8121
  * @param {number|string|string[]} value a string, or an array of strings
@@ -9526,8 +9680,8 @@ export class WebGLRenderer extends Renderer {
9526
9680
  /**
9527
9681
  * The WebGL context
9528
9682
  * @name gl
9529
- * @memberof WebGLRenderer#
9530
- * type {WebGLRenderingContext}
9683
+ * @memberof WebGLRenderer
9684
+ * @type {WebGLRenderingContext}
9531
9685
  */
9532
9686
  context: WebGLRenderingContext;
9533
9687
  gl: WebGLRenderingContext;
@@ -9582,14 +9736,14 @@ export class WebGLRenderer extends Renderer {
9582
9736
  * @name setCompositor
9583
9737
  * @function
9584
9738
  * @param {WebGLCompositor|string} compositor a compositor name or instance
9585
- * @memberof WebGLRenderer.prototype
9739
+ * @memberof WebGLRenderer
9586
9740
  * @function
9587
9741
  */
9588
9742
  setCompositor(compositor?: WebGLCompositor | string): void;
9589
9743
  /**
9590
9744
  * Reset the gl transform to identity
9591
9745
  * @name resetTransform
9592
- * @memberof WebGLRenderer.prototype
9746
+ * @memberof WebGLRenderer
9593
9747
  * @function
9594
9748
  */
9595
9749
  resetTransform(): void;
@@ -9608,7 +9762,7 @@ export class WebGLRenderer extends Renderer {
9608
9762
  /**
9609
9763
  * Create a pattern with the specified repetition
9610
9764
  * @name createPattern
9611
- * @memberof WebGLRenderer.prototype
9765
+ * @memberof WebGLRenderer
9612
9766
  * @function
9613
9767
  * @param {Image} image Source image
9614
9768
  * @param {string} repeat Define how the pattern should be repeated
@@ -9624,14 +9778,14 @@ export class WebGLRenderer extends Renderer {
9624
9778
  /**
9625
9779
  * Flush the compositor to the frame buffer
9626
9780
  * @name flush
9627
- * @memberof WebGLRenderer.prototype
9781
+ * @memberof WebGLRenderer
9628
9782
  * @function
9629
9783
  */
9630
9784
  flush(): void;
9631
9785
  /**
9632
9786
  * Clears the gl context with the given color.
9633
9787
  * @name clearColor
9634
- * @memberof WebGLRenderer.prototype
9788
+ * @memberof WebGLRenderer
9635
9789
  * @function
9636
9790
  * @param {Color|string} [color="#000000"] CSS color.
9637
9791
  * @param {boolean} [opaque=false] Allow transparency [default] or clear the surface completely [true]
@@ -9640,7 +9794,7 @@ export class WebGLRenderer extends Renderer {
9640
9794
  /**
9641
9795
  * Erase the pixels in the given rectangular area by setting them to transparent black (rgba(0,0,0,0)).
9642
9796
  * @name clearRect
9643
- * @memberof WebGLRenderer.prototype
9797
+ * @memberof WebGLRenderer
9644
9798
  * @function
9645
9799
  * @param {number} x x axis of the coordinate for the rectangle starting point.
9646
9800
  * @param {number} y y axis of the coordinate for the rectangle starting point.
@@ -9655,7 +9809,7 @@ export class WebGLRenderer extends Renderer {
9655
9809
  /**
9656
9810
  * Draw an image to the gl context
9657
9811
  * @name drawImage
9658
- * @memberof WebGLRenderer.prototype
9812
+ * @memberof WebGLRenderer
9659
9813
  * @function
9660
9814
  * @param {Image} image An element to draw into the context. The specification permits any canvas image source (CanvasImageSource), specifically, a CSSImageValue, an HTMLImageElement, an SVGImageElement, an HTMLVideoElement, an HTMLCanvasElement, an ImageBitmap, or an OffscreenCanvas.
9661
9815
  * @param {number} sx The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
@@ -9678,7 +9832,7 @@ export class WebGLRenderer extends Renderer {
9678
9832
  /**
9679
9833
  * Draw a pattern within the given rectangle.
9680
9834
  * @name drawPattern
9681
- * @memberof WebGLRenderer.prototype
9835
+ * @memberof WebGLRenderer
9682
9836
  * @function
9683
9837
  * @param {TextureAtlas} pattern Pattern object
9684
9838
  * @param {number} x
@@ -9691,7 +9845,7 @@ export class WebGLRenderer extends Renderer {
9691
9845
  /**
9692
9846
  * return a reference to the screen canvas corresponding WebGL Context
9693
9847
  * @name getScreenContext
9694
- * @memberof WebGLRenderer.prototype
9848
+ * @memberof WebGLRenderer
9695
9849
  * @function
9696
9850
  * @returns {WebGLRenderingContext}
9697
9851
  */
@@ -9699,7 +9853,7 @@ export class WebGLRenderer extends Renderer {
9699
9853
  /**
9700
9854
  * Returns the WebGL Context object of the given Canvas
9701
9855
  * @name getContextGL
9702
- * @memberof WebGLRenderer.prototype
9856
+ * @memberof WebGLRenderer
9703
9857
  * @function
9704
9858
  * @param {HTMLCanvasElement} canvas
9705
9859
  * @param {boolean} [transparent=true] use false to disable transparency
@@ -9710,7 +9864,7 @@ export class WebGLRenderer extends Renderer {
9710
9864
  * Returns the WebGLContext instance for the renderer
9711
9865
  * return a reference to the system 2d Context
9712
9866
  * @name getContext
9713
- * @memberof WebGLRenderer.prototype
9867
+ * @memberof WebGLRenderer
9714
9868
  * @function
9715
9869
  * @returns {WebGLRenderingContext}
9716
9870
  */
@@ -9728,7 +9882,7 @@ export class WebGLRenderer extends Renderer {
9728
9882
  * <img src="images/screen-blendmode.png" width="510"/> <br>
9729
9883
  * @name setBlendMode
9730
9884
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
9731
- * @memberof WebGLRenderer.prototype
9885
+ * @memberof WebGLRenderer
9732
9886
  * @function
9733
9887
  * @param {string} [mode="normal"] blend mode : "normal", "multiply", "lighter", "additive", "screen"
9734
9888
  * @param {WebGLRenderingContext} [gl]
@@ -9743,21 +9897,21 @@ export class WebGLRenderer extends Renderer {
9743
9897
  /**
9744
9898
  * restores the canvas context
9745
9899
  * @name restore
9746
- * @memberof WebGLRenderer.prototype
9900
+ * @memberof WebGLRenderer
9747
9901
  * @function
9748
9902
  */
9749
9903
  restore(): void;
9750
9904
  /**
9751
9905
  * saves the canvas context
9752
9906
  * @name save
9753
- * @memberof WebGLRenderer.prototype
9907
+ * @memberof WebGLRenderer
9754
9908
  * @function
9755
9909
  */
9756
9910
  save(): void;
9757
9911
  /**
9758
9912
  * rotates the uniform matrix
9759
9913
  * @name rotate
9760
- * @memberof WebGLRenderer.prototype
9914
+ * @memberof WebGLRenderer
9761
9915
  * @function
9762
9916
  * @param {number} angle in radians
9763
9917
  */
@@ -9765,7 +9919,7 @@ export class WebGLRenderer extends Renderer {
9765
9919
  /**
9766
9920
  * scales the uniform matrix
9767
9921
  * @name scale
9768
- * @memberof WebGLRenderer.prototype
9922
+ * @memberof WebGLRenderer
9769
9923
  * @function
9770
9924
  * @param {number} x
9771
9925
  * @param {number} y
@@ -9779,7 +9933,7 @@ export class WebGLRenderer extends Renderer {
9779
9933
  /**
9780
9934
  * Set the global alpha
9781
9935
  * @name setGlobalAlpha
9782
- * @memberof WebGLRenderer.prototype
9936
+ * @memberof WebGLRenderer
9783
9937
  * @function
9784
9938
  * @param {number} alpha 0.0 to 1.0 values accepted.
9785
9939
  */
@@ -9787,7 +9941,7 @@ export class WebGLRenderer extends Renderer {
9787
9941
  /**
9788
9942
  * Return the global alpha
9789
9943
  * @name getGlobalAlpha
9790
- * @memberof WebGLRenderer.prototype
9944
+ * @memberof WebGLRenderer
9791
9945
  * @function
9792
9946
  * @returns {number} global alpha value
9793
9947
  */
@@ -9796,7 +9950,7 @@ export class WebGLRenderer extends Renderer {
9796
9950
  * Set the current fill & stroke style color.
9797
9951
  * By default, or upon reset, the value is set to #000000.
9798
9952
  * @name setColor
9799
- * @memberof WebGLRenderer.prototype
9953
+ * @memberof WebGLRenderer
9800
9954
  * @function
9801
9955
  * @param {Color|string} color css color string.
9802
9956
  */
@@ -9804,7 +9958,7 @@ export class WebGLRenderer extends Renderer {
9804
9958
  /**
9805
9959
  * Set the line width
9806
9960
  * @name setLineWidth
9807
- * @memberof WebGLRenderer.prototype
9961
+ * @memberof WebGLRenderer
9808
9962
  * @function
9809
9963
  * @param {number} width Line width
9810
9964
  */
@@ -9812,7 +9966,7 @@ export class WebGLRenderer extends Renderer {
9812
9966
  /**
9813
9967
  * Stroke an arc at the specified coordinates with given radius, start and end points
9814
9968
  * @name strokeArc
9815
- * @memberof WebGLRenderer.prototype
9969
+ * @memberof WebGLRenderer
9816
9970
  * @function
9817
9971
  * @param {number} x arc center point x-axis
9818
9972
  * @param {number} y arc center point y-axis
@@ -9826,7 +9980,7 @@ export class WebGLRenderer extends Renderer {
9826
9980
  /**
9827
9981
  * Fill an arc at the specified coordinates with given radius, start and end points
9828
9982
  * @name fillArc
9829
- * @memberof WebGLRenderer.prototype
9983
+ * @memberof WebGLRenderer
9830
9984
  * @function
9831
9985
  * @param {number} x arc center point x-axis
9832
9986
  * @param {number} y arc center point y-axis
@@ -9839,7 +9993,7 @@ export class WebGLRenderer extends Renderer {
9839
9993
  /**
9840
9994
  * Stroke an ellipse at the specified coordinates with given radius
9841
9995
  * @name strokeEllipse
9842
- * @memberof WebGLRenderer.prototype
9996
+ * @memberof WebGLRenderer
9843
9997
  * @function
9844
9998
  * @param {number} x ellipse center point x-axis
9845
9999
  * @param {number} y ellipse center point y-axis
@@ -9851,7 +10005,7 @@ export class WebGLRenderer extends Renderer {
9851
10005
  /**
9852
10006
  * Fill an ellipse at the specified coordinates with given radius
9853
10007
  * @name fillEllipse
9854
- * @memberof WebGLRenderer.prototype
10008
+ * @memberof WebGLRenderer
9855
10009
  * @function
9856
10010
  * @param {number} x ellipse center point x-axis
9857
10011
  * @param {number} y ellipse center point y-axis
@@ -9862,7 +10016,7 @@ export class WebGLRenderer extends Renderer {
9862
10016
  /**
9863
10017
  * Stroke a line of the given two points
9864
10018
  * @name strokeLine
9865
- * @memberof WebGLRenderer.prototype
10019
+ * @memberof WebGLRenderer
9866
10020
  * @function
9867
10021
  * @param {number} startX the start x coordinate
9868
10022
  * @param {number} startY the start y coordinate
@@ -9873,7 +10027,7 @@ export class WebGLRenderer extends Renderer {
9873
10027
  /**
9874
10028
  * Fill a line of the given two points
9875
10029
  * @name fillLine
9876
- * @memberof WebGLRenderer.prototype
10030
+ * @memberof WebGLRenderer
9877
10031
  * @function
9878
10032
  * @param {number} startX the start x coordinate
9879
10033
  * @param {number} startY the start y coordinate
@@ -9884,7 +10038,7 @@ export class WebGLRenderer extends Renderer {
9884
10038
  /**
9885
10039
  * Stroke a me.Polygon on the screen with a specified color
9886
10040
  * @name strokePolygon
9887
- * @memberof WebGLRenderer.prototype
10041
+ * @memberof WebGLRenderer
9888
10042
  * @function
9889
10043
  * @param {Polygon} poly the shape to draw
9890
10044
  * @param {boolean} [fill=false] also fill the shape with the current color if true
@@ -9893,7 +10047,7 @@ export class WebGLRenderer extends Renderer {
9893
10047
  /**
9894
10048
  * Fill a me.Polygon on the screen
9895
10049
  * @name fillPolygon
9896
- * @memberof WebGLRenderer.prototype
10050
+ * @memberof WebGLRenderer
9897
10051
  * @function
9898
10052
  * @param {Polygon} poly the shape to draw
9899
10053
  */
@@ -9901,7 +10055,7 @@ export class WebGLRenderer extends Renderer {
9901
10055
  /**
9902
10056
  * Draw a stroke rectangle at the specified coordinates
9903
10057
  * @name strokeRect
9904
- * @memberof WebGLRenderer.prototype
10058
+ * @memberof WebGLRenderer
9905
10059
  * @function
9906
10060
  * @param {number} x
9907
10061
  * @param {number} y
@@ -9913,7 +10067,7 @@ export class WebGLRenderer extends Renderer {
9913
10067
  /**
9914
10068
  * Draw a filled rectangle at the specified coordinates
9915
10069
  * @name fillRect
9916
- * @memberof WebGLRenderer.prototype
10070
+ * @memberof WebGLRenderer
9917
10071
  * @function
9918
10072
  * @param {number} x
9919
10073
  * @param {number} y
@@ -9924,7 +10078,7 @@ export class WebGLRenderer extends Renderer {
9924
10078
  /**
9925
10079
  * Stroke a rounded rectangle at the specified coordinates
9926
10080
  * @name strokeRoundRect
9927
- * @memberof WebGLRenderer.prototype
10081
+ * @memberof WebGLRenderer
9928
10082
  * @function
9929
10083
  * @param {number} x
9930
10084
  * @param {number} y
@@ -9937,7 +10091,7 @@ export class WebGLRenderer extends Renderer {
9937
10091
  /**
9938
10092
  * Draw a rounded filled rectangle at the specified coordinates
9939
10093
  * @name fillRoundRect
9940
- * @memberof WebGLRenderer.prototype
10094
+ * @memberof WebGLRenderer
9941
10095
  * @function
9942
10096
  * @param {number} x
9943
10097
  * @param {number} y
@@ -9950,7 +10104,7 @@ export class WebGLRenderer extends Renderer {
9950
10104
  * Reset (overrides) the renderer transformation matrix to the
9951
10105
  * identity one, and then apply the given transformation matrix.
9952
10106
  * @name setTransform
9953
- * @memberof WebGLRenderer.prototype
10107
+ * @memberof WebGLRenderer
9954
10108
  * @function
9955
10109
  * @param {Matrix2d} mat2d Matrix to transform by
9956
10110
  */
@@ -9958,7 +10112,7 @@ export class WebGLRenderer extends Renderer {
9958
10112
  /**
9959
10113
  * Multiply given matrix into the renderer tranformation matrix
9960
10114
  * @name transform
9961
- * @memberof WebGLRenderer.prototype
10115
+ * @memberof WebGLRenderer
9962
10116
  * @function
9963
10117
  * @param {Matrix2d} mat2d Matrix to transform by
9964
10118
  */
@@ -9966,7 +10120,7 @@ export class WebGLRenderer extends Renderer {
9966
10120
  /**
9967
10121
  * Translates the uniform matrix by the given coordinates
9968
10122
  * @name translate
9969
- * @memberof WebGLRenderer.prototype
10123
+ * @memberof WebGLRenderer
9970
10124
  * @function
9971
10125
  * @param {number} x
9972
10126
  * @param {number} y
@@ -9979,7 +10133,7 @@ export class WebGLRenderer extends Renderer {
9979
10133
  * and restore it (with the restore() method) any time in the future.
9980
10134
  * (<u>this is an experimental feature !</u>)
9981
10135
  * @name clipRect
9982
- * @memberof WebGLRenderer.prototype
10136
+ * @memberof WebGLRenderer
9983
10137
  * @function
9984
10138
  * @param {number} x
9985
10139
  * @param {number} y
@@ -9987,6 +10141,17 @@ export class WebGLRenderer extends Renderer {
9987
10141
  * @param {number} height
9988
10142
  */
9989
10143
  clipRect(x: number, y: number, width: number, height: number): void;
10144
+ /**
10145
+ * A mask limits rendering elements to the shape and position of the given mask object.
10146
+ * So, if the renderable is larger than the mask, only the intersecting part of the renderable will be visible.
10147
+ * Mask are not preserved through renderer context save and restore.
10148
+ * @name setMask
10149
+ * @memberof WebGLRenderer
10150
+ * @function
10151
+ * @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] a shape defining the mask to be applied
10152
+ * @param {boolean} [invert=false] either the given shape should define what is visible (default) or the opposite
10153
+ */
10154
+ setMask(mask?: Rect | RoundRect | Polygon | Line | Ellipse, invert?: boolean): void;
9990
10155
  }
9991
10156
  /**
9992
10157
  * @classdesc
@@ -10073,7 +10238,7 @@ export class World extends Container {
10073
10238
  }
10074
10239
  export var audio: Readonly<{
10075
10240
  __proto__: any;
10076
- stopOnAudioError: boolean;
10241
+ stopOnAudioError: true;
10077
10242
  init: typeof init$1;
10078
10243
  hasFormat: typeof hasFormat;
10079
10244
  hasAudio: typeof hasAudio;
@@ -10119,8 +10284,26 @@ export function boot(): void;
10119
10284
  */
10120
10285
  export var collision: any;
10121
10286
  declare namespace device$1 {
10122
- namespace turnOnPointerLock { }
10123
- namespace turnOffPointerLock { }
10287
+ /**
10288
+ * @public
10289
+ * @name turnOnPointerLock
10290
+ * @function
10291
+ * @returns {boolean} return true if the request was successfully submitted
10292
+ * @memberof device#
10293
+ * @deprecated since 10.3.0
10294
+ * @see input.requestPointerLock
10295
+ */
10296
+ function turnOnPointerLock(): boolean;
10297
+ /**
10298
+ * @public
10299
+ * @name turnOffPointerLock
10300
+ * @function
10301
+ * @returns {boolean} return true if the request was successfully submitted
10302
+ * @memberof device#
10303
+ * @deprecated since 10.3.0
10304
+ * @see input.exitPointerLock
10305
+ */
10306
+ function turnOffPointerLock(): boolean;
10124
10307
  }
10125
10308
  declare var event$1: Readonly<{
10126
10309
  __proto__: any;
@@ -10166,7 +10349,7 @@ export var game: Readonly<{
10166
10349
  __proto__: any;
10167
10350
  readonly viewport: Camera2d;
10168
10351
  readonly world: World;
10169
- mergeGroup: boolean;
10352
+ mergeGroup: true;
10170
10353
  sortOn: string;
10171
10354
  readonly lastUpdate: number;
10172
10355
  onLevelLoaded: typeof onLevelLoaded;
@@ -10186,7 +10369,7 @@ export var game: Readonly<{
10186
10369
  export var initialized: boolean;
10187
10370
  export var input: Readonly<{
10188
10371
  __proto__: any;
10189
- preventDefault: boolean;
10372
+ preventDefault: true;
10190
10373
  readonly pointerEventTarget: EventTarget;
10191
10374
  pointer: Rect;
10192
10375
  readonly locked: boolean;
@@ -11713,9 +11896,9 @@ export namespace utils {
11713
11896
  export const version: string;
11714
11897
  export var video: Readonly<{
11715
11898
  __proto__: any;
11716
- CANVAS: number;
11717
- WEBGL: number;
11718
- AUTO: number;
11899
+ CANVAS: 0;
11900
+ WEBGL: 1;
11901
+ AUTO: 2;
11719
11902
  readonly parent: HTMLElement;
11720
11903
  scaleRatio: Vector2d;
11721
11904
  readonly renderer: CanvasRenderer | WebGLRenderer;
@@ -13326,4 +13509,4 @@ declare function defer(func: Function, thisArg: object, ...args: any[]): number;
13326
13509
  * @returns {Function} the function that will be throttled
13327
13510
  */
13328
13511
  declare function throttle(fn: Function, delay: number, no_trailing: any): Function;
13329
- export { Bounds$1 as Bounds, math as Math, device$1 as device, event$1 as event, pool$1 as pool, timer$1 as timer };
13512
+ export { Bounds$1 as Bounds, math as Math, Rect$1 as Rect, device$1 as device, event$1 as event, pool$1 as pool, timer$1 as timer };