MCPcopy Index your code
hub / github.com/phaserjs/phaser / PropertyValueSet

Function PropertyValueSet

src/actions/PropertyValueSet.js:29–59  ·  view source on GitHub ↗
(items, key, value, step, index, direction)

Source from the content-addressed store, hash-verified

27 * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
28 */
29var PropertyValueSet = function (items, key, value, step, index, direction)
30{
31 if (step === undefined) { step = 0; }
32 if (index === undefined) { index = 0; }
33 if (direction === undefined) { direction = 1; }
34
35 var i;
36 var t = 0;
37 var end = items.length;
38
39 if (direction === 1)
40 {
41 // Start to End
42 for (i = index; i < end; i++)
43 {
44 items[i][key] = value + (t * step);
45 t++;
46 }
47 }
48 else
49 {
50 // End to Start
51 for (i = index; i >= 0; i--)
52 {
53 items[i][key] = value + (t * step);
54 t++;
55 }
56 }
57
58 return items;
59};
60
61module.exports = PropertyValueSet;

Callers 15

SetAlphaFunction · 0.85
SetScaleFunction · 0.85
SetVisibleFunction · 0.85
SetScrollFactorFunction · 0.85
SetOriginFunction · 0.85
SetScaleXFunction · 0.85
SetBlendModeFunction · 0.85
SetRotationFunction · 0.85
SetXYFunction · 0.85
SetScaleYFunction · 0.85
SetDepthFunction · 0.85
SetYFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…