function leap(a, b, x) {
          var f = (1.0 - cos(x * 3.1415927)) * 0.5;
          return a * (1.0 - f) + b * f;
        }
Update light strength.
if this method will be invoked with an argument, it calculates only `cubes`.
@param {Array.<CSS3D.Cube>} cubes.