webgl2-sdf 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/browser/index.min.js +1 -0
  2. package/node/bezier/bezier-curves-to-line-segs.js +31 -0
  3. package/node/bezier/bezier-curves-to-line-segs.js.map +1 -0
  4. package/node/bezier/eval-de-casteljau.js +61 -0
  5. package/node/bezier/eval-de-casteljau.js.map +1 -0
  6. package/node/bezier/from-to/from-to-2.js +134 -0
  7. package/node/bezier/from-to/from-to-2.js.map +1 -0
  8. package/node/bezier/from-to/from-to-3.js +159 -0
  9. package/node/bezier/from-to/from-to-3.js.map +1 -0
  10. package/node/bezier/from-to/from-to.js +21 -0
  11. package/node/bezier/from-to/from-to.js.map +1 -0
  12. package/node/bezier/is-cubic-obtuse.js +24 -0
  13. package/node/bezier/is-cubic-obtuse.js.map +1 -0
  14. package/node/bezier/is-quad-obtuse.js +20 -0
  15. package/node/bezier/is-quad-obtuse.js.map +1 -0
  16. package/node/bezier/is-really-point.js +19 -0
  17. package/node/bezier/is-really-point.js.map +1 -0
  18. package/node/bezier/split-by-deviation-from-straight-line-cubic.js +85 -0
  19. package/node/bezier/split-by-deviation-from-straight-line-cubic.js.map +1 -0
  20. package/node/bezier/split-by-deviation-from-straight-line-quad.js +50 -0
  21. package/node/bezier/split-by-deviation-from-straight-line-quad.js.map +1 -0
  22. package/node/bezier/split-into-line-segments.js +29 -0
  23. package/node/bezier/split-into-line-segments.js.map +1 -0
  24. package/node/generate-sdf.js +57 -0
  25. package/node/generate-sdf.js.map +1 -0
  26. package/node/index.js +2 -0
  27. package/node/index.js.map +1 -0
  28. package/node/main-program.js +100 -0
  29. package/node/main-program.js.map +1 -0
  30. package/node/max-aspect-ratio-before-stretch.js +3 -0
  31. package/node/max-aspect-ratio-before-stretch.js.map +1 -0
  32. package/node/prepare-buffers.js +114 -0
  33. package/node/prepare-buffers.js.map +1 -0
  34. package/node/row-count.js +4 -0
  35. package/node/row-count.js.map +1 -0
  36. package/node/shaders/main.fragment.js +149 -0
  37. package/node/shaders/main.fragment.js.map +1 -0
  38. package/node/shaders/main.vertex.js +53 -0
  39. package/node/shaders/main.vertex.js.map +1 -0
  40. package/node/svg/get-beziers-from-raw-paths.js +91 -0
  41. package/node/svg/get-beziers-from-raw-paths.js.map +1 -0
  42. package/node/svg/get-paths-from-str.js +14 -0
  43. package/node/svg/get-paths-from-str.js.map +1 -0
  44. package/node/svg/path-data-polyfill/parse-number.js +101 -0
  45. package/node/svg/path-data-polyfill/parse-number.js.map +1 -0
  46. package/node/svg/path-data-polyfill/parse-path-data-string.js +21 -0
  47. package/node/svg/path-data-polyfill/parse-path-data-string.js.map +1 -0
  48. package/node/svg/path-data-polyfill/source.js +147 -0
  49. package/node/svg/path-data-polyfill/source.js.map +1 -0
  50. package/node/svg/path-segment/c.js +29 -0
  51. package/node/svg/path-segment/c.js.map +1 -0
  52. package/node/svg/path-segment/h.js +23 -0
  53. package/node/svg/path-segment/h.js.map +1 -0
  54. package/node/svg/path-segment/l.js +24 -0
  55. package/node/svg/path-segment/l.js.map +1 -0
  56. package/node/svg/path-segment/q.js +23 -0
  57. package/node/svg/path-segment/q.js.map +1 -0
  58. package/node/svg/path-segment/s.js +34 -0
  59. package/node/svg/path-segment/s.js.map +1 -0
  60. package/node/svg/path-segment/t.js +28 -0
  61. package/node/svg/path-segment/t.js.map +1 -0
  62. package/node/svg/path-segment/v.js +23 -0
  63. package/node/svg/path-segment/v.js.map +1 -0
  64. package/node/svg/path-segment/z.js +21 -0
  65. package/node/svg/path-segment/z.js.map +1 -0
  66. package/node/svg/path-state.js +2 -0
  67. package/node/svg/path-state.js.map +1 -0
  68. package/node/tex-width.js +12 -0
  69. package/node/tex-width.js.map +1 -0
  70. package/node/types/attribute.js +2 -0
  71. package/node/types/attribute.js.map +1 -0
  72. package/node/types/cell.js +2 -0
  73. package/node/types/cell.js.map +1 -0
  74. package/node/types/gl-context.js +2 -0
  75. package/node/types/gl-context.js.map +1 -0
  76. package/node/types/gl-type.js +2 -0
  77. package/node/types/gl-type.js.map +1 -0
  78. package/node/types/gl-usage.js +2 -0
  79. package/node/types/gl-usage.js.map +1 -0
  80. package/node/types/program.d.ts +2 -2
  81. package/node/types/program.js +2 -0
  82. package/node/types/program.js.map +1 -0
  83. package/node/types/strip.js +2 -0
  84. package/node/types/strip.js.map +1 -0
  85. package/node/types/texture.js +2 -0
  86. package/node/types/texture.js.map +1 -0
  87. package/node/utils/calc-circs.js +97 -0
  88. package/node/utils/calc-circs.js.map +1 -0
  89. package/node/utils/clip-line-segment-to-grid.d.ts +1 -1
  90. package/node/utils/clip-line-segment-to-grid.js +98 -0
  91. package/node/utils/clip-line-segment-to-grid.js.map +1 -0
  92. package/node/utils/clip-line-segment-to-strips.d.ts +1 -1
  93. package/node/utils/clip-line-segment-to-strips.js +150 -0
  94. package/node/utils/clip-line-segment-to-strips.js.map +1 -0
  95. package/node/utils/create-empty-grid.d.ts +1 -1
  96. package/node/utils/create-empty-grid.js +24 -0
  97. package/node/utils/create-empty-grid.js.map +1 -0
  98. package/node/utils/create-empty-strips.d.ts +1 -1
  99. package/node/utils/create-empty-strips.js +16 -0
  100. package/node/utils/create-empty-strips.js.map +1 -0
  101. package/node/utils/distance-seg-to-p.js +35 -0
  102. package/node/utils/distance-seg-to-p.js.map +1 -0
  103. package/node/utils/find-close-cells.d.ts +1 -1
  104. package/node/utils/find-close-cells.js +130 -0
  105. package/node/utils/find-close-cells.js.map +1 -0
  106. package/node/utils/find-crossing-cells.d.ts +1 -1
  107. package/node/utils/find-crossing-cells.js +31 -0
  108. package/node/utils/find-crossing-cells.js.map +1 -0
  109. package/node/utils/get-distance-to-line-function.js +45 -0
  110. package/node/utils/get-distance-to-line-function.js.map +1 -0
  111. package/node/utils/jump-idx.js +81 -0
  112. package/node/utils/jump-idx.js.map +1 -0
  113. package/node/utils/map-to-viewbox.js +29 -0
  114. package/node/utils/map-to-viewbox.js.map +1 -0
  115. package/node/utils/seg-box-x.js +69 -0
  116. package/node/utils/seg-box-x.js.map +1 -0
  117. package/node/utils/seg-strip-x.js +58 -0
  118. package/node/utils/seg-strip-x.js.map +1 -0
  119. package/node/vector/dot.js +11 -0
  120. package/node/vector/dot.js.map +1 -0
  121. package/node/vector/from-to-vec.js +11 -0
  122. package/node/vector/from-to-vec.js.map +1 -0
  123. package/node/vector/len.js +9 -0
  124. package/node/vector/len.js.map +1 -0
  125. package/node/webgl-utils/compile-shader.js +8 -0
  126. package/node/webgl-utils/compile-shader.js.map +1 -0
  127. package/node/webgl-utils/get-gl-context.d.ts +1 -1
  128. package/node/webgl-utils/get-gl-context.js +43 -0
  129. package/node/webgl-utils/get-gl-context.js.map +1 -0
  130. package/node/webgl-utils/set-attribute.d.ts +3 -3
  131. package/node/webgl-utils/set-attribute.js +52 -0
  132. package/node/webgl-utils/set-attribute.js.map +1 -0
  133. package/node/webgl-utils/set-uniform-block.d.ts +1 -1
  134. package/node/webgl-utils/set-uniform-block.js +31 -0
  135. package/node/webgl-utils/set-uniform-block.js.map +1 -0
  136. package/node/webgl-utils/set-uniform.d.ts +2 -2
  137. package/node/webgl-utils/set-uniform.js +11 -0
  138. package/node/webgl-utils/set-uniform.js.map +1 -0
  139. package/node/webgl-utils/uniform-block.js +2 -0
  140. package/node/webgl-utils/uniform-block.js.map +1 -0
  141. package/node/webgl-utils/uniform-type.js +2 -0
  142. package/node/webgl-utils/uniform-type.js.map +1 -0
  143. package/node/webgl-utils/use-program.d.ts +2 -2
  144. package/node/webgl-utils/use-program.js +31 -0
  145. package/node/webgl-utils/use-program.js.map +1 -0
  146. package/node/webgl-utils/use-texture.js +25 -0
  147. package/node/webgl-utils/use-texture.js.map +1 -0
  148. package/package.json +4 -5
  149. package/src/bezier/is-cubic-obtuse.ts +2 -2
  150. package/src/bezier/is-quad-obtuse.ts +2 -2
  151. package/src/bezier/split-by-deviation-from-straight-line-quad.ts +3 -3
  152. package/src/bezier/split-into-line-segments.ts +3 -3
  153. package/src/debug-shaders.ts +2 -2
  154. package/src/shaders/main.fragment.ts +1 -1
  155. package/src/shaders/main.vertex.ts +1 -1
  156. package/src/types/program.ts +2 -2
  157. package/src/utils/calc-circs.ts +3 -3
  158. package/src/utils/clip-line-segment-to-grid.ts +2 -3
  159. package/src/utils/clip-line-segment-to-strips.ts +2 -2
  160. package/src/utils/create-empty-grid.ts +2 -2
  161. package/src/utils/create-empty-strips.ts +2 -2
  162. package/src/utils/find-close-cells.ts +5 -5
  163. package/src/utils/find-crossing-cells.ts +2 -2
  164. package/src/utils/jump-idx.ts +1 -1
  165. package/src/webgl-utils/get-gl-context.ts +3 -3
  166. package/src/webgl-utils/set-attribute.ts +3 -3
  167. package/src/webgl-utils/set-uniform-block.ts +1 -1
  168. package/src/webgl-utils/set-uniform.ts +2 -2
  169. package/src/webgl-utils/use-program.ts +5 -5
  170. package/node/helpers/calc-circs.d.ts +0 -11
  171. package/node/helpers/clip-line-segment-to-grid.d.ts +0 -14
  172. package/node/helpers/clip-line-segment-to-strips.d.ts +0 -13
  173. package/node/helpers/create-empty-grid.d.ts +0 -8
  174. package/node/helpers/create-empty-strips.d.ts +0 -7
  175. package/node/helpers/distance-seg-to-p.d.ts +0 -5
  176. package/node/helpers/find-close-cells.d.ts +0 -3
  177. package/node/helpers/find-crossing-cells.d.ts +0 -3
  178. package/node/helpers/get-distance-to-line-function.d.ts +0 -10
  179. package/node/helpers/jump-idx.d.ts +0 -2
  180. package/node/helpers/map-to-viewbox.d.ts +0 -2
  181. package/node/helpers/seg-box-x.d.ts +0 -10
  182. package/node/helpers/seg-strip-x.d.ts +0 -9
  183. package/src/utils/path.ts +0 -137
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @hidden
3
+ * H and h: (from www.w3.org)
4
+ *
5
+ * params: x
6
+ *
7
+ * Draws a horizontal line from the current point (cpx, cpy) to (x, cpy). H
8
+ * (uppercase) indicates that absolute coordinates will follow; h (lowercase)
9
+ * indicates that relative coordinates will follow. Multiple x values can be
10
+ * provided (although usually this doesn't make sense). At the end of the
11
+ * command, the new current point becomes (x, cpy) for the final value of x.
12
+ */
13
+ function h(s) {
14
+ const ps = [
15
+ s.p,
16
+ [s.vals[0], s.p[1]]
17
+ ];
18
+ s.prev2ndCubicControlPoint = undefined;
19
+ s.prev2ndQuadraticControlPoint = undefined;
20
+ return ps;
21
+ }
22
+ export { h };
23
+ //# sourceMappingURL=h.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h.js","sourceRoot":"","sources":["../../../src/svg/path-segment/h.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,SAAS,CAAC,CAAC,CAAY;IACnB,MAAM,EAAE,GAAG;QACP,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACvB,CAAC;IACF,CAAC,CAAC,wBAAwB,GAAG,SAAS,CAAC;IACvC,CAAC,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAE3C,OAAO,EAAE,CAAC;AACd,CAAC;AAGD,OAAO,EAAE,CAAC,EAAE,CAAA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @hidden
3
+ * L and l: (from www.w3.org)
4
+ *
5
+ * params: x y
6
+ *
7
+ * Draw a line from the current point to the given (x,y) coordinate which
8
+ * becomes the new current point. L (uppercase) indicates that absolute
9
+ * coordinates will follow; l (lowercase) indicates that relative coordinates
10
+ * will follow. A number of coordinates pairs may be specified to draw a
11
+ * polyline. At the end of the command, the new current point is set to the
12
+ * final set of coordinates provided.
13
+ */
14
+ function l(s) {
15
+ const ps = [
16
+ s.p,
17
+ s.vals
18
+ ];
19
+ s.prev2ndCubicControlPoint = undefined;
20
+ s.prev2ndQuadraticControlPoint = undefined;
21
+ return ps;
22
+ }
23
+ export { l };
24
+ //# sourceMappingURL=l.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"l.js","sourceRoot":"","sources":["../../../src/svg/path-segment/l.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,SAAS,CAAC,CAAC,CAAY;IACnB,MAAM,EAAE,GAAG;QACP,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,IAAK;KACV,CAAC;IAEF,CAAC,CAAC,wBAAwB,GAAG,SAAS,CAAC;IACvC,CAAC,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAE3C,OAAO,EAAE,CAAC;AACd,CAAC;AAGD,OAAO,EAAE,CAAC,EAAE,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @hidden
3
+ * Q and q: (from www.w3.org)
4
+ *
5
+ * params: x1 y1 x y
6
+ *
7
+ * Draws a quadratic Bézier curve from the current point to (x,y) using (x1,y1)
8
+ * as the control point. Q (uppercase) indicates that absolute coordinates will
9
+ * follow; q (lowercase) indicates that relative coordinates will follow.
10
+ * Multiple sets of coordinates may be specified to draw a polybézier. At the
11
+ * end of the command, the new current point becomes the final (x,y) coordinate
12
+ * pair used in the polybézier.
13
+ */
14
+ function q(s) {
15
+ const QP1 = [s.vals[0], s.vals[1]];
16
+ const QP2 = [s.vals[2], s.vals[3]];
17
+ s.prev2ndCubicControlPoint = undefined;
18
+ s.prev2ndQuadraticControlPoint = QP1;
19
+ const ps = [s.p, QP1, QP2];
20
+ return ps;
21
+ }
22
+ export { q };
23
+ //# sourceMappingURL=q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"q.js","sourceRoot":"","sources":["../../../src/svg/path-segment/q.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,SAAS,CAAC,CAAC,CAAY;IACnB,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAErC,CAAC,CAAC,wBAAwB,GAAG,SAAS,CAAC;IACvC,CAAC,CAAC,4BAA4B,GAAG,GAAG,CAAC;IAErC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAE3B,OAAO,EAAE,CAAC;AACd,CAAC;AAGD,OAAO,EAAE,CAAC,EAAE,CAAA"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @hidden
3
+ * S and s: (from www.w3.org)
4
+ *
5
+ * params: x2 y2 x y
6
+ *
7
+ * Draws a cubic Bézier curve from the current point to (x,y). The first control
8
+ * point is assumed to be the reflection of the second control point on the
9
+ * previous command relative to the current point. (If there is no previous
10
+ * command or if the previous command was not an C, c, S or s, assume the first
11
+ * control point is coincident with the current point.) (x2,y2) is the second
12
+ * control point (i.e., the control point at the end of the curve). S
13
+ * (uppercase) indicates that absolute coordinates will follow; s (lowercase)
14
+ * indicates that relative coordinates will follow. Multiple sets of coordinates
15
+ * may be specified to draw a polybézier. At the end of the command, the new
16
+ * current point becomes the final (x,y) coordinate pair used in the polybézier.
17
+ */
18
+ function s(s) {
19
+ const p = s.prev2ndCubicControlPoint
20
+ ? [(s.p[0] - s.prev2ndCubicControlPoint[0]) + s.p[0],
21
+ (s.p[1] - s.prev2ndCubicControlPoint[1]) + s.p[1]]
22
+ : s.p;
23
+ const ps = [
24
+ s.p,
25
+ p,
26
+ [s.vals[0], s.vals[1]],
27
+ [s.vals[2], s.vals[3]]
28
+ ];
29
+ s.prev2ndCubicControlPoint = ps[2];
30
+ s.prev2ndQuadraticControlPoint = undefined;
31
+ return ps;
32
+ }
33
+ export { s };
34
+ //# sourceMappingURL=s.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s.js","sourceRoot":"","sources":["../../../src/svg/path-segment/s.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,CAAC,CAAC,CAAY;IACnB,MAAM,CAAC,GAAG,CAAC,CAAC,wBAAwB;QAChC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEV,MAAM,EAAE,GAAG;QACP,CAAC,CAAC,CAAC;QACH,CAAC;QACD,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC;KAC3B,CAAC;IACF,CAAC,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAE3C,OAAO,EAAE,CAAC;AACd,CAAC;AAGD,OAAO,EAAE,CAAC,EAAE,CAAA"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @hidden
3
+ * T and t: (from www.w3.org)
4
+ *
5
+ * params: x y
6
+ *
7
+ * Draws a quadratic Bézier curve from the current point to (x,y). The control
8
+ * point is assumed to be the reflection of the control point on the previous
9
+ * command relative to the current point. (If there is no previous command or if
10
+ * the previous command was not a Q, q, T or t, assume the control point is
11
+ * coincident with the current point.) T (uppercase) indicates that absolute
12
+ * coordinates will follow; t (lowercase) indicates that relative coordinates
13
+ * will follow. At the end of the command, the new current point becomes the
14
+ * final (x,y) coordinate pair used in the polybézier.
15
+ */
16
+ function t(s) {
17
+ const p = s.prev2ndQuadraticControlPoint
18
+ ? [(s.p[0] - s.prev2ndQuadraticControlPoint[0]) + s.p[0],
19
+ (s.p[1] - s.prev2ndQuadraticControlPoint[1]) + s.p[1]]
20
+ : s.p;
21
+ const QP1 = p;
22
+ const QP2 = [s.vals[0], s.vals[1]];
23
+ s.prev2ndCubicControlPoint = undefined;
24
+ s.prev2ndQuadraticControlPoint = QP1;
25
+ return [s.p, QP1, QP2];
26
+ }
27
+ export { t };
28
+ //# sourceMappingURL=t.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"t.js","sourceRoot":"","sources":["../../../src/svg/path-segment/t.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,SAAS,CAAC,CAAC,CAAY;IACnB,MAAM,CAAC,GAAG,CAAC,CAAC,4BAA4B;QACpC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEV,MAAM,GAAG,GAAG,CAAC,CAAC;IACd,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAErC,CAAC,CAAC,wBAAwB,GAAG,SAAS,CAAC;IACvC,CAAC,CAAC,4BAA4B,GAAG,GAAG,CAAC;IAErC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC3B,CAAC;AAGD,OAAO,EAAE,CAAC,EAAE,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @hidden
3
+ * V and v: (from www.w3.org)
4
+ *
5
+ * params: y
6
+ *
7
+ * Draws a vertical line from the current point (cpx, cpy) to (cpx, y). V
8
+ * (uppercase) indicates that absolute coordinates will follow; v (lowercase)
9
+ * indicates that relative coordinates will follow. Multiple y values can be
10
+ * provided (although usually this doesn't make sense). At the end of the
11
+ * command, the new current point becomes (cpx, y) for the final value of y.
12
+ */
13
+ function v(s) {
14
+ const ps = [
15
+ s.p,
16
+ [s.p[0], s.vals[0]]
17
+ ];
18
+ s.prev2ndCubicControlPoint = undefined;
19
+ s.prev2ndQuadraticControlPoint = undefined;
20
+ return ps;
21
+ }
22
+ export { v };
23
+ //# sourceMappingURL=v.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v.js","sourceRoot":"","sources":["../../../src/svg/path-segment/v.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,SAAS,CAAC,CAAC,CAAY;IACnB,MAAM,EAAE,GAAG;QACP,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC;KACvB,CAAC;IACF,CAAC,CAAC,wBAAwB,GAAG,SAAS,CAAC;IACvC,CAAC,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAE3C,OAAO,EAAE,CAAC;AACd,CAAC;AAGD,OAAO,EAAE,CAAC,EAAE,CAAA"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @hidden
3
+ * Z and z: (from www.w3.org)
4
+ *
5
+ * params: (none)
6
+ *
7
+ * Close the current subpath by drawing a straight line from the current point
8
+ * to current subpath's initial point. Since the Z and z commands take no
9
+ * parameters, they have an identical effect.
10
+ */
11
+ function z(s) {
12
+ const ps = [
13
+ s.p,
14
+ s.initialPoint
15
+ ];
16
+ s.prev2ndCubicControlPoint = undefined;
17
+ s.prev2ndQuadraticControlPoint = undefined;
18
+ return ps;
19
+ }
20
+ export { z };
21
+ //# sourceMappingURL=z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"z.js","sourceRoot":"","sources":["../../../src/svg/path-segment/z.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,SAAS,CAAC,CAAC,CAAY;IACnB,MAAM,EAAE,GAAG;QACP,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,YAAa;KAClB,CAAC;IAEF,CAAC,CAAC,wBAAwB,GAAG,SAAS,CAAC;IACvC,CAAC,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAE3C,OAAO,EAAE,CAAC;AACd,CAAC;AAGD,OAAO,EAAE,CAAC,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=path-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-state.js","sourceRoot":"","sources":["../../src/svg/path-state.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Just a general texture width for our textures holding general data.
3
+ * * width cannot be too small otherwise width or height might exceed
4
+ * `gl.getParameter(gl.MAX_TEXTURE_SIZE)`
5
+ * * if width is too large we might need to pad too many zeros so `256` is a
6
+ * good balance since we are guaranteed at least 4096 for MAX_TEXTURE_SIZE
7
+ * so we can store 256 * 4096 = 1_048_576 values per texture, more than
8
+ * adequate for our purposes
9
+ */
10
+ const TEX_WIDTH = 256;
11
+ export { TEX_WIDTH };
12
+ //# sourceMappingURL=tex-width.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tex-width.js","sourceRoot":"","sources":["../src/tex-width.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,MAAM,SAAS,GAAG,GAAG,CAAC;AAGtB,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=attribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribute.js","sourceRoot":"","sources":["../../src/types/attribute.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell.js","sourceRoot":"","sources":["../../src/types/cell.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gl-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gl-context.js","sourceRoot":"","sources":["../../src/types/gl-context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gl-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gl-type.js","sourceRoot":"","sources":["../../src/types/gl-type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gl-usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gl-usage.js","sourceRoot":"","sources":["../../src/types/gl-usage.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
- import type { Attribute } from "./attribute";
2
- import type { UniformBlock } from "../webgl-utils/uniform-block";
1
+ import type { Attribute } from "./attribute.js";
2
+ import type { UniformBlock } from "../webgl-utils/uniform-block.js";
3
3
  interface Program {
4
4
  readonly gl: WebGL2RenderingContext;
5
5
  readonly program: WebGLProgram;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=program.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/types/program.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=strip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strip.js","sourceRoot":"","sources":["../../src/types/strip.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=texture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"texture.js","sourceRoot":"","sources":["../../src/types/texture.ts"],"names":[],"mappings":""}
@@ -0,0 +1,97 @@
1
+ import { MAX_ASPECT_RATIO_BEFORE_STRETCH } from '../max-aspect-ratio-before-stretch.js';
2
+ import { ROW_COUNT } from '../row-count.js';
3
+ import { len } from '../vector/len.js';
4
+ /**
5
+ * Represents the max distance (in cell side length units) from one corner of
6
+ * the viewbox to the opposing corner.
7
+ */
8
+ // const diagLen = ceil(sqrt((MAX_ASPECT_RATIO_BEFORE_STRETCH*ROW_COUNT)**2 + ROW_COUNT**2));
9
+ const circsCache = calcCircs();
10
+ function calcCircs() {
11
+ const ranges = [{ from: 0, u: 0, v: 0 }];
12
+ // for (let i=0; i<ROW_COUNT; i++) {
13
+ for (let i = 0; i < MAX_ASPECT_RATIO_BEFORE_STRETCH * ROW_COUNT; i++) {
14
+ ranges.push({ from: i + 0.5, u: i + 1, v: 0 });
15
+ ranges.push({ from: i + 0.5, u: -i - 1, v: 0 });
16
+ ranges.push({ from: i + 0.5, u: 0, v: i + 1 });
17
+ ranges.push({ from: i + 0.5, u: 0, v: -i - 1 });
18
+ for (let j = 0; j < ROW_COUNT; j++) {
19
+ const p = [0.5 + i, 0.5 + j];
20
+ const d = len(p);
21
+ const u = i + 1;
22
+ const v = j + 1;
23
+ ranges.push({ from: d, u, v });
24
+ if (u !== 0) {
25
+ ranges.push({ from: d, u: -u, v });
26
+ }
27
+ if (v !== 0) {
28
+ ranges.push({ from: d, u, v: -v });
29
+ }
30
+ if (u !== 0 && v !== 0) {
31
+ ranges.push({ from: d, u: -u, v: -v });
32
+ }
33
+ }
34
+ ranges.sort((a, b) => (a.from - b.from));
35
+ }
36
+ return ranges;
37
+ }
38
+ export { circsCache };
39
+ // Quokka tests
40
+ // const { E, trunc, max, sqrt, ceil } = Math;
41
+ // calcCircs().length;//?
42
+ // const cs = calcCircs().map(c => c.from);
43
+ // const longest = (() => {
44
+ // let l = 0;
45
+ // let maxL = 0;
46
+ // let _v = 0;
47
+ // for (let i=0; i<cs.length; i++) {
48
+ // const v = cs[i];
49
+ // if (_v === cs[i]) {
50
+ // l++;
51
+ // } else {
52
+ // l = 0;
53
+ // }
54
+ // _v = v;
55
+ // if (l > maxL) {
56
+ // maxL = l;
57
+ // }
58
+ // }
59
+ // return maxL;
60
+ // })();//?
61
+ // const froms = [
62
+ // { from: 0, to: 50, skip: 1 },
63
+ // { from: 50, to: 3050, skip: 50 },
64
+ // { from: 400, to: 4000, skip: 100 },
65
+ // // { from: 10, to: 100, skip: 10 }
66
+ // ];
67
+ // for (let j=0; j<froms.length; j++) {
68
+ // const { from, to, skip } = froms[j];
69
+ // let strs: string[] = [];
70
+ // for (let i=from; i<to; i += skip) {
71
+ // const v = cs[i];
72
+ // strs.push(`${v.toString()} ${i}`);
73
+ // }
74
+ // const csStr = strs.join('\n');
75
+ // console.log(csStr);
76
+ // }
77
+ // jumpIdx(3.7);//?
78
+ // for (let i=30; i<44; i += 0.25) {
79
+ // jumpIdx(i);//?
80
+ // [(cs[jumpIdx(i)]), i];//?
81
+ // }
82
+ // let tot = 0;
83
+ // const vs: number[] = [];
84
+ // for (let i=400; i<=3800; i++) {
85
+ // const c = cs[i];
86
+ // const ap = A*(E**(B*c)) + C*(E**(-D*c)) + F;
87
+ // const S = B*A*(E**(B*c)) + -D*C*(E**(-D*c));
88
+ // // i;//?
89
+ // // ap;//?
90
+ // const err = abs(i - ap);
91
+ // tot += err;
92
+ // vs.push(err);
93
+ // }
94
+ // vs.sort((a,b) => b - a);//?
95
+ // vs[3400];//?
96
+ // tot/(3800 - 400);//?
97
+ //# sourceMappingURL=calc-circs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calc-circs.js","sourceRoot":"","sources":["../../src/utils/calc-circs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAGvC;;;GAGG;AACH,6FAA6F;AAG7F,MAAM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C,yCAAyC;AACzC,KAAK;AAEL,uCAAuC;AACvC,2CAA2C;AAC3C,+BAA+B;AAC/B,0CAA0C;AAC1C,2BAA2B;AAC3B,6CAA6C;AAC7C,QAAQ;AACR,qCAAqC;AAErC,0BAA0B;AAC1B,IAAI;AAEJ,mBAAmB;AACnB,oCAAoC;AACpC,qBAAqB;AACrB,gCAAgC;AAChC,IAAI;AAGJ,eAAe;AACf,2BAA2B;AAC3B,kCAAkC;AAClC,oBAAoB;AACpB,gDAAgD;AAChD,gDAAgD;AAChD,YAAY;AACZ,aAAa;AACb,4BAA4B;AAC5B,eAAe;AACf,iBAAiB;AACjB,IAAI;AACJ,8BAA8B;AAC9B,eAAe;AACf,uBAAuB"}
@@ -1,4 +1,4 @@
1
- import type { Cell } from "../types/cell";
1
+ import type { Cell } from "../types/cell.js";
2
2
  /**
3
3
  * Clips a line segment to grid boundaries and returns multiple segments.
4
4
  *
@@ -0,0 +1,98 @@
1
+ import { segBoxX } from "./seg-box-x.js";
2
+ const { floor, ceil } = Math;
3
+ /**
4
+ * Clips a line segment to grid boundaries and returns multiple segments.
5
+ *
6
+ * * modifies grid by adding line segments to cells
7
+ * * size/count *must* be a power of 2
8
+ *
9
+ * @param count the number of grid cells per dimension
10
+ * @param width
11
+ * @param height
12
+ * @param seg the line segment (array of 2 points)
13
+ */
14
+ function clipLineSegmentToGrid(grid, width, height, colCount, cellSize, seg, padCount) {
15
+ /** `cellSize` *must* be a power of two */
16
+ // const cellSize = width/ROW_COUNT;
17
+ const padding = cellSize * padCount;
18
+ const [[x0, y0], [x1, y1]] = seg;
19
+ const paddedWidth = width + padding;
20
+ const paddedHeight = height + padding;
21
+ // TODO - investigate lines on edge and corners - ps could be length 4!!
22
+ const ps = segBoxX(seg, [[-padding, -padding], [paddedWidth, paddedHeight]]);
23
+ const p0IsInBox = x0 > -padding && x0 < paddedWidth && y0 > -padding && y0 < paddedHeight;
24
+ const p1IsInBox = x1 > -padding && x1 < paddedWidth && y1 > -padding && y1 < paddedHeight;
25
+ // if line is completely outside box
26
+ if (ps.length < 2 && !p0IsInBox && !p1IsInBox) {
27
+ return;
28
+ }
29
+ // Determine which grid cells the line passes through
30
+ const dX = x1 - x0;
31
+ const dY = y1 - y0;
32
+ // Use Bresenham-like approach to find all grid cells the line crosses
33
+ const stepX = x1 > x0 ? cellSize : -cellSize;
34
+ const stepY = y1 > y0 ? cellSize : -cellSize;
35
+ /** first point of each line segment to connect */
36
+ /** current x position */
37
+ let x = x0;
38
+ /** current y position */
39
+ let y = y0;
40
+ // current intersection index
41
+ let xIdx = 0;
42
+ // left-to-right
43
+ const ltr = stepX > 0;
44
+ // bottom-to-top
45
+ const btt = stepY > 0;
46
+ // // line segment min-y excluded
47
+ // const crossing =
48
+ // (seg.y > y != seg.w > y) &&
49
+ // (x > (seg.z - seg.x)*(y - seg.y) / (seg.w - seg.y) + seg.x);
50
+ const fX = ltr ? floor : ceil;
51
+ const fY = btt ? floor : ceil;
52
+ while (true) {
53
+ // Find next grid boundary
54
+ let nextGridX = cellSize * fX((x + stepX) / cellSize);
55
+ let nextGridY = cellSize * fY((y + stepY) / cellSize);
56
+ // Calculate parameter t for intersection with vertical and horizontal grid lines
57
+ // eq. (1)
58
+ const tX = (nextGridX - x0) / dX;
59
+ // eq. (2)
60
+ const tY = (nextGridY - y0) / dY;
61
+ const useTx = (tX < tY && dX !== 0) || dY === 0;
62
+ /** intersection X */
63
+ const xX = useTx ? nextGridX : x0 + tY * dX;
64
+ /** intersection Y */
65
+ const xY = useTx ? y0 + tX * dY : nextGridY;
66
+ // if we're past the line endpoint
67
+ if ((tX > 1 || dX === 0) && (tY > 1 || dY === 0)) {
68
+ const u = floor(x1 / cellSize) + padCount;
69
+ const v = floor(y1 / cellSize) + padCount;
70
+ grid[u]?.[v]?.lineSegs.push([[x, y], [x1, y1]]);
71
+ break;
72
+ }
73
+ // if next grid intersection is on edge of grid
74
+ if ((xX <= -padding || xY <= -padding) || (xX >= paddedWidth || xY >= paddedHeight)) {
75
+ const entering = !p0IsInBox && xIdx === 0;
76
+ if (entering) {
77
+ [x, y] = ps[0]; // update current x,y position
78
+ xIdx++;
79
+ continue;
80
+ }
81
+ else {
82
+ const u = fX(x / cellSize) - (ltr ? 0 : 1) + padCount; // current u
83
+ const v = fY(y / cellSize) - (btt ? 0 : 1) + padCount; // current v
84
+ const seg_ = [[x, y], ps[xIdx]];
85
+ grid[u]?.[v]?.lineSegs.push(seg_);
86
+ break;
87
+ }
88
+ }
89
+ const u = fX(x / cellSize) - (ltr ? 0 : 1) + padCount; // current u
90
+ const v = fY(y / cellSize) - (btt ? 0 : 1) + padCount; // current v
91
+ grid[u]?.[v]?.lineSegs.push([[x, y], [xX, xY]]);
92
+ // update current position
93
+ x = xX;
94
+ y = xY;
95
+ }
96
+ }
97
+ export { clipLineSegmentToGrid };
98
+ //# sourceMappingURL=clip-line-segment-to-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clip-line-segment-to-grid.js","sourceRoot":"","sources":["../../src/utils/clip-line-segment-to-grid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;AAG7B;;;;;;;;;;GAUG;AACH,SAAS,qBAAqB,CACtB,IAAc,EACd,KAAa,EACb,MAAc,EACd,QAAgB,EAChB,QAAgB,EAChB,GAAe,EACf,QAAgB;IAEpB,0CAA0C;IAC1C,oCAAoC;IAEpC,MAAM,OAAO,GAAG,QAAQ,GAAC,QAAQ,CAAC;IAElC,MAAM,CAAC,CAAC,EAAE,EAAC,EAAE,CAAC,EAAC,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;IAE9B,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,CAAC;IACpC,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;IACtC,wEAAwE;IACxE,MAAM,EAAE,GAAG,OAAO,CA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AE,CAAC,CAAC,GAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAE,YAAY;QAClE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,GAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAE,YAAY;QAElE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAE9C,0BAA0B;QAC1B,CAAC,GAAG,EAAE,CAAC;QACP,CAAC,GAAG,EAAE,CAAC;IACX,CAAC;AACL,CAAC;AAGD,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { Strip } from "../types/strip";
1
+ import type { Strip } from "../types/strip.js";
2
2
  /**
3
3
  * Clips a line segment to strip boundaries and returns multiple segments.
4
4
  *