Commit graph

564 commits

Author SHA1 Message Date
Jürg Lehni
2973fef6bd Update PathStructure example to code from website. 2014-01-05 19:01:05 +01:00
Jürg Lehni
413e4efce4 Fix small error in PathStructure example. 2014-01-05 18:57:52 +01:00
Jürg Lehni
57f1763abe Merge branch 'refs/heads/paperscript-refactoring'
Conflicts:
	src/core/PaperScope.js
2014-01-03 12:34:07 +01:00
Jürg Lehni
469aa18f1a HitTesting example: Fix dragging of paths and segments. 2014-01-02 10:55:34 +01:00
Jürg Lehni
a26d1ed0fc Instead of creating the actual canvas we can also just provide a size. 2013-12-29 16:41:57 +01:00
Jürg Lehni
f97056e4b7 Change the way PaperScripts are executed in Node.js
Requiring a PaperScript returns an initialize method which receives the Canvas argument.
2013-12-29 16:36:23 +01:00
Jürg Lehni
99d7b5cfdb Merge branch 'refs/heads/fatline' 2013-12-17 22:07:34 +01:00
Jürg Lehni
a59a42376a Clean up coding style a bit. 2013-12-16 21:40:40 +01:00
Christoph Knoth
39c1e76d4c Typo Paelette -> Palette 2013-12-16 02:27:07 +01:00
Jürg Lehni
a51f8d4ee8 Rename Item#anchor -> Item#pivot 2013-12-13 20:50:58 +01:00
Jürg Lehni
a678c51555 Some minor changes in Satie example. 2013-12-11 17:51:58 +01:00
Jürg Lehni
78a2685324 Rename Item#registration to Item#anchor 2013-12-11 14:59:51 +01:00
Jürg Lehni
9e7fe2aa4e No need to run Radial Rainbows in HiDPI mode. 2013-12-11 12:05:14 +01:00
Jürg Lehni
37d5458322 Include Satie Sound Analysis Example. 2013-12-11 02:15:51 +01:00
Jürg Lehni
7278ee4374 Make JSON serialization work for Shapes. 2013-12-09 17:27:41 +01:00
Jürg Lehni
6e5d8939d5 Rename View#draw() -> View#update() and remove checkRedraw argument.
We always check for changes, since change propagation should work reliably.
2013-12-08 19:15:58 +01:00
Jürg Lehni
31e2c37e0d Clean up Tadpoles code further. 2013-12-08 11:14:36 +01:00
Jürg Lehni
e269ba7cc6 Optimize Tadpoles example.
- Shape instead Symbol
- Directly modify segments instead of copying points
2013-12-08 10:58:19 +01:00
Jürg Lehni
7c5d377133 Improve Space examples. 2013-12-06 22:28:13 +01:00
Jürg Lehni
ece14f0151 Fix Tadpoles example. 2013-12-06 03:16:33 +01:00
Jürg Lehni
fc02c58ddb Implement asynchronously loading Rasters from disk and remote locations for Node.js
Closes #328.
2013-12-03 23:07:54 +01:00
hkrish
b625ec5b6d Merge branch 'master' into bool-fix
* master: (127 commits)
  Fix edge cases in Curve._getWinding()
  Copy over parent style in Item#reduce().
  Fire key-up events for all currently pressed keys.
  Improve and streamline key-handling logic.
  Use renamed __options object in build script too.
  Correctly apply matrices to Raster items in #importSVG()
  Support passing DOM element IDs in calls to #importSVG()
  Update to latest Prepro.js and switch from global options object to __options, to avoid name clashes.
  Make directly setting view.onFrame work again.
  Update to latest Straps.js and remove unnecessary isArray argument in Base.each()
  Add missing DOCS comments.
  Fix issue where exceptions in onFrame handlers block future animations.
  Fix issue with JSON import.
  Add Node JSONtoPDF example.
  Implement Item#data cloning.
  Remove unnecessary Color#clone() since it's doing the same as Base#clone() now.
  Remove Base.merge() and use a new Straps.js feature instead.
  Improve build script to include dist file in paperjs.org website.
  Bump version to v0.9.14
  Fix setting #radius on Shape.Circle.
  ...
2013-11-30 14:50:18 +01:00
Jürg Lehni
c08fd44101 Add Node JSONtoPDF example. 2013-11-29 12:17:59 +01:00
Jürg Lehni
dfc1b966cb Simplify SVG node example. 2013-11-26 17:33:03 +01:00
hkrish
551b49805c Add special case to examples. 2013-11-11 21:21:41 +01:00
Jürg Lehni
1f98d72c5b Switch HiDPI on by default.
Allow deactivation by setting the hidpi attribute to "off" on the canvas.
2013-11-06 15:32:08 +01:00
Jürg Lehni
4dcb0d66a9 Update most examples to HiDPI. 2013-11-06 12:53:50 +01:00
Jürg Lehni
f07f4ac977 Fix example titles. 2013-11-04 11:43:27 +01:00
Jürg Lehni
5ddcfe25b9 Clean up white-space. 2013-11-03 13:22:34 +01:00
Jürg Lehni
aec4c70b9a Update Butterfly example. 2013-11-03 12:23:31 +01:00
Jürg Lehni
6425a01bbd Include example to illustrate loading from local files. 2013-11-03 12:10:35 +01:00
Jürg Lehni
5e4bcbb5e5 Update to Ghostscript Tiger that currently causes issues with new importer code. 2013-11-03 12:09:58 +01:00
Jürg Lehni
df80eb2f23 Define PaperScope#paper as a reference to the local scope.
And use it to fix Raster JSON example.
2013-11-01 11:46:31 +01:00
Jürg Lehni
e8919174f8 Use matchShapes option in an example. 2013-10-30 16:19:10 +01:00
Jürg Lehni
4042d4fc2c Only fire change events if values actually change. 2013-10-29 21:52:42 +01:00
Jürg Lehni
a3ec26dace Improve handling of change events in Palette. 2013-10-29 21:34:12 +01:00
Jürg Lehni
ccfacf2484 Fix mediaelement.js path in Nyan example. 2013-10-29 17:35:57 +01:00
Jürg Lehni
2066fae47a Use option.expandShapes to restore boolean examples. 2013-10-29 16:47:27 +01:00
Jürg Lehni
5a462f42b7 Improve some comments / docs. 2013-10-29 09:42:59 +01:00
Jürg Lehni
7209b2f977 Add butterfly SVG example. 2013-10-29 09:42:59 +01:00
Jürg Lehni
782f5c8f7e Fix issue with reading selected segment points from JSON when there are no handles.
The segment short form was misunderstood by the constructor.
2013-10-18 20:58:06 +02:00
Jürg Lehni
4f27be8f12 Include new, improved point in path algorithm based on winding number.
It's also possible to switch to using the canvas's native isPointInPath() through options.nativeContains
2013-10-18 14:22:59 +02:00
Jürg Lehni
9976033655 Implement serialization of selection. 2013-10-17 12:04:11 +02:00
Jürg Lehni
9956a6ff51 Implement Shape#toPath(), analogue to Path#toShape().
This way is much simpler though.
2013-10-16 23:44:50 +02:00
Jürg Lehni
c4c7a37993 Implement Path#toShape(), Segment#isColinear(), Segment#isOrthogonal() and Segment#isArc(). 2013-10-16 23:10:03 +02:00
Jürg Lehni
0129080a08 SVG: Add parallelogram to example.
We should really have a test-case in place...
2013-10-16 17:11:15 +02:00
Jürg Lehni
ba8e0b791e Fix rotated primitives example.
Only use Path shapes here.
2013-10-14 21:27:08 +02:00
Jürg Lehni
041d88c89c Clean up clipping example. 2013-10-14 21:26:43 +02:00
Jürg Lehni
2263afea59 Start implementing rounded rectangles in Shape.Rectangle. 2013-10-14 19:57:28 +02:00
Jürg Lehni
d8f7799fc4 Update rotates primitives examples. 2013-10-14 19:56:51 +02:00
Jürg Lehni
4738847f30 Clean up SVGExport node example. 2013-10-10 23:12:53 +02:00
Jürg Lehni
6d751fc466 Add mouse hovering to StrokeBounds example. 2013-08-16 16:40:26 -07:00
Jürg Lehni
ca790f9339 Add simple BooleanOperations Node example, illustrating how to serve results through a HTTP server. 2013-07-18 19:04:04 -07:00
Jürg Lehni
3a1fa3171b Fix Path Intersections example. 2013-06-27 23:26:26 -07:00
Jürg Lehni
4f5dac8567 Improved PrePro to be able to dynamically load Node.js code too, and improve load.js to handle both environments.
Also moved PaperScript .pjs extension code to PaperScript, and DOM related Node.js code to dom/node.js
2013-06-27 13:49:04 -07:00
Jürg Lehni
f572ad9c0a Improve handling of Stats.
Don't bail out if the library is not loaded.
2013-06-27 04:11:50 -07:00
Jürg Lehni
c6e50375df Expose nativeBlendModes and amend BlendModes example with information about the use of native modes. 2013-06-24 15:55:15 -07:00
Jürg Lehni
4c444f266f Update BlendModes example. 2013-06-24 15:20:43 -07:00
Jürg Lehni
7d433406f8 Fix bouncing balls example.
The Clip class is gone.
2013-06-24 09:32:36 -07:00
Jürg Lehni
2241329321 Fix id clash in SVGExport. 2013-06-18 17:29:00 -07:00
Jürg Lehni
ace23d354d Update BlendModes example to include SVG export. 2013-06-18 17:23:38 -07:00
Jürg Lehni
691b2f8094 Fix issues with SVG Import and matrices on groups. 2013-06-18 15:46:49 -07:00
Jürg Lehni
b133d8fe2e Restructure BlendMode code, fix issues with color-dodge and color-burn, and create BlendModes.html example.
All modes should be implemented according to specs now.
2013-06-18 08:02:04 -07:00
Jürg Lehni
18383875eb Fix global variable leakage. 2013-06-11 17:46:50 -07:00
Jürg Lehni
bd42ded79b Include clipping example for SVG Export. 2013-06-11 15:00:18 -07:00
Jürg Lehni
7f251b78e3 Switch to HTML5 meta charset tags. 2013-06-02 13:41:10 -07:00
Jürg Lehni
7c2e57e105 Remove Item#applyMatrix boolean, go back to previous way of directly applying transformations to children in Group and Layer, and introduce new Clip class for non-transformed nested matrices. 2013-05-13 18:57:17 -07:00
Jürg Lehni
cc82bbb24d Use correct canvas size. 2013-05-09 02:39:19 -07:00
Jürg Lehni
093f4cf7ba Fix issue with SVG transformations not being applied to gradient fills. 2013-05-09 02:37:48 -07:00
Jürg Lehni
728be483d7 Implement SVGImport example for node, currently failing. 2013-05-09 00:23:11 -07:00
Jürg Lehni
e5ed88462c Update package.json for new release on NPM. 2013-05-08 20:51:58 -07:00
Jürg Lehni
c5627d141e Fix PaperScript support in node. 2013-05-08 20:38:23 -07:00
Jürg Lehni
6fd93978f8 Do not use PaperScript in node example. 2013-05-08 20:30:13 -07:00
Jürg Lehni
e2ae03d571 Update exportSVG example. 2013-05-08 20:19:49 -07:00
Jürg Lehni
219ccd2fdd Start making exportSVG() work for node, using jsdom. 2013-05-08 01:30:14 -07:00
Jürg Lehni
fc71db458b More work on node.js version. 2013-05-08 01:13:41 -07:00
Jürg Lehni
b59a98f7ce Add jQuery style aliases to Callback and use #on() in the examples rather than #attach(). 2013-05-06 20:56:58 -07:00
Jürg Lehni
d9e2d2a94a Fix console logging. 2013-05-04 14:27:53 -07:00
Jürg Lehni
eb8ebca097 Run BooleanOperations.html code asynchronously for immediate feedback. 2013-05-04 14:26:29 -07:00
Jürg Lehni
ee8a79449b Include BooleanOperations.html 2013-05-03 16:31:36 -07:00
Jürg Lehni
96d9b6730f Rename Svg acronyms in API to SVG. 2013-04-23 07:19:08 -07:00
Jürg Lehni
cebeb11301 Rename Json acronyms in API to JSON. 2013-04-23 07:13:51 -07:00
Jürg Lehni
1cbb303941 Add SpaceUsingShapes.html, as an example for Shape.Circle() 2013-04-21 09:00:53 -07:00
Jürg Lehni
bcb10a222f Add SvgImport example for Inkscape and fix issue with multiple SVG path commands.
Closes #203.
2013-04-20 14:54:21 -07:00
Jürg Lehni
90f2614d52 Export Numerical object and move KAPPA constant there. 2013-04-19 17:03:41 -07:00
Jürg Lehni
8fc2a69136 Improve comment. 2013-04-19 13:52:17 -07:00
Jürg Lehni
fad9d8649d Update BouncingBalls.html example. 2013-04-19 13:16:22 -07:00
Jürg Lehni
9efbc288a1 Merge Path.Rectangle and Path.RoundRectangle. 2013-04-19 12:36:49 -07:00
Jürg Lehni
e546848bcc Adjust SpiralRaster to work with inverted gray. 2013-04-09 20:40:57 -07:00
Jürg Lehni
e9aad895ae Import and export Item#data in SVG as well.
Closes #188.
2013-04-09 17:53:26 -07:00
Jürg Lehni
7f3b9aa900 Convert Gradient creation to new notation. 2013-04-09 09:34:56 -07:00
Jürg Lehni
9d0b9dc4c6 Allow implicit Gradient declaration in Color object literals. 2013-04-09 09:27:46 -07:00
Jürg Lehni
26efbdb451 Implement argument reading for Gradient objects. 2013-04-09 09:20:32 -07:00
Jürg Lehni
b9532f6a1a Rename Color#hilite -> Color#highlight. 2013-04-09 08:51:14 -07:00
Jürg Lehni
5209e97c8d Merge GradientColor into Color.
Work in progress.
2013-04-09 01:21:36 -07:00
Jürg Lehni
9cdc4b9372 Switch back to only one Gradient constructor for both linear and radial Gradients. 2013-04-08 20:52:21 -07:00
Jürg Lehni
93437010aa Adjust Raster example to inverted gray value. 2013-04-08 20:22:02 -07:00
Jürg Lehni
232ea221b4 First batch of large Color refactoring and simplification.
Work in progress.
2013-04-07 10:03:51 -07:00
Jonathan Puckey
87d8d1f36c Remove asterisk from Q*bertify.html filename. 2013-03-16 13:20:04 +01:00
Jonathan Puckey
5172b77ab3 Remove path smoothing from Tadpoles example. 2013-03-11 00:20:02 +01:00
Jonathan Puckey
b60080d8e9 Fix tadpoles example. 2013-03-11 00:14:16 +01:00
Jonathan Puckey
03d98ecc09 Improve Lines example by cleaning up the code and make it run a little less hot. 2013-03-10 23:38:27 +01:00
Jonathan Puckey
1b57b1eb15 Fix Stars example. 2013-03-10 18:09:51 +01:00
Jonathan Puckey
bae5589409 Improve Chain example. 2013-03-10 18:04:52 +01:00
Jonathan Puckey
7a266a50dd Fix Q*Bertify example. 2013-03-10 18:03:08 +01:00
Jonathan Puckey
581f99f345 Make Phyllotaxis Raster example run a little less hot. 2013-03-10 17:05:25 +01:00
Jonathan Puckey
981bce31cb Improve examples. 2013-03-10 16:47:57 +01:00
Jonathan Puckey
f6cf20fa8c Improve Paperoids example. 2013-03-10 15:58:27 +01:00
Jonathan Puckey
78200e715b Improve Future Splash example. 2013-03-09 23:37:56 +01:00
Jonathan Puckey
ee141ca98d Improve Division Raster example. 2013-03-09 18:51:04 +01:00
Jonathan Puckey
c9e95d2c01 Improve examples. 2013-03-09 16:28:53 +01:00
Jonathan Puckey
ace2e3e13b Improve several examples. 2013-03-09 16:02:11 +01:00
Jonathan Puckey
2dfe491212 Improve PathStructure example. 2013-03-09 15:58:39 +01:00
Jonathan Puckey
421c3c19e3 Remove Letter example. 2013-03-09 15:26:59 +01:00
Jonathan Puckey
ba86ec8688 Remove Circle example.
Removing because the example doesn't really show off anything.
2013-03-09 15:01:46 +01:00
Jonathan Puckey
d4bbb84699 Fix Nyan Rainbow example. 2013-03-09 14:33:48 +01:00
Jonathan Puckey
304ca32d45 Fix Paperoids example. 2013-03-07 14:45:51 +01:00
Jürg Lehni
c0392b837c Simplify PathIntersections example. 2013-03-05 15:09:46 -08:00
Jürg Lehni
06beb0141b Follow same naming conventions as with other examples. 2013-03-05 15:05:39 -08:00
Jonathan Puckey
845e8cfa1b Optimize and clean up Tadpoles example. 2013-03-05 14:34:19 +01:00
Jonathan Puckey
841c99d6d8 Fix Paperoids example and use Path#getIntersections for collision detection. 2013-03-04 20:39:13 +01:00
Jürg Lehni
8a69fcd1e5 Actually use precision setting in Path#getPathData(). 2013-03-03 16:51:31 -08:00
Jürg Lehni
c9e337836a Move BouncingBalls example to Paper.js folder. 2013-03-03 14:38:27 -08:00
Jürg Lehni
7eb9df61b3 Update JSON for Tiger example. 2013-03-03 14:19:29 -08:00
Jonathan Puckey
bedb4001a7 Use named argument constructors in Simplify example. 2013-03-03 14:25:38 +01:00
Jonathan Puckey
3f7cc316c1 Small clean ups in Nyan Rainbow example. 2013-03-03 14:25:10 +01:00
Jonathan Puckey
9679881eef Add HitTesting example to Paperjs.org folder. 2013-03-03 14:22:46 +01:00
Jonathan Puckey
ba33fd6ebf Update MetaBalls example to be the same as that on Paperjs.org and convert to use the new notation style. 2013-03-03 13:39:15 +01:00
Jonathan Puckey
e692bf4c74 Add example of path intersections. 2013-03-03 12:50:26 +01:00
Jonathan Puckey
a8d796f787 Fix Q*bertify example. 2013-03-02 21:23:17 +01:00
Jonathan Puckey
0c125149e1 Move Tadpoles example to Paperjs.org folder. 2013-03-02 21:14:28 +01:00
Jonathan Puckey
59a2203764 Fix title of Nyan Rainbow example. 2013-03-02 21:13:45 +01:00
Jonathan Puckey
ae34f07c3a Fix Nyan Rainbow and update a few things to use the new notation. 2013-03-02 21:12:20 +01:00
Jonathan Puckey
9260717bb8 Examples: move Smoothing example to Paperjs.org folder. 2013-03-02 20:59:27 +01:00
Jonathan Puckey
3db61a3509 Examples: Move improved and simplified version of Bouncing Balls to Paperjs.org folder. 2013-03-02 20:58:56 +01:00
Jonathan Puckey
a3880bab5e Examples: add Voronoi, Q*bertify and Nyan Rainbow to Paperjs.org folder. 2013-03-02 20:58:09 +01:00
Jonathan Puckey
d13f1b88d6 Add interactive tiger example, which shows off item handlers and svg importing. 2013-03-02 20:57:09 +01:00
Jonathan Puckey
b124d23078 Move examples which are featured on paperjs.org website to Paperjs.org folder. 2013-03-02 20:54:52 +01:00
Jonathan Puckey
1346b7d4c0 Lines example: use new notation for creating paths. 2013-03-02 20:51:44 +01:00
Jonathan Puckey
e7475d5980 Update Chain example. 2013-03-02 18:35:10 +01:00
Jonathan Puckey
8ab70fd0de Update Arcs example. 2013-03-02 17:05:56 +01:00
Jonathan Puckey
2b4a1a7dc4 Update SpiralRaster example. 2013-03-02 16:42:26 +01:00
Jonathan Puckey
676a207871 Update Tadpoles example to use Project#importJson. 2013-03-02 16:06:31 +01:00
Jonathan Puckey
945a7220ee Update Animated Star example. 2013-03-02 16:02:29 +01:00
Jonathan Puckey
2eafb73912 Update extruded example to use Project#importJson. 2013-03-02 15:58:38 +01:00
Jürg Lehni
5afa1b1688 Allow direct passing of color arguments to gradient constructors as well as arrays. 2013-03-01 17:44:16 -08:00
Jürg Lehni
58fad6ed72 Switch from Gradient#type to separate LinearGradient / RadialGradient classes.
But remain backward compatible through direct calls to Gradient constructor.
2013-03-01 17:39:36 -08:00
Jürg Lehni
afeb8cbe70 No need to expand CSS 'font' shorthand property, since we're now iterating all style properties. 2013-03-01 10:21:19 -08:00
Jürg Lehni
01026c0896 Fix support for viewBox when importing SVG symbols. 2013-03-01 10:08:17 -08:00
Jürg Lehni
cef30f9dd1 Switch to #pathData for JSON serialization of Path and CompoundPath. 2013-02-28 19:41:13 -08:00