var MathSmoothStep = require('../math/SmoothStep'); var SmoothStep = function (items, property, min, max, inc){ if (inc === undefined) { inc = false ; } var step = Math.abs(max - min) / _AN_Read_length('length', items); var i; if (inc) { for (i = 0; i < _AN_Read_length('length', items); i++ ){ items[i][property] += MathSmoothStep(i * step, min, max); } } else { for (i = 0; i < _AN_Read_length('length', items); i++ ){ items[i][property] = MathSmoothStep(i * step, min, max); } } return items; } ; module.exports = SmoothStep;