You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. import { Data, ShapeType } from "types"
  2. import shapeUtils from "lib/shape-utils"
  3. export const defaultDocument: Data["document"] = {
  4. pages: {
  5. page0: {
  6. id: "page0",
  7. type: "page",
  8. name: "Page 0",
  9. childIndex: 0,
  10. shapes: {
  11. rayShape: shapeUtils[ShapeType.Ray].create({
  12. id: "rayShape",
  13. name: "Ray",
  14. childIndex: 3,
  15. point: [300, 300],
  16. direction: [0.5, 0.5],
  17. }),
  18. // shape3: shapeUtils[ShapeType.Dot].create({
  19. // id: "shape3",
  20. // name: "Shape 3",
  21. // childIndex: 3,
  22. // point: [400, 500],
  23. // style: {
  24. // fill: "#AAA",
  25. // stroke: "#c6cacb",
  26. // strokeWidth: 1,
  27. // },
  28. // }),
  29. shape0: shapeUtils[ShapeType.Circle].create({
  30. id: "shape0",
  31. name: "Shape 0",
  32. childIndex: 1,
  33. point: [100, 600],
  34. radius: 50,
  35. }),
  36. shape5: shapeUtils[ShapeType.Ellipse].create({
  37. id: "shape5",
  38. name: "Shape 5",
  39. childIndex: 5,
  40. point: [400, 600],
  41. radiusX: 50,
  42. radiusY: 30,
  43. }),
  44. // shape7: shapeUtils[ShapeType.Ellipse].create({
  45. // id: "shape7",
  46. // name: "Shape 7",
  47. // childIndex: 7,
  48. // point: [100, 100],
  49. // radiusX: 50,
  50. // radiusY: 30,
  51. // style: {
  52. // fill: "#AAA",
  53. // stroke: "#c6cacb",
  54. // strokeWidth: 1,
  55. // },
  56. // }),
  57. // shape2: shapeUtils[ShapeType.Polyline].create({
  58. // id: "shape2",
  59. // name: "Shape 2",
  60. // childIndex: 2,
  61. // point: [200, 600],
  62. // points: [
  63. // [0, 0],
  64. // [75, 200],
  65. // [100, 50],
  66. // ],
  67. // style: {
  68. // fill: "none",
  69. // stroke: "#c6cacb",
  70. // strokeWidth: 2,
  71. // strokeLinecap: "round",
  72. // strokeLinejoin: "round",
  73. // },
  74. // }),
  75. // shape1: shapeUtils[ShapeType.Rectangle].create({
  76. // id: "shape1",
  77. // name: "Shape 1",
  78. // childIndex: 1,
  79. // point: [400, 600],
  80. // size: [200, 200],
  81. // style: {
  82. // fill: "#AAA",
  83. // stroke: "#c6cacb",
  84. // strokeWidth: 1,
  85. // },
  86. // }),
  87. // shape6: shapeUtils[ShapeType.Line].create({
  88. // id: "shape6",
  89. // name: "Shape 6",
  90. // childIndex: 1,
  91. // point: [400, 400],
  92. // direction: [0.2, 0.2],
  93. // style: {
  94. // fill: "#AAA",
  95. // stroke: "#c6cacb",
  96. // strokeWidth: 1,
  97. // },
  98. // }),
  99. },
  100. },
  101. },
  102. code: {
  103. file0: {
  104. id: "file0",
  105. name: "index.ts",
  106. code: `
  107. new Dot({
  108. point: new Vector(0, 0),
  109. })
  110. new Circle({
  111. point: new Vector(200, 0),
  112. radius: 50,
  113. })
  114. new Ellipse({
  115. point: new Vector(400, 0),
  116. radiusX: 50,
  117. radiusY: 75
  118. })
  119. new Rectangle({
  120. point: new Vector(0, 300),
  121. })
  122. new Line({
  123. point: new Vector(200, 300),
  124. direction: new Vector(1,0.2)
  125. })
  126. new Polyline({
  127. point: new Vector(400, 300),
  128. points: [new Vector(0, 200), new Vector(0,0), new Vector(200, 200), new Vector(200, 0)],
  129. })
  130. `,
  131. },
  132. },
  133. }
  134. export const colors = {
  135. transparent: "transparent",
  136. white: "rgba(248, 249, 250, 1.000)",
  137. lightGray: "rgba(224, 226, 230, 1.000)",
  138. gray: "rgba(172, 181, 189, 1.000)",
  139. darkGray: "rgba(52, 58, 64, 1.000)",
  140. black: "rgba(0,0,0, 1.000)",
  141. lime: "rgba(115, 184, 23, 1.000)",
  142. green: "rgba(54, 178, 77, 1.000)",
  143. teal: "rgba(9, 167, 120, 1.000)",
  144. cyan: "rgba(14, 152, 173, 1.000)",
  145. blue: "rgba(28, 126, 214, 1.000)",
  146. indigo: "rgba(66, 99, 235, 1.000)",
  147. violet: "rgba(112, 72, 232, 1.000)",
  148. grape: "rgba(174, 62, 200, 1.000)",
  149. pink: "rgba(214, 51, 108, 1.000)",
  150. red: "rgba(240, 63, 63, 1.000)",
  151. orange: "rgba(247, 103, 6, 1.000)",
  152. yellow: "rgba(245, 159, 0, 1.000)",
  153. }