Commit graph

335 commits

Author SHA1 Message Date
Richard Davey
1a2a255904 Matrix Translation fixes
* `Array.Matrix.RotateLeft` was missing the `total` parameter, which controls how many times to rotate the matrix.
* `Array.Matrix.RotateRight` was missing the `total` parameter, which controls how many times to rotate the matrix.
* `Array.Matrix.TranslateMatrix` didn't work with any translation values above 1 due to missing parameters in `RotateLeft` and `RotateRight`
2023-06-29 21:14:21 +01:00
Richard Davey
468bf7821d Updated copyright year 2023-01-02 17:36:27 +00:00
Richard Davey
70cf842b8c Added NULL OP 2022-11-24 00:42:04 +00:00
Richard Davey
0fe75e9969 Use new features.stableSort 2022-10-04 17:08:18 +01:00
Richard Davey
a563b49877 Put missing return back in 2022-10-03 20:23:24 +01:00
Richard Davey
bf8ec50fe1 Remove use of 'len' for iOS test 2022-10-03 14:42:33 +01:00
Richard Davey
ff4d7084d9 Update IsPlainObject.js 2022-09-26 17:15:45 +01:00
Richard Davey
71703ff19c GameConfig.stableSort is a new optional property that will control if the internal depth sorting routine uses our own StableSort function, or the built-in browser Array.sort one. Only modern browsers have a _stable_ Array.sort implementation, which Phaser requires. Older ones need to use our function instead. Set to 1 to use the legacy version, 0 to use the ES2019 version or -1 to have Phaser try and detect which is best for the browser
Ref #6217
2022-09-21 17:52:57 +01:00
Richard Davey
1f6554f98e Utils.Array.Flatten is a new function that will return a flattened version of an array, regardless of how deeply-nested it is. 2022-07-26 18:34:04 +01:00
Richard Davey
e100fd76fa Fixed issue in Utils.Objects.GetValue where it would return an incorrect result if a source and altSource were provided that didn't match in structure. Fix #5952 2022-05-06 16:27:00 +01:00
Richard Davey
59fbcc5ca3 Updated copyright year 2022-02-28 14:29:51 +00:00
ksritharan
11c8216cb6
Fix to SafeRange to allow more valid ranges
The expression startIndex + endIndex > len is not needed.
The fix will allow the following ranges to be valid:
- n to Array.length, n = {1, 2, ..., Array.length-1}
- n to m, n = {1, 2, ..., Array.length - 1}, m = {n+1, ..., Array.length}
2022-01-24 13:17:24 -05:00
Richard Davey
dcbfd7677e The GetValue function has a new optional parameter altSource which allows you to provide an alternative object to source the value from. 2021-12-21 17:16:22 +00:00
Richard Davey
ede72366ca
Merge pull request #5624 from andriibarvynko/fix_check_matrix_for_one_row_matrix_support
Allow to have one row matrix in CheckMatrix
2021-09-22 11:32:56 +01:00
Rex
62ea171971 Add MoveAbove, MoveBelow methods of List structure
MoveAbove: Moves the given array element above another one in the array.
MoveBelow: Moves the given array element below another one in the array.
2021-04-26 15:17:42 +08:00
Andrii Barvynko
c7fd4c4e0a Allow to have one row matrix in CheckMatrix 2021-03-26 12:03:39 +02:00
Richard Davey
652a5e62ae Ignore private functions 2020-11-30 14:23:50 +00:00
Richard Davey
02c34cd64e Replace integer with number 2020-11-23 10:22:13 +00:00
Richard Davey
4181e90db1 Utils.Array.Remove would return an incorrect array of removed elements if one of the items to be removed was skipped in the array. Fix #5398 2020-11-20 11:58:14 +00:00
Richard Davey
8092460ce7 Docs update 2020-10-27 18:05:47 +00:00
Richard Davey
962c900e5a * Utils.Object.DeepCopy is a new function that will recursively deep copy an array of object. 2020-10-27 18:05:41 +00:00
Richard Davey
08b4597b72 Improved JSDocs 2020-09-15 10:37:19 +01:00
Richard Davey
99c12540f7 Utils.Array.Matrix.Translate is a new function that will translate an Array Matrix by horizontally and vertically by the given amounts. 2020-09-15 10:35:53 +01:00
Richard Davey
b8d35d7cf0 Utils.Array.NumerArray can now accept the start and end parameters in reverse order, i.e. 10, 1 will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns. 2020-09-08 13:02:16 +01:00
Richard Davey
28c6635ea3 Utils.Array.SortByDigits is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. 2020-09-03 15:01:55 +01:00
Richard Davey
27fd496e8f Updated to stablesort 0.1.8 and recoded to fit our style. Removed inplace static function. 2020-09-02 12:21:36 +01:00
Richard Davey
07865a5823 Final set of namespace changes. Fix #5062 2020-09-01 20:28:42 +01:00
Richard Davey
4ac240f280 Added String.RemoveAt 2020-08-02 23:52:45 +01:00
J.C
d8dc7fb4d7 TS def improvements 2020-03-02 20:14:25 +08:00
Richard Davey
ff65e69cd1 Changed copyright date to 2020 2020-01-15 12:07:09 +00:00
Valentin Vetter
f3350ce5a8 TypeScript: improve pick/shuffle types 2019-12-01 22:36:47 +01:00
Richard Davey
a5d494f9d2 JSDoc fix. Fix #4871 2019-11-20 13:02:56 +00:00
Richard Davey
5f13fe8c7c Updated docs 2019-07-08 13:03:25 +01:00
Richard Davey
0f592ba91a Moved the Pick function to the object utils 2019-06-12 12:35:03 +01:00
Richard Davey
b1e3ee4eec Added base64 to ArrayBuffer and ArrayBuffer to base64 2019-06-11 14:14:31 +01:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
a6341a97a8 Fixed Types references 2019-05-09 15:32:53 +01:00
Valentin Vetter
f33a9d730f TypeScript: Fix matrix types 2019-05-08 19:17:52 +02:00
Richard Davey
4c95d69711 Added new SetValue function for property setting to any depth 2019-05-01 12:28:21 +01:00
Richard Davey
6ba3f49b08
Merge pull request #4442 from LoolzRules/master
issue #4411 fix
2019-04-05 18:28:39 +01:00
LoolzRules
842ed1a995 issue #4411 fix 2019-03-25 03:31:16 +06:00
Richard Davey
dfb1e48f6f
Merge pull request #4380 from englercj/master
Correct jsdoc for Class utilities
2019-02-24 23:07:10 +00:00
Richard Davey
84c24862cf GetAdvancedValue now uses the correct Math RND reference, which means anything that used the randInt or randFloat features of this function, such as creating a Sprite from a Config object, or Bitmap Text sizing, will no longer throw an error about a null object reference. Fix #4369 2019-02-24 22:56:29 +00:00
Chad Engler
5fbef0b1cb Correct jsdoc for Class utilities 2019-02-18 16:47:44 -08:00
Richard Davey
c85497b6c5 Fixing jsdocs 2019-02-12 11:59:31 +00:00
Richard Davey
348306cafb Lots more jsdoc fixes and new documentation 2019-01-31 14:47:50 +00:00
Richard Davey
b7f99496dc Updated function name 2019-01-31 11:27:26 +00:00
Richard Davey
404c94ac27 Fixed namespace name 2019-01-31 11:27:15 +00:00
Kyra
f83f63f318
fix: GetValue not checking for the existence of '.' correctly
indexOf returns -1 when the passed string is not found, which is truthy.
2019-01-26 16:52:25 +01:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00