pyramidDown.js 587 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var config_1 = require("./config");
  4. function pyramidDown(minFaceSize, scaleFactor, dims) {
  5. var height = dims[0], width = dims[1];
  6. var m = config_1.CELL_SIZE / minFaceSize;
  7. var scales = [];
  8. var minLayer = Math.min(height, width) * m;
  9. var exp = 0;
  10. while (minLayer >= 12) {
  11. scales.push(m * Math.pow(scaleFactor, exp));
  12. minLayer = minLayer * scaleFactor;
  13. exp += 1;
  14. }
  15. return scales;
  16. }
  17. exports.pyramidDown = pyramidDown;
  18. //# sourceMappingURL=pyramidDown.js.map