Skip to content

Commit 330eac1

Browse files
committed
List is now internally using all of the new Utils.Array functions.
1 parent 3c5d3db commit 330eac1

23 files changed

Lines changed: 1088 additions & 326 deletions

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ being passed to the simulation. The default value is 1 to remain consistent with
2626
* List.addCallback is a new optional callback that is invoked every time a new child is added to the List. You can use this to have a callback fire when children are added to the Display List.
2727
* List.removeCallback is a new optional callback that is invoked every time a new child is removed from the List. You can use this to have a callback fire when children are removed from the Display List.
2828
* ScenePlugin.restart allows you to restart the current Scene. It's the same result as calling `ScenePlugin.start` without any arguments, but is more clear.
29+
* Utils.Array.Add allows you to add one or more items safely to an array, with optional limits and callbacks.
30+
* Utils.Array.AddAt allows you to add one or more items safely to an array at a specified position, with optional limits and callbacks.
31+
* Utils.Array.BringToTop allows you to bring an array element to the top of the array.
32+
* Utils.Array.CountAllMatching will scan an array and count all elements with properties matching the given value.
33+
* Utils.Array.Each will pass each element of an array to a given callback, with optional arguments.
34+
* Utils.Array.EachInRange will pass each element of an array in a given range to a callback, with optional arguments.
35+
* Utils.Array.GetAll will return all elements from an array, with optional property and value comparisons.
36+
* Utils.Array.GetFirst will return the first element in an array, with optional property and value comparisons.
37+
* Utils.Array.GetRandomElement has been renamed to GetRandom and will return a random element from an array.
38+
* Utils.Array.MoveDown will move the given array element down one position in the array.
39+
* Utils.Array.MoveTo will move the given array element to the given position in the array.
40+
* Utils.Array.MoveUp will move the given array element up one position in the array.
41+
* Utils.Array.Remove will remove the given element or array of elements from the array, with an optional callback.
42+
* Utils.Array.RemoveAt will remove the element from the given position in the array, with an optional callback.
43+
* Utils.Array.RemoveBetween will remove the elements between the given range in the array, with an optional callback.
44+
* Utils.Array.Replace will replace an existing element in an array with a new one.
45+
* Utils.Array.SendToBack allows you to send an array element to the bottom of the array.
46+
* Utils.Array.SetAll will set a property on all elements of an array to the given value, with optional range limits.
47+
* Utils.Array.Swap will swap the position of two elements in an array.
2948

3049
### Bug Fixes
3150

@@ -76,6 +95,11 @@ being passed to the simulation. The default value is 1 to remain consistent with
7695
* SceneManager._processing has been renamed to `isProcessing` which is now a boolean, not an integer. It's also now public and read-only.
7796
* SceneManager.isBooted is a new boolean read-only property that lets you know if the Scene Manager has performed its initial boot sequence.
7897
* TransformMatrix has the following new getter and setters: `a`, `b`, `c`, `d`, `tx` and `ty`. It also has the following new getters: `scaleX`, `scaleY` and `rotation`.
98+
* List.getByKey has been removed. Use `List.getFirst` instead which offers the exact same functionality.
99+
* List.sortIndexHandler has been removed because it's no longer required.
100+
* List.sort no longer takes an array as its argument, instead it only sorts the List contents by the defined property.
101+
* List.addMultiple has been removed. Used `List.add` instead which offers the exact same functionality.
102+
* List is now internally using all of the new Utils.Array functions.
79103

80104
### Animation System Updates
81105

0 commit comments

Comments
 (0)