We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59c8e35 commit 76b6fc0Copy full SHA for 76b6fc0
7 files changed
v3/src/actions/Call.js
@@ -0,0 +1,13 @@
1
+var Call = function (items, callback, thisArg)
2
+{
3
+ for (var i = 0; i < items.length; i++)
4
+ {
5
+ var item = items[i];
6
+
7
+ callback.call(thisArg, item);
8
+ }
9
10
+ return items;
11
+};
12
13
+module.exports = Call;
v3/src/actions/SmoothStep.js
@@ -1,14 +1,25 @@
var MathSmoothStep = require('../math/SmoothStep');
-var SmoothStep = function (items, property, min, max)
+var SmoothStep = function (items, property, min, max, inc)
{
+ if (inc === undefined) { inc = false; }
var step = Math.abs(max - min) / items.length;
+ var i;
- for (var i = 0; i < items.length; i++)
+ if (inc)
- var item = items[i];
-
- item[property] = MathSmoothStep(i * step, min, max);
+ for (i = 0; i < items.length; i++)
14
+ items[i][property] += MathSmoothStep(i * step, min, max);
15
16
17
+ else
18
19
20
21
+ items[i][property] = MathSmoothStep(i * step, min, max);
22
23
}
24
25
return items;
v3/src/actions/SmootherStep.js
var MathSmootherStep = require('../math/SmootherStep');
-var SmootherStep = function (items, property, min, max)
+var SmootherStep = function (items, property, min, max, inc)
- item[property] = MathSmootherStep(i * step, min, max);
+ items[i][property] += MathSmootherStep(i * step, min, max);
+ items[i][property] = MathSmootherStep(i * step, min, max);
v3/src/actions/Spread.js
@@ -1,12 +1,23 @@
-var Spread = function (items, property, min, max)
+var Spread = function (items, property, min, max, inc)
- item[property] = i * step;
+ items[i][property] += i * step;
+ items[i][property] = i * step;
v3/src/actions/index.js
@@ -3,6 +3,7 @@
module.exports = {
Angle: require('./Angle'),
+ Call: require('./Call'),
GridAlign: require('./GridAlign'),
IncAlpha: require('./IncAlpha'),
IncX: require('./IncX'),
v3/src/checksum.js
@@ -1,4 +1,4 @@
var CHECKSUM = {
-build: '01670a50-13c3-11e7-afb8-27083fa0efa0'
+build: '922ef1b0-13c3-11e7-83ea-a7683f5b2ec0'
};
module.exports = CHECKSUM;
v3/src/gameobjects/layer/Layer.js
@@ -357,23 +357,23 @@ var Layer = new Class({
357
return this;
358
},
359
360
- smootherStep: function (property, min, max)
+ smootherStep: function (property, min, max, inc)
361
362
- Actions.SmootherStep(this.children.entries, property, min, max);
+ Actions.SmootherStep(this.children.entries, property, min, max, inc);
363
364
365
366
367
- smoothStep: function (property, min, max)
+ smoothStep: function (property, min, max, inc)
368
369
- Actions.SmoothStep(this.children.entries, property, min, max);
+ Actions.SmoothStep(this.children.entries, property, min, max, inc);
370
371
372
373
374
- spread: function (property, min, max)
+ spread: function (property, min, max, inc)
375
376
- Actions.Spread(this.children.entries, property, min, max);
+ Actions.Spread(this.children.entries, property, min, max, inc);
377
378
379
0 commit comments