hkrish
|
d3405115c1
|
Use parameter on both curves in CurveLocation objects instead of Point in #getIntersection()
|
2013-06-08 21:37:43 +05:30 |
|
Jürg Lehni
|
cd7db56249
|
Remove all create() constructors for basic types since new constructors are now faster.
Woop!
|
2013-05-27 23:57:31 -07:00 |
|
Jürg Lehni
|
10d5de3ed6
|
Implement a better way to name and export class constructors.
This change also simplified the way classes are exported to PaperScope objects.
|
2013-05-27 12:48:58 -07:00 |
|
Jürg Lehni
|
f9267e7f5c
|
Some more code clean up and variable renaming.
|
2013-05-26 17:59:01 -07:00 |
|
Jürg Lehni
|
14962b5c45
|
Clean up code a bit more.
|
2013-05-26 17:52:05 -07:00 |
|
Jürg Lehni
|
32709a176b
|
Fix some comments.
|
2013-05-26 17:48:36 -07:00 |
|
Jürg Lehni
|
7050edd6e4
|
Fix point sequence.
|
2013-05-26 17:40:40 -07:00 |
|
Jürg Lehni
|
90f0679700
|
Further simplify getConvexHull() by using p0 … p3 point objects.
|
2013-05-26 17:39:13 -07:00 |
|
Jürg Lehni
|
487c4c4aef
|
Further simplify getConvexHull() by inlining cross product calculations.
|
2013-05-26 17:32:44 -07:00 |
|
Jürg Lehni
|
9edab9c3aa
|
Simplify convex hull algorithm by returning lists of points rather than lines.
We can avoid some data redundancy that way at no performance cost.
|
2013-05-26 17:18:54 -07:00 |
|
Jürg Lehni
|
9540b7f6a9
|
Use addLineIntersection() in subdivision algorithm as well.
|
2013-05-26 17:10:29 -07:00 |
|
Jürg Lehni
|
20737c6664
|
Rename various intersection methods.
|
2013-05-26 17:06:23 -07:00 |
|
Jürg Lehni
|
5d7cc2fb40
|
Use new Line.getSignedDistance().
|
2013-05-26 16:58:49 -07:00 |
|
Jürg Lehni
|
80f9f6061c
|
Change the way the Line class handles direction vectors and infinite lines.
The beginning of performance improvements in the Line class.
|
2013-05-26 15:44:52 -07:00 |
|
Jürg Lehni
|
1fb0a3a13c
|
Always provide t parameter for CurveLocations if we know it.
|
2013-05-25 11:23:59 -07:00 |
|
Jürg Lehni
|
502c76dbce
|
Start merging fat-line clipping code into Curve class.
And add a prepro option for now.
|
2013-05-24 22:30:13 -07:00 |
|
Jürg Lehni
|
7e5f846190
|
Remove debugging code.
|
2013-05-24 17:57:13 -07:00 |
|
Jürg Lehni
|
bd3ac02bbe
|
Use Curve instead of this.
Compresses better and allows passing on function as callback.
|
2013-05-24 17:52:05 -07:00 |
|
Harikrishnan Gopalakrishnan
|
ce600f4ea4
|
Fix: #initialize() to correctly convert #getValue() array back to Curve object.
|
2013-05-11 00:59:30 +03:00 |
|
Jürg Lehni
|
7b8e27ddd9
|
Further simplify getNearestPoint() algorithm.
|
2013-05-07 00:07:18 -07:00 |
|
Jürg Lehni
|
3a7547a255
|
Bring back accidentally removed static functions on Curve.
|
2013-05-05 23:14:49 -07:00 |
|
Jürg Lehni
|
db42dfdfc1
|
Implement simpler strategy to iteratively find nearest points on paths.
Idea based on method described on http://pomax.github.io/bezierinfo/
|
2013-05-05 23:05:57 -07:00 |
|
Jürg Lehni
|
f704b00e00
|
Implement static Line.intersect() and use it to speed up Curve.getIntersections()
Unfortunately doesn't seem to have any impact!
|
2013-05-04 10:22:10 -07:00 |
|
Jürg Lehni
|
85de8a0b7d
|
Clean up Curve#divide() code.
|
2013-05-03 21:00:46 -07:00 |
|
Jürg Lehni
|
3101989974
|
Adjust precision of Curve#isFlatEnough() to cover rare edge cases.
|
2013-05-03 21:00:37 -07:00 |
|
hkrish
|
e75cc32a3b
|
Merge branch 'master' of https://github.com/paperjs/paper.js
* 'master' of https://github.com/paperjs/paper.js:
Undo recent change to Curve#getIntersection() since it breaks some boolean operations.
ý5:q
|
2013-05-03 19:24:03 +02:00 |
|
Jürg Lehni
|
840e879ba8
|
Undo recent change to Curve#getIntersection() since it breaks some boolean operations.
|
2013-05-02 11:32:24 -07:00 |
|
hkrish
|
10553c1bd8
|
Merge upstream
|
2013-05-02 14:18:24 +02:00 |
|
Jürg Lehni
|
e8fed1bdf0
|
Improve Curve#getIntersections() by avoiding further subdivision of flat curves.
|
2013-05-01 18:40:57 -07:00 |
|
Jürg Lehni
|
c61e8d57b9
|
Fix issue with recursive call of Curve.getIntersections().
|
2013-05-01 18:24:54 -07:00 |
|
hkrish
|
f239a3980d
|
Fix: Update the getIntersections method signature in recursive calls
|
2013-05-01 13:29:02 +02:00 |
|
Jürg Lehni
|
883e3ad563
|
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
|
2013-04-30 18:41:26 -07:00 |
|
Jürg Lehni
|
c7ab32c501
|
Rearrange linear curve conditions.
|
2013-04-26 14:37:37 -07:00 |
|
Jürg Lehni
|
c513a24f46
|
Handle intersection between linear curves without recursive subdivision.
Closes #207.
|
2013-04-26 14:31:42 -07:00 |
|
Jürg Lehni
|
74f6a93b33
|
Optimize Curve.getArea().
|
2013-04-25 17:47:11 -07:00 |
|
Jürg Lehni
|
898e216668
|
Implement Path#getArea() and CompoundPath#getArea().
|
2013-04-25 17:37:19 -07:00 |
|
Jürg Lehni
|
80a1129eab
|
Consistently use 'this' rather than 'Curve'.
|
2013-04-25 17:19:00 -07:00 |
|
Jürg Lehni
|
1b5ca4dec9
|
Rename Curve._addIntersections() to Curve.getIntersections()
|
2013-04-25 17:17:53 -07:00 |
|
Jürg Lehni
|
eaa6e3bb6b
|
Improve Curve#getCrossings() documentation and code.
|
2013-04-25 11:08:50 -07:00 |
|
Jürg Lehni
|
d7e075d316
|
Handle contour edge cases in Path#contains().
Closes #208.
|
2013-04-25 11:03:49 -07:00 |
|
Jürg Lehni
|
dc9a9c42d2
|
Cleanup solveCubic() further.
|
2013-04-21 08:44:41 -07:00 |
|
Jonathan Puckey
|
52e7c39567
|
Improve Curve documentation.
|
2013-04-21 15:43:57 +02:00 |
|
Jürg Lehni
|
c45ad26b67
|
Remove tolerance parameter from solveCubic() / solveQuadratic() since we should always use EPSILON.
|
2013-04-20 19:58:42 -07:00 |
|
Jürg Lehni
|
14aa8e5dea
|
Improve precision of Numerical.solveCubic() and fix issues in Curve.getCrossings().
Closes #202.
|
2013-04-20 19:14:19 -07:00 |
|
Jürg Lehni
|
461def5383
|
Fix issue with imprecise tangents / normals to curves at t = 0, 1.
|
2013-04-20 17:40:19 -07:00 |
|
Jürg Lehni
|
1952e3dc7d
|
Implement Curve#getCurvatureAt().
|
2013-04-20 17:26:51 -07:00 |
|
Jürg Lehni
|
9fe1ff951a
|
Clean up code.
|
2013-04-09 20:36:38 -07:00 |
|
Jürg Lehni
|
7f245974e6
|
Implement a faster method to filter out beginnings of intersected curves.
|
2013-04-09 20:35:31 -07:00 |
|
Jürg Lehni
|
a9a0857ba4
|
Find a better strategy to avoid duplicate solutions in PathItem#getIntersections().
Closes #197.
|
2013-04-09 20:27:55 -07:00 |
|
Jürg Lehni
|
d3bb68d0e0
|
Use faster Array construction.
|
2013-04-09 07:55:09 -07:00 |
|
Jürg Lehni
|
a0b903e49c
|
Simply call slice() instead of slice(0).
|
2013-04-06 18:39:17 +02:00 |
|
Jürg Lehni
|
e854254986
|
Insert linear segments when dividing linear curves.
|
2013-03-19 16:17:12 -07:00 |
|
Jürg Lehni
|
2230c2888d
|
Fix issue with Curve#divide() where the wrong curve reference is returned.
|
2013-03-01 20:19:44 -08:00 |
|
Jürg Lehni
|
02ca95eb46
|
Avoid accidental global leakage.
|
2013-02-08 16:12:57 -08:00 |
|
Jürg Lehni
|
6c9c16ad3d
|
Update copyright information comments, and year.
|
2013-01-28 18:03:27 -08:00 |
|
Jürg Lehni
|
b0deda9445
|
Add missing documentation for various location related functions on Curve.
|
2013-01-28 16:47:45 -08:00 |
|
Jürg Lehni
|
c7d8aebb9e
|
Swap Curve's bounds scope with point evaluation scope, for proximity to bounds related methods in scope before.
|
2013-01-28 16:32:04 -08:00 |
|
Jürg Lehni
|
1a438b8b9b
|
Change Curve#[getPoint / getTangent / getNormal](t) to #[getPoint / getTangent / getNormal](offset, isParamter).
Keep deprecated versions around for now.
|
2013-01-28 16:30:28 -08:00 |
|
Jürg Lehni
|
f09bc84a12
|
Implement correct handling of Curves / Segments synchronization, improve CurveLocation linking to Curves through their linked Segments, and preserve Curves in Path#split() calls.
|
2013-01-22 14:46:49 -08:00 |
|
Jürg Lehni
|
ba5aa86411
|
Include Roger Willcocks in the thanks regarding isSufficentlyFlat.
|
2013-01-20 14:28:02 -08:00 |
|
Jürg Lehni
|
b05a21d6c9
|
Fix bug in Curve#getLocationOf().
|
2013-01-20 14:01:42 -08:00 |
|
Jürg Lehni
|
b04eb2b98f
|
Implement Path#split() and Curve#split().
|
2012-12-31 22:28:41 +01:00 |
|
Jürg Lehni
|
e066db4577
|
Implement Curve#divide().
|
2012-12-30 19:49:17 +01:00 |
|
Jürg Lehni
|
4185b63d99
|
Und recent renaming of #getNearest*() methods.
|
2012-12-30 19:43:35 +01:00 |
|
Jürg Lehni
|
2abefee336
|
Merge Base.readValue() with Base.read() and rename Base.peekValue() to Base.peek().
When called directly on Base, read() reads values, otherwise the specific type of the subclass it is called on.
|
2012-12-30 16:07:20 +01:00 |
|
Jürg Lehni
|
1b539301ad
|
Find a better naming convention for the various getLocation* methods (*At for offsets / parameters, *Of for points), implement the missing methods on Curve and use them in Path.
|
2012-12-27 21:08:03 +01:00 |
|
Jürg Lehni
|
231369fa01
|
Shorten code a bit, using loops.
|
2012-12-27 20:46:12 +01:00 |
|
Jürg Lehni
|
cb8f3291d3
|
Clean up some comments.
|
2012-12-27 20:19:23 +01:00 |
|
Jürg Lehni
|
5b9d33f32e
|
Fix imprecision in intersection code by re-introducing tolerance parameter in Curve#isFlatEnough().
|
2012-12-27 20:13:45 +01:00 |
|
Jürg Lehni
|
3c4978eb04
|
Rename Curve#getParameter(point) to Curve#getParameterOf(point), to better distinguish from Curve#getParameterAt(length).
|
2012-12-27 20:09:21 +01:00 |
|
Jürg Lehni
|
68ad4bb5ba
|
Implement PathItem#getIntersections(path) and Curve#getIntersections(curve) using divide-and-conquer approach, and new Curve.getBounds().
|
2012-12-27 19:23:03 +01:00 |
|
Jürg Lehni
|
75596e1d03
|
Move a part of Path.getBounds() code into Curve._addBounds(), and use it to also define Curve.getBounds().
|
2012-12-27 18:38:55 +01:00 |
|
Jürg Lehni
|
57a9f4fc91
|
Use constant substitution for Numerical constants as well.
|
2012-12-27 18:36:59 +01:00 |
|
Jürg Lehni
|
8f093f6dd7
|
Remove all PORT comments, since we won't port back features to Scriptographer.
|
2012-12-25 16:07:48 +01:00 |
|
Jürg Lehni
|
734cc1cc61
|
Undo commit 4445376c0204cb5a2e408c64b77a5b6fa09305ba since it clashes with magnification.
|
2012-12-21 16:41:57 +01:00 |
|
Jürg Lehni
|
d43cc28aac
|
Optimise Curve constructors that construct from 4 arguments (points) and 8 (coordinate values).
|
2012-12-20 18:03:11 +01:00 |
|
Jürg Lehni
|
29a2bc781b
|
Implement the various bounds getter on Curve too, using caching and the new static Path.get*Bounds methods.
|
2012-12-18 14:35:21 +01:00 |
|
Jürg Lehni
|
b535d9f843
|
Implement new Bootstrap feature that allows hiding of getter parameters to make sure beans are produced, and use it across the library.
|
2012-12-15 19:51:31 +01:00 |
|
Jürg Lehni
|
09ee9a0689
|
Exclude 1 in parameter range for crossing counting, as segment points would be counted twice otherwise.
|
2012-12-15 02:27:36 -08:00 |
|
Jürg Lehni
|
16578e6b15
|
Clean up code.
|
2012-12-15 02:24:46 -08:00 |
|
Jürg Lehni
|
a36d244eb1
|
Handle impression in Curve#getCrossings(), causing wrong results when handling circles.
|
2012-12-15 01:52:23 -08:00 |
|
Ben Firshman
|
73d6c102a6
|
Fix k leaking into globals
|
2012-11-20 15:53:04 +00:00 |
|
Ben Firshman
|
dc1161b32a
|
Fix fullLength leaking into globals
|
2012-11-20 15:53:03 +00:00 |
|
Jürg Lehni
|
400b454177
|
Introduce Numerical.isZero(), for comparisons against 0 with a tolerance.
|
2012-11-05 21:06:13 -08:00 |
|
Jürg Lehni
|
6ed1d67ada
|
Modernize Bootstrap.js, introduce Base.create() and use it instead of the Constructor.dont hack for object creation without the calling of initialize.
|
2012-11-03 21:49:37 -07:00 |
|
Jürg Lehni
|
f73717a7e7
|
Fix issues in Numerical.solveQuadratic(), solveCubic() and Path#contains().
Closes #71.
|
2012-10-22 18:21:33 -04:00 |
|
Jürg Lehni
|
44ad4d885a
|
Update link to Kaspar Fischer's PDF with new URL.
|
2012-10-15 15:48:38 -07:00 |
|
Jürg Lehni
|
9e61995282
|
Handle parameter matching of beginning and ends of curves separately.
|
2012-09-30 14:06:31 -07:00 |
|
Jürg Lehni
|
c30ff47930
|
Remove matrix argument from all hit-testing related methods.
We better inverse-transform the point and save the code!
|
2011-12-25 00:19:01 +01:00 |
|
Jürg Lehni
|
a326b189b4
|
Improve Curve#isFlatEnough() by finding the right threshold through testing, and remove other less precise solutions.
|
2011-11-12 01:23:41 +01:00 |
|
Jürg Lehni
|
d43b54a531
|
Shorten Curve.isFlatEnough() code.
|
2011-11-11 20:58:33 +01:00 |
|
Jürg Lehni
|
fdd4ee8d31
|
Switch back to Kaspar Fischer's version of Curve.isFlatEnough, as it produces the best results with dashed lines.
|
2011-11-11 20:55:31 +01:00 |
|
Jürg Lehni
|
3397931bb2
|
Be consistent in Numerical. EPSILON comparison rules.
|
2011-09-22 21:14:16 +02:00 |
|
Jürg Lehni
|
7f81184848
|
Only intersect lines if their lengths are not conflicting with Numerical.EPSILON comparison of the cross product in Line#intersect().
|
2011-07-30 11:38:17 +01:00 |
|
Jürg Lehni
|
7d0db22b9b
|
Use squared distances in nearest point algorithm.
|
2011-07-30 11:37:07 +01:00 |
|
Jürg Lehni
|
45c7f9c4fc
|
Port back code to prevent tangents and normals of length 0 from Scriptographer.
|
2011-07-09 11:20:03 +02:00 |
|
Jürg Lehni
|
833d4968ce
|
Change root solvers to not produce new arrays each time but fill a passed one that can be reused. Yields io impressive performance improvements.
|
2011-07-09 10:50:47 +02:00 |
|
Jürg Lehni
|
839107d341
|
Remove faulty code for calculation of tangents / normals.
|
2011-07-09 10:35:22 +02:00 |
|
Jürg Lehni
|
ec00150df2
|
Remove unused variable.
|
2011-07-09 10:34:18 +02:00 |
|
Jürg Lehni
|
4e1d613ed8
|
Fix Curve#getLength() again for straight lines.
|
2011-07-09 10:21:17 +02:00 |
|