Commit graph

4140 commits

Author SHA1 Message Date
Jürg Lehni
fef22f25e8 Remove node.js specific version of Base.isPlainObject(), since straps.js can handle it now. 2013-05-27 14:10:38 -07:00
Jürg Lehni
8aec04702c Update to latest version of straps.js 2013-05-27 13:52:28 -07:00
Jürg Lehni
a33beb0285 Synchronize with latest version on straps.js repo. 2013-05-27 13:46:21 -07:00
Jürg Lehni
a864ef3b3c Restructure Base.define() / Base.describe() code for easier future removal of legacy support. 2013-05-27 13:36:51 -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
15b1ea7af0 Solve issue with SVG gradients on Firefox. 2013-05-27 10:12:23 -07:00
Jürg Lehni
c533dda7b5 Finally found a better and faster alternative for this.base() calls, by setting base on the function object instead.
base can be accessed on named functions very easily, leading to another measurable speed increase. Finally all performance reasons against straps.js are eliminated!
2013-05-27 10:04:05 -07:00
Jürg Lehni
369b329b23 Change straps.js to directly use initialize() as constructor function rather than redirecting calls to it.
Should yield some interesting performance improvements.
2013-05-27 09:11:50 -07:00
Jürg Lehni
094e35f2e5 No need for separate injection object for Item.extend() 2013-05-27 08:16:34 -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
da8898abd2 Fix newly introduced bug in Line.getSide() through variable renaming. 2013-05-26 17:05:10 -07:00
Jürg Lehni
bd33446c7c Do not smooth graphs for clearer results. 2013-05-26 16:59:01 -07:00
Jürg Lehni
5d7cc2fb40 Use new Line.getSignedDistance(). 2013-05-26 16:58:49 -07:00
Jürg Lehni
f771233d37 Speed up Line class by removing internal dependance on Point. 2013-05-26 16:58:34 -07:00
Jürg Lehni
c9a669ae37 Improve fat-line charts for better comparison of results. 2013-05-26 16:15:59 -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
NickNorth
3e520efe5f arcBy recursively calls itself rather than arcTo. 2013-05-26 20:09:26 +01:00
Jürg Lehni
1fb0a3a13c Always provide t parameter for CurveLocations if we know it. 2013-05-25 11:23:59 -07:00
hkrish
46a324722a Merge branch 'master' of https://github.com/paperjs/paper.js
* 'master' of https://github.com/paperjs/paper.js: (90 commits)
  Start merging fat-line clipping code into Curve class.
  Fix white-spaces.
  Merge handling of flat curves.
  More getConvexHull() clean up.
  Remove unused variable dqmin.
  Further clean up clipFatLine()
  Some clean up in clipFatLine()
  Merge the two convergence checks to one.
  Simplify convergence checks.
  Rename p\d to part\d
  Rename v\dt to range\d
  Simplify handling of ranges and curve parts.
  Switch to using arrays rather than objects for parameter ranges.
  Reverse logic of v1t / _v1t naming and switch to using Numerical constants.
  Re-implement Curve.getLocation2() as "hub" for all the different intersection methods.
  Use break; instead of return; and untangle unnecessarily nested conditionals.
  Define private addLocation() to reduce code redundancy.
  Correctly handle calculation of CurveLocation point in getCurveIntersections().
  Move Curve.getIntersection2 to private function and better name other private functions.
  Always use parameter in getCurveLineIntersection() by flipping curve1 / 2 values as well.
  ...
2013-05-25 11:37:33 +02: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
7f00ef8f05 Fix white-spaces. 2013-05-24 22:25:22 -07:00
Jürg Lehni
f28e6ba372 Merge handling of flat curves. 2013-05-24 22:03:42 -07:00
Jürg Lehni
44be94e55e More getConvexHull() clean up. 2013-05-24 21:47:19 -07:00
Jürg Lehni
6374164de7 Remove unused variable dqmin. 2013-05-24 21:32:15 -07:00
Jürg Lehni
b1562d7594 Further clean up clipFatLine() 2013-05-24 21:31:32 -07:00
Jürg Lehni
696887477a Some clean up in clipFatLine() 2013-05-24 21:24:52 -07:00
Jürg Lehni
24f61c854a Merge the two convergence checks to one. 2013-05-24 21:11:10 -07:00
Jürg Lehni
ec1ef905cf Simplify convergence checks. 2013-05-24 21:10:02 -07:00
Jürg Lehni
eeac15ac46 Rename p\d to part\d 2013-05-24 21:05:20 -07:00
Jürg Lehni
9cf6536e5b Rename v\dt to range\d 2013-05-24 21:02:58 -07:00
Jürg Lehni
08245f936b Simplify handling of ranges and curve parts. 2013-05-24 21:01:37 -07:00
Jürg Lehni
1d1375915a Switch to using arrays rather than objects for parameter ranges. 2013-05-24 20:50:28 -07:00
Jürg Lehni
4a53767021 Reverse logic of v1t / _v1t naming and switch to using Numerical constants. 2013-05-24 20:39:40 -07:00
Jürg Lehni
6eab957fce Re-implement Curve.getLocation2() as "hub" for all the different intersection methods. 2013-05-24 20:25:29 -07:00
Jürg Lehni
7ef52b3dd4 Use break; instead of return; and untangle unnecessarily nested conditionals. 2013-05-24 20:12:42 -07:00
Jürg Lehni
d77fc505c7 Define private addLocation() to reduce code redundancy. 2013-05-24 20:04:48 -07:00
Jürg Lehni
be76cf22bb Correctly handle calculation of CurveLocation point in getCurveIntersections(). 2013-05-24 19:56:40 -07:00
Jürg Lehni
7f03ff83af Move Curve.getIntersection2 to private function and better name other private functions. 2013-05-24 19:55:17 -07:00
Jürg Lehni
26d79e6c16 Always use parameter in getCurveLineIntersection() by flipping curve1 / 2 values as well. 2013-05-24 19:53:30 -07:00
Jürg Lehni
d964ca3496 More fat-line refactoring.
Renaming and simple clean ups.
2013-05-24 19:36:26 -07:00
Jürg Lehni
f387d1596e Further simplify fat line code. 2013-05-24 18:00:28 -07:00
Jürg Lehni
7e5f846190 Remove debugging code. 2013-05-24 17:57:13 -07:00