mirror of
https://github.com/photonstorm/phaser
synced 2024-12-19 17:44:45 +00:00
18 lines
369 B
JavaScript
18 lines
369 B
JavaScript
|
var MathSmootherStep = require('../math/SmootherStep');
|
||
|
|
||
|
var SmootherStep = function (items, property, min, max)
|
||
|
{
|
||
|
var step = Math.abs(max - min) / items.length;
|
||
|
|
||
|
for (var i = 0; i < items.length; i++)
|
||
|
{
|
||
|
var item = items[i];
|
||
|
|
||
|
item[property] = MathSmootherStep(i * step, min, max);
|
||
|
}
|
||
|
|
||
|
return items;
|
||
|
};
|
||
|
|
||
|
module.exports = SmootherStep;
|