rotate.js 793 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.rotate = void 0;
  4. /* eslint-disable @typescript-eslint/no-unused-vars */
  5. var matrix_util_1 = require("@antv/matrix-util");
  6. /**
  7. * Apply translate transformation for current vector.
  8. * @param params [tx, ty]
  9. * @param x x of the the bounding box of coordinate
  10. * @param y y of the the bounding box of coordinate
  11. * @param width width of the the bounding box of coordinate
  12. * @param height height of the the bounding box of coordinate
  13. * @returns transformer
  14. */
  15. var rotate = function (params, x, y, width, height) {
  16. var theta = params[0];
  17. var matrix = matrix_util_1.mat3.create();
  18. return matrix_util_1.mat3.fromRotation(matrix, theta);
  19. };
  20. exports.rotate = rotate;
  21. //# sourceMappingURL=rotate.js.map