ArrayUtils.rotate()

<static> rotate(array) → {any} This method is deprecated and should not be used. It may be removed in the future. Moves the element from the start of the array to the end, shifting all items in the process.The "rotation" happens to the left. Before: [ A, B, C, D, E, F ]After: [ B, C, D, E, F, A ] See also Phaser.ArrayUtils.rotateRight Parameters Name Type Description array Array.<any> The array to rotate. The array is modified. Returns any - The rotated value. Deprec

ArrayUtils.rotateLeft()

<static> rotateLeft(array) → {any} Moves the element from the start of the array to the end, shifting all items in the process.The "rotation" happens to the left. Before: [ A, B, C, D, E, F ]After: [ B, C, D, E, F, A ] See also Phaser.ArrayUtils.rotateRight Parameters Name Type Description array Array.<any> The array to rotate. The array is modified. Returns any - The rotated value. Source code: utils/ArrayUtils.js (Line 217)

ArrayUtils.getRandomItem()

<static> getRandomItem(objects, startIndex, length) → {object} Fetch a random entry from the given array. Will return null if there are no array items that fall within the specified rangeor if there is no item for the randomly chosen index. Parameters Name Type Description objects Array.<any> An array of objects. startIndex integer Optional offset off the front of the array. Default value is 0, or the beginning of the array. length integer Optional restriction on the numbe

ArrayUtils.findClosest()

<static> findClosest(value, arr) → {number} Snaps a value to the nearest value in an array.The result will always be in the range [first_value, last_value]. Parameters Name Type Description value number The search value arr Array.<number> The input array which must be sorted. Returns number - The nearest value found. Source code: utils/ArrayUtils.js (Line 172)

ArrayUtils.removeRandomItem()

<static> removeRandomItem(objects, startIndex, length) → {object} Removes a random object from the given array and returns it. Will return null if there are no array items that fall within the specified rangeor if there is no item for the randomly chosen index. Parameters Name Type Description objects Array.<any> An array of objects. startIndex integer Optional offset off the front of the array. Default value is 0, or the beginning of the array. length integer Optional res

ArrayUtils#numberArrayStep()

numberArrayStep(start, end, step) → {Array} Create an array of numbers (positive and/or negative) progressing from startup to but not including end by advancing by step. If start is less than end a zero-length range is created unless a negative step is specified. Certain values for start and end (eg. NaN/undefined/null) are currently coerced to 0;for forward compatibility make sure to pass in actual numbers. Parameters Name Type Argument Default Description start number The start of th

ArrayUtils#numberArray()

numberArray(start, end) → {Array.<number>} Create an array representing the inclusive range of numbers (usually integers) in [start, end].This is equivalent to numberArrayStep(start, end, 1). Parameters Name Type Description start number The minimum value the array starts with. end number The maximum value the array contains. Returns Array.<number> - The array of number values. Source code: utils/ArrayUtils.js (Line 262)

ArrayUtils#ArrayUtils

new ArrayUtils() Utility functions for dealing with Arrays. Source code: utils/ArrayUtils.js (Line 13)

ArraySet#setAll()

setAll(key, value) Sets the property key to the given value on all members of this list. Parameters Name Type Description key any The property of the item to set. value any The value to set the property to. Source code: utils/ArraySet.js (Line 138)

ArraySet#total

total : integer Number of items in the ArraySet. Same as list.length. Source code: utils/ArraySet.js (Line 217)