mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Update JSDoc and do some documentation spring-cleaning.
- Convert from {@code ...} to shorter `...` - Reformat some documentation comment blocks - Update copyright notices
This commit is contained in:
parent
7d25096de6
commit
a7a07fb6d5
117 changed files with 554 additions and 575 deletions
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
http://scratchdisk.com/ & http://jonathanpuckey.com/
|
http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 91a4e45aa3ac4f25c106fec0ed1d5d8f9bb5fba7
|
Subproject commit f8b459c7fb52f7f98e3803351990b832d11721dd
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
# http://paperjs.org/
|
# http://paperjs.org/
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
#
|
#
|
||||||
# Distributed under the MIT license. See LICENSE file for details.
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -80,8 +80,8 @@ var Line = Base.extend(/** @lends Line# */{
|
||||||
/**
|
/**
|
||||||
* @param {Line} line
|
* @param {Line} line
|
||||||
* @param {Boolean} [isInfinite=false]
|
* @param {Boolean} [isInfinite=false]
|
||||||
* @return {Point} the intersection point of the lines, {@code undefined}
|
* @return {Point} the intersection point of the lines, `undefined` if the
|
||||||
* if the two lines are collinear, or {@code null} if they don't intersect.
|
* two lines are collinear, or `null` if they don't intersect.
|
||||||
*/
|
*/
|
||||||
intersect: function(line, isInfinite) {
|
intersect: function(line, isInfinite) {
|
||||||
return Line.intersect(
|
return Line.intersect(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -591,11 +591,11 @@ var Matrix = Base.extend(/** @lends Matrix# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to decompose the affine transformation described by this matrix
|
* Attempts to decompose the affine transformation described by this matrix
|
||||||
* into {@code scaling}, {@code rotation} and {@code shearing}, and returns
|
* into `scaling`, `rotation` and `shearing`, and returns an object with
|
||||||
* an object with these properties if it succeeded, {@code null} otherwise.
|
* these properties if it succeeded, `null` otherwise.
|
||||||
*
|
*
|
||||||
* @return {Object} the decomposed matrix, or {@code null} if decomposition
|
* @return {Object} the decomposed matrix, or `null` if decomposition is not
|
||||||
* is not possible
|
* possible
|
||||||
*/
|
*/
|
||||||
decompose: function() {
|
decompose: function() {
|
||||||
// http://dev.w3.org/csswg/css3-2d-transforms/#matrix-decomposition
|
// http://dev.w3.org/csswg/css3-2d-transforms/#matrix-decomposition
|
||||||
|
@ -730,11 +730,11 @@ var Matrix = Base.extend(/** @lends Matrix# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the inversion of the transformation of the matrix and returns it
|
* Creates the inversion of the transformation of the matrix and returns it
|
||||||
* as a new insteance. If the matrix is not invertible (in which case
|
* as a new insteance. If the matrix is not invertible (in which case {@link
|
||||||
* {@link #isSingular()} returns true), {@code null } is returned.
|
* #isSingular()} returns true), `null` is returned.
|
||||||
*
|
*
|
||||||
* @return {Matrix} the inverted matrix, or {@code null }, if the matrix is
|
* @return {Matrix} the inverted matrix, or `null`, if the matrix is
|
||||||
* singular
|
* singular
|
||||||
*/
|
*/
|
||||||
inverted: function() {
|
inverted: function() {
|
||||||
var det = this._getDeterminant();
|
var det = this._getDeterminant();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -241,9 +241,9 @@ var Point = Base.extend(/** @lends Point# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The length of the vector that is represented by this point's coordinates.
|
* The length of the vector that is represented by this point's coordinates.
|
||||||
* Each point can be interpreted as a vector that points from the origin
|
* Each point can be interpreted as a vector that points from the origin (`x
|
||||||
* ({@code x = 0}, {@code y = 0}) to the point's location.
|
* = 0`, `y = 0`) to the point's location. Setting the length changes the
|
||||||
* Setting the length changes the location but keeps the vector's angle.
|
* location but keeps the vector's angle.
|
||||||
*
|
*
|
||||||
* @type Number
|
* @type Number
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -357,10 +357,10 @@ var Point = Base.extend(/** @lends Point# */{
|
||||||
/**
|
/**
|
||||||
* The quadrant of the {@link #angle} of the point.
|
* The quadrant of the {@link #angle} of the point.
|
||||||
*
|
*
|
||||||
* Angles between 0 and 90 degrees are in quadrant {@code 1}. Angles between
|
* Angles between 0 and 90 degrees are in quadrant `1`. Angles between 90
|
||||||
* 90 and 180 degrees are in quadrant {@code 2}, angles between 180 and 270
|
* and 180 degrees are in quadrant `2`, angles between 180 and 270 degrees
|
||||||
* degrees are in quadrant {@code 3} and angles between 270 and 360 degrees
|
* are in quadrant `3` and angles between 270 and 360 degrees are in
|
||||||
* are in quadrant {@code 4}.
|
* quadrant `4`.
|
||||||
*
|
*
|
||||||
* @type Number
|
* @type Number
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -423,14 +423,14 @@ var Point = Base.extend(/** @lends Point# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalize modifies the {@link #length} of the vector to {@code 1} without
|
* Normalize modifies the {@link #length} of the vector to `1` without
|
||||||
* changing its angle and returns it as a new point. The optional
|
* changing its angle and returns it as a new point. The optional `length`
|
||||||
* {@code length} parameter defines the length to normalize to.
|
* parameter defines the length to normalize to. The object itself is not
|
||||||
* The object itself is not modified!
|
* modified!
|
||||||
*
|
*
|
||||||
* @param {Number} [length=1] The length of the normalized vector
|
* @param {Number} [length=1] The length of the normalized vector
|
||||||
* @return {Point} the normalized vector of the vector that is represented
|
* @return {Point} the normalized vector of the vector that is represented
|
||||||
* by this point's coordinates
|
* by this point's coordinates
|
||||||
*/
|
*/
|
||||||
normalize: function(length) {
|
normalize: function(length) {
|
||||||
if (length === undefined)
|
if (length === undefined)
|
||||||
|
@ -901,7 +901,7 @@ var Point = Base.extend(/** @lends Point# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a point object with random {@link #x} and {@link #y} values
|
* Returns a point object with random {@link #x} and {@link #y} values
|
||||||
* between {@code 0} and {@code 1}.
|
* between `0` and `1`.
|
||||||
*
|
*
|
||||||
* @return {Point} the newly created point object
|
* @return {Point} the newly created point object
|
||||||
* @static
|
* @static
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -721,16 +721,16 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a point to this rectangle. The resulting rectangle is the
|
* Adds a point to this rectangle. The resulting rectangle is the smallest
|
||||||
* smallest rectangle that contains both the original rectangle and the
|
* rectangle that contains both the original rectangle and the specified
|
||||||
* specified point.
|
* point.
|
||||||
*
|
*
|
||||||
* After adding a point, a call to {@link #contains(point)} with the added
|
* After adding a point, a call to {@link #contains(point)} with the added
|
||||||
* point as an argument does not necessarily return {@code true}.
|
* point as an argument does not necessarily return `true`. The {@link
|
||||||
* The {@link Rectangle#contains(point)} method does not return {@code true}
|
* Rectangle#contains(point)} method does not return `true` for points on
|
||||||
* for points on the right or bottom edges of a rectangle. Therefore, if the
|
* the right or bottom edges of a rectangle. Therefore, if the added point
|
||||||
* added point falls on the left or bottom edge of the enlarged rectangle,
|
* falls on the left or bottom edge of the enlarged rectangle, {@link
|
||||||
* {@link Rectangle#contains(point)} returns {@code false} for that point.
|
* Rectangle#contains(point)} returns `false` for that point.
|
||||||
*
|
*
|
||||||
* @param {Point} point
|
* @param {Point} point
|
||||||
*/
|
*/
|
||||||
|
@ -779,9 +779,9 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
|
||||||
* @param {Number} amount
|
* @param {Number} amount
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Scales the rectangle in horizontal direction by the specified
|
* Scales the rectangle in horizontal direction by the specified `hor`
|
||||||
* {@code hor} amount and in vertical direction by the specified {@code ver}
|
* amount and in vertical direction by the specified `ver` amount from its
|
||||||
* amount from its center.
|
* center.
|
||||||
*
|
*
|
||||||
* @name Rectangle#scale
|
* @name Rectangle#scale
|
||||||
* @function
|
* @function
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -496,7 +496,7 @@ var Size = Base.extend(/** @lends Size# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a size object with random {@link #width} and {@link #height}
|
* Returns a size object with random {@link #width} and {@link #height}
|
||||||
* values between {@code 0} and {@code 1}.
|
* values between `0` and `1`.
|
||||||
*
|
*
|
||||||
* @return {Size} the newly created size object
|
* @return {Size} the newly created size object
|
||||||
* @static
|
* @static
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -50,9 +50,9 @@ Base.inject(/** @lends Base# */{
|
||||||
* Exports (serializes) this object to a JSON data object or string.
|
* Exports (serializes) this object to a JSON data object or string.
|
||||||
*
|
*
|
||||||
* @option [options.asString=true] {Boolean} whether the JSON is returned as
|
* @option [options.asString=true] {Boolean} whether the JSON is returned as
|
||||||
* a {@code Object} or a {@code String}
|
* a `Object` or a `String`
|
||||||
* @option [options.precision=5] {Number} the amount of fractional digits in
|
* @option [options.precision=5] {Number} the amount of fractional digits in
|
||||||
* numbers used in JSON data
|
* numbers used in JSON data
|
||||||
*
|
*
|
||||||
* @param {Object} [options] the serialization options
|
* @param {Object} [options] the serialization options
|
||||||
* @return {String} the exported JSON data
|
* @return {String} the exported JSON data
|
||||||
|
@ -169,13 +169,13 @@ Base.inject(/** @lends Base# */{
|
||||||
* Size, Rectangle) and also higher classes such as Color and Segment.
|
* Size, Rectangle) and also higher classes such as Color and Segment.
|
||||||
*
|
*
|
||||||
* @param {Array} list the list to read from, either an arguments object
|
* @param {Array} list the list to read from, either an arguments object
|
||||||
* or a normal array
|
* or a normal array
|
||||||
* @param {Number} start the index at which to start reading in the list
|
* @param {Number} start the index at which to start reading in the list
|
||||||
* @param {Number} length the amount of elements that can be read
|
* @param {Number} length the amount of elements that can be read
|
||||||
* @param {Object} options {@code options.readNull} controls whether
|
* @param {Object} options `options.readNull` controls whether null is
|
||||||
* null is returned or converted. {@code options.clone} controls whether
|
* returned or converted. `options.clone` controls whether passed
|
||||||
* passed objects should be cloned if they are already provided in the
|
* objects should be cloned if they are already provided in the
|
||||||
* required type
|
* required type
|
||||||
*/
|
*/
|
||||||
read: function(list, start, options, length) {
|
read: function(list, start, options, length) {
|
||||||
// See if it's called directly on Base, and if so, read value and
|
// See if it's called directly on Base, and if so, read value and
|
||||||
|
@ -234,12 +234,12 @@ Base.inject(/** @lends Base# */{
|
||||||
* separately.
|
* separately.
|
||||||
*
|
*
|
||||||
* @param {Array} list the list to read from, either an arguments object
|
* @param {Array} list the list to read from, either an arguments object
|
||||||
* or a normal array
|
* or a normal array
|
||||||
* @param {Number} start the index at which to start reading in the list
|
* @param {Number} start the index at which to start reading in the list
|
||||||
* @param {Object} options {@code options.readNull} controls whether
|
* @param {Object} options `options.readNull` controls whether null is
|
||||||
* null is returned or converted. {@code options.clone} controls whether
|
* returned or converted. `options.clone` controls whether passed
|
||||||
* passed objects should be cloned if they are already provided in the
|
* objects should be cloned if they are already provided in the
|
||||||
* required type
|
* required type
|
||||||
*/
|
*/
|
||||||
readAll: function(list, start, options) {
|
readAll: function(list, start, options) {
|
||||||
var res = [],
|
var res = [],
|
||||||
|
@ -286,9 +286,9 @@ Base.inject(/** @lends Base# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the named value if the list provides an arguments object,
|
* @return the named value if the list provides an arguments object,
|
||||||
* {@code null} if the named value is {@code null} or {@code undefined},
|
* `null` if the named value is `null` or `undefined`, and
|
||||||
* and {@code undefined} if there is no arguments object
|
* `undefined` if there is no arguments object If no name is
|
||||||
* If no name is provided, it returns the whole arguments object
|
* provided, it returns the whole arguments object
|
||||||
*/
|
*/
|
||||||
getNamed: function(list, name) {
|
getNamed: function(list, name) {
|
||||||
var arg = list[0];
|
var arg = list[0];
|
||||||
|
@ -301,8 +301,8 @@ Base.inject(/** @lends Base# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the argument list has a named argument with the given name.
|
* Checks if the argument list has a named argument with the given name.
|
||||||
* If name is {@code null}, it returns {@code true} if there are any
|
* If name is `null`, it returns `true` if there are any named
|
||||||
* named arguments.
|
* arguments.
|
||||||
*/
|
*/
|
||||||
hasNamed: function(list, name) {
|
hasNamed: function(list, name) {
|
||||||
return !!this.getNamed(list, name);
|
return !!this.getNamed(list, name);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -13,24 +13,24 @@
|
||||||
/**
|
/**
|
||||||
* @name PaperScope
|
* @name PaperScope
|
||||||
*
|
*
|
||||||
* @class The {@code PaperScope} class represents the scope associated with a
|
* @class The `PaperScope` class represents the scope associated with a Paper
|
||||||
* Paper context. When working with PaperScript, these scopes are automatically
|
* context. When working with PaperScript, these scopes are automatically
|
||||||
* created for us, and through clever scoping the properties and methods of the
|
* created for us, and through clever scoping the properties and methods of
|
||||||
* active scope seem to become part of the global scope.
|
* the active scope seem to become part of the global scope.
|
||||||
*
|
*
|
||||||
* When working with normal JavaScript code, {@code PaperScope} objects need to
|
* When working with normal JavaScript code, `PaperScope` objects need to be
|
||||||
* be manually created and handled.
|
* manually created and handled.
|
||||||
*
|
*
|
||||||
* Paper classes can only be accessed through {@code PaperScope} objects. Thus
|
* Paper classes can only be accessed through `PaperScope` objects. Thus in
|
||||||
* in PaperScript they are global, while in JavaScript, they are available on
|
* PaperScript they are global, while in JavaScript, they are available on the
|
||||||
* the global {@link paper} object. For JavaScript you can use
|
* global {@link paper} object. For JavaScript you can use {@link
|
||||||
* {@link PaperScope#install(scope) } to install the Paper classes and objects
|
* PaperScope#install(scope) } to install the Paper classes and objects on the
|
||||||
* on the global scope. Note that when working with more than one scope, this
|
* global scope. Note that when working with more than one scope, this still
|
||||||
* still works for classes, but not for objects like {@link PaperScope#project},
|
* works for classes, but not for objects like {@link PaperScope#project}, since
|
||||||
* since they are not updated in the injected scope if scopes are switched.
|
* they are not updated in the injected scope if scopes are switched.
|
||||||
*
|
*
|
||||||
* The global {@link paper} object is simply a reference to the currently active
|
* The global {@link paper} object is simply a reference to the currently active
|
||||||
* {@code PaperScope}.
|
* `PaperScope`.
|
||||||
*/
|
*/
|
||||||
var PaperScope = Base.extend(/** @lends PaperScope# */{
|
var PaperScope = Base.extend(/** @lends PaperScope# */{
|
||||||
_class: 'PaperScope',
|
_class: 'PaperScope',
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -498,21 +498,21 @@ Base.exports.PaperScript = (function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads, compiles and executes PaperScript code in the HTML document.
|
* Loads, compiles and executes PaperScript code in the HTML document. Note
|
||||||
* Note that this method is executed automatically for all scripts in the
|
* that this method is executed automatically for all scripts in the
|
||||||
* document through a window load event. You can optionally call it earlier
|
* document through a window load event. You can optionally call it earlier
|
||||||
* (e.g. from a DOM ready event), or you can mark scripts to be ignored by
|
* (e.g. from a DOM ready event), or you can mark scripts to be ignored by
|
||||||
* setting the attribute {@code ignore="true"} or
|
* setting the attribute `ignore="true"` or `data-paper-ignore="true"`, and
|
||||||
* {@code data-paper-ignore="true"}, and call the
|
* call the `PaperScript.load(script)` method for each script separately
|
||||||
* {@code PaperScript.load(script)} method for each script separately when
|
* when needed.
|
||||||
* needed.
|
|
||||||
*
|
*
|
||||||
* @name PaperScript.load
|
* @name PaperScript.load
|
||||||
* @function
|
* @function
|
||||||
* @param {HTMLScriptElement} [script=null] the script to load. If none is
|
* @param {HTMLScriptElement} [script=null] the script to load. If none is
|
||||||
* provided, all scripts of the HTML document are iterated over and loaded
|
* provided, all scripts of the HTML document are iterated over and
|
||||||
* @return {PaperScope} the scope produced for the passed {@code script}, or
|
* loaded
|
||||||
* {@code undefined} of multiple scripts area loaded
|
* @return {PaperScope} the scope produced for the passed `script`, or
|
||||||
|
* `undefined` of multiple scripts area loaded
|
||||||
*/
|
*/
|
||||||
function load(script) {
|
function load(script) {
|
||||||
return script ? loadScript(script) : loadAll();
|
return script ? loadScript(script) : loadAll();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -190,21 +190,21 @@ var Key = new function() {
|
||||||
* @type Object
|
* @type Object
|
||||||
*
|
*
|
||||||
* @option modifiers.shift {Boolean} {@true if the shift key is
|
* @option modifiers.shift {Boolean} {@true if the shift key is
|
||||||
* pressed}.
|
* pressed}.
|
||||||
* @option modifiers.control {Boolean} {@true if the control key is
|
* @option modifiers.control {Boolean} {@true if the control key is
|
||||||
* pressed}.
|
* pressed}.
|
||||||
* @option modifiers.alt {Boolean} {@true if the alt/option key is
|
* @option modifiers.alt {Boolean} {@true if the alt/option key is
|
||||||
* pressed}.
|
* pressed}.
|
||||||
* @option modifiers.meta {Boolean} {@true if the meta/windows/command
|
* @option modifiers.meta {Boolean} {@true if the meta/windows/command
|
||||||
* key is pressed}.
|
* key is pressed}.
|
||||||
* @option modifiers.capsLock {Boolean} {@true if the caps-lock
|
* @option modifiers.capsLock {Boolean} {@true if the caps-lock key is
|
||||||
* key is active}.
|
* active}.
|
||||||
* @option modifiers.space {Boolean} {@true if the space key is
|
* @option modifiers.space {Boolean} {@true if the space key is
|
||||||
* pressed}.
|
* pressed}.
|
||||||
* @option modifiers.option {Boolean} {@true if the alt/option key is
|
* @option modifiers.option {Boolean} {@true if the alt/option key is
|
||||||
* pressed}. This is the same as {@code modifiers.alt}
|
* pressed}. This is the same as `modifiers.alt`
|
||||||
* @option modifiers.command {Boolean} {@true if the meta key is
|
* @option modifiers.command {Boolean} {@true if the meta key is pressed
|
||||||
* pressed on Mac, or the control key is pressed on Windows and Linux}.
|
* on Mac, or the control key is pressed on Windows and Linux}.
|
||||||
*/
|
*/
|
||||||
modifiers: modifiers,
|
modifiers: modifiers,
|
||||||
|
|
||||||
|
@ -212,8 +212,8 @@ var Key = new function() {
|
||||||
* Checks whether the specified key is pressed.
|
* Checks whether the specified key is pressed.
|
||||||
*
|
*
|
||||||
* @param {String} key any character or special key descriptor, e.g.:
|
* @param {String} key any character or special key descriptor, e.g.:
|
||||||
* {@strings enter, space, shift, control, alt, meta, caps-lock, left,
|
* {@strings enter, space, shift, control, alt, meta, caps-lock,
|
||||||
* up, right, down, escape, delete, ...}
|
* left, up, right, down, escape, delete, ...}
|
||||||
* @return {Boolean} {@true if the key is pressed}
|
* @return {Boolean} {@true if the key is pressed}
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -125,9 +125,9 @@ var Group = Item.extend(/** @lends Group# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether the group item is to be clipped.
|
* Specifies whether the group item is to be clipped. When setting to
|
||||||
* When setting to {@code true}, the first child in the group is
|
* `true`, the first child in the group is automatically defined as the
|
||||||
* automatically defined as the clipping mask.
|
* clipping mask.
|
||||||
*
|
*
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
* @bean
|
* @bean
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
220
src/item/Item.js
220
src/item/Item.js
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -436,8 +436,8 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
_locked: false,
|
_locked: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether the item is visible. When set to {@code false}, the
|
* Specifies whether the item is visible. When set to `false`, the item
|
||||||
* item won't be drawn.
|
* won't be drawn.
|
||||||
*
|
*
|
||||||
* @name Item#visible
|
* @name Item#visible
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
|
@ -498,7 +498,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
_blendMode: 'normal',
|
_blendMode: 'normal',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The opacity of the item as a value between {@code 0} and {@code 1}.
|
* The opacity of the item as a value between `0` and `1`.
|
||||||
*
|
*
|
||||||
* @name Item#opacity
|
* @name Item#opacity
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -527,8 +527,8 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
|
|
||||||
// TODO: Implement guides
|
// TODO: Implement guides
|
||||||
/**
|
/**
|
||||||
* Specifies whether the item functions as a guide. When set to
|
* Specifies whether the item functions as a guide. When set to `true`, the
|
||||||
* {@code true}, the item will be drawn at the end as a guide.
|
* item will be drawn at the end as a guide.
|
||||||
*
|
*
|
||||||
* @name Item#guide
|
* @name Item#guide
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
|
@ -538,9 +538,9 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
_guide: false,
|
_guide: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether the item is selected. This will also return
|
* Specifies whether the item is selected. This will also return `true` for
|
||||||
* {@code true} for {@link Group} items if they are partially selected, e.g.
|
* {@link Group} items if they are partially selected, e.g. groups
|
||||||
* groups containing selected or partially selected paths.
|
* containing selected or partially selected paths.
|
||||||
*
|
*
|
||||||
* Paper.js draws the visual outlines of selected items on top of your
|
* Paper.js draws the visual outlines of selected items on top of your
|
||||||
* project. This can be useful for debugging, as it allows you to see the
|
* project. This can be useful for debugging, as it allows you to see the
|
||||||
|
@ -760,9 +760,9 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
/**
|
/**
|
||||||
* The item's pivot point specified in the item coordinate system, defining
|
* The item's pivot point specified in the item coordinate system, defining
|
||||||
* the point around which all transformations are hinging. This is also the
|
* the point around which all transformations are hinging. This is also the
|
||||||
* reference point for {@link #position}. By default, it is set to
|
* reference point for {@link #position}. By default, it is set to `null`,
|
||||||
* {@code null}, meaning the {@link Rectangle#center} of the item's
|
* meaning the {@link Rectangle#center} of the item's {@link #bounds}
|
||||||
* {@link #bounds} rectangle is used as pivot.
|
* rectangle is used as pivot.
|
||||||
*
|
*
|
||||||
* @type Point
|
* @type Point
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -1330,7 +1330,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The first item contained within this item. This is a shortcut for
|
* The first item contained within this item. This is a shortcut for
|
||||||
* accessing {@code item.children[0]}.
|
* accessing `item.children[0]`.
|
||||||
*
|
*
|
||||||
* @type Item
|
* @type Item
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -1341,7 +1341,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The last item contained within this item.This is a shortcut for
|
* The last item contained within this item.This is a shortcut for
|
||||||
* accessing {@code item.children[item.children.length - 1]}.
|
* accessing `item.children[item.children.length - 1]`.
|
||||||
*
|
*
|
||||||
* @type Item
|
* @type Item
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -1411,8 +1411,8 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* item.
|
* item.
|
||||||
*
|
*
|
||||||
* @param {Boolean} [insert=true] specifies whether the copy should be
|
* @param {Boolean} [insert=true] specifies whether the copy should be
|
||||||
* inserted into the DOM. When set to {@code true}, it is inserted above the
|
* inserted into the DOM. When set to `true`, it is inserted above the
|
||||||
* original
|
* original
|
||||||
* @return {Item} the newly cloned item
|
* @return {Item} the newly cloned item
|
||||||
*
|
*
|
||||||
* @example {@paperscript}
|
* @example {@paperscript}
|
||||||
|
@ -1538,8 +1538,8 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* is not removed after rasterization.
|
* is not removed after rasterization.
|
||||||
*
|
*
|
||||||
* @param {Number} [resolution=view.resolution] the resolution of the raster
|
* @param {Number} [resolution=view.resolution] the resolution of the raster
|
||||||
* in pixels per inch (DPI). If not specified, the value of
|
* in pixels per inch (DPI). If not specified, the value of
|
||||||
* {@code view.resolution} is used.
|
* `view.resolution` is used.
|
||||||
* @return {Raster} the newly created raster item
|
* @return {Raster} the newly created raster item
|
||||||
*
|
*
|
||||||
* @example {@paperscript}
|
* @example {@paperscript}
|
||||||
|
@ -1675,42 +1675,41 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a hit-test on the item (and its children, if it is a
|
* Perform a hit-test on the item (and its children, if it is a {@link
|
||||||
* {@link Group} or {@link Layer}) at the location of the specified point.
|
* Group} or {@link Layer}) at the location of the specified point.
|
||||||
*
|
*
|
||||||
* The options object allows you to control the specifics of the hit-test
|
* The options object allows you to control the specifics of the hit-test
|
||||||
* and may contain a combination of the following values:
|
* and may contain a combination of the following values:
|
||||||
*
|
*
|
||||||
* @option [options.tolerance={@link PaperScope#settings}.hitTolerance]
|
* @option [options.tolerance={@link PaperScope#settings}.hitTolerance]
|
||||||
* {Number} the tolerance of the hit-test
|
* {Number} the tolerance of the hit-test
|
||||||
* @option options.class {Function} only hit-test again a certain item class
|
* @option options.class {Function} only hit-test again a certain item class
|
||||||
* and its sub-classes: {@code Group, Layer, Path, CompoundPath,
|
* and its sub-classes: {@code Group, Layer, Path, CompoundPath, Shape,
|
||||||
* Shape, Raster, PlacedSymbol, PointText}, etc
|
* Raster, PlacedSymbol, PointText}, etc
|
||||||
* @option options.fill {Boolean} hit-test the fill of items
|
* @option options.fill {Boolean} hit-test the fill of items
|
||||||
* @option options.stroke {Boolean} hit-test the stroke of path items,
|
* @option options.stroke {Boolean} hit-test the stroke of path items,
|
||||||
* taking into account the setting of stroke color and width
|
* taking into account the setting of stroke color and width
|
||||||
* @option options.segments {Boolean} hit-test for {@link Segment#point} of
|
* @option options.segments {Boolean} hit-test for {@link Segment#point} of
|
||||||
* {@link Path} items
|
* {@link Path} items
|
||||||
* @option options.curves {Boolean} hit-test the curves of path items,
|
* @option options.curves {Boolean} hit-test the curves of path items,
|
||||||
* without taking the stroke color or width into account
|
* without taking the stroke color or width into account
|
||||||
* @option options.handles {Boolean} hit-test for the handles
|
* @option options.handles {Boolean} hit-test for the handles ({@link
|
||||||
* ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments
|
* Segment#handleIn} / {@link Segment#handleOut}) of path segments
|
||||||
* @option options.ends {Boolean} only hit-test for the first or last
|
* @option options.ends {Boolean} only hit-test for the first or last
|
||||||
* segment points of open path items
|
* segment points of open path items
|
||||||
* @option options.bounds {Boolean} hit-test the corners and side-centers of
|
* @option options.bounds {Boolean} hit-test the corners and side-centers of
|
||||||
* the bounding rectangle of items ({@link Item#bounds})
|
* the bounding rectangle of items ({@link Item#bounds})
|
||||||
* @option options.center {Boolean} hit-test the {@link Rectangle#center} of
|
* @option options.center {Boolean} hit-test the {@link Rectangle#center} of
|
||||||
* the bounding rectangle of items ({@link Item#bounds})
|
* the bounding rectangle of items ({@link Item#bounds})
|
||||||
* @option options.guides {Boolean} hit-test items that have
|
* @option options.guides {Boolean} hit-test items that have {@link
|
||||||
* {@link Item#guide} set to {@code true}
|
* Item#guide} set to `true`
|
||||||
* @option options.selected {Boolean} only hit selected items
|
* @option options.selected {Boolean} only hit selected items
|
||||||
*
|
*
|
||||||
* @param {Point} point The point where the hit-test should be performed
|
* @param {Point} point The point where the hit-test should be performed
|
||||||
* @param {Object} [options={ fill: true, stroke: true, segments: true,
|
* @param {Object} [options={ fill: true, stroke: true, segments: true,
|
||||||
* tolerance: 2 }]
|
* tolerance: 2 }]
|
||||||
* @return {HitResult} a hit result object that contains more
|
* @return {HitResult} a hit result object that contains more information
|
||||||
* information about what exactly was hit or {@code null} if nothing was
|
* about what exactly was hit or `null` if nothing was hit
|
||||||
* hit
|
|
||||||
*/
|
*/
|
||||||
hitTest: function(/* point, options */) {
|
hitTest: function(/* point, options */) {
|
||||||
return this._hitTest(
|
return this._hitTest(
|
||||||
|
@ -1912,17 +1911,15 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the descendants (children or children of children) of this item
|
* Fetch the descendants (children or children of children) of this item
|
||||||
* that match the properties in the specified object.
|
* that match the properties in the specified object. Extended matching is
|
||||||
* Extended matching is possible by providing a compare function or
|
* possible by providing a compare function or regular expression. Matching
|
||||||
* regular expression. Matching points, colors only work as a comparison
|
* points, colors only work as a comparison of the full object, not partial
|
||||||
* of the full object, not partial matching (e.g. only providing the x-
|
* matching (e.g. only providing the x- coordinate to match all points with
|
||||||
* coordinate to match all points with that x-value). Partial matching
|
* that x-value). Partial matching does work for {@link Item#data}.
|
||||||
* does work for {@link Item#data}.
|
|
||||||
*
|
*
|
||||||
* Matching items against a rectangular area is also possible, by setting
|
* Matching items against a rectangular area is also possible, by setting
|
||||||
* either {@code match.inside} or {@code match.overlapping} to a rectangle
|
* either `match.inside` or `match.overlapping` to a rectangle describing
|
||||||
* describing the area in which the items either have to be fully or partly
|
* the area in which the items either have to be fully or partly contained.
|
||||||
* contained.
|
|
||||||
*
|
*
|
||||||
* See {@link Project#getItems(match)} for a selection of illustrated
|
* See {@link Project#getItems(match)} for a selection of illustrated
|
||||||
* examples.
|
* examples.
|
||||||
|
@ -1932,7 +1929,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* @option match.match {Function} a match function to be called for each
|
* @option match.match {Function} a match function to be called for each
|
||||||
* item, allowing the definition of more flexible item checks that are
|
* item, allowing the definition of more flexible item checks that are
|
||||||
* not bound to properties. If no other match properties are defined,
|
* not bound to properties. If no other match properties are defined,
|
||||||
* this function can also be passed instead of the {@code match} object
|
* this function can also be passed instead of the `match` object
|
||||||
* @option match.class {Function} the constructor function of the item type
|
* @option match.class {Function} the constructor function of the item type
|
||||||
* to match against
|
* to match against
|
||||||
* @option match.inside {Rectangle} the rectangle in which the items need to
|
* @option match.inside {Rectangle} the rectangle in which the items need to
|
||||||
|
@ -2050,10 +2047,10 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* @name Item#exportJSON
|
* @name Item#exportJSON
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @option [options.asString=true] {Boolean} whether the JSON is returned as a
|
* @option [options.asString=true] {Boolean} whether the JSON is returned as
|
||||||
* {@code Object} or a {@code String}
|
* a `Object` or a `String`
|
||||||
* @option [options.precision=5] {Number} the amount of fractional digits in
|
* @option [options.precision=5] {Number} the amount of fractional digits in
|
||||||
* numbers used in JSON data
|
* numbers used in JSON data
|
||||||
*
|
*
|
||||||
* @param {Object} [options] the serialization options
|
* @param {Object} [options] the serialization options
|
||||||
* @return {String} the exported JSON data
|
* @return {String} the exported JSON data
|
||||||
|
@ -2085,15 +2082,15 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @option [options.asString=false] {Boolean} whether a SVG node or a
|
* @option [options.asString=false] {Boolean} whether a SVG node or a
|
||||||
* {@code String} is to be returned
|
* `String` is to be returned
|
||||||
* @option [options.precision=5] {Number} the amount of fractional digits in
|
* @option [options.precision=5] {Number} the amount of fractional digits in
|
||||||
* numbers used in SVG data
|
* numbers used in SVG data
|
||||||
* @option [options.matchShapes=false] {Boolean} whether path items should
|
* @option [options.matchShapes=false] {Boolean} whether path items should
|
||||||
* tried to be converted to SVG shape items (rect, circle, ellipse, line,
|
* tried to be converted to SVG shape items (rect, circle, ellipse,
|
||||||
* polyline, polygon), if their geometries match
|
* line, polyline, polygon), if their geometries match
|
||||||
* @option [options.embedImages=true] {Boolean} whether raster images
|
* @option [options.embedImages=true] {Boolean} whether raster images should
|
||||||
* should be embedded as base64 data inlined in the xlink:href attribute,
|
* be embedded as base64 data inlined in the xlink:href attribute, or
|
||||||
* or kept as a link to their external URL.
|
* kept as a link to their external URL.
|
||||||
*
|
*
|
||||||
* @param {Object} [options] the export options
|
* @param {Object} [options] the export options
|
||||||
* @return {SVGElement} the item converted to an SVG node
|
* @return {SVGElement} the item converted to an SVG node
|
||||||
|
@ -2101,68 +2098,63 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the provided SVG content into Paper.js items and adds them to
|
* Converts the provided SVG content into Paper.js items and adds them to
|
||||||
* the this item's children list.
|
* the this item's children list. Note that the item is not cleared first.
|
||||||
* Note that the item is not cleared first. You can call
|
* You can call {@link Item#removeChildren()} to do so.
|
||||||
* {@link Item#removeChildren()} to do so.
|
|
||||||
*
|
*
|
||||||
* @name Item#importSVG
|
* @name Item#importSVG
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @option [options.expandShapes=false] {Boolean} whether imported shape
|
* @option [options.expandShapes=false] {Boolean} whether imported shape
|
||||||
* items should be expanded to path items
|
* items should be expanded to path items
|
||||||
* @option [options.onLoad] {Function} the callback function to call once
|
* @option [options.onLoad] {Function} the callback function to call once
|
||||||
* the SVG content is loaded from the given URL. Only required when loading
|
* the SVG content is loaded from the given URL. Only required when
|
||||||
* from external files.
|
* loading from external files.
|
||||||
* @option [options.applyMatrix={@link PaperScope#settings}.applyMatrix]
|
* @option [options.applyMatrix={@link PaperScope#settings}.applyMatrix]
|
||||||
* {Boolean} whether imported items should have their transformation
|
* {Boolean} whether imported items should have their transformation
|
||||||
* matrices applied to their contents or not
|
* matrices applied to their contents or not
|
||||||
*
|
*
|
||||||
* @param {SVGElement|String} svg the SVG content to import, either as a SVG
|
* @param {SVGElement|String} svg the SVG content to import, either as a SVG
|
||||||
* DOM node, a string containing SVG content, or a string describing the URL
|
* DOM node, a string containing SVG content, or a string describing the
|
||||||
* of the SVG file to fetch.
|
* URL of the SVG file to fetch.
|
||||||
* @param {Object} [options] the import options
|
* @param {Object} [options] the import options
|
||||||
* @return {Item} the newly created Paper.js item containing the converted
|
* @return {Item} the newly created Paper.js item containing the converted
|
||||||
* SVG content
|
* SVG content
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Imports the provided external SVG file, converts it into Paper.js items
|
* Imports the provided external SVG file, converts it into Paper.js items
|
||||||
* and adds them to the this item's children list.
|
* and adds them to the this item's children list. Note that the item is not
|
||||||
* Note that the item is not cleared first. You can call
|
* cleared first. You can call {@link Item#removeChildren()} to do so.
|
||||||
* {@link Item#removeChildren()} to do so.
|
|
||||||
*
|
*
|
||||||
* @name Item#importSVG
|
* @name Item#importSVG
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @param {SVGElement|String} svg the URL of the SVG file to fetch.
|
* @param {SVGElement|String} svg the URL of the SVG file to fetch.
|
||||||
* @param {Function} onLoad the callback function to call once the SVG
|
* @param {Function} onLoad the callback function to call once the SVG
|
||||||
* content is loaded from the given URL.
|
* content is loaded from the given URL.
|
||||||
* @return {Item} the newly created Paper.js item containing the converted
|
* @return {Item} the newly created Paper.js item containing the converted
|
||||||
* SVG content
|
* SVG content
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@grouptitle Hierarchy Operations}
|
* {@grouptitle Hierarchy Operations} Adds the specified item as a child of
|
||||||
* Adds the specified item as a child of this item at the end of the
|
* this item at the end of the its children list. You can use this function
|
||||||
* its children list. You can use this function for groups, compound
|
* for groups, compound paths and layers.
|
||||||
* paths and layers.
|
|
||||||
*
|
*
|
||||||
* @param {Item} item the item to be added as a child
|
* @param {Item} item the item to be added as a child
|
||||||
* @return {Item} the added item, or {@code null} if adding was not
|
* @return {Item} the added item, or `null` if adding was not possible
|
||||||
* possible
|
|
||||||
*/
|
*/
|
||||||
addChild: function(item, _preserve) {
|
addChild: function(item, _preserve) {
|
||||||
return this.insertChild(undefined, item, _preserve);
|
return this.insertChild(undefined, item, _preserve);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts the specified item as a child of this item at the specified
|
* Inserts the specified item as a child of this item at the specified index
|
||||||
* index in its {@link #children} list. You can use this function for
|
* in its {@link #children} list. You can use this function for groups,
|
||||||
* groups, compound paths and layers.
|
* compound paths and layers.
|
||||||
*
|
*
|
||||||
* @param {Number} index
|
* @param {Number} index
|
||||||
* @param {Item} item the item to be inserted as a child
|
* @param {Item} item the item to be inserted as a child
|
||||||
* @return {Item} the inserted item, or {@code null} if inserting was not
|
* @return {Item} the inserted item, or `null` if inserting was not possible
|
||||||
* possible
|
|
||||||
*/
|
*/
|
||||||
insertChild: function(index, item, _preserve) {
|
insertChild: function(index, item, _preserve) {
|
||||||
var res = item ? this.insertChildren(index, [item], _preserve) : null;
|
var res = item ? this.insertChildren(index, [item], _preserve) : null;
|
||||||
|
@ -2170,13 +2162,12 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified items as children of this item at the end of the
|
* Adds the specified items as children of this item at the end of the its
|
||||||
* its children list. You can use this function for groups, compound
|
* children list. You can use this function for groups, compound paths and
|
||||||
* paths and layers.
|
* layers.
|
||||||
*
|
*
|
||||||
* @param {Item[]} items The items to be added as children
|
* @param {Item[]} items The items to be added as children
|
||||||
* @return {Item[]} the added items, or {@code null} if adding was not
|
* @return {Item[]} the added items, or `null` if adding was not possible
|
||||||
* possible
|
|
||||||
*/
|
*/
|
||||||
addChildren: function(items, _preserve) {
|
addChildren: function(items, _preserve) {
|
||||||
return this.insertChildren(this._children.length, items, _preserve);
|
return this.insertChildren(this._children.length, items, _preserve);
|
||||||
|
@ -2189,8 +2180,8 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
*
|
*
|
||||||
* @param {Number} index
|
* @param {Number} index
|
||||||
* @param {Item[]} items The items to be appended as children
|
* @param {Item[]} items The items to be appended as children
|
||||||
* @return {Item[]} the inserted items, or {@code null} if inserted was not
|
* @return {Item[]} the inserted items, or `null` if inserted was not
|
||||||
* possible
|
* possible
|
||||||
*/
|
*/
|
||||||
insertChildren: function(index, items, _preserve, _proto) {
|
insertChildren: function(index, items, _preserve, _proto) {
|
||||||
// CompoundPath#insertChildren() requires _preserve and _type:
|
// CompoundPath#insertChildren() requires _preserve and _type:
|
||||||
|
@ -2254,8 +2245,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* Inserts this item above the specified item.
|
* Inserts this item above the specified item.
|
||||||
*
|
*
|
||||||
* @param {Item} item the item above which it should be inserted
|
* @param {Item} item the item above which it should be inserted
|
||||||
* @return {Item} the inserted item, or {@code null} if inserting was not
|
* @return {Item} the inserted item, or `null` if inserting was not possible
|
||||||
* possible
|
|
||||||
*/
|
*/
|
||||||
insertAbove: function(item, _preserve) {
|
insertAbove: function(item, _preserve) {
|
||||||
return item._insertSibling(item._index + 1, this, _preserve);
|
return item._insertSibling(item._index + 1, this, _preserve);
|
||||||
|
@ -2265,8 +2255,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* Inserts this item below the specified item.
|
* Inserts this item below the specified item.
|
||||||
*
|
*
|
||||||
* @param {Item} item the item below which it should be inserted
|
* @param {Item} item the item below which it should be inserted
|
||||||
* @return {Item} the inserted item, or {@code null} if inserting was not
|
* @return {Item} the inserted item, or `null` if inserting was not possible
|
||||||
* possible
|
|
||||||
*/
|
*/
|
||||||
insertBelow: function(item, _preserve) {
|
insertBelow: function(item, _preserve) {
|
||||||
return item._insertSibling(item._index, this, _preserve);
|
return item._insertSibling(item._index, this, _preserve);
|
||||||
|
@ -2448,8 +2437,8 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* @return {Item[]} an array containing the removed items
|
* @return {Item[]} an array containing the removed items
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Removes the children from the specified {@code from} index to the
|
* Removes the children from the specified `from` index to the `to` index
|
||||||
* {@code to} index from the parent's {@link #children} array.
|
* from the parent's {@link #children} array.
|
||||||
*
|
*
|
||||||
* @name Item#removeChildren
|
* @name Item#removeChildren
|
||||||
* @function
|
* @function
|
||||||
|
@ -2893,7 +2882,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The fill-rule with which the shape gets filled. Please note that only
|
* The fill-rule with which the shape gets filled. Please note that only
|
||||||
* modern browsers support fill-rules other than {@code 'nonzero'}.
|
* modern browsers support fill-rules other than `'nonzero'`.
|
||||||
*
|
*
|
||||||
* @name Item#fillRule
|
* @name Item#fillRule
|
||||||
* @property
|
* @property
|
||||||
|
@ -2907,7 +2896,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* The shadow color.
|
* The shadow color.
|
||||||
*
|
*
|
||||||
* @property
|
* @property
|
||||||
* @name Style#shadowColor
|
* @name Item#shadowColor
|
||||||
* @type Color
|
* @type Color
|
||||||
*
|
*
|
||||||
* @example {@paperscript}
|
* @example {@paperscript}
|
||||||
|
@ -2931,7 +2920,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
*
|
*
|
||||||
* @property
|
* @property
|
||||||
* @default 0
|
* @default 0
|
||||||
* @name Style#shadowBlur
|
* @name Item#shadowBlur
|
||||||
* @type Number
|
* @type Number
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2940,7 +2929,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
*
|
*
|
||||||
* @property
|
* @property
|
||||||
* @default 0
|
* @default 0
|
||||||
* @name Style#shadowOffset
|
* @name Item#shadowOffset
|
||||||
* @type Point
|
* @type Point
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3367,16 +3356,17 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@grouptitle Event Handlers}
|
* {@grouptitle Event Handlers}
|
||||||
|
*
|
||||||
* Item level handler function to be called on each frame of an animation.
|
* Item level handler function to be called on each frame of an animation.
|
||||||
* The function receives an event object which contains information about
|
* The function receives an event object which contains information about
|
||||||
* the frame event:
|
* the frame event:
|
||||||
*
|
*
|
||||||
* @option event.count {Number} the number of times the frame event was
|
* @option event.count {Number} the number of times the frame event was
|
||||||
* fired
|
* fired
|
||||||
* @option event.time {Number} the total amount of time passed since the
|
* @option event.time {Number} the total amount of time passed since the
|
||||||
* first frame event in seconds
|
* first frame event in seconds
|
||||||
* @option event.delta {Number} the time passed in seconds since the last
|
* @option event.delta {Number} the time passed in seconds since the last
|
||||||
* frame event
|
* frame event
|
||||||
*
|
*
|
||||||
* @see View#onFrame
|
* @see View#onFrame
|
||||||
* @example {@paperscript}
|
* @example {@paperscript}
|
||||||
|
@ -4073,24 +4063,24 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
/**
|
/**
|
||||||
* {@grouptitle Remove On Event}
|
* {@grouptitle Remove On Event}
|
||||||
*
|
*
|
||||||
* Removes the item when the events specified in the passed object literal
|
* Removes the item when the events specified in the passed options object
|
||||||
* occur.
|
* occur.
|
||||||
* The object literal can contain the following values:
|
|
||||||
* Remove the item when the next {@link Tool#onMouseMove} event is
|
|
||||||
* fired: {@code object.move = true}
|
|
||||||
*
|
*
|
||||||
* Remove the item when the next {@link Tool#onMouseDrag} event is
|
* @option options.move {Boolean) remove the item when the next {@link
|
||||||
* fired: {@code object.drag = true}
|
* Tool#onMouseMove} event is fired.
|
||||||
*
|
*
|
||||||
* Remove the item when the next {@link Tool#onMouseDown} event is
|
* @option options.drag {Boolena) remove the item when the next {@link
|
||||||
* fired: {@code object.down = true}
|
* Tool#onMouseDrag} event is fired.
|
||||||
*
|
*
|
||||||
* Remove the item when the next {@link Tool#onMouseUp} event is
|
* @option options.down {Boolean) remove the item when the next {@link
|
||||||
* fired: {@code object.up = true}
|
* Tool#onMouseDown} event is fired.
|
||||||
|
*
|
||||||
|
* @option options.up {Boolean) remove the item when the next {@link
|
||||||
|
* Tool#onMouseUp} event is fired.
|
||||||
*
|
*
|
||||||
* @name Item#removeOn
|
* @name Item#removeOn
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} object
|
* @param {Object} options
|
||||||
*
|
*
|
||||||
* @example {@paperscript height=200}
|
* @example {@paperscript height=200}
|
||||||
* // Click and drag below:
|
* // Click and drag below:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -34,14 +34,14 @@ var Raster = Item.extend(/** @lends Raster# */{
|
||||||
// TODO: Have PlacedSymbol & Raster inherit from a shared class?
|
// TODO: Have PlacedSymbol & Raster inherit from a shared class?
|
||||||
/**
|
/**
|
||||||
* Creates a new raster item from the passed argument, and places it in the
|
* Creates a new raster item from the passed argument, and places it in the
|
||||||
* active layer. {@code object} can either be a DOM Image, a Canvas, or a
|
* active layer. `object` can either be a DOM Image, a Canvas, or a string
|
||||||
* string describing the URL to load the image from, or the ID of a DOM
|
* describing the URL to load the image from, or the ID of a DOM element to
|
||||||
* element to get the image from (either a DOM Image or a Canvas).
|
* get the image from (either a DOM Image or a Canvas).
|
||||||
*
|
*
|
||||||
* @param {HTMLImageElement|HTMLCanvasElement|String} [source] the source of
|
* @param {HTMLImageElement|HTMLCanvasElement|String} [source] the source of
|
||||||
* the raster
|
* the raster
|
||||||
* @param {Point} [position] the center position at which the raster item is
|
* @param {Point} [position] the center position at which the raster item is
|
||||||
* placed
|
* placed
|
||||||
*
|
*
|
||||||
* @example {@paperscript height=300} // Creating a raster using a url
|
* @example {@paperscript height=300} // Creating a raster using a url
|
||||||
* var url = 'http://assets.paperjs.org/images/marilyn.jpg';
|
* var url = 'http://assets.paperjs.org/images/marilyn.jpg';
|
||||||
|
@ -250,7 +250,7 @@ var Raster = Item.extend(/** @lends Raster# */{
|
||||||
* The Canvas object of the raster. If the raster was created from an image,
|
* The Canvas object of the raster. If the raster was created from an image,
|
||||||
* accessing its canvas causes the raster to try and create one and draw the
|
* accessing its canvas causes the raster to try and create one and draw the
|
||||||
* image into it. Depending on security policies, this might fail, in which
|
* image into it. Depending on security policies, this might fail, in which
|
||||||
* case {@code null} is returned instead.
|
* case `null` is returned instead.
|
||||||
*
|
*
|
||||||
* @type Canvas
|
* @type Canvas
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -476,7 +476,7 @@ var Raster = Item.extend(/** @lends Raster# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Base 64 encoded {@code data:} URL representation of the raster.
|
* Returns a Base 64 encoded `data:` URL representation of the raster.
|
||||||
*
|
*
|
||||||
* @return {String}
|
* @return {String}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -160,10 +160,10 @@ var Shape = Item.extend(/** @lends Shape# */{
|
||||||
* inherits all settings from it, similar to {@link Item#clone()}.
|
* inherits all settings from it, similar to {@link Item#clone()}.
|
||||||
*
|
*
|
||||||
* @param {Boolean} [insert=true] specifies whether the new path should be
|
* @param {Boolean} [insert=true] specifies whether the new path should be
|
||||||
* inserted into the DOM. When set to {@code true}, it is inserted above the
|
* inserted into the DOM. When set to `true`, it is inserted above the
|
||||||
* shape item
|
* shape item
|
||||||
* @return {Shape} the newly created path item with the same geometry as
|
* @return {Shape} the newly created path item with the same geometry as
|
||||||
* this shape item
|
* this shape item
|
||||||
* @see Path#toShape(insert)
|
* @see Path#toShape(insert)
|
||||||
*/
|
*/
|
||||||
toPath: function(insert) {
|
toPath: function(insert) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js v*#=* __options.version - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js v*#=* __options.version - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -403,7 +403,7 @@ var Curve = Base.extend(/** @lends Curve# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new curve as a sub-curve from this curve, its range defined by
|
* Creates a new curve as a sub-curve from this curve, its range defined by
|
||||||
* the given parameters. If {@code from} is larger than {@code to}, then
|
* the given parameters. If `from` is larger than `to`, then
|
||||||
* the resulting curve will have its direction reversed.
|
* the resulting curve will have its direction reversed.
|
||||||
*
|
*
|
||||||
* @param {Number} from the curve-time parameter at which the sub-curve
|
* @param {Number} from the curve-time parameter at which the sub-curve
|
||||||
|
@ -426,10 +426,10 @@ var Curve = Base.extend(/** @lends Curve# */{
|
||||||
* of {@link CurveLocation} objects.
|
* of {@link CurveLocation} objects.
|
||||||
*
|
*
|
||||||
* @param {Curve} curve the other curve to find the intersections with (if
|
* @param {Curve} curve the other curve to find the intersections with (if
|
||||||
* the curve itself or {@code null} is passed, the self intersection of the
|
* the curve itself or `null` is passed, the self intersection of the
|
||||||
* curve is returned, if it exists)
|
* curve is returned, if it exists)
|
||||||
* @return {CurveLocation[]} the locations of all intersections between the
|
* @return {CurveLocation[]} the locations of all intersections between the
|
||||||
* curves
|
* curves
|
||||||
*/
|
*/
|
||||||
getIntersections: function(curve) {
|
getIntersections: function(curve) {
|
||||||
return Curve._getIntersections(this.getValues(),
|
return Curve._getIntersections(this.getValues(),
|
||||||
|
@ -464,11 +464,11 @@ var Curve = Base.extend(/** @lends Curve# */{
|
||||||
* @name Curve#divide
|
* @name Curve#divide
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} [offset=0.5] the offset on the curve at which to split,
|
* @param {Number} [offset=0.5] the offset on the curve at which to split,
|
||||||
* or the curve time parameter if {@code isParameter} is {@code true}
|
* or the curve time parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Curve} the second part of the divided curve, if the offset
|
* @return {Curve} the second part of the divided curve, if the offset is
|
||||||
* is within the valid range, {code null} otherwise.
|
* within the valid range, {code null} otherwise.
|
||||||
*/
|
*/
|
||||||
// TODO: Rename to divideAt()?
|
// TODO: Rename to divideAt()?
|
||||||
divide: function(offset, isParameter, _setHandles) {
|
divide: function(offset, isParameter, _setHandles) {
|
||||||
|
@ -524,9 +524,9 @@ var Curve = Base.extend(/** @lends Curve# */{
|
||||||
* @name Curve#split
|
* @name Curve#split
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} [offset=0.5] the offset on the curve at which to split,
|
* @param {Number} [offset=0.5] the offset on the curve at which to split,
|
||||||
* or the curve time parameter if {@code isParameter} is {@code true}
|
* or the curve time parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Path} the newly created path after splitting, if any
|
* @return {Path} the newly created path after splitting, if any
|
||||||
* @see Path#split(index, parameter)
|
* @see Path#split(index, parameter)
|
||||||
*/
|
*/
|
||||||
|
@ -985,8 +985,8 @@ statics: {
|
||||||
* Calculates the curve time parameter of the specified offset on the path,
|
* Calculates the curve time parameter of the specified offset on the path,
|
||||||
* relative to the provided start parameter. If offset is a negative value,
|
* relative to the provided start parameter. If offset is a negative value,
|
||||||
* the parameter is searched to the left of the start parameter. If no start
|
* the parameter is searched to the left of the start parameter. If no start
|
||||||
* parameter is provided, a default of {@code 0} for positive values of
|
* parameter is provided, a default of `0` for positive values of `offset`
|
||||||
* {@code offset} and {@code 1} for negative values of {@code offset}.
|
* and `1` for negative values of `offset`.
|
||||||
*
|
*
|
||||||
* @param {Number} offset
|
* @param {Number} offset
|
||||||
* @param {Number} [start]
|
* @param {Number} [start]
|
||||||
|
@ -998,7 +998,7 @@ statics: {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the curve time parameter of the specified point if it lies on the
|
* Returns the curve time parameter of the specified point if it lies on the
|
||||||
* curve, {@code null} otherwise.
|
* curve, `null` otherwise.
|
||||||
*
|
*
|
||||||
* @param {Point} point the point on the curve
|
* @param {Point} point the point on the curve
|
||||||
* @return {Number} the curve time parameter of the specified point
|
* @return {Number} the curve time parameter of the specified point
|
||||||
|
@ -1012,9 +1012,9 @@ statics: {
|
||||||
* parameter.
|
* parameter.
|
||||||
*
|
*
|
||||||
* @param {Number} offset the offset on the curve, or the curve time
|
* @param {Number} offset the offset on the curve, or the curve time
|
||||||
* parameter if {@code isParameter} is {@code true}
|
* parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {CurveLocation} the curve location at the specified the offset
|
* @return {CurveLocation} the curve location at the specified the offset
|
||||||
*/
|
*/
|
||||||
getLocationAt: function(offset, isParameter) {
|
getLocationAt: function(offset, isParameter) {
|
||||||
|
@ -1026,7 +1026,7 @@ statics: {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the curve location of the specified point if it lies on the
|
* Returns the curve location of the specified point if it lies on the
|
||||||
* curve, {@code null} otherwise.
|
* curve, `null` otherwise.
|
||||||
*
|
*
|
||||||
* @param {Point} point the point on the curve
|
* @param {Point} point the point on the curve
|
||||||
* @return {CurveLocation} the curve location of the specified point
|
* @return {CurveLocation} the curve location of the specified point
|
||||||
|
@ -1038,7 +1038,7 @@ statics: {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the length of the path from its beginning up to up to the
|
* Returns the length of the path from its beginning up to up to the
|
||||||
* specified point if it lies on the path, {@code null} otherwise.
|
* specified point if it lies on the path, `null` otherwise.
|
||||||
*
|
*
|
||||||
* @param {Point} point the point on the path
|
* @param {Point} point the point on the path
|
||||||
* @return {Number} the length of the path up to the specified point
|
* @return {Number} the length of the path up to the specified point
|
||||||
|
@ -1082,9 +1082,9 @@ statics: {
|
||||||
* @name Curve#getPointAt
|
* @name Curve#getPointAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the curve, or the curve time
|
* @param {Number} offset the offset on the curve, or the curve time
|
||||||
* parameter if {@code isParameter} is {@code true}
|
* parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Point} the point on the curve at the given offset
|
* @return {Point} the point on the curve at the given offset
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1095,9 +1095,9 @@ statics: {
|
||||||
* @name Curve#getTangentAt
|
* @name Curve#getTangentAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the curve, or the curve time
|
* @param {Number} offset the offset on the curve, or the curve time
|
||||||
* parameter if {@code isParameter} is {@code true}
|
* parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Point} the normalized tangent of the curve at the given offset
|
* @return {Point} the normalized tangent of the curve at the given offset
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1107,22 +1107,22 @@ statics: {
|
||||||
* @name Curve#getNormalAt
|
* @name Curve#getNormalAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the curve, or the curve time
|
* @param {Number} offset the offset on the curve, or the curve time
|
||||||
* parameter if {@code isParameter} is {@code true}
|
* parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Point} the normal of the curve at the given offset
|
* @return {Point} the normal of the curve at the given offset
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the weighted tangent vector of the curve at the given
|
* Calculates the weighted tangent vector of the curve at the given offset,
|
||||||
* offset, its length reflecting the curve velocity at that location.
|
* its length reflecting the curve velocity at that location.
|
||||||
*
|
*
|
||||||
* @name Curve#getWeightedTangentAt
|
* @name Curve#getWeightedTangentAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the curve, or the curve time
|
* @param {Number} offset the offset on the curve, or the curve time
|
||||||
* parameter if {@code isParameter} is {@code true}
|
* parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Point} the weighted tangent of the curve at the given offset
|
* @return {Point} the weighted tangent of the curve at the given offset
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1133,9 +1133,9 @@ statics: {
|
||||||
* @name Curve#getWeightedNormalAt
|
* @name Curve#getWeightedNormalAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the curve, or the curve time
|
* @param {Number} offset the offset on the curve, or the curve time
|
||||||
* parameter if {@code isParameter} is {@code true}
|
* parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Point} the weighted normal of the curve at the given offset
|
* @return {Point} the weighted normal of the curve at the given offset
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1148,9 +1148,9 @@ statics: {
|
||||||
* @name Curve#getCurvatureAt
|
* @name Curve#getCurvatureAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the curve, or the curve time
|
* @param {Number} offset the offset on the curve, or the curve time
|
||||||
* parameter if {@code isParameter} is {@code true}
|
* parameter if `isParameter` is `true`
|
||||||
* @param {Boolean} [isParameter=false] pass {@code true} if {@code offset}
|
* @param {Boolean} [isParameter=false] pass `true` if `offset` is a curve
|
||||||
* is a curve time parameter
|
* time parameter
|
||||||
* @return {Number} the curvature of the curve at the given offset
|
* @return {Number} the curvature of the curve at the given offset
|
||||||
*/
|
*/
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -13,11 +13,11 @@
|
||||||
/**
|
/**
|
||||||
* @name CurveLocation
|
* @name CurveLocation
|
||||||
*
|
*
|
||||||
* @class CurveLocation objects describe a location on {@link Curve} objects,
|
* @class CurveLocation objects describe a location on {@link Curve} objects, as
|
||||||
* as defined by the curve-time {@link #parameter}, a value between {@code 0}
|
* defined by the curve-time {@link #parameter}, a value between `0`
|
||||||
* (beginning of the curve) and {@code 1} (end of the curve). If the curve is
|
* (beginning of the curve) and `1` (end of the curve). If the curve is part
|
||||||
* part of a {@link Path} item, its {@link #index} inside the
|
* of a {@link Path} item, its {@link #index} inside the {@link Path#curves}
|
||||||
* {@link Path#curves} array is also provided.
|
* array is also provided.
|
||||||
*
|
*
|
||||||
* The class is in use in many places, such as
|
* The class is in use in many places, such as
|
||||||
* {@link Path#getLocationAt(offset)},
|
* {@link Path#getLocationAt(offset)},
|
||||||
|
@ -176,8 +176,8 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The curve-time parameter, as used by various bezier curve calculations.
|
* The curve-time parameter, as used by various bezier curve calculations.
|
||||||
* It is value between {@code 0} (beginning of the curve) and {@code 1}
|
* It is value between `0` (beginning of the curve) and `1` (end of the
|
||||||
* (end of the curve).
|
* curve).
|
||||||
*
|
*
|
||||||
* @type Number
|
* @type Number
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -429,7 +429,7 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
||||||
c1 = t1 <= tMin ? c2.getPrevious() : c2,
|
c1 = t1 <= tMin ? c2.getPrevious() : c2,
|
||||||
c4 = inter.getCurve(),
|
c4 = inter.getCurve(),
|
||||||
c3 = t2 <= tMin ? c4.getPrevious() : c4;
|
c3 = t2 <= tMin ? c4.getPrevious() : c4;
|
||||||
// If t1, t2 are at the end, then step to the next curve.
|
// If t1 / t2 are at the end, then step to the next curve.
|
||||||
if (t1 >= tMax)
|
if (t1 >= tMax)
|
||||||
c2 = c2.getNext();
|
c2 = c2.getNext();
|
||||||
if (t2 >= tMax)
|
if (t2 >= tMax)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -393,9 +393,9 @@ Path.inject({ statics: new function() {
|
||||||
/**
|
/**
|
||||||
* Creates a star shaped path item.
|
* Creates a star shaped path item.
|
||||||
*
|
*
|
||||||
* The largest of {@code radius1} and {@code radius2} will be the outer
|
* The largest of `radius1` and `radius2` will be the outer radius of
|
||||||
* radius of the star. The smallest of radius1 and radius2 will be the
|
* the star. The smallest of radius1 and radius2 will be the inner
|
||||||
* inner radius.
|
* radius.
|
||||||
*
|
*
|
||||||
* @name Path.Star
|
* @name Path.Star
|
||||||
* @param {Point} center the center point of the star
|
* @param {Point} center the center point of the star
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -701,8 +701,8 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
* @return {Segment[]} an array containing the removed segments
|
* @return {Segment[]} an array containing the removed segments
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Removes the segments from the specified {@code from} index to the
|
* Removes the segments from the specified `from` index to the `to` index
|
||||||
* {@code to} index from the path's {@link #segments} array.
|
* from the path's {@link #segments} array.
|
||||||
*
|
*
|
||||||
* @param {Number} from the beginning index, inclusive
|
* @param {Number} from the beginning index, inclusive
|
||||||
* @param {Number} [to=segments.length] the ending index, exclusive
|
* @param {Number} [to=segments.length] the ending index, exclusive
|
||||||
|
@ -862,9 +862,8 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether an path is selected and will also return {@code true}
|
* Specifies whether an path is selected and will also return `true` if the
|
||||||
* if the path is partially selected, i.e. one or more of its segments is
|
* path is partially selected, i.e. one or more of its segments is selected.
|
||||||
* selected.
|
|
||||||
*
|
*
|
||||||
* Paper.js draws the visual outlines of selected items on top of your
|
* Paper.js draws the visual outlines of selected items on top of your
|
||||||
* project. This can be useful for debugging, as it allows you to see the
|
* project. This can be useful for debugging, as it allows you to see the
|
||||||
|
@ -903,7 +902,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Specifies whether the path and all its segments are selected. Cannot be
|
* Specifies whether the path and all its segments are selected. Cannot be
|
||||||
* {@code true} on an empty path.
|
* `true` on an empty path.
|
||||||
*
|
*
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -981,7 +980,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
/**
|
/**
|
||||||
* Converts the curves in a path to straight lines with an even distribution
|
* Converts the curves in a path to straight lines with an even distribution
|
||||||
* of points. The distance between the produced segments is as close as
|
* of points. The distance between the produced segments is as close as
|
||||||
* possible to the value specified by the {@code maxDistance} parameter.
|
* possible to the value specified by the `maxDistance` parameter.
|
||||||
*
|
*
|
||||||
* @param {Number} maxDistance the maximum distance between the points
|
* @param {Number} maxDistance the maximum distance between the points
|
||||||
*
|
*
|
||||||
|
@ -1396,10 +1395,10 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
* and inherits all settings from it, similar to {@link Item#clone()}.
|
* and inherits all settings from it, similar to {@link Item#clone()}.
|
||||||
*
|
*
|
||||||
* @param {Boolean} [insert=true] specifies whether the new shape should be
|
* @param {Boolean} [insert=true] specifies whether the new shape should be
|
||||||
* inserted into the DOM. When set to {@code true}, it is inserted above the
|
* inserted into the DOM. When set to `true`, it is inserted above the
|
||||||
* path item
|
* path item
|
||||||
* @return {Shape} the newly created shape item with the same geometry as
|
* @return {Shape} the newly created shape item with the same geometry as
|
||||||
* this path item if it can be matched, {@code null} otherwise
|
* this path item if it can be matched, `null` otherwise
|
||||||
* @see Shape#toPath(insert)
|
* @see Shape#toPath(insert)
|
||||||
*/
|
*/
|
||||||
toShape: function(insert) {
|
toShape: function(insert) {
|
||||||
|
@ -1694,7 +1693,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
* {@grouptitle Positions on Paths and Curves}
|
* {@grouptitle Positions on Paths and Curves}
|
||||||
*
|
*
|
||||||
* Returns the curve location of the specified point if it lies on the
|
* Returns the curve location of the specified point if it lies on the
|
||||||
* path, {@code null} otherwise.
|
* path, `null` otherwise.
|
||||||
*
|
*
|
||||||
* @param {Point} point the point on the path
|
* @param {Point} point the point on the path
|
||||||
* @return {CurveLocation} the curve location of the specified point
|
* @return {CurveLocation} the curve location of the specified point
|
||||||
|
@ -1712,7 +1711,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the length of the path from its beginning up to up to the
|
* Returns the length of the path from its beginning up to up to the
|
||||||
* specified point if it lies on the path, {@code null} otherwise.
|
* specified point if it lies on the path, `null` otherwise.
|
||||||
*
|
*
|
||||||
* @param {Point} point the point on the path
|
* @param {Point} point the point on the path
|
||||||
* @return {Number} the length of the path up to the specified point
|
* @return {Number} the length of the path up to the specified point
|
||||||
|
@ -1725,7 +1724,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
/**
|
/**
|
||||||
* Returns the curve location of the specified offset on the path.
|
* Returns the curve location of the specified offset on the path.
|
||||||
*
|
*
|
||||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
* @param {Number} offset the offset on the path, where `0` is at
|
||||||
* the beginning of the path and {@link Path#length} at the end
|
* the beginning of the path and {@link Path#length} at the end
|
||||||
* @param {Boolean} [isParameter=false]
|
* @param {Boolean} [isParameter=false]
|
||||||
* @return {CurveLocation} the curve location at the specified offset
|
* @return {CurveLocation} the curve location at the specified offset
|
||||||
|
@ -1761,7 +1760,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
*
|
*
|
||||||
* @name Path#getPointAt
|
* @name Path#getPointAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
* @param {Number} offset the offset on the path, where `0` is at
|
||||||
* the beginning of the path and {@link Path#length} at the end
|
* the beginning of the path and {@link Path#length} at the end
|
||||||
* @param {Boolean} [isParameter=false]
|
* @param {Boolean} [isParameter=false]
|
||||||
* @return {Point} the point at the given offset
|
* @return {Point} the point at the given offset
|
||||||
|
@ -1824,7 +1823,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
*
|
*
|
||||||
* @name Path#getTangentAt
|
* @name Path#getTangentAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
* @param {Number} offset the offset on the path, where `0` is at
|
||||||
* the beginning of the path and {@link Path#length} at the end
|
* the beginning of the path and {@link Path#length} at the end
|
||||||
* @param {Boolean} [isParameter=false]
|
* @param {Boolean} [isParameter=false]
|
||||||
* @return {Point} the normalized tangent vector at the given offset
|
* @return {Point} the normalized tangent vector at the given offset
|
||||||
|
@ -1891,7 +1890,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
*
|
*
|
||||||
* @name Path#getNormalAt
|
* @name Path#getNormalAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
* @param {Number} offset the offset on the path, where `0` is at
|
||||||
* the beginning of the path and {@link Path#length} at the end
|
* the beginning of the path and {@link Path#length} at the end
|
||||||
* @param {Boolean} [isParameter=false]
|
* @param {Boolean} [isParameter=false]
|
||||||
* @return {Point} the normal vector at the given offset
|
* @return {Point} the normal vector at the given offset
|
||||||
|
@ -1958,7 +1957,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
*
|
*
|
||||||
* @name Path#getWeightedTangentAt
|
* @name Path#getWeightedTangentAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
* @param {Number} offset the offset on the path, where `0` is at
|
||||||
* the beginning of the path and {@link Path#length} at the end
|
* the beginning of the path and {@link Path#length} at the end
|
||||||
* @param {Boolean} [isParameter=false]
|
* @param {Boolean} [isParameter=false]
|
||||||
* @return {Point} the weighted tangent vector at the given offset
|
* @return {Point} the weighted tangent vector at the given offset
|
||||||
|
@ -1969,7 +1968,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
*
|
*
|
||||||
* @name Path#getWeightedNormalAt
|
* @name Path#getWeightedNormalAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
* @param {Number} offset the offset on the path, where `0` is at
|
||||||
* the beginning of the path and {@link Path#length} at the end
|
* the beginning of the path and {@link Path#length} at the end
|
||||||
* @param {Boolean} [isParameter=false]
|
* @param {Boolean} [isParameter=false]
|
||||||
* @return {Point} the weighted normal vector at the given offset
|
* @return {Point} the weighted normal vector at the given offset
|
||||||
|
@ -1983,7 +1982,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
*
|
*
|
||||||
* @name Path#getCurvatureAt
|
* @name Path#getCurvatureAt
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
* @param {Number} offset the offset on the path, where `0` is at
|
||||||
* the beginning of the path and {@link Path#length} at the end
|
* the beginning of the path and {@link Path#length} at the end
|
||||||
* @param {Boolean} [isParameter=false]
|
* @param {Boolean} [isParameter=false]
|
||||||
* @return {Number} the normal vector at the given offset
|
* @return {Number} the normal vector at the given offset
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -402,8 +402,8 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
||||||
// DOCS: Document PathItem#curveTo() 'paramater' param.
|
// DOCS: Document PathItem#curveTo() 'paramater' param.
|
||||||
/**
|
/**
|
||||||
* Draws a curve from the position of the last segment point in the path
|
* Draws a curve from the position of the last segment point in the path
|
||||||
* that goes through the specified {@code through} point, to the specified
|
* that goes through the specified `through` point, to the specified `to`
|
||||||
* {@code to} point by adding one segment to the path.
|
* point by adding one segment to the path.
|
||||||
*
|
*
|
||||||
* @name PathItem#curveTo
|
* @name PathItem#curveTo
|
||||||
* @function
|
* @function
|
||||||
|
@ -437,8 +437,8 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws an arc from the position of the last segment point in the path that
|
* Draws an arc from the position of the last segment point in the path that
|
||||||
* goes through the specified {@code through} point, to the specified
|
* goes through the specified `through` point, to the specified `to` point
|
||||||
* {@code to} point by adding one or more segments to the path.
|
* by adding one or more segments to the path.
|
||||||
*
|
*
|
||||||
* @name PathItem#arcTo
|
* @name PathItem#arcTo
|
||||||
* @function
|
* @function
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -304,35 +304,34 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
||||||
* and may contain a combination of the following values:
|
* and may contain a combination of the following values:
|
||||||
*
|
*
|
||||||
* @option [options.tolerance={@link PaperScope#settings}.hitTolerance]
|
* @option [options.tolerance={@link PaperScope#settings}.hitTolerance]
|
||||||
* {Number} the tolerance of the hit-test
|
* {Number} the tolerance of the hit-test
|
||||||
* @option options.class {Function} only hit-test again a certain item class
|
* @option options.class {Function} only hit-test again a certain item class
|
||||||
* and its sub-classes: {@code Group, Layer, Path, CompoundPath,
|
* and its sub-classes: {@code Group, Layer, Path, CompoundPath, Shape,
|
||||||
* Shape, Raster, PlacedSymbol, PointText}, etc
|
* Raster, PlacedSymbol, PointText}, etc
|
||||||
* @option options.fill {Boolean} hit-test the fill of items
|
* @option options.fill {Boolean} hit-test the fill of items
|
||||||
* @option options.stroke {Boolean} hit-test the stroke of path items,
|
* @option options.stroke {Boolean} hit-test the stroke of path items,
|
||||||
* taking into account the setting of stroke color and width
|
* taking into account the setting of stroke color and width
|
||||||
* @option options.segments {Boolean} hit-test for {@link Segment#point} of
|
* @option options.segments {Boolean} hit-test for {@link Segment#point} of
|
||||||
* {@link Path} items
|
* {@link Path} items
|
||||||
* @option options.curves {Boolean} hit-test the curves of path items,
|
* @option options.curves {Boolean} hit-test the curves of path items,
|
||||||
* without taking the stroke color or width into account
|
* without taking the stroke color or width into account
|
||||||
* @option options.handles {Boolean} hit-test for the handles
|
* @option options.handles {Boolean} hit-test for the handles ({@link
|
||||||
* ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments.
|
* Segment#handleIn} / {@link Segment#handleOut}) of path segments.
|
||||||
* @option options.ends {Boolean} only hit-test for the first or last
|
* @option options.ends {Boolean} only hit-test for the first or last
|
||||||
* segment points of open path items
|
* segment points of open path items
|
||||||
* @option options.bounds {Boolean} hit-test the corners and side-centers of
|
* @option options.bounds {Boolean} hit-test the corners and side-centers of
|
||||||
* the bounding rectangle of items ({@link Item#bounds})
|
* the bounding rectangle of items ({@link Item#bounds})
|
||||||
* @option options.center {Boolean} hit-test the {@link Rectangle#center} of
|
* @option options.center {Boolean} hit-test the {@link Rectangle#center} of
|
||||||
* the bounding rectangle of items ({@link Item#bounds})
|
* the bounding rectangle of items ({@link Item#bounds})
|
||||||
* @option options.guides {Boolean} hit-test items that have
|
* @option options.guides {Boolean} hit-test items that have {@link
|
||||||
* {@link Item#guide} set to {@code true}
|
* Item#guide} set to `true`
|
||||||
* @option options.selected {Boolean} only hit selected items
|
* @option options.selected {Boolean} only hit selected items
|
||||||
*
|
*
|
||||||
* @param {Point} point the point where the hit-test should be performed
|
* @param {Point} point the point where the hit-test should be performed
|
||||||
* @param {Object} [options={ fill: true, stroke: true, segments: true,
|
* @param {Object} [options={ fill: true, stroke: true, segments: true,
|
||||||
* tolerance: true }]
|
* tolerance: true }]
|
||||||
* @return {HitResult} a hit result object that contains more
|
* @return {HitResult} a hit result object that contains more information
|
||||||
* information about what exactly was hit or {@code null} if nothing was
|
* about what exactly was hit or `null` if nothing was hit
|
||||||
* hit
|
|
||||||
*/
|
*/
|
||||||
hitTest: function(/* point, options */) {
|
hitTest: function(/* point, options */) {
|
||||||
// We don't need to do this here, but it speeds up things since we won't
|
// We don't need to do this here, but it speeds up things since we won't
|
||||||
|
@ -352,22 +351,23 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
||||||
*
|
*
|
||||||
* Fetch items contained within the project whose properties match the
|
* Fetch items contained within the project whose properties match the
|
||||||
* criteria in the specified object.
|
* criteria in the specified object.
|
||||||
|
*
|
||||||
* Extended matching of properties is possible by providing a comparator
|
* Extended matching of properties is possible by providing a comparator
|
||||||
* function or regular expression. Matching points, colors only work as a
|
* function or regular expression. Matching points, colors only work as a
|
||||||
* comparison of the full object, not partial matching (e.g. only providing
|
* comparison of the full object, not partial matching (e.g. only providing
|
||||||
* the x- coordinate to match all points with that x-value). Partial
|
* the x- coordinate to match all points with that x-value). Partial
|
||||||
* matching does work for {@link Item#data}.
|
* matching does work for {@link Item#data}.
|
||||||
|
*
|
||||||
* Matching items against a rectangular area is also possible, by setting
|
* Matching items against a rectangular area is also possible, by setting
|
||||||
* either {@code match.inside} or {@code match.overlapping} to a rectangle
|
* either `match.inside` or `match.overlapping` to a rectangle describing
|
||||||
* describing the area in which the items either have to be fully or partly
|
* the area in which the items either have to be fully or partly contained.
|
||||||
* contained.
|
|
||||||
*
|
*
|
||||||
* @option [match.recursive=true] {Boolean} whether to loop recursively
|
* @option [match.recursive=true] {Boolean} whether to loop recursively
|
||||||
* through all children, or stop at the current level
|
* through all children, or stop at the current level
|
||||||
* @option match.match {Function} a match function to be called for each
|
* @option match.match {Function} a match function to be called for each
|
||||||
* item, allowing the definition of more flexible item checks that are
|
* item, allowing the definition of more flexible item checks that are
|
||||||
* not bound to properties. If no other match properties are defined,
|
* not bound to properties. If no other match properties are defined,
|
||||||
* this function can also be passed instead of the {@code match} object
|
* this function can also be passed instead of the `match` object
|
||||||
* @option match.class {Function} the constructor function of the item type
|
* @option match.class {Function} the constructor function of the item type
|
||||||
* to match against
|
* to match against
|
||||||
* @option match.inside {Rectangle} the rectangle in which the items need to
|
* @option match.inside {Rectangle} the rectangle in which the items need to
|
||||||
|
@ -607,16 +607,16 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
||||||
/**
|
/**
|
||||||
* {@grouptitle Importing / Exporting JSON and SVG}
|
* {@grouptitle Importing / Exporting JSON and SVG}
|
||||||
*
|
*
|
||||||
* Exports (serializes) the project with all its layers and child items to
|
* Exports (serializes) the project with all its layers and child items to a
|
||||||
* a JSON data object or string.
|
* JSON data object or string.
|
||||||
*
|
*
|
||||||
* @name Project#exportJSON
|
* @name Project#exportJSON
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @option [options.asString=true] {Boolean} whether the JSON is returned as
|
* @option [options.asString=true] {Boolean} whether the JSON is returned as
|
||||||
* a {@code Object} or a {@code String}
|
* a `Object` or a `String`
|
||||||
* @option [options.precision=5] {Number} the amount of fractional digits in
|
* @option [options.precision=5] {Number} the amount of fractional digits in
|
||||||
* numbers used in JSON data
|
* numbers used in JSON data
|
||||||
*
|
*
|
||||||
* @param {Object} [options] the serialization options
|
* @param {Object} [options] the serialization options
|
||||||
* @return {String} the exported JSON data
|
* @return {String} the exported JSON data
|
||||||
|
@ -645,15 +645,15 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @option [options.asString=false] {Boolean} whether a SVG node or a
|
* @option [options.asString=false] {Boolean} whether a SVG node or a
|
||||||
* {@code String} is to be returned
|
* `String` is to be returned
|
||||||
* @option [options.precision=5] {Number} the amount of fractional digits in
|
* @option [options.precision=5] {Number} the amount of fractional digits in
|
||||||
* numbers used in SVG data
|
* numbers used in SVG data
|
||||||
* @option [options.matchShapes=false] {Boolean} whether path items should
|
* @option [options.matchShapes=false] {Boolean} whether path items should
|
||||||
* tried to be converted to SVG shape items (rect, circle, ellipse, line,
|
* tried to be converted to SVG shape items (rect, circle, ellipse,
|
||||||
* polyline, polygon), if their geometries match
|
* line, polyline, polygon), if their geometries match
|
||||||
* @option [options.embedImages=true] {Boolean} whether raster images
|
* @option [options.embedImages=true] {Boolean} whether raster images should
|
||||||
* should be embedded as base64 data inlined in the xlink:href attribute,
|
* be embedded as base64 data inlined in the xlink:href attribute, or
|
||||||
* or kept as a link to their external URL.
|
* kept as a link to their external URL.
|
||||||
*
|
*
|
||||||
* @param {Object} [options] the export options
|
* @param {Object} [options] the export options
|
||||||
* @return {SVGElement} the project converted to an SVG node
|
* @return {SVGElement} the project converted to an SVG node
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -292,14 +292,14 @@ var Color = Base.extend(new function() {
|
||||||
* Creates a RGB Color object.
|
* Creates a RGB Color object.
|
||||||
*
|
*
|
||||||
* @name Color#initialize
|
* @name Color#initialize
|
||||||
* @param {Number} red the amount of red in the color as a value
|
* @param {Number} red the amount of red in the color as a value between
|
||||||
* between {@code 0} and {@code 1}
|
* `0` and `1`
|
||||||
* @param {Number} green the amount of green in the color as a value
|
* @param {Number} green the amount of green in the color as a value
|
||||||
* between {@code 0} and {@code 1}
|
* between `0` and `1`
|
||||||
* @param {Number} blue the amount of blue in the color as a value
|
* @param {Number} blue the amount of blue in the color as a value
|
||||||
* between {@code 0} and {@code 1}
|
* between `0` and `1`
|
||||||
* @param {Number} [alpha] the alpha of the color as a value between
|
* @param {Number} [alpha] the alpha of the color as a value between `0`
|
||||||
* {@code 0} and {@code 1}
|
* and `1`
|
||||||
*
|
*
|
||||||
* @example {@paperscript}
|
* @example {@paperscript}
|
||||||
* // Creating a RGB Color:
|
* // Creating a RGB Color:
|
||||||
|
@ -316,9 +316,9 @@ var Color = Base.extend(new function() {
|
||||||
*
|
*
|
||||||
* @name Color#initialize
|
* @name Color#initialize
|
||||||
* @param {Number} gray the amount of gray in the color as a value
|
* @param {Number} gray the amount of gray in the color as a value
|
||||||
* between {@code 0} and {@code 1}
|
* between `0` and `1`
|
||||||
* @param {Number} [alpha] the alpha of the color as a value between
|
* @param {Number} [alpha] the alpha of the color as a value between `0`
|
||||||
* {@code 0} and {@code 1}
|
* and `1`
|
||||||
*
|
*
|
||||||
* @example {@paperscript}
|
* @example {@paperscript}
|
||||||
* // Creating a gray Color:
|
* // Creating a gray Color:
|
||||||
|
@ -334,35 +334,33 @@ var Color = Base.extend(new function() {
|
||||||
* Creates a HSB, HSL or gradient Color object from the properties of
|
* Creates a HSB, HSL or gradient Color object from the properties of
|
||||||
* the provided object:
|
* the provided object:
|
||||||
*
|
*
|
||||||
* <b>HSB Color</b>:<br>
|
* @option hsb.hue {Number} the hue of the color as a value in degrees
|
||||||
* {@code hue: Number} — the hue of the color as a value in
|
* between `0` and `360`
|
||||||
* degrees between {@code 0} and {@code 360}<br>
|
* @option hsb.saturation {Number} the saturation of the color as a
|
||||||
* {@code saturation: Number} — the saturation of the color as a
|
* value between `0` and `1`
|
||||||
* value between {@code 0} and {@code 1}<br>
|
* @option hsb.brightness {Number} the brightness of the color as a
|
||||||
* {@code brightness: Number} — the brightness of the color as a
|
* value between `0` and `1`
|
||||||
* value between {@code 0} and {@code 1}<br>
|
* @option hsb.alpha {Number} the alpha of the color as a value between
|
||||||
* {@code alpha: Number} — the alpha of the color as a value between
|
* `0` and `1`
|
||||||
* {@code 0} and {@code 1}
|
|
||||||
*
|
*
|
||||||
* <b>HSL Color</b>:<br>
|
* @option hsl.hue {Number} the hue of the color as a value in degrees
|
||||||
* {@code hue: Number} — the hue of the color as a value in
|
* between `0` and `360`
|
||||||
* degrees between {@code 0} and {@code 360}<br>
|
* @option hsl.saturation {Number} the saturation of the color as a
|
||||||
* {@code saturation: Number} — the saturation of the color as a
|
* value between `0` and `1`
|
||||||
* value between {@code 0} and {@code 1}<br>
|
* @option hsl.lightness {Number} the lightness of the color as a value
|
||||||
* {@code lightness: Number} — the lightness of the color as a
|
* between `0` and `1`<br>
|
||||||
* value between {@code 0} and {@code 1}<br>
|
* @option hsl.alpha {Number} the alpha of the color as a value between
|
||||||
* {@code alpha: Number} — the alpha of the color as a value between
|
* `0` and `1`
|
||||||
* {@code 0} and {@code 1}
|
|
||||||
*
|
*
|
||||||
* <b>Gradient Color</b>:<br>
|
* @option gradient.gradient {Gradient} the gradient object that
|
||||||
* {@code gradient: Gradient} — the gradient object that describes the
|
* describes the color stops and type of gradient to be used
|
||||||
* color stops and type of gradient to be used.<br>
|
* @option gradient.origin {Point} the origin point of the gradient
|
||||||
* {@code origin: Point} — the origin point of the gradient<br>
|
* @option gradient.destination {Point} the destination point of the
|
||||||
* {@code destination: Point} — the destination point of the gradient
|
* gradient
|
||||||
* {@code stops: Array of GradientStop} — the gradient stops describing
|
* @option gradient.stops {GradientStop[]} the gradient stops describing
|
||||||
* the gradient, as an alternative to providing a gradient object<br>
|
* the gradient, as an alternative to providing a gradient object
|
||||||
* {@code radial: Boolean} — controls whether the gradient is radial,
|
* @option gradient.radial {Boolean} controls whether the gradient is
|
||||||
* as an alternative to providing a gradient object<br>
|
* radial, as an alternative to providing a gradient object
|
||||||
*
|
*
|
||||||
* @name Color#initialize
|
* @name Color#initialize
|
||||||
* @param {Object} object an object describing the components and
|
* @param {Object} object an object describing the components and
|
||||||
|
@ -707,7 +705,7 @@ var Color = Base.extend(new function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The color's alpha value as a number between {@code 0} and {@code 1}.
|
* The color's alpha value as a number between `0` and `1`.
|
||||||
* All colors of the different subclasses support alpha values.
|
* All colors of the different subclasses support alpha values.
|
||||||
*
|
*
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -879,8 +877,7 @@ var Color = Base.extend(new function() {
|
||||||
/**
|
/**
|
||||||
* {@grouptitle RGB Components}
|
* {@grouptitle RGB Components}
|
||||||
*
|
*
|
||||||
* The amount of red in the color as a value between {@code 0} and
|
* The amount of red in the color as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
|
||||||
*
|
*
|
||||||
* @name Color#red
|
* @name Color#red
|
||||||
* @property
|
* @property
|
||||||
|
@ -895,8 +892,7 @@ var Color = Base.extend(new function() {
|
||||||
* circle.fillColor.red = 1;
|
* circle.fillColor.red = 1;
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* The amount of green in the color as a value between {@code 0} and
|
* The amount of green in the color as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
|
||||||
*
|
*
|
||||||
* @name Color#green
|
* @name Color#green
|
||||||
* @property
|
* @property
|
||||||
|
@ -913,8 +909,7 @@ var Color = Base.extend(new function() {
|
||||||
* circle.fillColor.green = 1;
|
* circle.fillColor.green = 1;
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* The amount of blue in the color as a value between {@code 0} and
|
* The amount of blue in the color as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
|
||||||
*
|
*
|
||||||
* @name Color#blue
|
* @name Color#blue
|
||||||
* @property
|
* @property
|
||||||
|
@ -934,8 +929,7 @@ var Color = Base.extend(new function() {
|
||||||
/**
|
/**
|
||||||
* {@grouptitle Gray Components}
|
* {@grouptitle Gray Components}
|
||||||
*
|
*
|
||||||
* The amount of gray in the color as a value between {@code 0} and
|
* The amount of gray in the color as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
|
||||||
*
|
*
|
||||||
* @name Color#gray
|
* @name Color#gray
|
||||||
* @property
|
* @property
|
||||||
|
@ -945,8 +939,7 @@ var Color = Base.extend(new function() {
|
||||||
/**
|
/**
|
||||||
* {@grouptitle HSB Components}
|
* {@grouptitle HSB Components}
|
||||||
*
|
*
|
||||||
* The hue of the color as a value in degrees between {@code 0} and
|
* The hue of the color as a value in degrees between `0` and `360`.
|
||||||
* {@code 360}.
|
|
||||||
*
|
*
|
||||||
* @name Color#hue
|
* @name Color#hue
|
||||||
* @property
|
* @property
|
||||||
|
@ -971,16 +964,14 @@ var Color = Base.extend(new function() {
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* The saturation of the color as a value between {@code 0} and
|
* The saturation of the color as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
|
||||||
*
|
*
|
||||||
* @name Color#saturation
|
* @name Color#saturation
|
||||||
* @property
|
* @property
|
||||||
* @type Number
|
* @type Number
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* The brightness of the color as a value between {@code 0} and
|
* The brightness of the color as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
|
||||||
*
|
*
|
||||||
* @name Color#brightness
|
* @name Color#brightness
|
||||||
* @property
|
* @property
|
||||||
|
@ -990,8 +981,8 @@ var Color = Base.extend(new function() {
|
||||||
/**
|
/**
|
||||||
* {@grouptitle HSL Components}
|
* {@grouptitle HSL Components}
|
||||||
*
|
*
|
||||||
* The lightness of the color as a value between {@code 0} and
|
* The lightness of the color as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
*
|
||||||
* Note that all other components are shared with HSB.
|
* Note that all other components are shared with HSB.
|
||||||
*
|
*
|
||||||
* @name Color#lightness
|
* @name Color#lightness
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -72,8 +72,7 @@ var GradientStop = Base.extend(/** @lends GradientStop# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ramp-point of the gradient stop as a value between {@code 0} and
|
* The ramp-point of the gradient stop as a value between `0` and `1`.
|
||||||
* {@code 1}.
|
|
||||||
*
|
*
|
||||||
* @type Number
|
* @type Number
|
||||||
* @bean
|
* @bean
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -523,7 +523,7 @@ var Style = Base.extend(new function() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The fill-rule with which the shape gets filled. Please note that only
|
* The fill-rule with which the shape gets filled. Please note that only
|
||||||
* modern browsers support fill-rules other than {@code 'nonzero'}.
|
* modern browsers support fill-rules other than `'nonzero'`.
|
||||||
*
|
*
|
||||||
* @name Style#fillRule
|
* @name Style#fillRule
|
||||||
* @property
|
* @property
|
||||||
|
@ -605,8 +605,8 @@ var Style = Base.extend(new function() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The font size of text content, as a number in pixels, or as a string
|
* The font size of text content, as a number in pixels, or as a string with
|
||||||
* with optional units {@code 'px'}, {@code 'pt'} and {@code 'em'}.
|
* optional units `'px'`, `'pt'` and `'em'`.
|
||||||
*
|
*
|
||||||
* @name Style#fontSize
|
* @name Style#fontSize
|
||||||
* @default 10
|
* @default 10
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -13,11 +13,11 @@
|
||||||
/**
|
/**
|
||||||
* @name TextItem
|
* @name TextItem
|
||||||
*
|
*
|
||||||
* @class The TextItem type allows you to create typography. Its
|
* @class The TextItem type allows you to create typography. Its functionality
|
||||||
* functionality is inherited by different text item types such as
|
* is inherited by different text item types such as {@link PointText}, and
|
||||||
* {@link PointText}, and {@link AreaText} (coming soon). They each add a
|
* {@link AreaText} (coming soon). They each add a layer of functionality
|
||||||
* layer of functionality that is unique to their type, but share the
|
* that is unique to their type, but share the underlying properties and
|
||||||
* underlying properties and functions that they inherit from TextItem.
|
* functions that they inherit from TextItem.
|
||||||
*
|
*
|
||||||
* @extends Item
|
* @extends Item
|
||||||
*/
|
*/
|
||||||
|
@ -119,8 +119,8 @@ var TextItem = Item.extend(/** @lends TextItem# */{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The font size of text content, as a number in pixels, or as a string
|
* The font size of text content, as a number in pixels, or as a string with
|
||||||
* with optional units {@code 'px'}, {@code 'pt'} and {@code 'em'}.
|
* optional units `'px'`, `'pt'` and `'em'`.
|
||||||
*
|
*
|
||||||
* @name TextItem#fontSize
|
* @name TextItem#fontSize
|
||||||
* @default 10
|
* @default 10
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -13,15 +13,15 @@
|
||||||
/**
|
/**
|
||||||
* @name Tool
|
* @name Tool
|
||||||
*
|
*
|
||||||
* @class The Tool object refers to a script that the user can interact with
|
* @class The Tool object refers to a script that the user can interact with by
|
||||||
* by using the mouse and keyboard and can be accessed through the global
|
* using the mouse and keyboard and can be accessed through the global
|
||||||
* {@code tool} variable. All its properties are also available in the paper
|
* `tool` variable. All its properties are also available in the paper
|
||||||
* scope.
|
* scope.
|
||||||
*
|
*
|
||||||
* The global {@code tool} variable only exists in scripts that contain mouse
|
* The global `tool` variable only exists in scripts that contain mouse handler
|
||||||
* handler functions ({@link #onMouseMove}, {@link #onMouseDown},
|
* functions ({@link #onMouseMove}, {@link #onMouseDown}, {@link #onMouseDrag},
|
||||||
* {@link #onMouseDrag}, {@link #onMouseUp}) or a keyboard handler
|
* {@link #onMouseUp}) or a keyboard handler function ({@link #onKeyDown},
|
||||||
* function ({@link #onKeyDown}, {@link #onKeyUp}).
|
* {@link #onKeyUp}).
|
||||||
*
|
*
|
||||||
* @classexample
|
* @classexample
|
||||||
* var path;
|
* var path;
|
||||||
|
@ -227,10 +227,10 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
|
||||||
* The function to be called when the user presses a key on the keyboard.
|
* The function to be called when the user presses a key on the keyboard.
|
||||||
* The function receives a {@link KeyEvent} object which contains
|
* The function receives a {@link KeyEvent} object which contains
|
||||||
* information about the keyboard event.
|
* information about the keyboard event.
|
||||||
* If the function returns {@code false}, the keyboard event will be
|
*
|
||||||
* prevented from bubbling up. This can be used for example to stop the
|
* If the function returns `false`, the keyboard event will be prevented
|
||||||
* window from scrolling, when you need the user to interact with arrow
|
* from bubbling up. This can be used for example to stop the window from
|
||||||
* keys.
|
* scrolling, when you need the user to interact with arrow keys.
|
||||||
*
|
*
|
||||||
* @name Tool#onKeyDown
|
* @name Tool#onKeyDown
|
||||||
* @property
|
* @property
|
||||||
|
@ -261,10 +261,10 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
|
||||||
* The function to be called when the user releases a key on the keyboard.
|
* The function to be called when the user releases a key on the keyboard.
|
||||||
* The function receives a {@link KeyEvent} object which contains
|
* The function receives a {@link KeyEvent} object which contains
|
||||||
* information about the keyboard event.
|
* information about the keyboard event.
|
||||||
* If the function returns {@code false}, the keyboard event will be
|
*
|
||||||
* prevented from bubbling up. This can be used for example to stop the
|
* If the function returns `false`, the keyboard event will be prevented
|
||||||
* window from scrolling, when you need the user to interact with arrow
|
* from bubbling up. This can be used for example to stop the window from
|
||||||
* keys.
|
* scrolling, when you need the user to interact with arrow keys.
|
||||||
*
|
*
|
||||||
* @name Tool#onKeyUp
|
* @name Tool#onKeyUp
|
||||||
* @property
|
* @property
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -296,7 +296,7 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
||||||
/**
|
/**
|
||||||
* The ratio between physical pixels and device-independent pixels (DIPs)
|
* The ratio between physical pixels and device-independent pixels (DIPs)
|
||||||
* of the underlying canvas / device.
|
* of the underlying canvas / device.
|
||||||
* It is {@code 1} for normal displays, and {@code 2} or more for
|
* It is `1` for normal displays, and `2` or more for
|
||||||
* high-resolution displays.
|
* high-resolution displays.
|
||||||
*
|
*
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -309,8 +309,8 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The resoltuion of the underlying canvas / device in pixel per inch (DPI).
|
* The resoltuion of the underlying canvas / device in pixel per inch (DPI).
|
||||||
* It is {@code 72} for normal displays, and {@code 144} for high-resolution
|
* It is `72` for normal displays, and `144` for high-resolution
|
||||||
* displays with a pixel-ratio of {@code 2}.
|
* displays with a pixel-ratio of `2`.
|
||||||
*
|
*
|
||||||
* @type Number
|
* @type Number
|
||||||
* @bean
|
* @bean
|
||||||
|
@ -580,7 +580,7 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
||||||
* @name View#on
|
* @name View#on
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} param an object literal containing one or more of the
|
* @param {Object} param an object literal containing one or more of the
|
||||||
* following properties: {@code frame, resize}
|
* following properties: `frame, resize`
|
||||||
* @return {View} this view itself, so calls can be chained
|
* @return {View} this view itself, so calls can be chained
|
||||||
*
|
*
|
||||||
* @example {@paperscript}
|
* @example {@paperscript}
|
||||||
|
@ -635,7 +635,7 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
||||||
* @name View#off
|
* @name View#off
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} param an object literal containing one or more of the
|
* @param {Object} param an object literal containing one or more of the
|
||||||
* following properties: {@code frame, resize}
|
* following properties: `frame, resize`
|
||||||
* @return {View} this view itself, so calls can be chained
|
* @return {View} this view itself, so calls can be chained
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
@ -14,75 +14,75 @@ module('Emitter');
|
||||||
|
|
||||||
test('on()', function() {
|
test('on()', function() {
|
||||||
var emitter = new Base(Emitter),
|
var emitter = new Base(Emitter),
|
||||||
installed;
|
installed;
|
||||||
// fake event type registration
|
// fake event type registration
|
||||||
emitter._eventTypes = {mousemove: {install: function(){ installed = true;} } };
|
emitter._eventTypes = {mousemove: {install: function(){ installed = true;} } };
|
||||||
equals(function() {
|
equals(function() {
|
||||||
return !emitter.responds('mousemove');
|
return !emitter.responds('mousemove');
|
||||||
}, true);
|
}, true);
|
||||||
emitter.on('mousemove', function() {});
|
emitter.on('mousemove', function() {});
|
||||||
equals(function() {
|
equals(function() {
|
||||||
return emitter.responds('mousemove')
|
return emitter.responds('mousemove')
|
||||||
}, true);
|
}, true);
|
||||||
equals(function() { return installed; }, true);
|
equals(function() { return installed; }, true);
|
||||||
// one time installation only
|
// one time installation only
|
||||||
installed = false;
|
installed = false;
|
||||||
emitter.on('mousemove', function() {});
|
emitter.on('mousemove', function() {});
|
||||||
equals(function() { return !installed; }, true);
|
equals(function() { return !installed; }, true);
|
||||||
|
|
||||||
emitter.on('customUnregistered', function() {});
|
emitter.on('customUnregistered', function() {});
|
||||||
equals(function() {
|
equals(function() {
|
||||||
return emitter.responds('customUnregistered')
|
return emitter.responds('customUnregistered')
|
||||||
}, true);
|
}, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('off()', function() {
|
test('off()', function() {
|
||||||
var emitter = new Base(Emitter),
|
var emitter = new Base(Emitter),
|
||||||
uninstalled, called = 0,
|
uninstalled, called = 0,
|
||||||
handler = function () {called++},
|
handler = function () {called++},
|
||||||
handler2 = function () {};
|
handler2 = function () {};
|
||||||
emitter._eventTypes = {mousemove: {uninstall: function(){ uninstalled = true;} } };
|
emitter._eventTypes = {mousemove: {uninstall: function(){ uninstalled = true;} } };
|
||||||
|
|
||||||
emitter.on('mousemove', handler);
|
emitter.on('mousemove', handler);
|
||||||
emitter.on('mousemove', handler2);
|
emitter.on('mousemove', handler2);
|
||||||
emitter.on('custom', handler);
|
emitter.on('custom', handler);
|
||||||
emitter.emit('mousemove');
|
emitter.emit('mousemove');
|
||||||
equals(function() { return called == 1; }, true);
|
equals(function() { return called == 1; }, true);
|
||||||
|
|
||||||
emitter.off('mousemove', handler2);
|
emitter.off('mousemove', handler2);
|
||||||
emitter.emit('mousemove');
|
emitter.emit('mousemove');
|
||||||
equals(function() { return called == 2; }, true);
|
equals(function() { return called == 2; }, true);
|
||||||
equals(function() { return !uninstalled }, true);
|
equals(function() { return !uninstalled }, true);
|
||||||
|
|
||||||
emitter.off('mousemove', handler);
|
emitter.off('mousemove', handler);
|
||||||
emitter.emit('mousemove');
|
emitter.emit('mousemove');
|
||||||
equals(function() { return called == 2; }, true);
|
equals(function() { return called == 2; }, true);
|
||||||
equals(function() { return uninstalled }, true);
|
equals(function() { return uninstalled }, true);
|
||||||
|
|
||||||
called = 0;
|
called = 0;
|
||||||
emitter.emit('custom');
|
emitter.emit('custom');
|
||||||
equals(function() { return called == 1; }, true);
|
equals(function() { return called == 1; }, true);
|
||||||
emitter.off('custom', handler);
|
emitter.off('custom', handler);
|
||||||
emitter.emit('custom');
|
emitter.emit('custom');
|
||||||
equals(function() { return called == 1; }, true);
|
equals(function() { return called == 1; }, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('emit()', function() {
|
test('emit()', function() {
|
||||||
var emitter = new Base(Emitter),
|
var emitter = new Base(Emitter),
|
||||||
called,
|
called,
|
||||||
handler = function (e) {called = e};
|
handler = function (e) {called = e};
|
||||||
// fake event type registration
|
// fake event type registration
|
||||||
emitter._eventTypes = {mousemove: {} };
|
emitter._eventTypes = {mousemove: {} };
|
||||||
emitter.on('mousemove', handler);
|
emitter.on('mousemove', handler);
|
||||||
emitter.on('custom', handler);
|
emitter.on('custom', handler);
|
||||||
|
|
||||||
emitter.emit('mousemove', 'mousemove');
|
emitter.emit('mousemove', 'mousemove');
|
||||||
equals(function() {
|
equals(function() {
|
||||||
return called == 'mousemove';
|
return called == 'mousemove';
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
emitter.emit('custom', 'custom');
|
emitter.emit('custom', 'custom');
|
||||||
equals(function() {
|
equals(function() {
|
||||||
return called == 'custom';
|
return called == 'custom';
|
||||||
}, true);
|
}, true);
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||||
*
|
*
|
||||||
* Distributed under the MIT license. See LICENSE file for details.
|
* Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue