Commit graph

236 commits

Author SHA1 Message Date
Jürg Lehni
884a0c54ad Update JSDoc, and some minor documentation changes. 2016-01-15 23:42:20 +01:00
Jürg Lehni
16e42c68fd Various minor documentation fixes (mainly capitalization). 2016-01-15 23:22:08 +01:00
Jürg Lehni
20f90bbee2 Merge branch 'new-smooth' into develop 2016-01-11 20:26:41 +01:00
Jürg Lehni
4c92c0739e Correctly handle negative smooth() indices on open paths. 2016-01-11 20:21:27 +01:00
Jürg Lehni
79508ff78b Various comments adjustments. 2016-01-08 11:14:25 +01:00
Jürg Lehni
d1e4807c6a Allow the use of Formater without additional processing of numbers.
precision >= 16 will output numbers as is.
2016-01-07 18:51:30 +01:00
Jürg Lehni
bcf000788e Reduce GEOMETRIC_EPSILON again.
Reverting daaf625ebd
2016-01-04 12:53:30 +01:00
Jürg Lehni
1543d056a7 Add more boolean unit tests from known edge cases. 2016-01-04 11:01:42 +01:00
Jürg Lehni
daaf625ebd Double GEOMETRIC_EPSILON to cover the last found edge case.
See https://github.com/paperjs/paper.js/issues/784#issuecomment-168614053
2016-01-04 10:02:58 +01:00
Jürg Lehni
0e427c16a2 Fix some white-spaces in comments and HTML. 2015-12-30 21:55:20 +01:00
Jürg Lehni
a7a07fb6d5 Update JSDoc and do some documentation spring-cleaning.
- Convert from {@code ...} to shorter `...`
- Reformat some documentation comment blocks
- Update copyright notices
2015-12-30 21:55:19 +01:00
sapics
0050984d83 Remove unnecessary calculation 2015-12-30 21:52:34 +01:00
Jürg Lehni
6c0faaf010 Use Base.pick() instead of null check. 2015-10-27 23:43:14 +01:00
Jürg Lehni
60c64ab25c Merge pull request #814 from johan/precision-0
Handle exportSVG({ precision: 0 }) correctly
2015-10-27 23:41:55 +01:00
Jürg Lehni
8eb0dcc87d Fix various JS linting problems. 2015-10-27 23:35:30 +01:00
Johan Sundström
1b129feebf Handle exportSVG({ precision: 0 }) correctly 2015-10-27 15:33:09 -07:00
Jürg Lehni
ac7c272401 Clean up link references about kappa. 2015-10-26 21:43:38 +01:00
Jürg Lehni
85f7134fe6 Reduce curve-time epsilon, and improve comments about other epsilon values. 2015-10-22 10:34:49 +02:00
Jürg Lehni
bafb6794a6 Introduce separate epsilon for fat-line clipping code, and reduce curve-time epsilon. 2015-10-21 23:44:24 +02:00
Jürg Lehni
8c3d9df06c Further fine-tune the various EPSILON values based on edge-case tests. 2015-10-21 01:42:26 +02:00
Jürg Lehni
5d6b761d3a Introduce separate WINDING_EPSILON and improve GEOMETRIC_EPSILON.
New values are based on a lot of testing.
2015-10-21 01:16:52 +02:00
Jürg Lehni
c9f5c02ee4 Decrease GEOMETRIC_EPSILON
This appears to be better aligned with the new Curve#getParameterOf() behavior.
2015-10-11 17:00:01 +02:00
Jürg Lehni
d2c762997f Address improvements mentioned by @hkrish in #794 2015-10-04 18:36:18 +02:00
Jürg Lehni
00f1d5089f Clean up Numerical code a bit. 2015-10-02 18:56:41 -05:00
Jürg Lehni
f6f9d963eb Shorten Numerical.solveQuadratic() a bit. 2015-10-02 15:46:15 -05:00
sapics
c6de2f7f23 Fix to minimize floating point noise 2015-10-02 15:39:51 -05:00
Jürg Lehni
7f7d35a38a Clean-up epsilon definitions. 2015-10-02 01:05:45 -05:00
Jürg Lehni
4b4ccbac09 Make GEOMETRIC_EPSILON so that overlap edge-cases are correctly matched.
Relates to #784
2015-10-01 20:45:08 -05:00
Jürg Lehni
9b883e5fb6 Introduce new TRIGONOMETRIC_EPSILON with higher precision than GEOMETRIC_EPSILON. 2015-10-01 20:44:27 -05:00
Jürg Lehni
75a004187e Improve Line.intersect() to more reliably find interesctions at the beginnings / ends.
Relates to #784
2015-10-01 04:38:48 -05:00
Jürg Lehni
ce95043e99 Lower geometric epsilon.
Differences slightly above 1e-8 where observed.
2015-09-21 10:54:17 -04:00
Jürg Lehni
1e5c1bafaf Increase geometric epsilon to better match collinear lines.
Needs more testing, but seems to perform well.

Relates to #786
2015-09-16 02:31:37 +02:00
Jürg Lehni
f029d5f9da Write docs for the new EPSILON values. 2015-09-13 13:41:53 +02:00
Jürg Lehni
d62caf6faa Introduce CURVETIME_EPSILON, to be used when handling curve time parameters.
Relates to #777
2015-09-12 22:55:58 +02:00
Jürg Lehni
fb5f8c0115 Introduce GEOMETRIC_EPSILON, for isOrthogonal(), isCollinear() and overlap checks.
Relates to #777
2015-09-12 10:35:47 +02:00
Jürg Lehni
215bbe2e8e Fix issue in Numerical.solveCubic() / solveQuadratic()
We need to include EPSILON tolerance in the comparison with bounds values.
2015-08-30 22:57:33 +02:00
Jürg Lehni
e476672748 Use better epsilon values in Numerical.solveQuadratic() and solveCubic()
To finally satisfy both #541 and #708.

With this change in place, https://github.com/paperjs/boolean-test is also finally back to run with 0 errors. Woop!
2015-08-18 23:47:28 +02:00
Jürg Lehni
dbac9c06de Bring back private UIDs for Color.
SVG Export for multiple gradients was broken.
2015-06-16 18:12:40 +02:00
Jürg Lehni
b541088c6f A whole lot of documentation clean-up. 2015-06-16 17:50:37 +02:00
Jürg Lehni
ce41447793 Prevent invalid invinite solutions in Numerical.solveQuadratic()
Closes #708
2015-06-16 12:30:25 +02:00
Jürg Lehni
27bb8a356f Implement unique ids, and fix issue with Base.deserialize()
Gradient and Symbol were overriding each other in the dictionary, and dictionary entries could not contain references to other dictionary entries.

Closes #690
2015-05-11 19:39:39 +02:00
Jürg Lehni
15813107c0 Remove unused variables. 2015-02-26 13:44:09 +01:00
Jürg Lehni
55e2f6610a Rename nRoots to count. 2015-01-10 22:06:11 +01:00
Jürg Lehni
22be259167 Deal with edge cases in Curve.solveCubic() where small cubics are very close to lines.
Also reduce Numerical.EPSILON again, as required by some rare edge cases.

Relates to #541.
2015-01-10 22:05:42 +01:00
Jürg Lehni
665d154c95 Simplify control-flow in Numerical.solveCubic() a bit. 2015-01-10 17:57:37 +01:00
Jürg Lehni
814512f562 No need to check solutions for bounds again. 2015-01-05 22:01:56 +01:00
Jürg Lehni
920469426e Remove the harmony version of Number.isFinite() in favor of the generally available global isFinite() for now. 2015-01-05 16:17:11 +01:00
Jürg Lehni
afc14b9634 Reduce Numerical.TOLERANCE to 1e-6, and use the same value across the boolean code.
Yields very good results now, across all tests.
2015-01-04 15:54:50 +01:00
Jürg Lehni
4371e92191 Reduce EPSILON to 1e-13.
Reducing further to 1e-14 starts producing new issues in boolean operations code.
2015-01-03 21:03:13 +01:00
Jürg Lehni
6359738618 Do not offset bounds in cubic solver by MACHINE_EPSILON, as this is how comparisons are performed with values offset by tolerances elsewhere in the library.
Doing it differently here produced various errors in fat-line clipping and boolean code.
2015-01-02 23:14:19 +01:00