mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Prebuilt module for rd/ENG-48/paper-js-to-gha
This commit is contained in:
parent
a6b7f2bb67
commit
d0ac51bc98
56 changed files with 26738 additions and 7720 deletions
|
@ -1,15 +1,18 @@
|
|||
## Authors
|
||||
|
||||
- Jürg Lehni <juerg@scratchdisk.com>
|
||||
- Jonathan Puckey <jonathan@studiomoniker.com>
|
||||
- Jonathan Puckey <jonathan@puckey.studio>
|
||||
|
||||
## Contributors
|
||||
|
||||
- Harikrishnan Gopalakrishnan <hari.exeption@gmail.com>
|
||||
- Jan Bösenberg <development@iconexperience.com>
|
||||
- Jan Bösenberg <jan.boesenberg@gmail.com>
|
||||
- Jt Whissel <jtwhissel@gmail.com>
|
||||
- Andrew Roles <jaroles58@gmail.com>
|
||||
- Jacob Lites <jnightlight@gmail.com>
|
||||
- Justin Ridgewell <justinridgewell@gmail.com>
|
||||
- Andrew Wagenheim <abwagenheim@gmail.com>
|
||||
- Scott Kieronski <baroes0239@gmail.com>
|
||||
- DD Liu <liudi@media.mit.edu>
|
||||
- Samuel Asensi <asensi.samuel@gmail.com>
|
||||
- Takahiro Nishino <sapics.dev@gmail.com>
|
||||
|
|
224
CHANGELOG.md
224
CHANGELOG.md
|
@ -1,8 +1,205 @@
|
|||
# Change Log
|
||||
|
||||
## `0.12.7`
|
||||
|
||||
### Fixed
|
||||
|
||||
- PaperScript: Actually make `options.paperFeatures.moduleExports` work
|
||||
independently from `options.paperFeatures.operatorOverloading`.
|
||||
|
||||
## `0.12.6`
|
||||
|
||||
### Added
|
||||
|
||||
- PaperScript: Add option `options.paperFeatures.moduleExports` to control
|
||||
module exports conversion.
|
||||
|
||||
## `0.12.5`
|
||||
|
||||
### Added
|
||||
|
||||
- PaperScript: Add option `options.paperFeatures.operatorOverloading` to control
|
||||
operator overloading.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix `new Raster(HTMLCanvasElement)` constructor (#1745).
|
||||
- Handle `CurveLocation` on paths with only one segment.
|
||||
- Fix recently introduced error in `CompoundPath.compare()` (#1769).
|
||||
- Clamp opacity values to [0, 1] (#1814).
|
||||
- Support closed `Path` items with blend mode and no segments (#1763).
|
||||
- Fix error in `getCrossingSegments()` (#1773).
|
||||
- SVG Import: Support SVG strings with leading line-breaks (#1813).
|
||||
- Docs: Improve documentation for `Raster#drawImage(CanvasImageSource)` (#1784).
|
||||
|
||||
### Changed
|
||||
|
||||
- Use `'paper-'` prefix in generated view ids.
|
||||
|
||||
## `0.12.4`
|
||||
|
||||
### Added
|
||||
|
||||
- Allow paper core import in TypeScript (#1713).
|
||||
- Boolean: Improve performance from `O(n^2)` to nearly `O(n)` by the use of the
|
||||
sweep and prune algorithm (#1737).
|
||||
- Docs: Add support for nullable values.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix `PathItem#getCrossing()` to not return overlaps (#1409).
|
||||
- Fix regression in `Curve.getIntersections()` (#1638).
|
||||
- Fix edge cases in `CurveLocation.isCrossing()` (#1419, #1263).
|
||||
- Fix `SymbolItem#hitTestAll()` to return only one match per symbol item
|
||||
(#1680).
|
||||
- Fix handling of negative `Shape` sizes (#1733).
|
||||
- Fix parsing of RGB `Color` strings with percentages (#1736).
|
||||
- Fix `Shape` bounds when passing position in constructor (#1686).
|
||||
- Prevent nested group matrix from reset when transforming parent (#1711).
|
||||
- Boolean: Fix edge cases in overlap detection (#1262).
|
||||
- Boolean: Add check for paths with only one segment (#1351).
|
||||
- Boolean: Correctly handle open filled paths (#1647).
|
||||
- Boolean: Avoid winding number edge cases (#1619).
|
||||
- Docs: Fix some documentation return types (#1679).
|
||||
|
||||
## `0.12.3`
|
||||
|
||||
### Added
|
||||
|
||||
- Add documentation for `Item#internalBounds`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix regression in `Color` change propagation (#1672, #1674).
|
||||
- SVG Export: Fix viewport size of exported `Symbol` (#1668).
|
||||
- Handle non-invertible matrices in `Item#contains()` (#1651).
|
||||
- Improve documentation for `Item#clipMask` (#1673).
|
||||
- Improve TypeScript definitions (#1659, #1663, #1664, #1667).
|
||||
|
||||
## `0.12.2`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix drawing with compound-paths as clip-items (#1361).
|
||||
- Fix drawing of path selection with small handle size (#1327).
|
||||
- Do not ignore `Group#clipItem.matrix` in `Group#internalBounds` (#1427).
|
||||
- Correctly calculate bounds with nested empty items (#1467).
|
||||
- Fix color change propagation on groups (#1152).
|
||||
- Fix `Path#arcTo()` where `from` and `to` points are equal (#1613).
|
||||
- Improve `new Raster(size[, position])` constructor (#1621).
|
||||
- SVG Export: Fix error when `Item#matrix` is not invertible (#1580).
|
||||
- SVG Export: Include missing viewBox attribute (#1576).
|
||||
- SVG Import: Use correct default values for gradients (#1632, #1660).
|
||||
- SVG Import: Add basic `<switch/>` support (#1597).
|
||||
- JSON Import: Prevent `Item#insert()` method from being overridden (#1392).
|
||||
- PaperScript: Fix issues with increment/decrement operators (#1450, #1611).
|
||||
|
||||
## `0.12.1`
|
||||
|
||||
### Added
|
||||
|
||||
- Add TypeScript definition, automatically generated from JSDoc comments
|
||||
(#1612).
|
||||
- Support `new Raster(size[, position])` constructor.
|
||||
- Expose `Raster#context` accessor.
|
||||
- Implement `Raster#clear()` method to clear associated canvas context.
|
||||
- Node.js: Add support for Node.js v11 and v12.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix parsing of CSS colors with spaces in parentheses (#1629).
|
||||
- Improve `Color.random()` documentation.
|
||||
- Fix `Tween#then()` documentation.
|
||||
|
||||
### Removed
|
||||
|
||||
- Node.js: Remove support for Node.js v6.
|
||||
|
||||
## `0.12.0`
|
||||
|
||||
### News
|
||||
|
||||
Another release, another new member on the team: Please welcome
|
||||
[@arnoson](https://github.com/arnoson), who has worked hard on the all new
|
||||
animation support, exposed through the `Tween` class and its various methods on
|
||||
the `Item` class, see below for details:
|
||||
|
||||
### Added
|
||||
|
||||
- Add new `Tween` class and related methods on `Item`, to animate and
|
||||
interpolate their various properties, including colors, sub-properties, etc.:
|
||||
`Item#tween(from, to, options)`, `Item#tween(to, options)`,
|
||||
`Item#tween(options)`, `Item#tweenFrom(from, options)`,
|
||||
`Item#tweenTo(to, options)`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Only draw Raster if image is not empty (#1320).
|
||||
- Emit mousedrag events on correct items when covered by other items (#1465).
|
||||
- Fix drawing issues of bounds and position with `Group#selectedColor` (#1571).
|
||||
- Fix `Item.once()` to actually only emit event once.
|
||||
- Various documentation fixes and improvements (#1399).
|
||||
|
||||
## `0.11.8`
|
||||
|
||||
### News
|
||||
|
||||
This is the first release in quite a while, and it was made possible thanks to
|
||||
two new people on the team:
|
||||
|
||||
A warm welcome to [@sasensi](https://github.com/sasensi) and
|
||||
[@sapics](https://github.com/sapics), the two new and very active maintainers /
|
||||
contributors! :tada:
|
||||
|
||||
Their efforts mean that many issues are finally getting proper attention and
|
||||
solid fixes, as we are paving the way for the upcoming release of `1.0.0`. Here
|
||||
the fixes and additions from the past two weeks:
|
||||
|
||||
### Fixed
|
||||
|
||||
- Prevent `paper` object from polluting the global scope (#1544).
|
||||
- Make sure `Path#arcTo()` always passes through the provide through point
|
||||
(#1477).
|
||||
- Draw shadows on `Raster` images (#1437).
|
||||
- Fix boolean operation edge case (#1506, #1513, #1515).
|
||||
- Handle closed paths with only one segment in `Path#flatten()` (#1338).
|
||||
- Remove memory leak on gradient colors (#1499).
|
||||
- Support alpha channel in CSS colors (#1468, #1539, #1565).
|
||||
- Improve color CSS string parsing and documentation.
|
||||
- Improve caching of item positions (#1503).
|
||||
- Always draw selected position in global coordinates system (#1545).
|
||||
- Prevent empty `Symbol` items from causing issues with transformations (#1561).
|
||||
- Better detect when a cached global matrix is not valid anymore (#1448).
|
||||
- Correctly draw selected position when item is in a group with matrix not
|
||||
applied (#1535).
|
||||
- Improve handling of huge amounts of segments in paths (#1493).
|
||||
- Do not trigger error messages about passive event listeners on Chrome (#1501).
|
||||
- Fix errors with event listeners on mobile (#1533).
|
||||
- Prevent first mouse drag event from being emitted twice (#1553).
|
||||
- Support optional arguments in translate and rotate statements in SVG Import
|
||||
(#1487).
|
||||
- Make sure SVG import always applies imported attributes (#1416).
|
||||
- Correctly handle `Raster` images positions in SVG import (#1328).
|
||||
- Improve documentation for `Shape#toPath()` (#1374).
|
||||
- Improve documentation of hit test coordinate system (#1430).
|
||||
- Add documentation for `Item#locked` (#1436).
|
||||
- Support Webpack bundling in Node.js server (#1482).
|
||||
- Travis CI: Get unit tests to run correctly again.
|
||||
- Travis CI: Remove Node 4 and add Node 9.
|
||||
|
||||
### Added
|
||||
|
||||
- `Curve#getTimesWithTangent()` and `Path#getOffsetsWithTangent()` as a way to
|
||||
get the curve-times / offsets where the path is tangential to a given vector.
|
||||
- `Raster#smoothing` to control if pixels should be blurred or repeated when a
|
||||
raster is scaled up (#1521).
|
||||
- Allow `PaperScript`to export from executed code, supporting `export default`,
|
||||
named exports, as well as `module.exports`.
|
||||
|
||||
## `0.11.5`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix `Curve#isSelected()` to correctly reflect the state of `#handle1` (#1378).
|
||||
- Key Events: Fix auto-filling issue on Chrome (#1358, #1365).
|
||||
- Boolean: Check that overlaps are on the right path (#1321).
|
||||
|
@ -15,38 +212,42 @@
|
|||
## `0.11.4`
|
||||
|
||||
### Changed
|
||||
|
||||
- Node.js: Add support for v8, and keep testing v4, v6, v7 in Travis CI.
|
||||
|
||||
## `0.11.3`
|
||||
|
||||
### Fixed
|
||||
- Mouse Events: Fix item-based `doubleclick` events (#1316).
|
||||
|
||||
- Mouse Events: Fix item-based `doubleclick` events (#1316).
|
||||
- Overhaul the caching of bounds and matrix decomposition, improving reliability
|
||||
of `Item#rotation` and `#scaling` and fixing situations caused by wrongly
|
||||
caching `Item#position` and `#bounds` values.
|
||||
|
||||
- Prevent consumed properties in object literal constructors from being set on
|
||||
the instance.
|
||||
|
||||
### Changed
|
||||
|
||||
- Make all functions and accessors enumerable on all Paper.js classes.
|
||||
|
||||
## `0.11.2`
|
||||
|
||||
### Fixed
|
||||
|
||||
- PaperScript: Fix a parsing error in math operations without white-space
|
||||
(#1314).
|
||||
|
||||
## `0.11.1`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Bring back deactivation of Node.js modules on browsers. This has most probably
|
||||
broken Webpack bundling in `0.11.0`.
|
||||
|
||||
## `0.11.0`
|
||||
|
||||
### Changed
|
||||
|
||||
- Separate `paper` module on NPM into: `paper`, `paper-jsdom` and
|
||||
`paper-jsdom-canvas` (#1252):
|
||||
- `paper` is the main library, and can be used directly in a browser
|
||||
|
@ -59,12 +260,14 @@
|
|||
[jsdom](https://github.com/tmpvar/jsdom).
|
||||
|
||||
### Added
|
||||
|
||||
- PaperScript: Support newer, external versions of Acorn.js for PaperScript
|
||||
parsing, opening the doors to ES 2015 (#1183, #1275).
|
||||
- Hit Tests: Implement `options.position` to hit `Item#position` (#1249).
|
||||
- Split `Item#copyTo()` into `#addTo()` and `#copyTo()`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Intersections: Bring back special handling of curve end-points (#1284).
|
||||
- Intersections: Correctly handle `Item#applyMatrix = false` (#1289).
|
||||
- Boolean: Bring back on-path winding handling (#1281).
|
||||
|
@ -98,6 +301,7 @@
|
|||
## `0.10.3`
|
||||
|
||||
### Changed
|
||||
|
||||
- Node.js: Support v7, and keep testing v4 up to v7 in Travis CI.
|
||||
- Node.js: Loosely couple Node.js / Electron code to `Canvas` module, and treat
|
||||
its absence like a headless web worker context in the browser (#1103).
|
||||
|
@ -122,6 +326,7 @@
|
|||
`#reorient()` (#973).
|
||||
|
||||
### Added
|
||||
|
||||
- Implement `Path#divideAt(location)`, in analogy to `Curve#divideAt(location)`.
|
||||
- Add `PathItem#compare()` as a way to compare the geometry of two paths to see
|
||||
if they describe the same shape, handling cases where paths start in different
|
||||
|
@ -140,6 +345,7 @@
|
|||
(#1004, #1177).
|
||||
|
||||
### Fixed
|
||||
|
||||
- Many improvements to boolean operations:
|
||||
- Improve performance of boolean operations when there no actual crossings
|
||||
between the paths, but paths may be contained within each other.
|
||||
|
@ -180,17 +386,20 @@
|
|||
(#632).
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove `Numerical.TOLERANCE = 1e-6` as there is no internal use for it
|
||||
anymore.
|
||||
|
||||
## `0.10.2`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Get published version to work correctly in Bower again.
|
||||
|
||||
## `0.10.1`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Correct a few issues with documentation and NPM publishing that slipped
|
||||
through in the `0.10.0` release.
|
||||
|
||||
|
@ -228,6 +437,7 @@ Thank you all for using Paper.js, submitting bugs and ideas, and all those that
|
|||
contribute to the code.
|
||||
|
||||
### Changed
|
||||
|
||||
- Significant overhaul and improvements of boolean path operations
|
||||
`PathItem#unite()`, `#subtract()`, `#intersect()`, `#exclude()`, `#divide()`:
|
||||
- Improve handling of self-intersecting paths and non-zero fill-rules.
|
||||
|
@ -244,7 +454,7 @@ contribute to the code.
|
|||
- `Curve#getParameterAt(offset)` → `#getTimeAt(offset)`
|
||||
- `Curve#getParameterOf(point)` → `getTimeOf(point)`
|
||||
- `Curve#getPointAt(time, true)` → `#getPointAtTime(time)`
|
||||
- `Curve#getTangentAt(time, true)` → `#getTangenttTime(time)`
|
||||
- `Curve#getTangentAt(time, true)` → `#getTangentAtTime(time)`
|
||||
- `Curve#getNormalAt(time, true)` → `#getNormalAtTime(time)`
|
||||
- `Curve#getCurvatureAt(time, true)` → `#getCurvatureAtTime(time)`
|
||||
- `CurveLocation#parameter` → `#time`
|
||||
|
@ -304,6 +514,7 @@ contribute to the code.
|
|||
`Color` (#1043).
|
||||
|
||||
### Added
|
||||
|
||||
- Use unified code-base for browsers, Node.js, Electron, and anything
|
||||
in-between, and enable npm install for browser use (#739).
|
||||
- Start using automatic code testing and deployment of prebuilt versions through
|
||||
|
@ -368,6 +579,7 @@ contribute to the code.
|
|||
- Add `Raster#loaded` to reflect the loading state of its image.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix calculations of `Item#strokeBounds` for all possible combinations of
|
||||
`Item#strokeScaling` and `Item#applyMatrix` for `Path`, `Shape` and
|
||||
`SymbolItem`, along with correct handling of such strokes in Item#hitTest()
|
||||
|
@ -446,10 +658,11 @@ contribute to the code.
|
|||
`Numerical.solveCubic()` for edge-cases (#1085).
|
||||
|
||||
### Removed
|
||||
|
||||
- Canvas attributes "resize" and "data-paper-resize" no longer cause paper to
|
||||
resize the canvas when the viewport size changes; Additional CSS styles are
|
||||
required since `0.9.22`, e.g.:
|
||||
|
||||
|
||||
```css
|
||||
/* Scale canvas with resize attribute to full size */
|
||||
canvas[resize] {
|
||||
|
@ -464,6 +677,7 @@ contribute to the code.
|
|||
It is replaced by `Project#addLayer()` and `Project#insertLayer()`.
|
||||
|
||||
### Deprecated
|
||||
|
||||
- `#windingRule` on `Item` and `Style` → `#fillRule`
|
||||
- `Curve#getNormalAt(time, true)` → `#getNormalAtTime(true)`
|
||||
- `Curve#divide()` → `#divideAt(offset)` / `#divideAtTime(time)`
|
||||
|
@ -471,7 +685,7 @@ contribute to the code.
|
|||
- `Curve#getParameterAt(offset)` → `#getTimeAt(offset)`
|
||||
- `Curve#getParameterOf(point)` → `getTimeOf(point)`
|
||||
- `Curve#getPointAt(time, true)` → `#getPointAtTime(time)`
|
||||
- `Curve#getTangentAt(time, true)` → `#getTangenttTime(time)`
|
||||
- `Curve#getTangentAt(time, true)` → `#getTangentAtTime(time)`
|
||||
- `Curve#getNormalAt(time, true)` → `#getNormalAtTime(time)`
|
||||
- `Curve#getCurvatureAt(time, true)` → `#getCurvatureAtTime(time)`
|
||||
- `CurveLocation#parameter` → `#time`
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||
http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||
Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
||||
http://juerglehni.com/ & https://puckey.studio/
|
||||
All rights reserved.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
|
126
README.md
126
README.md
|
@ -1,38 +1,45 @@
|
|||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting [![Build Status](https://travis-ci.org/paperjs/paper.js.svg?branch=develop)](https://travis-ci.org/paperjs/paper.js) [![NPM](https://img.shields.io/npm/v/paper.svg)](https://www.npmjs.com/package/paper) ![Bower](https://img.shields.io/bower/v/paper.svg)
|
||||
# Scratch's fork of Paper.js [![Build Status](https://circleci.com/gh/LLK/paper.js.svg?style=shield)](https://app.circleci.com/pipelines/github/LLK/paper.js?branch=develop) [![NPM](https://img.shields.io/npm/v/@scratch/paper.svg)](https://www.npmjs.com/package/@scratch/paper)
|
||||
|
||||
This is a fork of Paper.js for use in Scratch. Please do not contact the Paper.js authors to support this fork.
|
||||
|
||||
_Original README.md below_
|
||||
|
||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting
|
||||
|
||||
If you want to work with Paper.js, simply download the latest "stable" version
|
||||
from [http://paperjs.org/download/](http://paperjs.org/download/)
|
||||
|
||||
- Website: <http://paperjs.org/>
|
||||
- Discussion forum: <http://groups.google.com/group/paperjs>
|
||||
- Questions: <https://stackoverflow.com/questions/tagged/paperjs>
|
||||
- Discussion forum: <https://groups.google.com/group/paperjs>
|
||||
- Mainline source code: <https://github.com/paperjs/paper.js>
|
||||
- Twitter: [@paperjs](http://twitter.com/paperjs)
|
||||
- Twitter: [@paperjs](https://twitter.com/paperjs)
|
||||
- Latest releases: <http://paperjs.org/download/>
|
||||
- Pre-built development versions: [`prebuilt/module`](https://github.com/paperjs/paper.js/tree/prebuilt/module)
|
||||
and [`prebuilt/dist`](https://github.com/paperjs/paper.js/tree/prebuilt/dist) branches.
|
||||
- Pre-built development versions:
|
||||
[`prebuilt/module`](https://github.com/paperjs/paper.js/tree/prebuilt/module)
|
||||
and [`prebuilt/dist`](https://github.com/paperjs/paper.js/tree/prebuilt/dist)
|
||||
branches.
|
||||
|
||||
## Installing Paper.js
|
||||
|
||||
The recommended way to install and maintain Paper.js as a dependency in your
|
||||
project is through the [Node.js Package Manager (NPM)](https://www.npmjs.com/)
|
||||
for browsers, Node.js or Electron, as well as through Bower for browsers.
|
||||
for browsers, Node.js or Electron.
|
||||
|
||||
If NPM or Bower is already installed, simply type one of these
|
||||
commands in your project folder:
|
||||
If NPM is already installed, simply type one of these commands in your project
|
||||
folder:
|
||||
|
||||
```sh
|
||||
npm install paper
|
||||
# Or:
|
||||
bower install paper
|
||||
```
|
||||
|
||||
Upon execution, you will find a `paper` folder inside the project's
|
||||
`node_modules` / `bower_components` folder.
|
||||
`node_modules` folder.
|
||||
|
||||
For more information on how to install Node.js and NPM, read the chapter
|
||||
[Installing Node.js and NPM](#installing-nodejs-and-npm).
|
||||
|
||||
### Which Version to Use?
|
||||
### Which Version to Use
|
||||
|
||||
The various distributions come with two different pre-build versions of
|
||||
Paper.js, in minified and normal variants:
|
||||
|
@ -51,9 +58,9 @@ generally not recommended to install Node.js through OS-supplied package
|
|||
managers, as the its development cycles move fast and these versions are often
|
||||
out-of-date.
|
||||
|
||||
On macOS, [Homebrew](http://brew.sh/) is a good option if one version of
|
||||
On macOS, [Homebrew](https://brew.sh/) is a good option if one version of
|
||||
Node.js that is kept up to date with `brew upgrade` is enough:
|
||||
<http://treehouse.github.io/installation-guides/mac/node-mac.html>
|
||||
<https://treehouse.github.io/installation-guides/mac/node-mac.html>
|
||||
|
||||
[NVM](https://github.com/creationix/nvm) can be used instead to install and
|
||||
maintain multiple versions of Node.js on the same platform, as often required by
|
||||
|
@ -63,10 +70,10 @@ different projects:
|
|||
Homebrew is recommended on macOS also if you intend to install Paper.js with
|
||||
rendering to the Canvas on Node.js, as described in the next paragraph.
|
||||
|
||||
For Linux, see <http://nodejs.org/download/> to locate 32-bit and 64-bit Node.js
|
||||
For Linux, see <https://nodejs.org/download/> to locate 32-bit and 64-bit Node.js
|
||||
binaries as well as sources, or use NVM, as described in the paragraph above.
|
||||
|
||||
### Installing Paper.js for Node.js
|
||||
### Installing Paper.js Using NPM
|
||||
|
||||
Paper.js comes in three different versions on NPM: `paper`, `paper-jsdom` and
|
||||
`paper-jsdom-canvas`. Depending on your use case, you need to required a
|
||||
|
@ -81,12 +88,19 @@ different one:
|
|||
SVG importing and exporting through [jsdom](https://github.com/tmpvar/jsdom).
|
||||
|
||||
In order to install `paper-jsdom-canvas`, you need the [Cairo Graphics
|
||||
library](http://cairographics.org/) installed in your system:
|
||||
library](https://cairographics.org/) installed in your system:
|
||||
|
||||
##### Installing Cairo and Pango on macOS:
|
||||
### Installing Native Dependencies
|
||||
|
||||
The easiest way to install Cairo is through [Homebrew](http://brew.sh/), by
|
||||
issuing the command:
|
||||
Paper.js relies on [Node-Canvas](https://github.com/Automattic/node-canvas) for
|
||||
rendering, which in turn relies on the native libraries
|
||||
[Cairo](https://cairographics.org/) and [Pango](https://www.pango.org/).
|
||||
|
||||
#### Installing Native Dependencies on macOS
|
||||
|
||||
Paper.js relies on Node-Canvas for rendering, which in turn relies on Cairo and
|
||||
Pango. The easiest way to install Cairo is through
|
||||
[Homebrew](https://brew.sh/), by issuing the command:
|
||||
|
||||
brew install cairo pango
|
||||
|
||||
|
@ -110,7 +124,7 @@ After adding this line, your commands should work in the expected way:
|
|||
npm install paper
|
||||
npm update
|
||||
|
||||
##### Installing Cairo, Pango and all other dependencies on Debian/Ubuntu Linux:
|
||||
#### Installing Native Dependencies on Debian/Ubuntu Linux
|
||||
|
||||
sudo apt-get install pkg-config libcairo2-dev libpango1.0-dev libssl-dev libjpeg62-dev libgif-dev
|
||||
|
||||
|
@ -119,24 +133,23 @@ build from c++ sources:
|
|||
|
||||
sudo apt-get install build-essential
|
||||
|
||||
##### After Cairo has been installed:
|
||||
#### Installing Native Dependencies for Electron
|
||||
|
||||
In order to build Node-Canvas for use of `paper-jsdom-canvas` in Electron, which
|
||||
is likely to use a different version of V8 than the Node binary installed in
|
||||
your system, you need to manually specify the location of Electron’s headers.
|
||||
Follow these steps to do so:
|
||||
|
||||
[Electron — Using Native Node
|
||||
Modules](https://electron.atom.io/docs/tutorial/using-native-node-modules/)
|
||||
|
||||
#### After Native Dependencies have been installed
|
||||
|
||||
You should now be able to install the Paper.js module with jsdom and Canvas
|
||||
rendering from NPM:
|
||||
|
||||
npm install paper-jsdom-canvas
|
||||
|
||||
### Installing Paper.js with Node-Canvas for Electron
|
||||
|
||||
[Node-Canvas](https://github.com/Automattic/node-canvas) is a native dependency.
|
||||
In order to build it for use of `paper-jsdom-canvas` in Electron, which is
|
||||
likely to use a different version of V8 than the Node binary installed in your
|
||||
system, you need to manually specify the location of Electron’s headers. Follow
|
||||
these steps to do so:
|
||||
|
||||
[Electron — Using Native Node
|
||||
Modules](https://electron.atom.io/docs/tutorial/using-native-node-modules/)
|
||||
|
||||
## Development
|
||||
|
||||
The main Paper.js source tree is hosted on
|
||||
|
@ -160,9 +173,9 @@ run:
|
|||
|
||||
### Setting Up For Building
|
||||
|
||||
As of 2016, Paper.js uses [Gulp.js](http://gulpjs.com/) for building, and has a
|
||||
couple of dependencies as Bower and NPM modules. Read the chapter [Installing
|
||||
Node.js, NPM and Bower](#installing-nodejs-npm-and-bower) if you still need to
|
||||
As of 2016, Paper.js uses [Gulp.js](https://gulpjs.com/) for building, and has a
|
||||
couple of dependencies as NPM modules. Read the chapter [Installing
|
||||
Node.js and NPM](#installing-nodejs-and-npm) if you still need to
|
||||
install these.
|
||||
|
||||
In order to be able to build Paper.js, after checking out the repository, paper
|
||||
|
@ -248,7 +261,7 @@ Your docs will then be located at `dist/docs`.
|
|||
### Testing
|
||||
|
||||
Paper.js was developed and tested from day 1 using proper unit testing through
|
||||
jQuery's [Qunit](http://docs.jquery.com/Qunit). To run the tests after any
|
||||
jQuery's [Qunit](https://qunitjs.com/). To run the tests after any
|
||||
change to the library's source, simply open `index.html` inside the `test`
|
||||
folder in your web browser. There should be a green bar at the top, meaning all
|
||||
tests have passed. If the bar is red, some tests have not passed. These will be
|
||||
|
@ -274,24 +287,30 @@ And to test both the PhantomJS and Node.js environments together, simply run:
|
|||
|
||||
gulp test
|
||||
|
||||
### Contributing
|
||||
### Contributing [![Open Source Helpers](https://www.codetriage.com/paperjs/paper.js/badges/users.svg)](https://www.codetriage.com/paperjs/paper.js)
|
||||
|
||||
The main Paper.js source tree is hosted on GitHub, thus you should create a fork
|
||||
of the repository in which you perform development. See
|
||||
<http://help.github.com/forking/>.
|
||||
<https://help.github.com/articles/fork-a-repo/>.
|
||||
|
||||
We prefer that you send a [pull request on GitHub]
|
||||
(http://help.github.com/pull-requests/) which will then be merged into the
|
||||
official main line repository. You need to sign the Paper.js CLA to be able to
|
||||
contribute (see below).
|
||||
We prefer that you send a
|
||||
[pull request on GitHub](https://help.github.com/articles/about-pull-requests/)
|
||||
which will then be merged into the official main line repository.
|
||||
You need to sign the Paper.js CLA to be able to contribute (see below).
|
||||
|
||||
Also, in your first contribution, add yourself to the end of `AUTHORS.md` (which
|
||||
of course is optional).
|
||||
|
||||
In addition to contributing code you can also triage issues which may include
|
||||
reproducing bug reports or asking for vital information, such as version numbers
|
||||
or reproduction instructions. If you would like to start triaging issues, one
|
||||
easy way to get started is to
|
||||
[subscribe to paper.js on CodeTriage](https://www.codetriage.com/paperjs/paper.js).
|
||||
|
||||
**Get the source (for contributing):**
|
||||
|
||||
If you want to contribute to the project you will have to [make a
|
||||
fork](http://help.github.com/forking/). Then do this:
|
||||
fork](https://help.github.com/articles/fork-a-repo/). Then do this:
|
||||
|
||||
git clone --recursive git@github.com:yourusername/paper.js.git
|
||||
cd paper.js
|
||||
|
@ -304,11 +323,11 @@ To then fetch changes from upstream, run
|
|||
#### Creating and Submitting a Patch
|
||||
|
||||
As mentioned above, we prefer that you send a
|
||||
[pull request](http://help.github.com/pull-requests/) on GitHub:
|
||||
[pull request](https://help.github.com/articles/about-pull-requests/) on GitHub:
|
||||
|
||||
1. Create a fork of the upstream repository by visiting
|
||||
<https://github.com/paperjs/paper.js/fork>. If you feel insecure, here's a
|
||||
great guide: <http://help.github.com/forking/>
|
||||
great guide: <https://help.github.com/articles/fork-a-repo/>
|
||||
|
||||
2. Clone of your repository: `git clone
|
||||
https://yourusername@github.com/yourusername/paper.js.git`
|
||||
|
@ -326,7 +345,7 @@ As mentioned above, we prefer that you send a
|
|||
repository's site at GitHub (i.e. https://github.com/yourusername/paper.js)
|
||||
and press the "Pull Request" button. Make sure you are creating the pull
|
||||
request to the `develop` branch, not the `master` branch. Here's a good guide
|
||||
on pull requests: <http://help.github.com/pull-requests/>
|
||||
on pull requests: <https://help.github.com/articles/about-pull-requests/>
|
||||
|
||||
##### Use one topic branch per feature:
|
||||
|
||||
|
@ -335,7 +354,7 @@ together into your `develop` branch (or develop everything in your `develop`
|
|||
branch and then cherry-pick-and-merge into the different topic branches). Git
|
||||
provides for an extremely flexible workflow, which in many ways causes more
|
||||
confusion than it helps you when new to collaborative software development. The
|
||||
guides provided by GitHub at <http://help.github.com/> are a really good
|
||||
guides provided by GitHub at <https://help.github.com/> are a really good
|
||||
starting point and reference. If you are fixing an issue, a convenient way to
|
||||
name the branch is to use the issue number as a prefix, like this: `git checkout
|
||||
-tb issue-937-feature-add-text-styling`.
|
||||
|
@ -343,7 +362,7 @@ name the branch is to use the issue number as a prefix, like this: `git checkout
|
|||
#### Contributor License Agreement
|
||||
|
||||
Before we can accept any contributions to Paper.js, you need to sign this
|
||||
[CLA](http://en.wikipedia.org/wiki/Contributor_License_Agreement):
|
||||
[CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement):
|
||||
|
||||
[Contributor License Agreement](https://spreadsheets.google.com/a/paperjs.org/spreadsheet/embeddedform?formkey=dENxd0JBVDY2REo3THVuRmh4YjdWRlE6MQ)
|
||||
|
||||
|
@ -352,10 +371,11 @@ Before we can accept any contributions to Paper.js, you need to sign this
|
|||
> defend the project should there be a legal dispute regarding the software at
|
||||
> some future time.
|
||||
|
||||
For a list of authors and contributors, please see [AUTHORS]
|
||||
(https://github.com/paperjs/paper.js/blob/master/AUTHORS.md).
|
||||
For a list of authors and contributors, please see
|
||||
[AUTHORS](https://github.com/paperjs/paper.js/blob/master/AUTHORS.md).
|
||||
|
||||
## License
|
||||
|
||||
Distributed under the MIT license. See [LICENSE]
|
||||
(https://github.com/paperjs/paper.js/blob/master/LICENSE.txt) for details.
|
||||
Distributed under the MIT license. See
|
||||
[LICENSE](https://github.com/paperjs/paper.js/blob/master/LICENSE.txt)
|
||||
fo details.
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
},
|
||||
"bugs": "https://github.com/paperjs/paper.js/issues",
|
||||
"authors": [
|
||||
"Jürg Lehni <juerg@scratchdisk.com> (http://scratchdisk.com)",
|
||||
"Jonathan Puckey <jonathan@studiomoniker.com> (http://studiomoniker.com)"
|
||||
"Jürg Lehni <juerg@scratchdisk.com> (http://juerglehni.com)",
|
||||
"Jonathan Puckey <jonathan@puckey.studio> (http://puckey.studio)"
|
||||
],
|
||||
"main": "dist/paper-full.js",
|
||||
"ignore": [
|
||||
|
|
2280
dist/docs/assets/js/paper.js
vendored
2280
dist/docs/assets/js/paper.js
vendored
File diff suppressed because it is too large
Load diff
184
dist/docs/classes/Color.html
vendored
184
dist/docs/classes/Color.html
vendored
|
@ -340,6 +340,65 @@ var path = new Path.Rectangle({
|
|||
</div>
|
||||
|
||||
|
||||
<div id="color-color" class="member">
|
||||
<div class="member-link">
|
||||
<a name="color-color" href="#color-color"><tt><b>Color</b>(color)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Creates a Color object from a CSS string. All common CSS color string formats are supported: - Named colors (e.g. <code>'red'</code>, <code>'fuchsia'</code>, …) - Hex strings (<code>'#ffff00'</code>, <code>'#ff0'</code>, …) - RGB strings (<code>'rgb(255, 128, 0)'</code>, <code>'rgba(255, 128, 0, 0.5)'</code>, …) - HSL strings (<code>'hsl(180deg, 20%, 50%)'</code>, <code>'hsla(3.14rad, 20%, 50%, 0.5)'</code>, …)</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>color:</tt>
|
||||
<tt>String</tt>
|
||||
— the color’s CSS string representation
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Color.html"><tt>Color</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Example:</h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-7">
|
||||
var circle = new Path.Circle({
|
||||
center: [80, 50],
|
||||
radius: 30,
|
||||
fillColor: new Color('rgba(255, 255, 0, 0.5)')
|
||||
});
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-7"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="color-gradient-origin-destination" class="member">
|
||||
<div class="member-link">
|
||||
<a name="color-gradient-origin-destination" href="#color-gradient-origin-destination"><tt><b>Color</b>(gradient, origin, destination[, highlight])</tt></a>
|
||||
|
@ -404,7 +463,7 @@ var path = new Path.Rectangle({
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-7">
|
||||
<script type="text/paperscript" canvas="canvas-8">
|
||||
// Define two points which we will be using to construct
|
||||
// the path and to position the gradient color:
|
||||
var topLeft = view.center - [80, 80];
|
||||
|
@ -425,7 +484,7 @@ var gradientColor = new Color(gradient, topLeft, bottomRight);
|
|||
// Set the fill color of the path to the gradient color:
|
||||
path.fillColor = gradientColor;
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="200" id="canvas-7"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="200" id="canvas-8"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -437,7 +496,7 @@ path.fillColor = gradientColor;
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-8">
|
||||
<script type="text/paperscript" canvas="canvas-9">
|
||||
// Create a circle shaped path at the center of the view
|
||||
// with a radius of 80:
|
||||
var path = new Path.Circle({
|
||||
|
@ -471,7 +530,7 @@ var gradientColor = new Color(gradient, from, to);
|
|||
// Set the fill color of the path to the gradient color:
|
||||
path.fillColor = gradientColor;
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="200" id="canvas-8"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="200" id="canvas-9"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -907,7 +966,7 @@ console.log(color.type); // 'rgb'</code></pre>
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
Array of <tt>Number</tt>s
|
||||
Array of <tt>Numbers</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -930,6 +989,11 @@ console.log(color.type); // 'rgb'</code></pre>
|
|||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Default:</h4>
|
||||
<li><tt>1</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
|
@ -946,7 +1010,7 @@ console.log(color.type); // 'rgb'</code></pre>
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-9">
|
||||
<script type="text/paperscript" canvas="canvas-10">
|
||||
var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
|
||||
// Fill the circle with red and give it a 20pt green stroke:
|
||||
|
@ -959,7 +1023,7 @@ circle.style = {
|
|||
// Make the stroke half transparent:
|
||||
circle.strokeColor.alpha = 0.5;
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-9"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-10"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -998,14 +1062,14 @@ circle.strokeColor.alpha = 0.5;
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-10">
|
||||
<script type="text/paperscript" canvas="canvas-11">
|
||||
var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
circle.fillColor = 'blue';
|
||||
|
||||
// Blue + red = purple:
|
||||
circle.fillColor.red = 1;
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-10"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-11"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1042,7 +1106,7 @@ circle.fillColor.red = 1;
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-11">
|
||||
<script type="text/paperscript" canvas="canvas-12">
|
||||
var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
|
||||
// First we set the fill color to red:
|
||||
|
@ -1051,7 +1115,7 @@ circle.fillColor = 'red';
|
|||
// Red + green = yellow:
|
||||
circle.fillColor.green = 1;
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-11"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-12"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1088,7 +1152,7 @@ circle.fillColor.green = 1;
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-12">
|
||||
<script type="text/paperscript" canvas="canvas-13">
|
||||
var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
|
||||
// First we set the fill color to red:
|
||||
|
@ -1097,7 +1161,7 @@ circle.fillColor = 'red';
|
|||
// Red + blue = purple:
|
||||
circle.fillColor.blue = 1;
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-12"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-13"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1164,12 +1228,12 @@ circle.fillColor.blue = 1;
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-13">
|
||||
<script type="text/paperscript" canvas="canvas-14">
|
||||
var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
circle.fillColor = 'red';
|
||||
circle.fillColor.hue += 30;
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-13"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-14"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1181,7 +1245,7 @@ circle.fillColor.hue += 30;
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-14">
|
||||
<script type="text/paperscript" canvas="canvas-15">
|
||||
// Create a rectangle shaped path, using the dimensions
|
||||
// of the view:
|
||||
var path = new Path.Rectangle(view.bounds);
|
||||
|
@ -1191,7 +1255,7 @@ function onFrame(event) {
|
|||
path.fillColor.hue += 0.5;
|
||||
}
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-14"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-15"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1337,7 +1401,7 @@ function onFrame(event) {
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-15">
|
||||
<script type="text/paperscript" canvas="canvas-16">
|
||||
var path = new Path.Circle({
|
||||
center: view.center,
|
||||
radius: view.bounds.height * 0.4
|
||||
|
@ -1358,7 +1422,7 @@ function onMouseMove(event) {
|
|||
path.fillColor.highlight = event.point;
|
||||
}
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="300" id="canvas-15"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="300" id="canvas-16"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1378,16 +1442,38 @@ function onMouseMove(event) {
|
|||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="set" class="member">
|
||||
<div id="set-values" class="member">
|
||||
<div class="member-link">
|
||||
<a name="set" href="#set"><tt><b>set</b>()</tt></a>
|
||||
<a name="set-values" href="#set-values"><tt><b>set</b>(...values)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Sets the color to the passed values. Note that any sequence of parameters that is supported by the various <a href="../classes/Color.html"><tt>Color</tt></a>() constructors also work for calls of <code>set()</code>.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>values:</tt>
|
||||
<tt>any value</tt>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Color.html"><tt>Color</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1403,7 +1489,7 @@ function onMouseMove(event) {
|
|||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Converts the color another type.</p>
|
||||
<p>Converts the color to another type.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
|
@ -2039,12 +2125,62 @@ console.log(result); // { red: 0, blue: 0, green: 1 }</code></pre>
|
|||
</div>
|
||||
|
||||
|
||||
<div class="reference-members">
|
||||
<h2>Static Methods</h2>
|
||||
|
||||
|
||||
<div id="random" class="member">
|
||||
<div class="member-link">
|
||||
<a name="random" href="#random"><tt><b>Color.random</b>()</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Returns a color object with random <a href="../classes/Color.html#red"><tt>red</tt></a>, <a href="../classes/Color.html#green"><tt>green</tt></a> and <a href="../classes/Color.html#blue"><tt>blue</tt></a> values between <code>0</code> and <code>1</code>.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Color.html"><tt>Color</tt></a></tt> — the newly created color object
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Example:</h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-17">
|
||||
var circle = new Path.Circle(view.center, 50);
|
||||
// Set a random color as circle fill color.
|
||||
circle.fillColor = Color.random();
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-17"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
1036
dist/docs/classes/CompoundPath.html
vendored
1036
dist/docs/classes/CompoundPath.html
vendored
File diff suppressed because it is too large
Load diff
49
dist/docs/classes/Curve.html
vendored
49
dist/docs/classes/Curve.html
vendored
|
@ -460,7 +460,7 @@
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
Array of <tt>Number</tt>s
|
||||
Array of <tt>Numbers</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -727,7 +727,7 @@
|
|||
|
||||
<ul class="member-list">
|
||||
<li><tt>info.type: <tt>String</tt></tt> — the type of Bézier curve, possible values are: <tt>‘line’</tt>, <tt>‘quadratic’</tt>, <tt>‘serpentine’</tt>, <tt>‘cusp’</tt>, <tt>‘loop’</tt>, <tt>‘arch’</tt></li>
|
||||
<li><tt>info.roots: Array of <tt>Number</tt>s</tt> — the curve-time parameters of the associated points of inflection for serpentine curves, loops, cusps, etc</li>
|
||||
<li><tt>info.roots: Array of <tt>Numbers</tt></tt> — the curve-time parameters of the associated points of inflection for serpentine curves, loops, cusps, etc</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -1481,6 +1481,47 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="gettimeswithtangent-tangent" class="member">
|
||||
<div class="member-link">
|
||||
<a name="gettimeswithtangent-tangent" href="#gettimeswithtangent-tangent"><tt><b>getTimesWithTangent</b>(tangent)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<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>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>tangent:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— the tangent to which the curve must be tangential
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt>Array of <tt>Numbers</tt></tt> — at most two curve-time parameters, where the curve is tangential to the given tangent
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2273,8 +2314,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
10
dist/docs/classes/CurveLocation.html
vendored
10
dist/docs/classes/CurveLocation.html
vendored
|
@ -162,7 +162,7 @@
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Item.html"><tt>Item</tt></a>
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -190,7 +190,7 @@
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Index</tt>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -452,7 +452,7 @@
|
|||
|
||||
<li><tt><a href="../classes/Curve.html#getnearestlocation-point"><tt>curve.getNearestLocation(point)</tt></a></tt></li>
|
||||
|
||||
<li><tt><tt>Path#getNearestLocation(point)</tt></tt></li>
|
||||
<li><tt><a href="../classes/PathItem.html#getnearestlocation-point"><tt>pathItem.getNearestLocation(point)</tt></a></tt></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -663,8 +663,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
4
dist/docs/classes/Event.html
vendored
4
dist/docs/classes/Event.html
vendored
|
@ -167,8 +167,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
4
dist/docs/classes/Gradient.html
vendored
4
dist/docs/classes/Gradient.html
vendored
|
@ -231,8 +231,8 @@ path.fillColor = {
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
4
dist/docs/classes/GradientStop.html
vendored
4
dist/docs/classes/GradientStop.html
vendored
|
@ -264,8 +264,8 @@ function onFrame(event) {
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
958
dist/docs/classes/Group.html
vendored
958
dist/docs/classes/Group.html
vendored
File diff suppressed because it is too large
Load diff
6
dist/docs/classes/HitResult.html
vendored
6
dist/docs/classes/HitResult.html
vendored
|
@ -156,7 +156,7 @@
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -230,8 +230,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
804
dist/docs/classes/Item.html
vendored
804
dist/docs/classes/Item.html
vendored
File diff suppressed because it is too large
Load diff
4
dist/docs/classes/Key.html
vendored
4
dist/docs/classes/Key.html
vendored
|
@ -130,8 +130,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
4
dist/docs/classes/KeyEvent.html
vendored
4
dist/docs/classes/KeyEvent.html
vendored
|
@ -299,8 +299,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
962
dist/docs/classes/Layer.html
vendored
962
dist/docs/classes/Layer.html
vendored
File diff suppressed because it is too large
Load diff
392
dist/docs/classes/Line.html
vendored
392
dist/docs/classes/Line.html
vendored
|
@ -1,392 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Line</title>
|
||||
<base target="class-frame">
|
||||
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
||||
<script src="../assets/js/paper.js"></script>
|
||||
<script src="../assets/js/jquery.js"></script>
|
||||
<script src="../assets/js/codemirror.js"></script>
|
||||
<script src="../assets/js/docs.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<article class="reference">
|
||||
<div class="reference-class">
|
||||
<h1>Line</h1>
|
||||
|
||||
<p>The Line object represents..</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- =============================== constructors ========================== -->
|
||||
<div class="reference-members">
|
||||
<h2>Constructors</h2>
|
||||
|
||||
|
||||
<div id="line-point1-point2-arg3-arg4" class="member">
|
||||
<div class="member-link">
|
||||
<a name="line-point1-point2-arg3-arg4" href="#line-point1-point2-arg3-arg4"><tt><b>Line</b>(point1, point2[, asVector, arg3, arg4])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Creates a Line object.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>point1:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>point2:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>asVector:</tt>
|
||||
<tt>Boolean</tt>
|
||||
|
||||
— optional, default: <tt>false</tt>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>arg3:</tt>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>arg4:</tt>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Line.html"><tt>Line</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ================================ properties =========================== -->
|
||||
<div class="reference-members">
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<div id="point" class="member">
|
||||
<div class="member-link">
|
||||
<a name="point" href="#point"><tt><b>point</b></tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
|
||||
<div class="member-text">
|
||||
<p>The starting point of the line.</p>
|
||||
|
||||
<p>Read only.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="vector" class="member">
|
||||
<div class="member-link">
|
||||
<a name="vector" href="#vector"><tt><b>vector</b></tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
|
||||
<div class="member-text">
|
||||
<p>The direction of the line as a vector.</p>
|
||||
|
||||
<p>Read only.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="length" class="member">
|
||||
<div class="member-link">
|
||||
<a name="length" href="#length"><tt><b>length</b></tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
|
||||
<div class="member-text">
|
||||
<p>The length of the line.</p>
|
||||
|
||||
<p>Read only.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ============================== methods ================================ -->
|
||||
<div class="reference-members">
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="intersect-line" class="member">
|
||||
<div class="member-link">
|
||||
<a name="intersect-line" href="#intersect-line"><tt><b>intersect</b>(line[, isInfinite])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>line:</tt>
|
||||
<a href="../classes/Line.html"><tt>Line</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>isInfinite:</tt>
|
||||
<tt>Boolean</tt>
|
||||
|
||||
— optional, default: <tt>false</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt> — the intersection point of the lines, <code>undefined</code> if the two lines are collinear, or <code>null</code> if they don’t intersect.
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="getside-point" class="member">
|
||||
<div class="member-link">
|
||||
<a name="getside-point" href="#getside-point"><tt><b>getSide</b>(point[, isInfinite])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>isInfinite:</tt>
|
||||
<tt>Boolean</tt>
|
||||
|
||||
— optional, default: <tt>false</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>Number</tt></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="getdistance-point" class="member">
|
||||
<div class="member-link">
|
||||
<a name="getdistance-point" href="#getdistance-point"><tt><b>getDistance</b>(point)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>Number</tt></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="getsigneddistance-point" class="member">
|
||||
<div class="member-link">
|
||||
<a name="getsigneddistance-point" href="#getsigneddistance-point"><tt><b>getSignedDistance</b>(point)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>Number</tt></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
</article>
|
||||
</body>
|
64
dist/docs/classes/Matrix.html
vendored
64
dist/docs/classes/Matrix.html
vendored
|
@ -150,7 +150,7 @@
|
|||
|
||||
<li>
|
||||
<tt>values:</tt>
|
||||
Array of <tt>Number</tt>s
|
||||
Array of <tt>Numbers</tt>
|
||||
— the matrix values to initialize this matrix with
|
||||
|
||||
</li>
|
||||
|
@ -400,7 +400,7 @@ Array of <tt>Number</tt>s
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
Array of <tt>Number</tt>s
|
||||
Array of <tt>Numbers</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -520,16 +520,38 @@ Array of <tt>Number</tt>s
|
|||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="set" class="member">
|
||||
<div id="set-values" class="member">
|
||||
<div class="member-link">
|
||||
<a name="set" href="#set"><tt><b>set</b>()</tt></a>
|
||||
<a name="set-values" href="#set-values"><tt><b>set</b>(...values)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Sets the matrix to the passed values. Note that any sequence of parameters that is supported by the various <a href="../classes/Matrix.html"><tt>Matrix</tt></a>() constructors also work for calls of <code>set()</code>.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>values:</tt>
|
||||
<tt>any value</tt>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -657,9 +679,9 @@ Array of <tt>Number</tt>s
|
|||
</div>
|
||||
|
||||
|
||||
<div id="apply-recursively" class="member">
|
||||
<div id="apply" class="member">
|
||||
<div class="member-link">
|
||||
<a name="apply-recursively" href="#apply-recursively"><tt><b>apply</b>(recursively)</tt></a>
|
||||
<a name="apply" href="#apply"><tt><b>apply</b>([recursively])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
@ -672,8 +694,8 @@ Array of <tt>Number</tt>s
|
|||
<li>
|
||||
<tt>recursively:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— controls whether to apply transformations recursively on children
|
||||
|
||||
— controls whether to apply transformations recursively on children
|
||||
— optional, default: <tt>true</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1328,7 +1350,7 @@ Array of <tt>Number</tt>s
|
|||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Returns a new matrix as the result of prepending the specified matrix to this matrix. This is the equivalent of multiplying <code>(specified matrix) s* (this matrix)</code>.</p>
|
||||
<p>Returns a new matrix as the result of prepending the specified matrix to this matrix. This is the equivalent of multiplying <code>(specified matrix) * (this matrix)</code>.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
|
@ -1563,14 +1585,14 @@ Array of <tt>Number</tt>s
|
|||
|
||||
<li>
|
||||
<tt>src:</tt>
|
||||
Array of <tt>Number</tt>s
|
||||
Array of <tt>Numbers</tt>
|
||||
— the array containing the source points as x, y value pairs
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>dst:</tt>
|
||||
Array of <tt>Number</tt>s
|
||||
Array of <tt>Numbers</tt>
|
||||
— the array into which to store the transformed point pairs
|
||||
|
||||
</li>
|
||||
|
@ -1589,7 +1611,7 @@ Array of <tt>Number</tt>s
|
|||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt>Array of <tt>Number</tt>s</tt> — the dst array, containing the transformed coordinates
|
||||
<tt>Array of <tt>Numbers</tt></tt> — the dst array, containing the transformed coordinates
|
||||
</li>
|
||||
|
||||
|
||||
|
@ -1626,6 +1648,16 @@ Array of <tt>Number</tt>s
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1641,7 +1673,7 @@ Array of <tt>Number</tt>s
|
|||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Attempts to decompose the affine transformation described by this matrix into <code>scaling</code>, <code>rotation</code> and <code>skewing</code>, and returns an object with these properties if it succeeded, <code>null</code> otherwise.</p>
|
||||
<p>Decomposes the affine transformation described by this matrix into <code>scaling</code>, <code>rotation</code> and <code>skewing</code>, and returns an object with these properties.</p>
|
||||
|
||||
|
||||
|
||||
|
@ -1649,7 +1681,7 @@ Array of <tt>Number</tt>s
|
|||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>Object</tt></tt> — the decomposed matrix, or <code>null</code> if decomposition is not possible
|
||||
<tt><tt>Object</tt></tt> — the decomposed matrix
|
||||
</li>
|
||||
|
||||
|
||||
|
@ -1703,8 +1735,8 @@ Array of <tt>Number</tt>s
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
4
dist/docs/classes/MouseEvent.html
vendored
4
dist/docs/classes/MouseEvent.html
vendored
|
@ -346,8 +346,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
24
dist/docs/classes/PaperScope.html
vendored
24
dist/docs/classes/PaperScope.html
vendored
|
@ -75,6 +75,8 @@
|
|||
<div class="member-text">
|
||||
<p>The version of Paper.js, as a string.</p>
|
||||
|
||||
<p>Read only.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
|
@ -268,7 +270,7 @@
|
|||
|
||||
<div id="execute-code" class="member">
|
||||
<div class="member-link">
|
||||
<a name="execute-code" href="#execute-code"><tt><b>execute</b>(code[, option])</tt></a>
|
||||
<a name="execute-code" href="#execute-code"><tt><b>execute</b>(code[, options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
@ -290,7 +292,7 @@
|
|||
</li>
|
||||
|
||||
<li>
|
||||
<tt>option:</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
— the compilation options
|
||||
— optional
|
||||
|
@ -358,8 +360,8 @@
|
|||
|
||||
<li>
|
||||
<tt>element:</tt>
|
||||
<tt>HTMLCanvasElement</tt>⟋<tt>String</tt>
|
||||
— the HTML canvas element this scope should be associated with, or an ID string by which to find the element.
|
||||
<tt>HTMLCanvasElement</tt>⟋<tt>String</tt>⟋<a href="../classes/Size.html"><tt>Size</tt></a>
|
||||
— the HTML canvas element this scope should be associated with, or an ID string by which to find the element, or the size of the canvas to be created for usage in a web worker.
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -424,6 +426,16 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/PaperScope.html"><tt>PaperScope</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -438,8 +450,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
14
dist/docs/classes/PaperScript.html
vendored
14
dist/docs/classes/PaperScript.html
vendored
|
@ -34,7 +34,7 @@
|
|||
|
||||
<div id="compile-code" class="member">
|
||||
<div class="member-link">
|
||||
<a name="compile-code" href="#compile-code"><tt><b>PaperScript.compile</b>(code[, option])</tt></a>
|
||||
<a name="compile-code" href="#compile-code"><tt><b>PaperScript.compile</b>(code[, options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
@ -56,7 +56,7 @@
|
|||
</li>
|
||||
|
||||
<li>
|
||||
<tt>option:</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
— the compilation options
|
||||
— optional
|
||||
|
@ -86,7 +86,7 @@
|
|||
|
||||
<div id="execute-code-scope" class="member">
|
||||
<div class="member-link">
|
||||
<a name="execute-code-scope" href="#execute-code-scope"><tt><b>PaperScript.execute</b>(code, scope[, option])</tt></a>
|
||||
<a name="execute-code-scope" href="#execute-code-scope"><tt><b>PaperScript.execute</b>(code, scope[, options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
@ -115,7 +115,7 @@
|
|||
</li>
|
||||
|
||||
<li>
|
||||
<tt>option:</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
— the compilation options
|
||||
— optional
|
||||
|
@ -128,7 +128,7 @@
|
|||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>Object</tt></tt> — an object holding the compiled PaperScript translated into JavaScript code along with source-maps and other information.
|
||||
<tt><tt>Object</tt></tt> — the exports defined in the executed code
|
||||
</li>
|
||||
|
||||
|
||||
|
@ -189,8 +189,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
1102
dist/docs/classes/Path.html
vendored
1102
dist/docs/classes/Path.html
vendored
File diff suppressed because it is too large
Load diff
976
dist/docs/classes/PathItem.html
vendored
976
dist/docs/classes/PathItem.html
vendored
File diff suppressed because it is too large
Load diff
32
dist/docs/classes/Point.html
vendored
32
dist/docs/classes/Point.html
vendored
|
@ -1019,16 +1019,38 @@ path.position.selected = true;
|
|||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="set" class="member">
|
||||
<div id="set-values" class="member">
|
||||
<div class="member-link">
|
||||
<a name="set" href="#set"><tt><b>set</b>()</tt></a>
|
||||
<a name="set-values" href="#set-values"><tt><b>set</b>(...values)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Sets the point to the passed values. Note that any sequence of parameters that is supported by the various <a href="../classes/Point.html"><tt>Point</tt></a>() constructors also work for calls of <code>set()</code>.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>values:</tt>
|
||||
<tt>any value</tt>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1725,7 +1747,7 @@ point2.x = 1; // doesn't change point1.x</code></pre>
|
|||
<ul class="member-list">
|
||||
<h4>See also:</h4>
|
||||
|
||||
<li><tt><tt>#getQuadrant</tt>()</tt></li>
|
||||
<li><tt><a href="../classes/Point.html#quadrant"><tt>quadrant</tt></a></tt></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -2668,8 +2690,8 @@ var point = maxPoint * randomPoint;</code></pre>
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
997
dist/docs/classes/PointText.html
vendored
997
dist/docs/classes/PointText.html
vendored
File diff suppressed because it is too large
Load diff
32
dist/docs/classes/Project.html
vendored
32
dist/docs/classes/Project.html
vendored
|
@ -42,8 +42,8 @@
|
|||
|
||||
<li>
|
||||
<tt>element:</tt>
|
||||
<tt>HTMLCanvasElement</tt>⟋<tt>String</tt>
|
||||
— the HTML canvas element that should be used as the element for the view, or an ID string by which to find the element.
|
||||
<tt>HTMLCanvasElement</tt>⟋<tt>String</tt>⟋<a href="../classes/Size.html"><tt>Size</tt></a>
|
||||
— the HTML canvas element that should be used as the element for the view, or an ID string by which to find the element, or the size of the canvas to be created for usage in a web worker.
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -379,7 +379,7 @@ var path2 = new Path.Circle(new Point(175, 50), 20);
|
|||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt></tt> — Boolean
|
||||
<tt><tt>Boolean</tt></tt>
|
||||
</li>
|
||||
|
||||
|
||||
|
@ -494,9 +494,9 @@ var path2 = new Path.Circle(new Point(175, 50), 20);
|
|||
</div>
|
||||
|
||||
|
||||
<div id="insertlayer-index-item" class="member">
|
||||
<div id="insertlayer-index-layer" class="member">
|
||||
<div class="member-link">
|
||||
<a name="insertlayer-index-item" href="#insertlayer-index-item"><tt><b>insertLayer</b>(index, item)</tt></a>
|
||||
<a name="insertlayer-index-layer" href="#insertlayer-index-layer"><tt><b>insertLayer</b>(index, layer)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
@ -514,9 +514,9 @@ var path2 = new Path.Circle(new Point(175, 50), 20);
|
|||
</li>
|
||||
|
||||
<li>
|
||||
<tt>item:</tt>
|
||||
<a href="../classes/Item.html"><tt>Item</tt></a>
|
||||
— the item to be inserted in the project
|
||||
<tt>layer:</tt>
|
||||
<a href="../classes/Layer.html"><tt>Layer</tt></a>
|
||||
— the layer to be inserted in the project
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1117,6 +1117,16 @@ for (var i = 0; i < items.length; i++) {
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Item.html"><tt>Item</tt></a></tt> — the imported item
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1160,7 +1170,7 @@ for (var i = 0; i < items.length; i++) {
|
|||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>SVGElement</tt></tt> — the project converted to an SVG node
|
||||
<tt><tt>SVGElement</tt>⟋<tt>String</tt></tt> — the project converted to an SVG node or a <code>String</code> depending on <code>option.asString</code> value
|
||||
</li>
|
||||
|
||||
|
||||
|
@ -1286,8 +1296,8 @@ for (var i = 0; i < items.length; i++) {
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
1166
dist/docs/classes/Raster.html
vendored
1166
dist/docs/classes/Raster.html
vendored
File diff suppressed because it is too large
Load diff
109
dist/docs/classes/Rectangle.html
vendored
109
dist/docs/classes/Rectangle.html
vendored
|
@ -238,9 +238,9 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div id="rectangle-rt" class="member">
|
||||
<div id="rectangle-rectangle" class="member">
|
||||
<div class="member-link">
|
||||
<a name="rectangle-rt" href="#rectangle-rt"><tt><b>Rectangle</b>(rt)</tt></a>
|
||||
<a name="rectangle-rectangle" href="#rectangle-rectangle"><tt><b>Rectangle</b>(rectangle)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
@ -251,7 +251,7 @@
|
|||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>rt:</tt>
|
||||
<tt>rectangle:</tt>
|
||||
<a href="../classes/Rectangle.html"><tt>Rectangle</tt></a>
|
||||
|
||||
|
||||
|
@ -829,6 +829,11 @@
|
|||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Default:</h4>
|
||||
<li><tt>false</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
|
@ -874,16 +879,38 @@ path.bounds.selected = true;
|
|||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="set" class="member">
|
||||
<div id="set-values" class="member">
|
||||
<div class="member-link">
|
||||
<a name="set" href="#set"><tt><b>set</b>()</tt></a>
|
||||
<a name="set-values" href="#set-values"><tt><b>set</b>(...values)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Sets the rectangle to the passed values. Note that any sequence of parameters that is supported by the various <a href="../classes/Rectangle.html"><tt>Rectangle</tt></a>() constructors also work for calls of <code>set()</code>.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>values:</tt>
|
||||
<tt>any value</tt>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Rectangle.html"><tt>Rectangle</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -903,6 +930,16 @@ path.bounds.selected = true;
|
|||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Rectangle.html"><tt>Rectangle</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1403,6 +1440,16 @@ intersectionPath.fillColor = 'red';
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Rectangle.html"><tt>Rectangle</tt></a></tt> — the smallest rectangle that contains both the original rectangle and the specified point
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1418,7 +1465,7 @@ intersectionPath.fillColor = 'red';
|
|||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Expands the rectangle by the specified amount in horizontal and vertical directions.</p>
|
||||
<p>Returns a new rectangle expanded by the specified amount in horizontal and vertical directions.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
|
@ -1434,6 +1481,16 @@ intersectionPath.fillColor = 'red';
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Rectangle.html"><tt>Rectangle</tt></a></tt> — the expanded rectangle
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1449,7 +1506,7 @@ intersectionPath.fillColor = 'red';
|
|||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Expands the rectangle by the specified amounts in horizontal and vertical directions.</p>
|
||||
<p>Returns a new rectangle expanded by the specified amounts in horizontal and vertical directions.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
|
@ -1472,6 +1529,16 @@ intersectionPath.fillColor = 'red';
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Rectangle.html"><tt>Rectangle</tt></a></tt> — the expanded rectangle
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1487,7 +1554,7 @@ intersectionPath.fillColor = 'red';
|
|||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Scales the rectangle by the specified amount from its center.</p>
|
||||
<p>Returns a new rectangle scaled by the specified amount from its center.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
|
@ -1503,6 +1570,16 @@ intersectionPath.fillColor = 'red';
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Rectangle.html"><tt>Rectangle</tt></a></tt> — the scaled rectangle
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1518,7 +1595,7 @@ intersectionPath.fillColor = 'red';
|
|||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Scales the rectangle in horizontal direction by the specified <code>hor</code> amount and in vertical direction by the specified <code>ver</code> amount from its center.</p>
|
||||
<p>Returns a new rectangle scaled in horizontal direction by the specified <code>hor</code> amount and in vertical direction by the specified <code>ver</code> amount from its center.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
|
@ -1541,6 +1618,16 @@ intersectionPath.fillColor = 'red';
|
|||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Rectangle.html"><tt>Rectangle</tt></a></tt> — the scaled rectangle
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1558,8 +1645,8 @@ intersectionPath.fillColor = 'red';
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
37
dist/docs/classes/Segment.html
vendored
37
dist/docs/classes/Segment.html
vendored
|
@ -514,9 +514,9 @@ path.segments[2].selected = true;
|
|||
<ul class="member-list">
|
||||
<h4>See also:</h4>
|
||||
|
||||
<li><tt><tt>Segment#getHandleIn</tt>()</tt></li>
|
||||
<li><tt><a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a></tt></li>
|
||||
|
||||
<li><tt><tt>Segment#getHandleOut</tt>()</tt></li>
|
||||
<li><tt><a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a></tt></li>
|
||||
|
||||
<li><tt><a href="../classes/Curve.html#hashandles"><tt>curve.hasHandles</tt></a>()</tt></li>
|
||||
|
||||
|
@ -783,6 +783,35 @@ path.segments[2].selected = true;
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>()</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -901,8 +930,8 @@ path.segments[2].selected = true;
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
960
dist/docs/classes/Shape.html
vendored
960
dist/docs/classes/Shape.html
vendored
File diff suppressed because it is too large
Load diff
48
dist/docs/classes/Size.html
vendored
48
dist/docs/classes/Size.html
vendored
|
@ -803,16 +803,38 @@ console.log(size % new Size(5, 2)); // {width: 2, height: 0}</code></pre>
|
|||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="set" class="member">
|
||||
<div id="set-values" class="member">
|
||||
<div class="member-link">
|
||||
<a name="set" href="#set"><tt><b>set</b>()</tt></a>
|
||||
<a name="set-values" href="#set-values"><tt><b>set</b>(...values)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Sets the size to the passed values. Note that any sequence of parameters that is supported by the various <a href="../classes/Size.html"><tt>Size</tt></a>() constructors also work for calls of <code>set()</code>.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>values:</tt>
|
||||
<tt>any value</tt>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Size.html"><tt>Size</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -822,9 +844,9 @@ console.log(size % new Size(5, 2)); // {width: 2, height: 0}</code></pre>
|
|||
</div>
|
||||
|
||||
|
||||
<div id="equals-" class="member">
|
||||
<div id="equals-size" class="member">
|
||||
<div class="member-link">
|
||||
<a name="equals-" href="#equals-"><tt><b>equals</b>()</tt></a>
|
||||
<a name="equals-size" href="#equals-size"><tt><b>equals</b>(size)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
|
@ -835,9 +857,9 @@ console.log(size % new Size(5, 2)); // {width: 2, height: 0}</code></pre>
|
|||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>:</tt>
|
||||
<tt>size:</tt>
|
||||
<a href="../classes/Size.html"><tt>Size</tt></a>
|
||||
|
||||
— the size to compare to
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -880,6 +902,16 @@ console.log(size != new Size(1, 1)); // true</code></pre>
|
|||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Size.html"><tt>Size</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1784,8 +1816,8 @@ var size = maxSize * randomSize;</code></pre>
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
14
dist/docs/classes/Style.html
vendored
14
dist/docs/classes/Style.html
vendored
|
@ -150,7 +150,7 @@ group.style = {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -449,7 +449,7 @@ path3.strokeJoin = 'bevel';
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Array</tt>
|
||||
Array of <tt>Numbers</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -527,7 +527,7 @@ path.dashArray = [10, 4];
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -610,7 +610,7 @@ circle.fillColor = new Color(1, 0, 0);
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -724,7 +724,7 @@ var circle = new Path.Circle({
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>
|
||||
<a href="../classes/Color.html"><tt>Color</tt></a>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -910,8 +910,8 @@ var circle = new Path.Circle({
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
8
dist/docs/classes/SymbolDefinition.html
vendored
8
dist/docs/classes/SymbolDefinition.html
vendored
|
@ -238,7 +238,7 @@ for (var i = 0; i < 100; i++) {
|
|||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>Symbol</tt></tt>
|
||||
<tt><a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
|
@ -267,7 +267,7 @@ for (var i = 0; i < 100; i++) {
|
|||
|
||||
<li>
|
||||
<tt>symbol:</tt>
|
||||
<tt>Symbol</tt>
|
||||
<a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
@ -302,8 +302,8 @@ for (var i = 0; i < 100; i++) {
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
962
dist/docs/classes/SymbolItem.html
vendored
962
dist/docs/classes/SymbolItem.html
vendored
File diff suppressed because it is too large
Load diff
958
dist/docs/classes/TextItem.html
vendored
958
dist/docs/classes/TextItem.html
vendored
File diff suppressed because it is too large
Load diff
16
dist/docs/classes/Tool.html
vendored
16
dist/docs/classes/Tool.html
vendored
|
@ -153,7 +153,7 @@ tool.onMouseDrag = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -201,7 +201,7 @@ tool.onMouseDown = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -249,7 +249,7 @@ tool.onMouseDrag = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -300,7 +300,7 @@ tool.onMouseMove = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -351,7 +351,7 @@ tool.onMouseUp = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -407,7 +407,7 @@ tool.onKeyDown = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -752,8 +752,8 @@ tool.onKeyDown = function(event) {
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
4
dist/docs/classes/ToolEvent.html
vendored
4
dist/docs/classes/ToolEvent.html
vendored
|
@ -437,8 +437,8 @@ function onMouseUp(event) {
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
374
dist/docs/classes/Tween.html
vendored
Normal file
374
dist/docs/classes/Tween.html
vendored
Normal file
|
@ -0,0 +1,374 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tween</title>
|
||||
<base target="class-frame">
|
||||
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
||||
<script src="../assets/js/paper.js"></script>
|
||||
<script src="../assets/js/jquery.js"></script>
|
||||
<script src="../assets/js/codemirror.js"></script>
|
||||
<script src="../assets/js/docs.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<article class="reference">
|
||||
<div class="reference-class">
|
||||
<h1>Tween</h1>
|
||||
|
||||
<p>Allows tweening <code>Object</code> properties between two states for a given duration. To tween properties on Paper.js <a href="../classes/Item.html"><tt>Item</tt></a> instances, <a href="../classes/Item.html#tween-from-to-options"><tt>item.tween(from, to, options)</tt></a> can be used, which returns created tween instance.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- =============================== constructors ========================== -->
|
||||
<div class="reference-members">
|
||||
<h2>Constructors</h2>
|
||||
|
||||
|
||||
<div id="tween-object-from-to-duration" class="member">
|
||||
<div class="member-link">
|
||||
<a name="tween-object-from-to-duration" href="#tween-object-from-to-duration"><tt><b>Tween</b>(object, from, to, duration[, easing[, start]])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Creates a new tween.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>object:</tt>
|
||||
<tt>Object</tt>
|
||||
— the object to tween the properties on
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>from:</tt>
|
||||
<tt>Object</tt>
|
||||
— the state at the start of the tweening
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>to:</tt>
|
||||
<tt>Object</tt>
|
||||
— the state at the end of the tweening
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>duration:</tt>
|
||||
<tt>Number</tt>
|
||||
— the duration of the tweening
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>easing:</tt>
|
||||
<tt>String</tt>⟋<tt>Function</tt>
|
||||
— the type of the easing function or the easing function
|
||||
— optional, default: <tt>‘linear’</tt>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>start:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— whether to start tweening automatically
|
||||
— optional, default: <tt>true</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Tween.html"><tt>Tween</tt></a></tt> — the newly created tween
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ================================ properties =========================== -->
|
||||
<div class="reference-members">
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>Event Handlers</h3>
|
||||
|
||||
<div id="onupdate" class="member">
|
||||
<div class="member-link">
|
||||
<a name="onupdate" href="#onupdate"><tt><b>onUpdate</b></tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
|
||||
<div class="member-text">
|
||||
<p>The function to be called when the tween is updated. It receives an object as its sole argument, containing the current progress of the tweening and the factor calculated by the easing function.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h4>Example:<span class="description">Display tween progression values:</span></h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-0">
|
||||
var circle = new Path.Circle({
|
||||
center: view.center,
|
||||
radius: 40,
|
||||
fillColor: 'blue'
|
||||
});
|
||||
var tween = circle.tweenTo(
|
||||
{ fillColor: 'red' },
|
||||
{
|
||||
duration: 2000,
|
||||
easing: 'easeInCubic'
|
||||
}
|
||||
);
|
||||
var progressText = new PointText(view.center + [60, -10]);
|
||||
var factorText = new PointText(view.center + [60, 10]);
|
||||
|
||||
// Install event using onUpdate() property:
|
||||
tween.onUpdate = function(event) {
|
||||
progressText.content = 'progress: ' + event.progress.toFixed(2);
|
||||
};
|
||||
|
||||
// Install event using on('update') method:
|
||||
tween.on('update', function(event) {
|
||||
factorText.content = 'factor: ' + event.factor.toFixed(2);
|
||||
});
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-0"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ============================== methods ================================ -->
|
||||
<div class="reference-members">
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="then-function" class="member">
|
||||
<div class="member-link">
|
||||
<a name="then-function" href="#then-function"><tt><b>then</b>(function)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Set a function that will be executed when the tween completes.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>function:</tt>
|
||||
<tt>Function</tt>
|
||||
— the function to execute when the tween completes
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Tween.html"><tt>Tween</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Example:<span class="description">Tweens chaining:</span></h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-1">
|
||||
var circle = new Path.Circle({
|
||||
center: view.center,
|
||||
radius: 40,
|
||||
fillColor: 'blue'
|
||||
});
|
||||
// Tween color from blue to red.
|
||||
var tween = circle.tweenTo({ fillColor: 'red' }, 2000);
|
||||
// When the first tween completes...
|
||||
tween.then(function() {
|
||||
// ...tween color back to blue.
|
||||
circle.tweenTo({ fillColor: 'blue' }, 2000);
|
||||
});
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-1"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="start" class="member">
|
||||
<div class="member-link">
|
||||
<a name="start" href="#start"><tt><b>start</b>()</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Start tweening.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Tween.html"><tt>Tween</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Example:<span class="description">Manually start tweening.</span></h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-2">
|
||||
var circle = new Path.Circle({
|
||||
center: view.center,
|
||||
radius: 40,
|
||||
fillColor: 'blue'
|
||||
});
|
||||
var tween = circle.tweenTo(
|
||||
{ fillColor: 'red' },
|
||||
{ duration: 2000, start: false }
|
||||
);
|
||||
tween.start();
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-2"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="stop" class="member">
|
||||
<div class="member-link">
|
||||
<a name="stop" href="#stop"><tt><b>stop</b>()</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Stop tweening.</p>
|
||||
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Tween.html"><tt>Tween</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Example:<span class="description">Stop a tween before it completes.</span></h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-3">
|
||||
var circle = new Path.Circle({
|
||||
center: view.center,
|
||||
radius: 40,
|
||||
fillColor: 'blue'
|
||||
});
|
||||
// Start tweening from blue to red for 2 seconds.
|
||||
var tween = circle.tweenTo({ fillColor: 'red' }, 2000);
|
||||
// After 1 second...
|
||||
setTimeout(function(){
|
||||
// ...stop tweening.
|
||||
tween.stop();
|
||||
}, 1000);
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-3"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
</article>
|
||||
</body>
|
32
dist/docs/classes/View.html
vendored
32
dist/docs/classes/View.html
vendored
|
@ -268,7 +268,7 @@
|
|||
<ul class="member-list">
|
||||
<h4>See also:</h4>
|
||||
|
||||
<li><tt><tt>#getScaling</tt>()</tt></li>
|
||||
<li><tt><a href="../classes/View.html#scaling"><tt>scaling</tt></a></tt></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -327,7 +327,7 @@
|
|||
<ul class="member-list">
|
||||
<h4>See also:</h4>
|
||||
|
||||
<li><tt><tt>#getZoom</tt>()</tt></li>
|
||||
<li><tt><a href="../classes/View.html#zoom"><tt>zoom</tt></a></tt></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -380,7 +380,7 @@
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="member-list">
|
||||
|
@ -440,7 +440,7 @@ view.onFrame = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -477,7 +477,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -510,7 +510,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -543,7 +543,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -576,7 +576,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -609,7 +609,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -642,7 +642,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -675,7 +675,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -708,7 +708,7 @@ view.onResize = function(event) {
|
|||
<ul class="member-list">
|
||||
<h4>Type:</h4>
|
||||
<li>
|
||||
<tt>Function</tt>
|
||||
<tt>Function</tt>⟋<tt>null</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -1077,7 +1077,7 @@ view.onResize = function(event) {
|
|||
<li>
|
||||
<tt>shear:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— the horziontal and vertical shear factors as a point
|
||||
— the horizontal and vertical shear factors as a point
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1174,7 +1174,7 @@ view.onResize = function(event) {
|
|||
<li>
|
||||
<tt>skew:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— the horziontal and vertical skew angles in degrees
|
||||
— the horizontal and vertical skew angles in degrees
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1763,8 +1763,8 @@ function onMouseDown(event) {
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
12
dist/docs/classes/global.html
vendored
12
dist/docs/classes/global.html
vendored
|
@ -65,7 +65,7 @@
|
|||
|
||||
<div class="member-text">
|
||||
<p>The project for which the PaperScript is executed.</p>
|
||||
<p>Note that when working with mulitple projects, this does not necessarily reflect the currently active project. For this, use <a href="../classes/PaperScope.html#project"><tt>paperScope.project</tt></a> instead.</p>
|
||||
<p>Note that when working with multiple projects, this does not necessarily reflect the currently active project. For this, use <a href="../classes/PaperScope.html#project"><tt>paperScope.project</tt></a> instead.</p>
|
||||
|
||||
|
||||
|
||||
|
@ -118,7 +118,9 @@
|
|||
|
||||
<div class="member-text">
|
||||
<p>The reference to the project’s view.</p>
|
||||
<p>Note that when working with mulitple projects, this does not necessarily reflect the view of the currently active project. For this, use <a href="../classes/PaperScope.html#view"><tt>paperScope.view</tt></a> instead.</p>
|
||||
<p>Note that when working with multiple projects, this does not necessarily reflect the view of the currently active project. For this, use <a href="../classes/PaperScope.html#view"><tt>paperScope.view</tt></a> instead.</p>
|
||||
|
||||
<p>Read only.</p>
|
||||
|
||||
|
||||
|
||||
|
@ -145,7 +147,7 @@
|
|||
|
||||
<div class="member-text">
|
||||
<p>The reference to the tool object which is automatically created when global tool event handlers are defined.</p>
|
||||
<p>Note that when working with mulitple tools, this does not necessarily reflect the currently active tool. For this, use <a href="../classes/PaperScope.html#tool"><tt>paperScope.tool</tt></a> instead.</p>
|
||||
<p>Note that when working with multiple tools, this does not necessarily reflect the currently active tool. For this, use <a href="../classes/PaperScope.html#tool"><tt>paperScope.tool</tt></a> instead.</p>
|
||||
|
||||
|
||||
|
||||
|
@ -414,8 +416,8 @@
|
|||
|
||||
<!-- =========================== copyright notice ========================== -->
|
||||
<p class="footer">
|
||||
Paper.js v0.11.5 (develop)<br>
|
||||
Copyright © 2011—2017 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
Paper.js v0.12.7<br>
|
||||
Copyright © 2011—2023 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
|
||||
|
|
9
dist/docs/classes/index.html
vendored
9
dist/docs/classes/index.html
vendored
|
@ -2,13 +2,13 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Paper.js v0.11.5 (develop)</title>
|
||||
<title>Paper.js v0.12.7</title>
|
||||
<base target="class-frame">
|
||||
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body class="reference">
|
||||
<div class="reference-index">
|
||||
<h1>Paper.js<span class="version">0.11.5 (develop)</span></h1>
|
||||
<h1>Paper.js<span class="version">0.12.7</span></h1>
|
||||
<ul class="reference-classes"><li><a href="../classes/global.html">Global Scope</a></li>
|
||||
<li>
|
||||
<h2>Basic Types</h2>
|
||||
|
@ -56,6 +56,11 @@
|
|||
<li><a href="../classes/GradientStop.html">GradientStop</a></li>
|
||||
</ul>
|
||||
<li>
|
||||
<h2>Animation</h2>
|
||||
<ul>
|
||||
<li><a href="../classes/Tween.html">Tween</a></li>
|
||||
</ul>
|
||||
<li>
|
||||
<h2>Typography</h2>
|
||||
<ul>
|
||||
<li><a href="../classes/TextItem.html">TextItem</a></li>
|
||||
|
|
2
dist/docs/index.html
vendored
2
dist/docs/index.html
vendored
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Paper.js v0.11.5 (develop)</title>
|
||||
<title>Paper.js v0.12.7</title>
|
||||
</head>
|
||||
<frameset cols="230,*">
|
||||
<frame src="classes/index.html" name="packageListFrame" title="All Packages">
|
||||
|
|
8
dist/node/canvas.js
vendored
8
dist/node/canvas.js
vendored
|
@ -2,8 +2,8 @@
|
|||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
||||
* http://juerglehni.com/ & https://puckey.studio/
|
||||
*
|
||||
* Distributed under the MIT license. See LICENSE file for details.
|
||||
*
|
||||
|
@ -18,8 +18,8 @@
|
|||
module.exports = function(self, requireName) {
|
||||
var Canvas;
|
||||
try {
|
||||
Canvas = require('canvas');
|
||||
} catch(e) {
|
||||
Canvas = require('canvas').Canvas;
|
||||
} catch(error) {
|
||||
// Remove `self.window`, so we still have the global `self` reference,
|
||||
// but no `window` object:
|
||||
// - On the browser, this corresponds to a worker context.
|
||||
|
|
4
dist/node/extend.js
vendored
4
dist/node/extend.js
vendored
|
@ -2,8 +2,8 @@
|
|||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
||||
* http://juerglehni.com/ & https://puckey.studio/
|
||||
*
|
||||
* Distributed under the MIT license. See LICENSE file for details.
|
||||
*
|
||||
|
|
14
dist/node/self.js
vendored
14
dist/node/self.js
vendored
|
@ -2,8 +2,8 @@
|
|||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
||||
* http://juerglehni.com/ & https://puckey.studio/
|
||||
*
|
||||
* Distributed under the MIT license. See LICENSE file for details.
|
||||
*
|
||||
|
@ -17,7 +17,7 @@ var path = require('path');
|
|||
// Determine the name by which name the module was required (either 'paper',
|
||||
// 'paper-jsdom' or 'paper-jsdom-canvas'), and use this to determine if error
|
||||
// exceptions should be thrown or if loading should fail silently.
|
||||
var parent = module.parent.parent,
|
||||
var parent = module.parent && module.parent.parent,
|
||||
requireName = parent && path.basename(path.dirname(parent.filename));
|
||||
requireName = /^paper/.test(requireName) ? requireName : 'paper';
|
||||
|
||||
|
@ -37,15 +37,13 @@ try {
|
|||
if (jsdom) {
|
||||
// Create our document and window objects through jsdom.
|
||||
/* global document:true, window:true */
|
||||
var document = jsdom.jsdom('<html><body></body></html>', {
|
||||
var document = new jsdom.JSDOM('<html><body></body></html>', {
|
||||
// Use the current working directory as the document's origin, so
|
||||
// requests to local files work correctly with CORS.
|
||||
url: 'file://' + process.cwd() + '/',
|
||||
features: {
|
||||
FetchExternalResources: ['img', 'script']
|
||||
}
|
||||
resources: 'usable'
|
||||
});
|
||||
self = document.defaultView;
|
||||
self = document.window;
|
||||
require('./canvas.js')(self, requireName);
|
||||
require('./xml.js')(self);
|
||||
} else {
|
||||
|
|
4
dist/node/xml.js
vendored
4
dist/node/xml.js
vendored
|
@ -2,8 +2,8 @@
|
|||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
||||
* http://juerglehni.com/ & https://puckey.studio/
|
||||
*
|
||||
* Distributed under the MIT license. See LICENSE file for details.
|
||||
*
|
||||
|
|
2133
dist/paper-core.js
vendored
2133
dist/paper-core.js
vendored
File diff suppressed because it is too large
Load diff
28
dist/paper-core.min.js
vendored
28
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
2280
dist/paper-full.js
vendored
2280
dist/paper-full.js
vendored
File diff suppressed because it is too large
Load diff
30
dist/paper-full.min.js
vendored
30
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
7347
dist/paper.d.ts
vendored
Normal file
7347
dist/paper.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load diff
7497
package-lock.json
generated
7497
package-lock.json
generated
File diff suppressed because it is too large
Load diff
91
package.json
91
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper",
|
||||
"version": "0.11.5",
|
||||
"name": "@scratch/paper",
|
||||
"version": "0.12.7",
|
||||
"description": "The Swiss Army Knife of Vector Graphics Scripting",
|
||||
"license": "MIT",
|
||||
"homepage": "http://paperjs.org",
|
||||
|
@ -11,12 +11,11 @@
|
|||
"bugs": "https://github.com/paperjs/paper.js/issues",
|
||||
"contributors": [
|
||||
"Jürg Lehni <juerg@scratchdisk.com> (http://scratchdisk.com)",
|
||||
"Jonathan Puckey <jonathan@studiomoniker.com> (http://studiomoniker.com)"
|
||||
"Jonathan Puckey <jonathan@puckey.studio> (http://studiomoniker.com)"
|
||||
],
|
||||
"main": "dist/paper-full.js",
|
||||
"types": "dist/paper.d.ts",
|
||||
"scripts": {
|
||||
"precommit": "gulp jshint --branch develop",
|
||||
"prepush": "gulp test --branch develop",
|
||||
"build": "gulp build",
|
||||
"dist": "gulp dist",
|
||||
"zip": "gulp zip",
|
||||
|
@ -34,42 +33,16 @@
|
|||
"README.md"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
"node": ">=8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"acorn": "~0.5.0",
|
||||
"canvas": "^1.3.5",
|
||||
"del": "^2.2.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-cached": "^1.1.0",
|
||||
"gulp-git-streamed": "^2.4.0",
|
||||
"gulp-jshint": "^2.0.0",
|
||||
"gulp-json-editor": "^2.2.1",
|
||||
"gulp-prepro": "^2.4.0",
|
||||
"gulp-qunits": "^2.1.1",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-shell": "^0.5.2",
|
||||
"gulp-symlink": "^2.1.4",
|
||||
"gulp-uglify": "^1.5.4",
|
||||
"gulp-uncomment": "^0.3.0",
|
||||
"gulp-util": "^3.0.7",
|
||||
"gulp-webserver": "^0.9.1",
|
||||
"gulp-whitespace": "^0.1.0",
|
||||
"gulp-zip": "^3.2.0",
|
||||
"husky": "^0.11.4",
|
||||
"jsdom": "^9.4.0",
|
||||
"jshint": "^2.9.2",
|
||||
"jshint-summary": "^0.4.0",
|
||||
"merge-stream": "^1.0.0",
|
||||
"minimist": "^1.2.0",
|
||||
"prepro": "^2.4.0",
|
||||
"qunitjs": "^1.23.0",
|
||||
"require-dir": "^0.3.0",
|
||||
"resemblejs": "^2.2.1",
|
||||
"run-sequence": "^1.2.2",
|
||||
"source-map-support": "^0.4.0",
|
||||
"stats.js": "0.16.0",
|
||||
"straps": "^3.0.1"
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "gulp jshint --ensure-branch develop",
|
||||
"pre-push": "gulp test --ensure-branch develop"
|
||||
}
|
||||
},
|
||||
"overrides": {
|
||||
"graceful-fs": "^4.2.11"
|
||||
},
|
||||
"browser": {
|
||||
"canvas": false,
|
||||
|
@ -79,6 +52,44 @@
|
|||
"./dist/node/self.js": false,
|
||||
"./dist/node/extend.js": false
|
||||
},
|
||||
"devDependencies": {
|
||||
"acorn": "~0.5.0",
|
||||
"canvas": "^2.6.0",
|
||||
"del": "^4.1.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-cached": "^1.1.0",
|
||||
"gulp-git-streamed": "^2.10.1",
|
||||
"gulp-jshint": "^2.1.0",
|
||||
"gulp-json-editor": "^2.5.2",
|
||||
"gulp-prepro": "^2.4.0",
|
||||
"gulp-qunits": "^2.1.2",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"gulp-typescript": "^5.0.0",
|
||||
"gulp-shell": "^0.8.0",
|
||||
"gulp-symlink": "^2.1.4",
|
||||
"gulp-uglify": "^1.5.4",
|
||||
"gulp-uncomment": "^0.3.0",
|
||||
"gulp-util": "^3.0.7",
|
||||
"gulp-webserver": "^0.9.1",
|
||||
"gulp-whitespace": "^0.1.0",
|
||||
"gulp-zip": "^3.2.0",
|
||||
"husky": "^2.3.0",
|
||||
"jsdom": "^15.1.1",
|
||||
"jshint": "^2.10.2",
|
||||
"jshint-summary": "^0.4.0",
|
||||
"merge-stream": "^2.0.0",
|
||||
"minimist": "^1.2.0",
|
||||
"mustache": "^3.0.1",
|
||||
"prepro": "^2.4.0",
|
||||
"qunitjs": "^1.23.0",
|
||||
"require-dir": "^1.2.0",
|
||||
"resemblejs": "^3.1.0",
|
||||
"run-sequence": "^2.2.1",
|
||||
"source-map-support": "^0.5.12",
|
||||
"stats.js": "0.17.0",
|
||||
"straps": "^3.0.1",
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"keywords": [
|
||||
"vector",
|
||||
"graphic",
|
||||
|
|
Loading…
Reference in a new issue