data.ts 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. const RADIUS = 6;
  2. const generateCirclesData = (
  3. width: number,
  4. height: number
  5. ): Array<CircleType> => [
  6. {
  7. direction: 'top-left',
  8. cx: RADIUS,
  9. cy: RADIUS,
  10. r: RADIUS,
  11. },
  12. {
  13. direction: 'left',
  14. cx: RADIUS,
  15. cy: height / 2 + 12,
  16. r: RADIUS,
  17. },
  18. {
  19. direction: 'bottom-left',
  20. cx: RADIUS,
  21. cy: height + 18,
  22. r: RADIUS,
  23. },
  24. {
  25. direction: 'bottom',
  26. cx: width / 2 + 12,
  27. cy: height + 18,
  28. r: RADIUS,
  29. },
  30. {
  31. direction: 'bottom-right',
  32. cx: width + 18,
  33. cy: height + 18,
  34. r: RADIUS,
  35. },
  36. {
  37. direction: 'right',
  38. cx: width + 18,
  39. cy: height / 2 + 12,
  40. r: RADIUS,
  41. },
  42. {
  43. direction: 'top-right',
  44. cx: width + 18,
  45. cy: RADIUS,
  46. r: RADIUS,
  47. },
  48. {
  49. direction: 'top',
  50. cx: width / 2 + 12,
  51. cy: RADIUS,
  52. r: RADIUS,
  53. },
  54. ];
  55. export default generateCirclesData;