paper 0.12.18 → 0.12.19

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 (228) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/docs/assets/js/paper.js +91 -53
  3. package/dist/docs/classes/Color.html +2 -2
  4. package/dist/docs/classes/CompoundPath.html +2 -2
  5. package/dist/docs/classes/Curve.html +2 -2
  6. package/dist/docs/classes/CurveLocation.html +2 -2
  7. package/dist/docs/classes/Event.html +2 -2
  8. package/dist/docs/classes/Gradient.html +2 -2
  9. package/dist/docs/classes/GradientStop.html +2 -2
  10. package/dist/docs/classes/Group.html +2 -2
  11. package/dist/docs/classes/HitResult.html +2 -2
  12. package/dist/docs/classes/Item.html +2 -2
  13. package/dist/docs/classes/Key.html +2 -2
  14. package/dist/docs/classes/KeyEvent.html +2 -2
  15. package/dist/docs/classes/Layer.html +2 -2
  16. package/dist/docs/classes/Matrix.html +2 -2
  17. package/dist/docs/classes/MouseEvent.html +2 -2
  18. package/dist/docs/classes/PaperScope.html +2 -2
  19. package/dist/docs/classes/PaperScript.html +2 -2
  20. package/dist/docs/classes/Path.html +2 -2
  21. package/dist/docs/classes/PathItem.html +2 -2
  22. package/dist/docs/classes/Point.html +2 -2
  23. package/dist/docs/classes/PointText.html +2 -2
  24. package/dist/docs/classes/Project.html +2 -2
  25. package/dist/docs/classes/Raster.html +2 -2
  26. package/dist/docs/classes/Rectangle.html +2 -2
  27. package/dist/docs/classes/Segment.html +2 -2
  28. package/dist/docs/classes/Shape.html +2 -2
  29. package/dist/docs/classes/Size.html +2 -2
  30. package/dist/docs/classes/Style.html +2 -2
  31. package/dist/docs/classes/SymbolDefinition.html +2 -2
  32. package/dist/docs/classes/SymbolItem.html +2 -2
  33. package/dist/docs/classes/TextItem.html +2 -2
  34. package/dist/docs/classes/Tool.html +2 -2
  35. package/dist/docs/classes/ToolEvent.html +2 -2
  36. package/dist/docs/classes/Tween.html +2 -2
  37. package/dist/docs/classes/View.html +2 -2
  38. package/dist/docs/classes/global.html +2 -2
  39. package/dist/docs/classes/index.html +2 -2
  40. package/dist/docs/index.html +1 -1
  41. package/dist/paper-core.js +90 -52
  42. package/dist/paper-core.min.js +3 -3
  43. package/dist/paper-full.js +91 -53
  44. package/dist/paper-full.min.js +3 -3
  45. package/dist/paper.d.ts +2 -2
  46. package/package.json +5 -2
  47. package/dist/paperjs/LICENSE.txt +0 -23
  48. package/dist/paperjs/dist/node/canvas.js +0 -66
  49. package/dist/paperjs/dist/node/extend.js +0 -156
  50. package/dist/paperjs/dist/node/self.js +0 -58
  51. package/dist/paperjs/dist/node/xml.js +0 -40
  52. package/dist/paperjs/dist/paper-core.d.ts +0 -1
  53. package/dist/paperjs/dist/paper-core.js +0 -15703
  54. package/dist/paperjs/dist/paper-core.min.js +0 -32
  55. package/dist/paperjs/dist/paper-full.js +0 -17472
  56. package/dist/paperjs/dist/paper-full.min.js +0 -32
  57. package/dist/paperjs/dist/paper.d.ts +0 -7394
  58. package/dist/paperjs/docs/assets/css/docs.css +0 -414
  59. package/dist/paperjs/docs/assets/js/codemirror.js +0 -4
  60. package/dist/paperjs/docs/assets/js/docs.js +0 -493
  61. package/dist/paperjs/docs/assets/js/jquery.js +0 -6
  62. package/dist/paperjs/docs/assets/js/paper.js +0 -17472
  63. package/dist/paperjs/docs/classes/Color.html +0 -2188
  64. package/dist/paperjs/docs/classes/CompoundPath.html +0 -8877
  65. package/dist/paperjs/docs/classes/Curve.html +0 -2323
  66. package/dist/paperjs/docs/classes/CurveLocation.html +0 -672
  67. package/dist/paperjs/docs/classes/Event.html +0 -176
  68. package/dist/paperjs/docs/classes/Gradient.html +0 -240
  69. package/dist/paperjs/docs/classes/GradientStop.html +0 -273
  70. package/dist/paperjs/docs/classes/Group.html +0 -6864
  71. package/dist/paperjs/docs/classes/HitResult.html +0 -239
  72. package/dist/paperjs/docs/classes/Item.html +0 -6628
  73. package/dist/paperjs/docs/classes/Key.html +0 -139
  74. package/dist/paperjs/docs/classes/KeyEvent.html +0 -308
  75. package/dist/paperjs/docs/classes/Layer.html +0 -6850
  76. package/dist/paperjs/docs/classes/Matrix.html +0 -1744
  77. package/dist/paperjs/docs/classes/MouseEvent.html +0 -355
  78. package/dist/paperjs/docs/classes/PaperScope.html +0 -459
  79. package/dist/paperjs/docs/classes/PaperScript.html +0 -198
  80. package/dist/paperjs/docs/classes/Path.html +0 -11775
  81. package/dist/paperjs/docs/classes/PathItem.html +0 -8639
  82. package/dist/paperjs/docs/classes/Point.html +0 -2699
  83. package/dist/paperjs/docs/classes/PointText.html +0 -7029
  84. package/dist/paperjs/docs/classes/Project.html +0 -1305
  85. package/dist/paperjs/docs/classes/Raster.html +0 -7843
  86. package/dist/paperjs/docs/classes/Rectangle.html +0 -1654
  87. package/dist/paperjs/docs/classes/Segment.html +0 -939
  88. package/dist/paperjs/docs/classes/Shape.html +0 -7363
  89. package/dist/paperjs/docs/classes/Size.html +0 -1825
  90. package/dist/paperjs/docs/classes/Style.html +0 -919
  91. package/dist/paperjs/docs/classes/SymbolDefinition.html +0 -311
  92. package/dist/paperjs/docs/classes/SymbolItem.html +0 -6755
  93. package/dist/paperjs/docs/classes/TextItem.html +0 -6869
  94. package/dist/paperjs/docs/classes/Tool.html +0 -761
  95. package/dist/paperjs/docs/classes/ToolEvent.html +0 -446
  96. package/dist/paperjs/docs/classes/Tween.html +0 -374
  97. package/dist/paperjs/docs/classes/View.html +0 -1772
  98. package/dist/paperjs/docs/classes/global.html +0 -425
  99. package/dist/paperjs/docs/classes/index.html +0 -88
  100. package/dist/paperjs/docs/index.html +0 -11
  101. package/dist/paperjs/examples/Animated/AnimatedStar.html +0 -53
  102. package/dist/paperjs/examples/Animated/BooleanOperations.html +0 -115
  103. package/dist/paperjs/examples/Animated/CandyCrash.html +0 -151
  104. package/dist/paperjs/examples/Animated/Extruded.html +0 -50
  105. package/dist/paperjs/examples/Animated/Lines.html +0 -53
  106. package/dist/paperjs/examples/Animated/Smoothing.html +0 -70
  107. package/dist/paperjs/examples/Animated/Space.html +0 -86
  108. package/dist/paperjs/examples/Animated/SpaceUsingShapes.html +0 -79
  109. package/dist/paperjs/examples/Games/Paperoids.html +0 -569
  110. package/dist/paperjs/examples/JSON/Circle Testing.html +0 -34
  111. package/dist/paperjs/examples/JSON/Compound Path.html +0 -25
  112. package/dist/paperjs/examples/JSON/Empty Path Testing.html +0 -31
  113. package/dist/paperjs/examples/JSON/Gradients.html +0 -34
  114. package/dist/paperjs/examples/JSON/Group Transform.html +0 -28
  115. package/dist/paperjs/examples/JSON/Line Testing.html +0 -44
  116. package/dist/paperjs/examples/JSON/Random Path Testing.html +0 -42
  117. package/dist/paperjs/examples/JSON/Raster.html +0 -29
  118. package/dist/paperjs/examples/JSON/Rect and Attribute Testing.html +0 -56
  119. package/dist/paperjs/examples/JSON/Rotated Primitives.html +0 -55
  120. package/dist/paperjs/examples/JSON/Selection.html +0 -43
  121. package/dist/paperjs/examples/JSON/Shapes.html +0 -54
  122. package/dist/paperjs/examples/JSON/Symbols.html +0 -30
  123. package/dist/paperjs/examples/JSON/Text Testing.html +0 -38
  124. package/dist/paperjs/examples/JSON/Tiger.html +0 -19
  125. package/dist/paperjs/examples/JSON/Transform Test 1.html +0 -32
  126. package/dist/paperjs/examples/JSON/Transform Test 2.html +0 -30
  127. package/dist/paperjs/examples/Node.js/AnimatedStar.js +0 -52
  128. package/dist/paperjs/examples/Node.js/BooleanOperations.js +0 -36
  129. package/dist/paperjs/examples/Node.js/JSONtoPDF.js +0 -20
  130. package/dist/paperjs/examples/Node.js/Raster.js +0 -32
  131. package/dist/paperjs/examples/Node.js/RasterRemote.js +0 -33
  132. package/dist/paperjs/examples/Node.js/SvgExport.js +0 -52
  133. package/dist/paperjs/examples/Node.js/SvgImport.js +0 -23
  134. package/dist/paperjs/examples/Node.js/Tadpoles.js +0 -16
  135. package/dist/paperjs/examples/Node.js/Tadpoles.pjs +0 -278
  136. package/dist/paperjs/examples/Node.js/in.json +0 -1
  137. package/dist/paperjs/examples/Node.js/in.svg +0 -16
  138. package/dist/paperjs/examples/Paperjs.org/BooleanOperattions.html +0 -115
  139. package/dist/paperjs/examples/Paperjs.org/BouncingBalls.html +0 -103
  140. package/dist/paperjs/examples/Paperjs.org/Chain.html +0 -54
  141. package/dist/paperjs/examples/Paperjs.org/DivisionRaster.html +0 -72
  142. package/dist/paperjs/examples/Paperjs.org/FutureSplash.html +0 -122
  143. package/dist/paperjs/examples/Paperjs.org/HitTesting.html +0 -103
  144. package/dist/paperjs/examples/Paperjs.org/InteractiveTiger.html +0 -777
  145. package/dist/paperjs/examples/Paperjs.org/MetaBalls.html +0 -132
  146. package/dist/paperjs/examples/Paperjs.org/NyanRainbow.html +0 -202
  147. package/dist/paperjs/examples/Paperjs.org/PathIntersections.html +0 -76
  148. package/dist/paperjs/examples/Paperjs.org/Qbertify.html +0 -146
  149. package/dist/paperjs/examples/Paperjs.org/RadialRainbows.html +0 -80
  150. package/dist/paperjs/examples/Paperjs.org/RoundedRectangles.html +0 -41
  151. package/dist/paperjs/examples/Paperjs.org/SatieLikedToDraw.html +0 -140
  152. package/dist/paperjs/examples/Paperjs.org/Simplify.html +0 -63
  153. package/dist/paperjs/examples/Paperjs.org/SpiralRaster.html +0 -120
  154. package/dist/paperjs/examples/Paperjs.org/Tadpoles.html +0 -283
  155. package/dist/paperjs/examples/Paperjs.org/Voronoi.html +0 -134
  156. package/dist/paperjs/examples/Rasters/PhyllotaxisRaster.html +0 -96
  157. package/dist/paperjs/examples/Rasters/Raster.html +0 -34
  158. package/dist/paperjs/examples/Rasters/RotationRaster.html +0 -44
  159. package/dist/paperjs/examples/Rasters/Smoothing.html +0 -36
  160. package/dist/paperjs/examples/SVG Export/Circle Testing.html +0 -32
  161. package/dist/paperjs/examples/SVG Export/Clipping.html +0 -17
  162. package/dist/paperjs/examples/SVG Export/Compound Path.html +0 -22
  163. package/dist/paperjs/examples/SVG Export/Empty Path Testing.html +0 -28
  164. package/dist/paperjs/examples/SVG Export/Gradients.html +0 -52
  165. package/dist/paperjs/examples/SVG Export/Group Transform.html +0 -25
  166. package/dist/paperjs/examples/SVG Export/Line Testing.html +0 -41
  167. package/dist/paperjs/examples/SVG Export/Random Path Testing.html +0 -39
  168. package/dist/paperjs/examples/SVG Export/Raster.html +0 -21
  169. package/dist/paperjs/examples/SVG Export/Rect and Attribute Testing.html +0 -53
  170. package/dist/paperjs/examples/SVG Export/Rotated Primitives.html +0 -80
  171. package/dist/paperjs/examples/SVG Export/Shapes.html +0 -58
  172. package/dist/paperjs/examples/SVG Export/Symbols.html +0 -27
  173. package/dist/paperjs/examples/SVG Export/Text Testing.html +0 -45
  174. package/dist/paperjs/examples/SVG Export/Tiger.html +0 -23
  175. package/dist/paperjs/examples/SVG Export/Transform Test 1.html +0 -29
  176. package/dist/paperjs/examples/SVG Export/Transform Test 2.html +0 -27
  177. package/dist/paperjs/examples/SVG Import/Arcs.html +0 -78
  178. package/dist/paperjs/examples/SVG Import/Butterfly.html +0 -223
  179. package/dist/paperjs/examples/SVG Import/Circle and Ellipse Testing.html +0 -26
  180. package/dist/paperjs/examples/SVG Import/Clipping.html +0 -100
  181. package/dist/paperjs/examples/SVG Import/From File.html +0 -30
  182. package/dist/paperjs/examples/SVG Import/Gradient.html +0 -138
  183. package/dist/paperjs/examples/SVG Import/Gradients.html +0 -30
  184. package/dist/paperjs/examples/SVG Import/Inkscape Pivot.html +0 -52
  185. package/dist/paperjs/examples/SVG Import/Inkscape.html +0 -88
  186. package/dist/paperjs/examples/SVG Import/Line Testing.html +0 -24
  187. package/dist/paperjs/examples/SVG Import/MoreGradients.html +0 -107
  188. package/dist/paperjs/examples/SVG Import/Multiple Paths Test 1.html +0 -42
  189. package/dist/paperjs/examples/SVG Import/Multiple Paths Test 2.html +0 -33
  190. package/dist/paperjs/examples/SVG Import/Nested Groups Test.html +0 -78
  191. package/dist/paperjs/examples/SVG Import/Polybezier.html +0 -43
  192. package/dist/paperjs/examples/SVG Import/Rect Testing.html +0 -25
  193. package/dist/paperjs/examples/SVG Import/Symbols.html +0 -24
  194. package/dist/paperjs/examples/SVG Import/Testing.html +0 -40
  195. package/dist/paperjs/examples/SVG Import/Text Testing.html +0 -19
  196. package/dist/paperjs/examples/SVG Import/Tiger.html +0 -742
  197. package/dist/paperjs/examples/SVG Import/Transform Testing.html +0 -22
  198. package/dist/paperjs/examples/SVG Import/Viewbox.html +0 -38
  199. package/dist/paperjs/examples/Scripts/Arcs.html +0 -39
  200. package/dist/paperjs/examples/Scripts/BlendModes.html +0 -77
  201. package/dist/paperjs/examples/Scripts/BooleanOperations.html +0 -937
  202. package/dist/paperjs/examples/Scripts/CompoundPath.html +0 -19
  203. package/dist/paperjs/examples/Scripts/CurveTimeParameterization.html +0 -61
  204. package/dist/paperjs/examples/Scripts/HslColor.html +0 -53
  205. package/dist/paperjs/examples/Scripts/PathStructure.html +0 -82
  206. package/dist/paperjs/examples/Scripts/PathTangents.html +0 -73
  207. package/dist/paperjs/examples/Scripts/Resize.html +0 -42
  208. package/dist/paperjs/examples/Scripts/RoundRectangle.html +0 -28
  209. package/dist/paperjs/examples/Scripts/Shapes.html +0 -54
  210. package/dist/paperjs/examples/Scripts/StrokeBounds.html +0 -101
  211. package/dist/paperjs/examples/Scripts/StrokeScaling.html +0 -65
  212. package/dist/paperjs/examples/Tools/BezierTool.html +0 -90
  213. package/dist/paperjs/examples/Tools/Circles.html +0 -28
  214. package/dist/paperjs/examples/Tools/Clouds.html +0 -35
  215. package/dist/paperjs/examples/Tools/DrippingBrush.html +0 -73
  216. package/dist/paperjs/examples/Tools/FancyBrush.html +0 -82
  217. package/dist/paperjs/examples/Tools/Grid.html +0 -44
  218. package/dist/paperjs/examples/Tools/MultiLines.html +0 -44
  219. package/dist/paperjs/examples/Tools/MultipleTools.html +0 -44
  220. package/dist/paperjs/examples/Tools/PathEditing.html +0 -95
  221. package/dist/paperjs/examples/Tools/SquareRounded.html +0 -76
  222. package/dist/paperjs/examples/Tools/Stars.html +0 -38
  223. package/dist/paperjs/examples/Tools/Vektor.html +0 -200
  224. package/dist/paperjs/examples/Tools/Wave.html +0 -50
  225. package/dist/paperjs/examples/Tools/WormFarm.html +0 -88
  226. package/dist/paperjs/examples/Worker/Main.html +0 -53
  227. package/dist/paperjs/examples/Worker/Worker.js +0 -14
  228. package/dist/paperjs/examples/css/style.css +0 -12
@@ -1,2323 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Curve</title>
6
- <base target="class-frame">
7
- <link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
8
- <script src="../assets/js/paper.js"></script>
9
- <script src="../assets/js/jquery.js"></script>
10
- <script src="../assets/js/codemirror.js"></script>
11
- <script src="../assets/js/docs.js"></script>
12
- </head>
13
- <body>
14
- <article class="reference">
15
- <div class="reference-class">
16
- <h1>Curve</h1>
17
-
18
- <p>The Curve object represents the parts of a path that are connected by two following <a href="../classes/Segment.html"><tt>Segment</tt></a> objects. The curves of a path can be accessed through its <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array.</p>
19
- <p>While a segment describe the anchor point and its incoming and outgoing handles, a Curve object describes the curve passing between two such segments. Curves and segments represent two different ways of looking at the same thing, but focusing on different aspects. Curves for example offer many convenient ways to work with parts of the path, finding lengths, positions or tangents at given offsets.</p>
20
-
21
- </div>
22
-
23
- <!-- =============================== constructors ========================== -->
24
- <div class="reference-members">
25
- <h2>Constructors</h2>
26
-
27
-
28
- <div id="curve-segment1-segment2" class="member">
29
- <div class="member-link">
30
- <a name="curve-segment1-segment2" href="#curve-segment1-segment2"><tt><b>Curve</b>(segment1, segment2)</tt></a>
31
- </div>
32
- <div class="member-description hidden">
33
- <div class="member-text">
34
- <p>Creates a new curve object.</p>
35
-
36
-
37
- <ul class="member-list">
38
- <h4>Parameters:</h4>
39
-
40
- <li>
41
- <tt>segment1:</tt>
42
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
43
-
44
-
45
- </li>
46
-
47
- <li>
48
- <tt>segment2:</tt>
49
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
50
-
51
-
52
- </li>
53
-
54
- </ul>
55
-
56
-
57
- <ul class="member-list">
58
- <h4>Returns:</h4>
59
-
60
- <li>
61
- <tt><a href="../classes/Curve.html"><tt>Curve</tt></a></tt>
62
- </li>
63
-
64
-
65
- </ul>
66
-
67
-
68
-
69
-
70
-
71
- </div>
72
- </div>
73
- </div>
74
-
75
-
76
- <div id="curve-point1-handle1-handle2-point2" class="member">
77
- <div class="member-link">
78
- <a name="curve-point1-handle1-handle2-point2" href="#curve-point1-handle1-handle2-point2"><tt><b>Curve</b>(point1, handle1, handle2, point2)</tt></a>
79
- </div>
80
- <div class="member-description hidden">
81
- <div class="member-text">
82
- <p>Creates a new curve object.</p>
83
-
84
-
85
- <ul class="member-list">
86
- <h4>Parameters:</h4>
87
-
88
- <li>
89
- <tt>point1:</tt>
90
- <a href="../classes/Point.html"><tt>Point</tt></a>
91
-
92
-
93
- </li>
94
-
95
- <li>
96
- <tt>handle1:</tt>
97
- <a href="../classes/Point.html"><tt>Point</tt></a>
98
-
99
-
100
- </li>
101
-
102
- <li>
103
- <tt>handle2:</tt>
104
- <a href="../classes/Point.html"><tt>Point</tt></a>
105
-
106
-
107
- </li>
108
-
109
- <li>
110
- <tt>point2:</tt>
111
- <a href="../classes/Point.html"><tt>Point</tt></a>
112
-
113
-
114
- </li>
115
-
116
- </ul>
117
-
118
-
119
- <ul class="member-list">
120
- <h4>Returns:</h4>
121
-
122
- <li>
123
- <tt><a href="../classes/Curve.html"><tt>Curve</tt></a></tt>
124
- </li>
125
-
126
-
127
- </ul>
128
-
129
-
130
-
131
-
132
-
133
- </div>
134
- </div>
135
- </div>
136
-
137
- </div>
138
-
139
-
140
-
141
-
142
-
143
- <!-- ================================ properties =========================== -->
144
- <div class="reference-members">
145
- <h2>Properties</h2>
146
-
147
-
148
- <div id="point1" class="member">
149
- <div class="member-link">
150
- <a name="point1" href="#point1"><tt><b>point1</b></tt></a>
151
- </div>
152
- <div class="member-description hidden">
153
-
154
- <div class="member-text">
155
- <p>The first anchor point of the curve.</p>
156
-
157
-
158
-
159
- <ul class="member-list">
160
- <h4>Type:</h4>
161
- <li>
162
- <a href="../classes/Point.html"><tt>Point</tt></a>
163
- </li>
164
- </ul>
165
-
166
-
167
-
168
- </div>
169
-
170
- </div>
171
- </div>
172
-
173
-
174
- <div id="point2" class="member">
175
- <div class="member-link">
176
- <a name="point2" href="#point2"><tt><b>point2</b></tt></a>
177
- </div>
178
- <div class="member-description hidden">
179
-
180
- <div class="member-text">
181
- <p>The second anchor point of the curve.</p>
182
-
183
-
184
-
185
- <ul class="member-list">
186
- <h4>Type:</h4>
187
- <li>
188
- <a href="../classes/Point.html"><tt>Point</tt></a>
189
- </li>
190
- </ul>
191
-
192
-
193
-
194
- </div>
195
-
196
- </div>
197
- </div>
198
-
199
-
200
- <div id="handle1" class="member">
201
- <div class="member-link">
202
- <a name="handle1" href="#handle1"><tt><b>handle1</b></tt></a>
203
- </div>
204
- <div class="member-description hidden">
205
-
206
- <div class="member-text">
207
- <p>The handle point that describes the tangent in the first anchor point.</p>
208
-
209
-
210
-
211
- <ul class="member-list">
212
- <h4>Type:</h4>
213
- <li>
214
- <a href="../classes/Point.html"><tt>Point</tt></a>
215
- </li>
216
- </ul>
217
-
218
-
219
-
220
- </div>
221
-
222
- </div>
223
- </div>
224
-
225
-
226
- <div id="handle2" class="member">
227
- <div class="member-link">
228
- <a name="handle2" href="#handle2"><tt><b>handle2</b></tt></a>
229
- </div>
230
- <div class="member-description hidden">
231
-
232
- <div class="member-text">
233
- <p>The handle point that describes the tangent in the second anchor point.</p>
234
-
235
-
236
-
237
- <ul class="member-list">
238
- <h4>Type:</h4>
239
- <li>
240
- <a href="../classes/Point.html"><tt>Point</tt></a>
241
- </li>
242
- </ul>
243
-
244
-
245
-
246
- </div>
247
-
248
- </div>
249
- </div>
250
-
251
-
252
- <div id="segment1" class="member">
253
- <div class="member-link">
254
- <a name="segment1" href="#segment1"><tt><b>segment1</b></tt></a>
255
- </div>
256
- <div class="member-description hidden">
257
-
258
- <div class="member-text">
259
- <p>The first segment of the curve.</p>
260
-
261
- <p>Read only.</p>
262
-
263
-
264
-
265
- <ul class="member-list">
266
- <h4>Type:</h4>
267
- <li>
268
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
269
- </li>
270
- </ul>
271
-
272
-
273
-
274
- </div>
275
-
276
- </div>
277
- </div>
278
-
279
-
280
- <div id="segment2" class="member">
281
- <div class="member-link">
282
- <a name="segment2" href="#segment2"><tt><b>segment2</b></tt></a>
283
- </div>
284
- <div class="member-description hidden">
285
-
286
- <div class="member-text">
287
- <p>The second segment of the curve.</p>
288
-
289
- <p>Read only.</p>
290
-
291
-
292
-
293
- <ul class="member-list">
294
- <h4>Type:</h4>
295
- <li>
296
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
297
- </li>
298
- </ul>
299
-
300
-
301
-
302
- </div>
303
-
304
- </div>
305
- </div>
306
-
307
-
308
- <div id="path" class="member">
309
- <div class="member-link">
310
- <a name="path" href="#path"><tt><b>path</b></tt></a>
311
- </div>
312
- <div class="member-description hidden">
313
-
314
- <div class="member-text">
315
- <p>The path that the curve belongs to.</p>
316
-
317
- <p>Read only.</p>
318
-
319
-
320
-
321
- <ul class="member-list">
322
- <h4>Type:</h4>
323
- <li>
324
- <a href="../classes/Path.html"><tt>Path</tt></a>
325
- </li>
326
- </ul>
327
-
328
-
329
-
330
- </div>
331
-
332
- </div>
333
- </div>
334
-
335
-
336
- <div id="index" class="member">
337
- <div class="member-link">
338
- <a name="index" href="#index"><tt><b>index</b></tt></a>
339
- </div>
340
- <div class="member-description hidden">
341
-
342
- <div class="member-text">
343
- <p>The index of the curve in the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array.</p>
344
-
345
- <p>Read only.</p>
346
-
347
-
348
-
349
- <ul class="member-list">
350
- <h4>Type:</h4>
351
- <li>
352
- <tt>Number</tt>
353
- </li>
354
- </ul>
355
-
356
-
357
-
358
- </div>
359
-
360
- </div>
361
- </div>
362
-
363
-
364
- <div id="next" class="member">
365
- <div class="member-link">
366
- <a name="next" href="#next"><tt><b>next</b></tt></a>
367
- </div>
368
- <div class="member-description hidden">
369
-
370
- <div class="member-text">
371
- <p>The next curve in the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array that the curve belongs to.</p>
372
-
373
- <p>Read only.</p>
374
-
375
-
376
-
377
- <ul class="member-list">
378
- <h4>Type:</h4>
379
- <li>
380
- <a href="../classes/Curve.html"><tt>Curve</tt></a>
381
- </li>
382
- </ul>
383
-
384
-
385
-
386
- </div>
387
-
388
- </div>
389
- </div>
390
-
391
-
392
- <div id="previous" class="member">
393
- <div class="member-link">
394
- <a name="previous" href="#previous"><tt><b>previous</b></tt></a>
395
- </div>
396
- <div class="member-description hidden">
397
-
398
- <div class="member-text">
399
- <p>The previous curve in the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array that the curve belongs to.</p>
400
-
401
- <p>Read only.</p>
402
-
403
-
404
-
405
- <ul class="member-list">
406
- <h4>Type:</h4>
407
- <li>
408
- <a href="../classes/Curve.html"><tt>Curve</tt></a>
409
- </li>
410
- </ul>
411
-
412
-
413
-
414
- </div>
415
-
416
- </div>
417
- </div>
418
-
419
-
420
- <div id="selected" class="member">
421
- <div class="member-link">
422
- <a name="selected" href="#selected"><tt><b>selected</b></tt></a>
423
- </div>
424
- <div class="member-description hidden">
425
-
426
- <div class="member-text">
427
- <p>Specifies whether the points and handles of the curve are selected.</p>
428
-
429
-
430
-
431
- <ul class="member-list">
432
- <h4>Type:</h4>
433
- <li>
434
- <tt>Boolean</tt>
435
- </li>
436
- </ul>
437
-
438
-
439
-
440
- </div>
441
-
442
- </div>
443
- </div>
444
-
445
-
446
- <div id="values-matrix" class="member">
447
- <div class="member-link">
448
- <a name="values-matrix" href="#values-matrix"><tt><b>values</b></tt></a>
449
- </div>
450
- <div class="member-description hidden">
451
-
452
- <div class="member-text">
453
- <p>An array of 8 float values, describing this curve&rsquo;s geometry in four absolute x/y pairs (point1, handle1, handle2, point2). This format is used internally for efficient processing of curve geometries, e.g. when calculating intersections or bounds.</p>
454
- <p>Note that the handles are converted to absolute coordinates.</p>
455
-
456
- <p>Read only.</p>
457
-
458
-
459
-
460
- <ul class="member-list">
461
- <h4>Type:</h4>
462
- <li>
463
- Array of <tt>Numbers</tt>
464
- </li>
465
- </ul>
466
-
467
-
468
-
469
- </div>
470
-
471
- </div>
472
- </div>
473
-
474
-
475
- <div id="points" class="member">
476
- <div class="member-link">
477
- <a name="points" href="#points"><tt><b>points</b></tt></a>
478
- </div>
479
- <div class="member-description hidden">
480
-
481
- <div class="member-text">
482
- <p>An array of 4 point objects, describing this curve&rsquo;s geometry in absolute coordinates (point1, handle1, handle2, point2).</p>
483
- <p>Note that the handles are converted to absolute coordinates.</p>
484
-
485
- <p>Read only.</p>
486
-
487
-
488
-
489
- <ul class="member-list">
490
- <h4>Type:</h4>
491
- <li>
492
- Array of <a href="../classes/Point.html"><tt>Point</tt></a> objects
493
- </li>
494
- </ul>
495
-
496
-
497
-
498
- </div>
499
-
500
- </div>
501
- </div>
502
-
503
-
504
- <div id="length" class="member">
505
- <div class="member-link">
506
- <a name="length" href="#length"><tt><b>length</b></tt></a>
507
- </div>
508
- <div class="member-description hidden">
509
-
510
- <div class="member-text">
511
- <p>The approximated length of the curve.</p>
512
-
513
- <p>Read only.</p>
514
-
515
-
516
-
517
- <ul class="member-list">
518
- <h4>Type:</h4>
519
- <li>
520
- <tt>Number</tt>
521
- </li>
522
- </ul>
523
-
524
-
525
-
526
- </div>
527
-
528
- </div>
529
- </div>
530
-
531
-
532
- <div id="area" class="member">
533
- <div class="member-link">
534
- <a name="area" href="#area"><tt><b>area</b></tt></a>
535
- </div>
536
- <div class="member-description hidden">
537
-
538
- <div class="member-text">
539
- <p>The area that the curve&rsquo;s geometry is covering.</p>
540
-
541
- <p>Read only.</p>
542
-
543
-
544
-
545
- <ul class="member-list">
546
- <h4>Type:</h4>
547
- <li>
548
- <tt>Number</tt>
549
- </li>
550
- </ul>
551
-
552
-
553
-
554
- </div>
555
-
556
- </div>
557
- </div>
558
-
559
-
560
- <h3>Bounding Boxes</h3>
561
-
562
- <div id="bounds" class="member">
563
- <div class="member-link">
564
- <a name="bounds" href="#bounds"><tt><b>bounds</b></tt></a>
565
- </div>
566
- <div class="member-description hidden">
567
-
568
- <div class="member-text">
569
- <p>The bounding rectangle of the curve excluding stroke width.</p>
570
-
571
-
572
-
573
- <ul class="member-list">
574
- <h4>Type:</h4>
575
- <li>
576
- <a href="../classes/Rectangle.html"><tt>Rectangle</tt></a>
577
- </li>
578
- </ul>
579
-
580
-
581
-
582
- </div>
583
-
584
- </div>
585
- </div>
586
-
587
-
588
- <div id="strokebounds" class="member">
589
- <div class="member-link">
590
- <a name="strokebounds" href="#strokebounds"><tt><b>strokeBounds</b></tt></a>
591
- </div>
592
- <div class="member-description hidden">
593
-
594
- <div class="member-text">
595
- <p>The bounding rectangle of the curve including stroke width.</p>
596
-
597
-
598
-
599
- <ul class="member-list">
600
- <h4>Type:</h4>
601
- <li>
602
- <a href="../classes/Rectangle.html"><tt>Rectangle</tt></a>
603
- </li>
604
- </ul>
605
-
606
-
607
-
608
- </div>
609
-
610
- </div>
611
- </div>
612
-
613
-
614
- <div id="handlebounds" class="member">
615
- <div class="member-link">
616
- <a name="handlebounds" href="#handlebounds"><tt><b>handleBounds</b></tt></a>
617
- </div>
618
- <div class="member-description hidden">
619
-
620
- <div class="member-text">
621
- <p>The bounding rectangle of the curve including handles.</p>
622
-
623
-
624
-
625
- <ul class="member-list">
626
- <h4>Type:</h4>
627
- <li>
628
- <a href="../classes/Rectangle.html"><tt>Rectangle</tt></a>
629
- </li>
630
- </ul>
631
-
632
-
633
-
634
- </div>
635
-
636
- </div>
637
- </div>
638
-
639
- </div>
640
-
641
-
642
-
643
-
644
-
645
- <!-- ============================== methods ================================ -->
646
- <div class="reference-members">
647
- <h2>Methods</h2>
648
-
649
-
650
- <div id="clone" class="member">
651
- <div class="member-link">
652
- <a name="clone" href="#clone"><tt><b>clone</b>()</tt></a>
653
- </div>
654
- <div class="member-description hidden">
655
- <div class="member-text">
656
- <p>Returns a copy of the curve.</p>
657
-
658
-
659
-
660
- <ul class="member-list">
661
- <h4>Returns:</h4>
662
-
663
- <li>
664
- <tt><a href="../classes/Curve.html"><tt>Curve</tt></a></tt>
665
- </li>
666
-
667
-
668
- </ul>
669
-
670
-
671
-
672
-
673
-
674
- </div>
675
- </div>
676
- </div>
677
-
678
-
679
- <div id="tostring" class="member">
680
- <div class="member-link">
681
- <a name="tostring" href="#tostring"><tt><b>toString</b>()</tt></a>
682
- </div>
683
- <div class="member-description hidden">
684
- <div class="member-text">
685
-
686
-
687
-
688
-
689
- <ul class="member-list">
690
- <h4>Returns:</h4>
691
-
692
- <li>
693
- <tt><tt>String</tt></tt>&nbsp;&mdash;&nbsp;a string representation of the curve
694
- </li>
695
-
696
-
697
- </ul>
698
-
699
-
700
-
701
-
702
-
703
- </div>
704
- </div>
705
- </div>
706
-
707
-
708
- <div id="classify" class="member">
709
- <div class="member-link">
710
- <a name="classify" href="#classify"><tt><b>classify</b>()</tt></a>
711
- </div>
712
- <div class="member-description hidden">
713
- <div class="member-text">
714
- <p>Determines the type of cubic Bézier curve via discriminant classification, as well as the curve-time parameters of the associated points of inflection, loops, cusps, etc.</p>
715
-
716
-
717
-
718
- <ul class="member-list">
719
- <h4>Returns:</h4>
720
-
721
- <li>
722
- <tt><tt>Object</tt></tt>&nbsp;&mdash;&nbsp;the curve classification information as an object, see options
723
- </li>
724
-
725
-
726
- </ul>
727
-
728
- <ul class="member-list">
729
- <li><tt>info.type: <tt>String</tt></tt> &mdash; the type of Bézier curve, possible values are: <tt>&lsquo;line&rsquo;</tt>, <tt>&lsquo;quadratic&rsquo;</tt>, <tt>&lsquo;serpentine&rsquo;</tt>, <tt>&lsquo;cusp&rsquo;</tt>, <tt>&lsquo;loop&rsquo;</tt>, <tt>&lsquo;arch&rsquo;</tt></li>
730
- <li><tt>info.roots: Array of <tt>Numbers</tt></tt> &mdash; the curve-time parameters of the associated points of inflection for serpentine curves, loops, cusps, etc</li>
731
- </ul>
732
-
733
-
734
-
735
- </div>
736
- </div>
737
- </div>
738
-
739
-
740
- <div id="remove" class="member">
741
- <div class="member-link">
742
- <a name="remove" href="#remove"><tt><b>remove</b>()</tt></a>
743
- </div>
744
- <div class="member-description hidden">
745
- <div class="member-text">
746
- <p>Removes the curve from the path that it belongs to, by removing its second segment and merging its handle with the first segment.</p>
747
-
748
-
749
-
750
- <ul class="member-list">
751
- <h4>Returns:</h4>
752
-
753
- <li>
754
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the curve was removed, <tt>false</tt> otherwise
755
- </li>
756
-
757
-
758
- </ul>
759
-
760
-
761
-
762
-
763
-
764
- </div>
765
- </div>
766
- </div>
767
-
768
-
769
- <div id="isfirst" class="member">
770
- <div class="member-link">
771
- <a name="isfirst" href="#isfirst"><tt><b>isFirst</b>()</tt></a>
772
- </div>
773
- <div class="member-description hidden">
774
- <div class="member-text">
775
- <p>Checks if the this is the first curve in the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array.</p>
776
-
777
-
778
-
779
- <ul class="member-list">
780
- <h4>Returns:</h4>
781
-
782
- <li>
783
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if this is the first curve, <tt>false</tt> otherwise
784
- </li>
785
-
786
-
787
- </ul>
788
-
789
-
790
-
791
-
792
-
793
- </div>
794
- </div>
795
- </div>
796
-
797
-
798
- <div id="islast" class="member">
799
- <div class="member-link">
800
- <a name="islast" href="#islast"><tt><b>isLast</b>()</tt></a>
801
- </div>
802
- <div class="member-description hidden">
803
- <div class="member-text">
804
- <p>Checks if the this is the last curve in the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array.</p>
805
-
806
-
807
-
808
- <ul class="member-list">
809
- <h4>Returns:</h4>
810
-
811
- <li>
812
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if this is the last curve, <tt>false</tt> otherwise
813
- </li>
814
-
815
-
816
- </ul>
817
-
818
-
819
-
820
-
821
-
822
- </div>
823
- </div>
824
- </div>
825
-
826
-
827
- <div id="getpart-from-to" class="member">
828
- <div class="member-link">
829
- <a name="getpart-from-to" href="#getpart-from-to"><tt><b>getPart</b>(from, to)</tt></a>
830
- </div>
831
- <div class="member-description hidden">
832
- <div class="member-text">
833
- <p>Creates a new curve as a sub-curve from this curve, its range defined by the given curve-time parameters. If <code>from</code> is larger than <code>to</code>, then the resulting curve will have its direction reversed.</p>
834
-
835
-
836
- <ul class="member-list">
837
- <h4>Parameters:</h4>
838
-
839
- <li>
840
- <tt>from:</tt>
841
- <tt>Number</tt>
842
- &mdash;&nbsp;the curve-time parameter at which the sub-curve starts
843
-
844
- </li>
845
-
846
- <li>
847
- <tt>to:</tt>
848
- <tt>Number</tt>
849
- &mdash;&nbsp;the curve-time parameter at which the sub-curve ends
850
-
851
- </li>
852
-
853
- </ul>
854
-
855
-
856
- <ul class="member-list">
857
- <h4>Returns:</h4>
858
-
859
- <li>
860
- <tt><a href="../classes/Curve.html"><tt>Curve</tt></a></tt>&nbsp;&mdash;&nbsp;the newly create sub-curve
861
- </li>
862
-
863
-
864
- </ul>
865
-
866
-
867
-
868
-
869
-
870
- </div>
871
- </div>
872
- </div>
873
-
874
-
875
- <div id="divideat-location" class="member">
876
- <div class="member-link">
877
- <a name="divideat-location" href="#divideat-location"><tt><b>divideAt</b>(location)</tt></a>
878
- </div>
879
- <div class="member-description hidden">
880
- <div class="member-text">
881
- <p>Divides the curve into two curves at the given offset or location. The curve itself is modified and becomes the first part, the second part is returned as a new curve. If the curve belongs to a path item, a new segment is inserted into the path at the given location, and the second part becomes a part of the path as well.</p>
882
-
883
-
884
- <ul class="member-list">
885
- <h4>Parameters:</h4>
886
-
887
- <li>
888
- <tt>location:</tt>
889
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
890
- &mdash;&nbsp;the offset or location on the curve at which to divide
891
-
892
- </li>
893
-
894
- </ul>
895
-
896
-
897
- <ul class="member-list">
898
- <h4>Returns:</h4>
899
-
900
- <li>
901
- <tt><a href="../classes/Curve.html"><tt>Curve</tt></a></tt>&nbsp;&mdash;&nbsp;the second part of the divided curve if the location is valid, {code null} otherwise
902
- </li>
903
-
904
-
905
- </ul>
906
-
907
-
908
-
909
-
910
- <ul class="member-list">
911
- <h4>See also:</h4>
912
-
913
- <li><tt><a href="../classes/Curve.html#divideattime-time"><tt>divideAtTime(time)</tt></a></tt></li>
914
-
915
- </ul>
916
-
917
-
918
- </div>
919
- </div>
920
- </div>
921
-
922
-
923
- <div id="divideattime-time" class="member">
924
- <div class="member-link">
925
- <a name="divideattime-time" href="#divideattime-time"><tt><b>divideAtTime</b>(time)</tt></a>
926
- </div>
927
- <div class="member-description hidden">
928
- <div class="member-text">
929
- <p>Divides the curve into two curves at the given curve-time parameter. The curve itself is modified and becomes the first part, the second part is returned as a new curve. If the modified curve belongs to a path item, the second part is also added to the path.</p>
930
-
931
-
932
- <ul class="member-list">
933
- <h4>Parameters:</h4>
934
-
935
- <li>
936
- <tt>time:</tt>
937
- <tt>Number</tt>
938
- &mdash;&nbsp;the curve-time parameter on the curve at which to divide
939
-
940
- </li>
941
-
942
- </ul>
943
-
944
-
945
- <ul class="member-list">
946
- <h4>Returns:</h4>
947
-
948
- <li>
949
- <tt><a href="../classes/Curve.html"><tt>Curve</tt></a></tt>&nbsp;&mdash;&nbsp;the second part of the divided curve, if the offset is within the valid range, {code null} otherwise.
950
- </li>
951
-
952
-
953
- </ul>
954
-
955
-
956
-
957
-
958
- <ul class="member-list">
959
- <h4>See also:</h4>
960
-
961
- <li><tt><a href="../classes/Curve.html#divideat-offset"><tt>divideAt(offset)</tt></a></tt></li>
962
-
963
- </ul>
964
-
965
-
966
- </div>
967
- </div>
968
- </div>
969
-
970
-
971
- <div id="splitat-location" class="member">
972
- <div class="member-link">
973
- <a name="splitat-location" href="#splitat-location"><tt><b>splitAt</b>(location)</tt></a>
974
- </div>
975
- <div class="member-description hidden">
976
- <div class="member-text">
977
- <p>Splits the path this curve belongs to at the given offset. After splitting, the path will be open. If the path was open already, splitting will result in two paths.</p>
978
-
979
-
980
- <ul class="member-list">
981
- <h4>Parameters:</h4>
982
-
983
- <li>
984
- <tt>location:</tt>
985
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
986
- &mdash;&nbsp;the offset or location on the curve at which to split
987
-
988
- </li>
989
-
990
- </ul>
991
-
992
-
993
- <ul class="member-list">
994
- <h4>Returns:</h4>
995
-
996
- <li>
997
- <tt><a href="../classes/Path.html"><tt>Path</tt></a></tt>&nbsp;&mdash;&nbsp;the newly created path after splitting, if any
998
- </li>
999
-
1000
-
1001
- </ul>
1002
-
1003
-
1004
-
1005
-
1006
- <ul class="member-list">
1007
- <h4>See also:</h4>
1008
-
1009
- <li><tt><a href="../classes/Path.html#splitat-offset"><tt>path.splitAt(offset)</tt></a></tt></li>
1010
-
1011
- </ul>
1012
-
1013
-
1014
- </div>
1015
- </div>
1016
- </div>
1017
-
1018
-
1019
- <div id="splitattime-time" class="member">
1020
- <div class="member-link">
1021
- <a name="splitattime-time" href="#splitattime-time"><tt><b>splitAtTime</b>(time)</tt></a>
1022
- </div>
1023
- <div class="member-description hidden">
1024
- <div class="member-text">
1025
- <p>Splits the path this curve belongs to at the given offset. After splitting, the path will be open. If the path was open already, splitting will result in two paths.</p>
1026
-
1027
-
1028
- <ul class="member-list">
1029
- <h4>Parameters:</h4>
1030
-
1031
- <li>
1032
- <tt>time:</tt>
1033
- <tt>Number</tt>
1034
- &mdash;&nbsp;the curve-time parameter on the curve at which to split
1035
-
1036
- </li>
1037
-
1038
- </ul>
1039
-
1040
-
1041
- <ul class="member-list">
1042
- <h4>Returns:</h4>
1043
-
1044
- <li>
1045
- <tt><a href="../classes/Path.html"><tt>Path</tt></a></tt>&nbsp;&mdash;&nbsp;the newly created path after splitting, if any
1046
- </li>
1047
-
1048
-
1049
- </ul>
1050
-
1051
-
1052
-
1053
-
1054
- <ul class="member-list">
1055
- <h4>See also:</h4>
1056
-
1057
- <li><tt><a href="../classes/Path.html#splitat-offset"><tt>path.splitAt(offset)</tt></a></tt></li>
1058
-
1059
- </ul>
1060
-
1061
-
1062
- </div>
1063
- </div>
1064
- </div>
1065
-
1066
-
1067
- <div id="reversed" class="member">
1068
- <div class="member-link">
1069
- <a name="reversed" href="#reversed"><tt><b>reversed</b>()</tt></a>
1070
- </div>
1071
- <div class="member-description hidden">
1072
- <div class="member-text">
1073
- <p>Returns a reversed version of the curve, without modifying the curve itself.</p>
1074
-
1075
-
1076
-
1077
- <ul class="member-list">
1078
- <h4>Returns:</h4>
1079
-
1080
- <li>
1081
- <tt><a href="../classes/Curve.html"><tt>Curve</tt></a></tt>&nbsp;&mdash;&nbsp;a reversed version of the curve
1082
- </li>
1083
-
1084
-
1085
- </ul>
1086
-
1087
-
1088
-
1089
-
1090
-
1091
- </div>
1092
- </div>
1093
- </div>
1094
-
1095
-
1096
- <div id="clearhandles" class="member">
1097
- <div class="member-link">
1098
- <a name="clearhandles" href="#clearhandles"><tt><b>clearHandles</b>()</tt></a>
1099
- </div>
1100
- <div class="member-description hidden">
1101
- <div class="member-text">
1102
- <p>Clears the curve&rsquo;s handles by setting their coordinates to zero, turning the curve into a straight line.</p>
1103
-
1104
-
1105
-
1106
-
1107
-
1108
-
1109
-
1110
- </div>
1111
- </div>
1112
- </div>
1113
-
1114
-
1115
- <h3>Curve Tests</h3>
1116
-
1117
- <div id="hashandles" class="member">
1118
- <div class="member-link">
1119
- <a name="hashandles" href="#hashandles"><tt><b>hasHandles</b>()</tt></a>
1120
- </div>
1121
- <div class="member-description hidden">
1122
- <div class="member-text">
1123
- <p>Checks if this curve has any curve handles set.</p>
1124
-
1125
-
1126
-
1127
- <ul class="member-list">
1128
- <h4>Returns:</h4>
1129
-
1130
- <li>
1131
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the curve has handles set, <tt>false</tt> otherwise
1132
- </li>
1133
-
1134
-
1135
- </ul>
1136
-
1137
-
1138
-
1139
-
1140
- <ul class="member-list">
1141
- <h4>See also:</h4>
1142
-
1143
- <li><tt><a href="../classes/Curve.html#handle1"><tt>curve.handle1</tt></a></tt></li>
1144
-
1145
- <li><tt><a href="../classes/Curve.html#handle2"><tt>curve.handle2</tt></a></tt></li>
1146
-
1147
- <li><tt><a href="../classes/Segment.html#hashandles"><tt>segment.hasHandles</tt></a>()</tt></li>
1148
-
1149
- <li><tt><a href="../classes/Path.html#hashandles"><tt>path.hasHandles</tt></a>()</tt></li>
1150
-
1151
- </ul>
1152
-
1153
-
1154
- </div>
1155
- </div>
1156
- </div>
1157
-
1158
-
1159
- <div id="haslength" class="member">
1160
- <div class="member-link">
1161
- <a name="haslength" href="#haslength"><tt><b>hasLength</b>([epsilon])</tt></a>
1162
- </div>
1163
- <div class="member-description hidden">
1164
- <div class="member-text">
1165
- <p>Checks if this curve has any length.</p>
1166
-
1167
-
1168
- <ul class="member-list">
1169
- <h4>Parameters:</h4>
1170
-
1171
- <li>
1172
- <tt>epsilon:</tt>
1173
- <tt>Number</tt>
1174
- &mdash;&nbsp;the epsilon against which to compare the curve&rsquo;s length
1175
- &mdash;&nbsp;optional, default: <tt>0</tt>
1176
- </li>
1177
-
1178
- </ul>
1179
-
1180
-
1181
- <ul class="member-list">
1182
- <h4>Returns:</h4>
1183
-
1184
- <li>
1185
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the curve is longer than the given epsilon, <tt>false</tt> otherwise
1186
- </li>
1187
-
1188
-
1189
- </ul>
1190
-
1191
-
1192
-
1193
-
1194
-
1195
- </div>
1196
- </div>
1197
- </div>
1198
-
1199
-
1200
- <div id="isstraight" class="member">
1201
- <div class="member-link">
1202
- <a name="isstraight" href="#isstraight"><tt><b>isStraight</b>()</tt></a>
1203
- </div>
1204
- <div class="member-description hidden">
1205
- <div class="member-text">
1206
- <p>Checks if this curve appears as a straight line. This can mean that it has no handles defined, or that the handles run collinear with the line that connects the curve&rsquo;s start and end point, not falling outside of the line.</p>
1207
-
1208
-
1209
-
1210
- <ul class="member-list">
1211
- <h4>Returns:</h4>
1212
-
1213
- <li>
1214
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the curve is straight, <tt>false</tt> otherwise
1215
- </li>
1216
-
1217
-
1218
- </ul>
1219
-
1220
-
1221
-
1222
-
1223
-
1224
- </div>
1225
- </div>
1226
- </div>
1227
-
1228
-
1229
- <div id="islinear" class="member">
1230
- <div class="member-link">
1231
- <a name="islinear" href="#islinear"><tt><b>isLinear</b>()</tt></a>
1232
- </div>
1233
- <div class="member-description hidden">
1234
- <div class="member-text">
1235
- <p>Checks if this curve is parametrically linear, meaning that it is straight and its handles are positioned at 1/3 and 2/3 of the total length of the curve.</p>
1236
-
1237
-
1238
-
1239
- <ul class="member-list">
1240
- <h4>Returns:</h4>
1241
-
1242
- <li>
1243
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the curve is parametrically linear, <tt>false</tt> otherwise
1244
- </li>
1245
-
1246
-
1247
- </ul>
1248
-
1249
-
1250
-
1251
-
1252
-
1253
- </div>
1254
- </div>
1255
- </div>
1256
-
1257
-
1258
- <div id="iscollinear-curve" class="member">
1259
- <div class="member-link">
1260
- <a name="iscollinear-curve" href="#iscollinear-curve"><tt><b>isCollinear</b>(curve)</tt></a>
1261
- </div>
1262
- <div class="member-description hidden">
1263
- <div class="member-text">
1264
- <p>Checks if the the two curves describe straight lines that are collinear, meaning they run in parallel.</p>
1265
-
1266
-
1267
- <ul class="member-list">
1268
- <h4>Parameters:</h4>
1269
-
1270
- <li>
1271
- <tt>curve:</tt>
1272
- <a href="../classes/Curve.html"><tt>Curve</tt></a>
1273
- &mdash;&nbsp;the other curve to check against
1274
-
1275
- </li>
1276
-
1277
- </ul>
1278
-
1279
-
1280
- <ul class="member-list">
1281
- <h4>Returns:</h4>
1282
-
1283
- <li>
1284
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the two lines are collinear, <tt>false</tt> otherwise
1285
- </li>
1286
-
1287
-
1288
- </ul>
1289
-
1290
-
1291
-
1292
-
1293
-
1294
- </div>
1295
- </div>
1296
- </div>
1297
-
1298
-
1299
- <div id="ishorizontal" class="member">
1300
- <div class="member-link">
1301
- <a name="ishorizontal" href="#ishorizontal"><tt><b>isHorizontal</b>()</tt></a>
1302
- </div>
1303
- <div class="member-description hidden">
1304
- <div class="member-text">
1305
- <p>Checks if the curve is a straight horizontal line.</p>
1306
-
1307
-
1308
-
1309
- <ul class="member-list">
1310
- <h4>Returns:</h4>
1311
-
1312
- <li>
1313
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the line is horizontal, <tt>false</tt> otherwise
1314
- </li>
1315
-
1316
-
1317
- </ul>
1318
-
1319
-
1320
-
1321
-
1322
-
1323
- </div>
1324
- </div>
1325
- </div>
1326
-
1327
-
1328
- <div id="isvertical" class="member">
1329
- <div class="member-link">
1330
- <a name="isvertical" href="#isvertical"><tt><b>isVertical</b>()</tt></a>
1331
- </div>
1332
- <div class="member-description hidden">
1333
- <div class="member-text">
1334
- <p>Checks if the curve is a straight vertical line.</p>
1335
-
1336
-
1337
-
1338
- <ul class="member-list">
1339
- <h4>Returns:</h4>
1340
-
1341
- <li>
1342
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the line is vertical, <tt>false</tt> otherwise
1343
- </li>
1344
-
1345
-
1346
- </ul>
1347
-
1348
-
1349
-
1350
-
1351
-
1352
- </div>
1353
- </div>
1354
- </div>
1355
-
1356
-
1357
- <h3>Positions on Curves</h3>
1358
-
1359
- <div id="getlocationat-offset" class="member">
1360
- <div class="member-link">
1361
- <a name="getlocationat-offset" href="#getlocationat-offset"><tt><b>getLocationAt</b>(offset)</tt></a>
1362
- </div>
1363
- <div class="member-description hidden">
1364
- <div class="member-text">
1365
- <p>Calculates the curve location at the specified offset on the curve.</p>
1366
-
1367
-
1368
- <ul class="member-list">
1369
- <h4>Parameters:</h4>
1370
-
1371
- <li>
1372
- <tt>offset:</tt>
1373
- <tt>Number</tt>
1374
- &mdash;&nbsp;the offset on the curve
1375
-
1376
- </li>
1377
-
1378
- </ul>
1379
-
1380
-
1381
- <ul class="member-list">
1382
- <h4>Returns:</h4>
1383
-
1384
- <li>
1385
- <tt><a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></tt>&nbsp;&mdash;&nbsp;the curve location at the specified the offset
1386
- </li>
1387
-
1388
-
1389
- </ul>
1390
-
1391
-
1392
-
1393
-
1394
-
1395
- </div>
1396
- </div>
1397
- </div>
1398
-
1399
-
1400
- <div id="getlocationattime-time" class="member">
1401
- <div class="member-link">
1402
- <a name="getlocationattime-time" href="#getlocationattime-time"><tt><b>getLocationAtTime</b>(time)</tt></a>
1403
- </div>
1404
- <div class="member-description hidden">
1405
- <div class="member-text">
1406
- <p>Calculates the curve location at the specified curve-time parameter on the curve.</p>
1407
-
1408
-
1409
- <ul class="member-list">
1410
- <h4>Parameters:</h4>
1411
-
1412
- <li>
1413
- <tt>time:</tt>
1414
- <tt>Number</tt>
1415
- &mdash;&nbsp;the curve-time parameter on the curve
1416
-
1417
- </li>
1418
-
1419
- </ul>
1420
-
1421
-
1422
- <ul class="member-list">
1423
- <h4>Returns:</h4>
1424
-
1425
- <li>
1426
- <tt><a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></tt>&nbsp;&mdash;&nbsp;the curve location at the specified the location
1427
- </li>
1428
-
1429
-
1430
- </ul>
1431
-
1432
-
1433
-
1434
-
1435
-
1436
- </div>
1437
- </div>
1438
- </div>
1439
-
1440
-
1441
- <div id="gettimeat-offset" class="member">
1442
- <div class="member-link">
1443
- <a name="gettimeat-offset" href="#gettimeat-offset"><tt><b>getTimeAt</b>(offset[, start])</tt></a>
1444
- </div>
1445
- <div class="member-description hidden">
1446
- <div class="member-text">
1447
- <p>Calculates the curve-time parameter of the specified offset on the path, relative to the provided start parameter. If offset is a negative value, the parameter is searched to the left of the start parameter. If no start parameter is provided, a default of <code>0</code> for positive values of <code>offset</code> and <code>1</code> for negative values of <code>offset</code>.</p>
1448
-
1449
-
1450
- <ul class="member-list">
1451
- <h4>Parameters:</h4>
1452
-
1453
- <li>
1454
- <tt>offset:</tt>
1455
- <tt>Number</tt>
1456
- &mdash;&nbsp;the offset at which to find the curve-time, in curve length units
1457
-
1458
- </li>
1459
-
1460
- <li>
1461
- <tt>start:</tt>
1462
- <tt>Number</tt>
1463
- &mdash;&nbsp;the curve-time in relation to which the offset is determined
1464
- &mdash;&nbsp;optional
1465
- </li>
1466
-
1467
- </ul>
1468
-
1469
-
1470
- <ul class="member-list">
1471
- <h4>Returns:</h4>
1472
-
1473
- <li>
1474
- <tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;the curve-time parameter at the specified location
1475
- </li>
1476
-
1477
-
1478
- </ul>
1479
-
1480
-
1481
-
1482
-
1483
-
1484
- </div>
1485
- </div>
1486
- </div>
1487
-
1488
-
1489
- <div id="gettimeswithtangent-tangent" class="member">
1490
- <div class="member-link">
1491
- <a name="gettimeswithtangent-tangent" href="#gettimeswithtangent-tangent"><tt><b>getTimesWithTangent</b>(tangent)</tt></a>
1492
- </div>
1493
- <div class="member-description hidden">
1494
- <div class="member-text">
1495
- <p>Calculates the curve-time parameters where the curve is tangential to provided tangent. Note that tangents at the start or end are included.</p>
1496
-
1497
-
1498
- <ul class="member-list">
1499
- <h4>Parameters:</h4>
1500
-
1501
- <li>
1502
- <tt>tangent:</tt>
1503
- <a href="../classes/Point.html"><tt>Point</tt></a>
1504
- &mdash;&nbsp;the tangent to which the curve must be tangential
1505
-
1506
- </li>
1507
-
1508
- </ul>
1509
-
1510
-
1511
- <ul class="member-list">
1512
- <h4>Returns:</h4>
1513
-
1514
- <li>
1515
- <tt>Array of <tt>Numbers</tt></tt>&nbsp;&mdash;&nbsp;at most two curve-time parameters, where the curve is tangential to the given tangent
1516
- </li>
1517
-
1518
-
1519
- </ul>
1520
-
1521
-
1522
-
1523
-
1524
-
1525
- </div>
1526
- </div>
1527
- </div>
1528
-
1529
-
1530
- <div id="getoffsetattime-time" class="member">
1531
- <div class="member-link">
1532
- <a name="getoffsetattime-time" href="#getoffsetattime-time"><tt><b>getOffsetAtTime</b>(time)</tt></a>
1533
- </div>
1534
- <div class="member-description hidden">
1535
- <div class="member-text">
1536
- <p>Calculates the curve offset at the specified curve-time parameter on the curve.</p>
1537
-
1538
-
1539
- <ul class="member-list">
1540
- <h4>Parameters:</h4>
1541
-
1542
- <li>
1543
- <tt>time:</tt>
1544
- <tt>Number</tt>
1545
- &mdash;&nbsp;the curve-time parameter on the curve
1546
-
1547
- </li>
1548
-
1549
- </ul>
1550
-
1551
-
1552
- <ul class="member-list">
1553
- <h4>Returns:</h4>
1554
-
1555
- <li>
1556
- <tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;the curve offset at the specified the location
1557
- </li>
1558
-
1559
-
1560
- </ul>
1561
-
1562
-
1563
-
1564
-
1565
-
1566
- </div>
1567
- </div>
1568
- </div>
1569
-
1570
-
1571
- <div id="getlocationof-point" class="member">
1572
- <div class="member-link">
1573
- <a name="getlocationof-point" href="#getlocationof-point"><tt><b>getLocationOf</b>(point)</tt></a>
1574
- </div>
1575
- <div class="member-description hidden">
1576
- <div class="member-text">
1577
- <p>Returns the curve location of the specified point if it lies on the curve, <code>null</code> otherwise.</p>
1578
-
1579
-
1580
- <ul class="member-list">
1581
- <h4>Parameters:</h4>
1582
-
1583
- <li>
1584
- <tt>point:</tt>
1585
- <a href="../classes/Point.html"><tt>Point</tt></a>
1586
- &mdash;&nbsp;the point on the curve
1587
-
1588
- </li>
1589
-
1590
- </ul>
1591
-
1592
-
1593
- <ul class="member-list">
1594
- <h4>Returns:</h4>
1595
-
1596
- <li>
1597
- <tt><a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></tt>&nbsp;&mdash;&nbsp;the curve location of the specified point
1598
- </li>
1599
-
1600
-
1601
- </ul>
1602
-
1603
-
1604
-
1605
-
1606
-
1607
- </div>
1608
- </div>
1609
- </div>
1610
-
1611
-
1612
- <div id="getoffsetof-point" class="member">
1613
- <div class="member-link">
1614
- <a name="getoffsetof-point" href="#getoffsetof-point"><tt><b>getOffsetOf</b>(point)</tt></a>
1615
- </div>
1616
- <div class="member-description hidden">
1617
- <div class="member-text">
1618
- <p>Returns the length of the path from its beginning up to up to the specified point if it lies on the path, <code>null</code> otherwise.</p>
1619
-
1620
-
1621
- <ul class="member-list">
1622
- <h4>Parameters:</h4>
1623
-
1624
- <li>
1625
- <tt>point:</tt>
1626
- <a href="../classes/Point.html"><tt>Point</tt></a>
1627
- &mdash;&nbsp;the point on the path
1628
-
1629
- </li>
1630
-
1631
- </ul>
1632
-
1633
-
1634
- <ul class="member-list">
1635
- <h4>Returns:</h4>
1636
-
1637
- <li>
1638
- <tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;the length of the path up to the specified point
1639
- </li>
1640
-
1641
-
1642
- </ul>
1643
-
1644
-
1645
-
1646
-
1647
-
1648
- </div>
1649
- </div>
1650
- </div>
1651
-
1652
-
1653
- <div id="gettimeof-point" class="member">
1654
- <div class="member-link">
1655
- <a name="gettimeof-point" href="#gettimeof-point"><tt><b>getTimeOf</b>(point)</tt></a>
1656
- </div>
1657
- <div class="member-description hidden">
1658
- <div class="member-text">
1659
- <p>Returns the curve-time parameter of the specified point if it lies on the curve, <code>null</code> otherwise. Note that if there is more than one possible solution in a self-intersecting curve, the first found result is returned.</p>
1660
-
1661
-
1662
- <ul class="member-list">
1663
- <h4>Parameters:</h4>
1664
-
1665
- <li>
1666
- <tt>point:</tt>
1667
- <a href="../classes/Point.html"><tt>Point</tt></a>
1668
- &mdash;&nbsp;the point on the curve
1669
-
1670
- </li>
1671
-
1672
- </ul>
1673
-
1674
-
1675
- <ul class="member-list">
1676
- <h4>Returns:</h4>
1677
-
1678
- <li>
1679
- <tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;the curve-time parameter of the specified point
1680
- </li>
1681
-
1682
-
1683
- </ul>
1684
-
1685
-
1686
-
1687
-
1688
-
1689
- </div>
1690
- </div>
1691
- </div>
1692
-
1693
-
1694
- <div id="getnearestlocation-point" class="member">
1695
- <div class="member-link">
1696
- <a name="getnearestlocation-point" href="#getnearestlocation-point"><tt><b>getNearestLocation</b>(point)</tt></a>
1697
- </div>
1698
- <div class="member-description hidden">
1699
- <div class="member-text">
1700
- <p>Returns the nearest location on the curve to the specified point.</p>
1701
-
1702
-
1703
- <ul class="member-list">
1704
- <h4>Parameters:</h4>
1705
-
1706
- <li>
1707
- <tt>point:</tt>
1708
- <a href="../classes/Point.html"><tt>Point</tt></a>
1709
- &mdash;&nbsp;the point for which we search the nearest location
1710
-
1711
- </li>
1712
-
1713
- </ul>
1714
-
1715
-
1716
- <ul class="member-list">
1717
- <h4>Returns:</h4>
1718
-
1719
- <li>
1720
- <tt><a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></tt>&nbsp;&mdash;&nbsp;the location on the curve that&rsquo;s the closest to the specified point
1721
- </li>
1722
-
1723
-
1724
- </ul>
1725
-
1726
-
1727
-
1728
-
1729
-
1730
- </div>
1731
- </div>
1732
- </div>
1733
-
1734
-
1735
- <div id="getnearestpoint-point" class="member">
1736
- <div class="member-link">
1737
- <a name="getnearestpoint-point" href="#getnearestpoint-point"><tt><b>getNearestPoint</b>(point)</tt></a>
1738
- </div>
1739
- <div class="member-description hidden">
1740
- <div class="member-text">
1741
- <p>Returns the nearest point on the curve to the specified point.</p>
1742
-
1743
-
1744
- <ul class="member-list">
1745
- <h4>Parameters:</h4>
1746
-
1747
- <li>
1748
- <tt>point:</tt>
1749
- <a href="../classes/Point.html"><tt>Point</tt></a>
1750
- &mdash;&nbsp;the point for which we search the nearest point
1751
-
1752
- </li>
1753
-
1754
- </ul>
1755
-
1756
-
1757
- <ul class="member-list">
1758
- <h4>Returns:</h4>
1759
-
1760
- <li>
1761
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the point on the curve that&rsquo;s the closest to the specified point
1762
- </li>
1763
-
1764
-
1765
- </ul>
1766
-
1767
-
1768
-
1769
-
1770
-
1771
- </div>
1772
- </div>
1773
- </div>
1774
-
1775
-
1776
- <div id="getpointat-location" class="member">
1777
- <div class="member-link">
1778
- <a name="getpointat-location" href="#getpointat-location"><tt><b>getPointAt</b>(location)</tt></a>
1779
- </div>
1780
- <div class="member-description hidden">
1781
- <div class="member-text">
1782
- <p>Calculates the point on the curve at the given location.</p>
1783
-
1784
-
1785
- <ul class="member-list">
1786
- <h4>Parameters:</h4>
1787
-
1788
- <li>
1789
- <tt>location:</tt>
1790
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
1791
- &mdash;&nbsp;the offset or location on the curve
1792
-
1793
- </li>
1794
-
1795
- </ul>
1796
-
1797
-
1798
- <ul class="member-list">
1799
- <h4>Returns:</h4>
1800
-
1801
- <li>
1802
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the point on the curve at the given location
1803
- </li>
1804
-
1805
-
1806
- </ul>
1807
-
1808
-
1809
-
1810
-
1811
-
1812
- </div>
1813
- </div>
1814
- </div>
1815
-
1816
-
1817
- <div id="gettangentat-location" class="member">
1818
- <div class="member-link">
1819
- <a name="gettangentat-location" href="#gettangentat-location"><tt><b>getTangentAt</b>(location)</tt></a>
1820
- </div>
1821
- <div class="member-description hidden">
1822
- <div class="member-text">
1823
- <p>Calculates the normalized tangent vector of the curve at the given location.</p>
1824
-
1825
-
1826
- <ul class="member-list">
1827
- <h4>Parameters:</h4>
1828
-
1829
- <li>
1830
- <tt>location:</tt>
1831
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
1832
- &mdash;&nbsp;the offset or location on the curve
1833
-
1834
- </li>
1835
-
1836
- </ul>
1837
-
1838
-
1839
- <ul class="member-list">
1840
- <h4>Returns:</h4>
1841
-
1842
- <li>
1843
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the normalized tangent of the curve at the given location
1844
- </li>
1845
-
1846
-
1847
- </ul>
1848
-
1849
-
1850
-
1851
-
1852
-
1853
- </div>
1854
- </div>
1855
- </div>
1856
-
1857
-
1858
- <div id="getnormalat-location" class="member">
1859
- <div class="member-link">
1860
- <a name="getnormalat-location" href="#getnormalat-location"><tt><b>getNormalAt</b>(location)</tt></a>
1861
- </div>
1862
- <div class="member-description hidden">
1863
- <div class="member-text">
1864
- <p>Calculates the normal vector of the curve at the given location.</p>
1865
-
1866
-
1867
- <ul class="member-list">
1868
- <h4>Parameters:</h4>
1869
-
1870
- <li>
1871
- <tt>location:</tt>
1872
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
1873
- &mdash;&nbsp;the offset or location on the curve
1874
-
1875
- </li>
1876
-
1877
- </ul>
1878
-
1879
-
1880
- <ul class="member-list">
1881
- <h4>Returns:</h4>
1882
-
1883
- <li>
1884
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the normal of the curve at the given location
1885
- </li>
1886
-
1887
-
1888
- </ul>
1889
-
1890
-
1891
-
1892
-
1893
-
1894
- </div>
1895
- </div>
1896
- </div>
1897
-
1898
-
1899
- <div id="getweightedtangentat-location" class="member">
1900
- <div class="member-link">
1901
- <a name="getweightedtangentat-location" href="#getweightedtangentat-location"><tt><b>getWeightedTangentAt</b>(location)</tt></a>
1902
- </div>
1903
- <div class="member-description hidden">
1904
- <div class="member-text">
1905
- <p>Calculates the weighted tangent vector of the curve at the given location, its length reflecting the curve velocity at that location.</p>
1906
-
1907
-
1908
- <ul class="member-list">
1909
- <h4>Parameters:</h4>
1910
-
1911
- <li>
1912
- <tt>location:</tt>
1913
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
1914
- &mdash;&nbsp;the offset or location on the curve
1915
-
1916
- </li>
1917
-
1918
- </ul>
1919
-
1920
-
1921
- <ul class="member-list">
1922
- <h4>Returns:</h4>
1923
-
1924
- <li>
1925
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the weighted tangent of the curve at the given location
1926
- </li>
1927
-
1928
-
1929
- </ul>
1930
-
1931
-
1932
-
1933
-
1934
-
1935
- </div>
1936
- </div>
1937
- </div>
1938
-
1939
-
1940
- <div id="getweightednormalat-location" class="member">
1941
- <div class="member-link">
1942
- <a name="getweightednormalat-location" href="#getweightednormalat-location"><tt><b>getWeightedNormalAt</b>(location)</tt></a>
1943
- </div>
1944
- <div class="member-description hidden">
1945
- <div class="member-text">
1946
- <p>Calculates the weighted normal vector of the curve at the given location, its length reflecting the curve velocity at that location.</p>
1947
-
1948
-
1949
- <ul class="member-list">
1950
- <h4>Parameters:</h4>
1951
-
1952
- <li>
1953
- <tt>location:</tt>
1954
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
1955
- &mdash;&nbsp;the offset or location on the curve
1956
-
1957
- </li>
1958
-
1959
- </ul>
1960
-
1961
-
1962
- <ul class="member-list">
1963
- <h4>Returns:</h4>
1964
-
1965
- <li>
1966
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the weighted normal of the curve at the given location
1967
- </li>
1968
-
1969
-
1970
- </ul>
1971
-
1972
-
1973
-
1974
-
1975
-
1976
- </div>
1977
- </div>
1978
- </div>
1979
-
1980
-
1981
- <div id="getcurvatureat-location" class="member">
1982
- <div class="member-link">
1983
- <a name="getcurvatureat-location" href="#getcurvatureat-location"><tt><b>getCurvatureAt</b>(location)</tt></a>
1984
- </div>
1985
- <div class="member-description hidden">
1986
- <div class="member-text">
1987
- <p>Calculates the curvature of the curve at the given location. Curvatures indicate how sharply a curve changes direction. A straight line has zero curvature, where as a circle has a constant curvature. The curve&rsquo;s radius at the given location is the reciprocal value of its curvature.</p>
1988
-
1989
-
1990
- <ul class="member-list">
1991
- <h4>Parameters:</h4>
1992
-
1993
- <li>
1994
- <tt>location:</tt>
1995
- <tt>Number</tt>⟋<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
1996
- &mdash;&nbsp;the offset or location on the curve
1997
-
1998
- </li>
1999
-
2000
- </ul>
2001
-
2002
-
2003
- <ul class="member-list">
2004
- <h4>Returns:</h4>
2005
-
2006
- <li>
2007
- <tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;the curvature of the curve at the given location
2008
- </li>
2009
-
2010
-
2011
- </ul>
2012
-
2013
-
2014
-
2015
-
2016
-
2017
- </div>
2018
- </div>
2019
- </div>
2020
-
2021
-
2022
- <div id="getpointattime-time" class="member">
2023
- <div class="member-link">
2024
- <a name="getpointattime-time" href="#getpointattime-time"><tt><b>getPointAtTime</b>(time)</tt></a>
2025
- </div>
2026
- <div class="member-description hidden">
2027
- <div class="member-text">
2028
- <p>Calculates the point on the curve at the given location.</p>
2029
-
2030
-
2031
- <ul class="member-list">
2032
- <h4>Parameters:</h4>
2033
-
2034
- <li>
2035
- <tt>time:</tt>
2036
- <tt>Number</tt>
2037
- &mdash;&nbsp;the curve-time parameter on the curve
2038
-
2039
- </li>
2040
-
2041
- </ul>
2042
-
2043
-
2044
- <ul class="member-list">
2045
- <h4>Returns:</h4>
2046
-
2047
- <li>
2048
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the point on the curve at the given location
2049
- </li>
2050
-
2051
-
2052
- </ul>
2053
-
2054
-
2055
-
2056
-
2057
-
2058
- </div>
2059
- </div>
2060
- </div>
2061
-
2062
-
2063
- <div id="gettangentattime-time" class="member">
2064
- <div class="member-link">
2065
- <a name="gettangentattime-time" href="#gettangentattime-time"><tt><b>getTangentAtTime</b>(time)</tt></a>
2066
- </div>
2067
- <div class="member-description hidden">
2068
- <div class="member-text">
2069
- <p>Calculates the normalized tangent vector of the curve at the given location.</p>
2070
-
2071
-
2072
- <ul class="member-list">
2073
- <h4>Parameters:</h4>
2074
-
2075
- <li>
2076
- <tt>time:</tt>
2077
- <tt>Number</tt>
2078
- &mdash;&nbsp;the curve-time parameter on the curve
2079
-
2080
- </li>
2081
-
2082
- </ul>
2083
-
2084
-
2085
- <ul class="member-list">
2086
- <h4>Returns:</h4>
2087
-
2088
- <li>
2089
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the normalized tangent of the curve at the given location
2090
- </li>
2091
-
2092
-
2093
- </ul>
2094
-
2095
-
2096
-
2097
-
2098
-
2099
- </div>
2100
- </div>
2101
- </div>
2102
-
2103
-
2104
- <div id="getnormalattime-time" class="member">
2105
- <div class="member-link">
2106
- <a name="getnormalattime-time" href="#getnormalattime-time"><tt><b>getNormalAtTime</b>(time)</tt></a>
2107
- </div>
2108
- <div class="member-description hidden">
2109
- <div class="member-text">
2110
- <p>Calculates the normal vector of the curve at the given location.</p>
2111
-
2112
-
2113
- <ul class="member-list">
2114
- <h4>Parameters:</h4>
2115
-
2116
- <li>
2117
- <tt>time:</tt>
2118
- <tt>Number</tt>
2119
- &mdash;&nbsp;the curve-time parameter on the curve
2120
-
2121
- </li>
2122
-
2123
- </ul>
2124
-
2125
-
2126
- <ul class="member-list">
2127
- <h4>Returns:</h4>
2128
-
2129
- <li>
2130
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the normal of the curve at the given location
2131
- </li>
2132
-
2133
-
2134
- </ul>
2135
-
2136
-
2137
-
2138
-
2139
-
2140
- </div>
2141
- </div>
2142
- </div>
2143
-
2144
-
2145
- <div id="getweightedtangentattime-time" class="member">
2146
- <div class="member-link">
2147
- <a name="getweightedtangentattime-time" href="#getweightedtangentattime-time"><tt><b>getWeightedTangentAtTime</b>(time)</tt></a>
2148
- </div>
2149
- <div class="member-description hidden">
2150
- <div class="member-text">
2151
- <p>Calculates the weighted tangent vector of the curve at the given location, its length reflecting the curve velocity at that location.</p>
2152
-
2153
-
2154
- <ul class="member-list">
2155
- <h4>Parameters:</h4>
2156
-
2157
- <li>
2158
- <tt>time:</tt>
2159
- <tt>Number</tt>
2160
- &mdash;&nbsp;the curve-time parameter on the curve
2161
-
2162
- </li>
2163
-
2164
- </ul>
2165
-
2166
-
2167
- <ul class="member-list">
2168
- <h4>Returns:</h4>
2169
-
2170
- <li>
2171
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the weighted tangent of the curve at the given location
2172
- </li>
2173
-
2174
-
2175
- </ul>
2176
-
2177
-
2178
-
2179
-
2180
-
2181
- </div>
2182
- </div>
2183
- </div>
2184
-
2185
-
2186
- <div id="getweightednormalattime-time" class="member">
2187
- <div class="member-link">
2188
- <a name="getweightednormalattime-time" href="#getweightednormalattime-time"><tt><b>getWeightedNormalAtTime</b>(time)</tt></a>
2189
- </div>
2190
- <div class="member-description hidden">
2191
- <div class="member-text">
2192
- <p>Calculates the weighted normal vector of the curve at the given location, its length reflecting the curve velocity at that location.</p>
2193
-
2194
-
2195
- <ul class="member-list">
2196
- <h4>Parameters:</h4>
2197
-
2198
- <li>
2199
- <tt>time:</tt>
2200
- <tt>Number</tt>
2201
- &mdash;&nbsp;the curve-time parameter on the curve
2202
-
2203
- </li>
2204
-
2205
- </ul>
2206
-
2207
-
2208
- <ul class="member-list">
2209
- <h4>Returns:</h4>
2210
-
2211
- <li>
2212
- <tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>&nbsp;&mdash;&nbsp;the weighted normal of the curve at the given location
2213
- </li>
2214
-
2215
-
2216
- </ul>
2217
-
2218
-
2219
-
2220
-
2221
-
2222
- </div>
2223
- </div>
2224
- </div>
2225
-
2226
-
2227
- <div id="getcurvatureattime-time" class="member">
2228
- <div class="member-link">
2229
- <a name="getcurvatureattime-time" href="#getcurvatureattime-time"><tt><b>getCurvatureAtTime</b>(time)</tt></a>
2230
- </div>
2231
- <div class="member-description hidden">
2232
- <div class="member-text">
2233
- <p>Calculates the curvature of the curve at the given location. Curvatures indicate how sharply a curve changes direction. A straight line has zero curvature, where as a circle has a constant curvature. The curve&rsquo;s radius at the given location is the reciprocal value of its curvature.</p>
2234
-
2235
-
2236
- <ul class="member-list">
2237
- <h4>Parameters:</h4>
2238
-
2239
- <li>
2240
- <tt>time:</tt>
2241
- <tt>Number</tt>
2242
- &mdash;&nbsp;the curve-time parameter on the curve
2243
-
2244
- </li>
2245
-
2246
- </ul>
2247
-
2248
-
2249
- <ul class="member-list">
2250
- <h4>Returns:</h4>
2251
-
2252
- <li>
2253
- <tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;the curvature of the curve at the given location
2254
- </li>
2255
-
2256
-
2257
- </ul>
2258
-
2259
-
2260
-
2261
-
2262
-
2263
- </div>
2264
- </div>
2265
- </div>
2266
-
2267
-
2268
- <div id="getintersections-curve" class="member">
2269
- <div class="member-link">
2270
- <a name="getintersections-curve" href="#getintersections-curve"><tt><b>getIntersections</b>(curve)</tt></a>
2271
- </div>
2272
- <div class="member-description hidden">
2273
- <div class="member-text">
2274
- <p>Returns all intersections between two <a href="../classes/Curve.html"><tt>Curve</tt></a> objects as an array of <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a> objects.</p>
2275
-
2276
-
2277
- <ul class="member-list">
2278
- <h4>Parameters:</h4>
2279
-
2280
- <li>
2281
- <tt>curve:</tt>
2282
- <a href="../classes/Curve.html"><tt>Curve</tt></a>
2283
- &mdash;&nbsp;the other curve to find the intersections with (if the curve itself or <code>null</code> is passed, the self intersection of the curve is returned, if it exists)
2284
-
2285
- </li>
2286
-
2287
- </ul>
2288
-
2289
-
2290
- <ul class="member-list">
2291
- <h4>Returns:</h4>
2292
-
2293
- <li>
2294
- <tt>Array of <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a> objects</tt>&nbsp;&mdash;&nbsp;the locations of all intersections between the curves
2295
- </li>
2296
-
2297
-
2298
- </ul>
2299
-
2300
-
2301
-
2302
-
2303
-
2304
- </div>
2305
- </div>
2306
- </div>
2307
-
2308
-
2309
-
2310
- </div>
2311
-
2312
-
2313
-
2314
-
2315
- <!-- =========================== copyright notice ========================== -->
2316
- <p class="footer">
2317
- Paper.js v0.12.17<br>
2318
- Copyright &#169; 2011—2022 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
2319
- <div class="content-end"></div>
2320
-
2321
-
2322
- </article>
2323
- </body>