rotate.js 637 B

1234567891011121314151617
  1. /* eslint-disable @typescript-eslint/no-unused-vars */
  2. import { mat3 } from '@antv/matrix-util';
  3. /**
  4. * Apply translate transformation for current vector.
  5. * @param params [tx, ty]
  6. * @param x x of the the bounding box of coordinate
  7. * @param y y of the the bounding box of coordinate
  8. * @param width width of the the bounding box of coordinate
  9. * @param height height of the the bounding box of coordinate
  10. * @returns transformer
  11. */
  12. export var rotate = function (params, x, y, width, height) {
  13. var theta = params[0];
  14. var matrix = mat3.create();
  15. return mat3.fromRotation(matrix, theta);
  16. };
  17. //# sourceMappingURL=rotate.js.map