mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Bump version to v0.9.20
This commit is contained in:
parent
99b06b061c
commit
73751040b7
9 changed files with 415 additions and 400 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper",
|
||||
"version": "0.9.19",
|
||||
"version": "0.9.20",
|
||||
"description": "The Swiss Army Knife of Vector Graphics Scripting",
|
||||
"license": "MIT",
|
||||
"homepage": "http://paperjs.org",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper",
|
||||
"version": "0.9.19",
|
||||
"version": "0.9.20",
|
||||
"description": "The Swiss Army Knife of Vector Graphics Scripting",
|
||||
"license": "MIT",
|
||||
"repo": "paperjs/paper.js",
|
||||
|
|
45
dist/paper-core.js
vendored
45
dist/paper-core.js
vendored
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Paper.js v0.9.19 - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* Paper.js v0.9.20 - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
||||
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Aug 16 18:31:16 2014 +0200
|
||||
* Date: Mon Aug 25 14:21:13 2014 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -716,7 +716,7 @@ var PaperScope = Base.extend({
|
|||
}
|
||||
},
|
||||
|
||||
version: '0.9.19',
|
||||
version: '0.9.20',
|
||||
|
||||
getView: function() {
|
||||
return this.project && this.project.getView();
|
||||
|
@ -4905,8 +4905,7 @@ var HitResult = Base.extend({
|
|||
center: false,
|
||||
bounds: false,
|
||||
guides: false,
|
||||
selected: false,
|
||||
callback: null
|
||||
selected: false
|
||||
}, options);
|
||||
}
|
||||
}
|
||||
|
@ -5152,7 +5151,7 @@ var Segment = Base.extend({
|
|||
|
||||
_transformCoordinates: function(matrix, coords, change) {
|
||||
var point = this._point,
|
||||
handleIn = !change || !this._handleIn.isZero()
|
||||
handleIn = !change || !this._handleIn.isZero()
|
||||
? this._handleIn : null,
|
||||
handleOut = !change || !this._handleOut.isZero()
|
||||
? this._handleOut : null,
|
||||
|
@ -6019,7 +6018,7 @@ new function() {
|
|||
} else if (qy <= dMax) {
|
||||
px = hullBottom[i][0];
|
||||
qx = hullBottom[i + 1][0];
|
||||
tProxy = px + (dMax - py) * (qx - px) / (qy - py);
|
||||
tProxy = px + (dMax - py) * (qx - px) / (qy - py);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
@ -7154,7 +7153,7 @@ var Path = PathItem.extend({
|
|||
if (parameter === 0 || parameter === 1 && numSegments > 1) {
|
||||
if (!checkSegmentStroke(loc.getSegment()))
|
||||
loc = null;
|
||||
} else if (!isCloseEnough(loc.getPoint(), strokePadding)) {
|
||||
} else if (!isCloseEnough(loc.getPoint(), strokePadding)) {
|
||||
loc = null;
|
||||
}
|
||||
}
|
||||
|
@ -7668,7 +7667,7 @@ var Path = PathItem.extend({
|
|||
}
|
||||
}
|
||||
var ext = Math.abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil(ext / 90),
|
||||
count = ext >= 360 ? 4 : Math.ceil(ext / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
|
@ -8707,7 +8706,7 @@ Path.inject({
|
|||
|
||||
CompoundPath.inject({
|
||||
_getMonoCurves: function() {
|
||||
var children = this._children,
|
||||
var children = this._children,
|
||||
monoCurves = [];
|
||||
for (var i = 0, l = children.length; i < l; i++)
|
||||
monoCurves.push.apply(monoCurves, children[i]._getMonoCurves());
|
||||
|
@ -8797,7 +8796,7 @@ var PathFlattener = Base.extend({
|
|||
prevLen = prev ? prev.offset : 0;
|
||||
return {
|
||||
value: prevVal + (part.value - prevVal)
|
||||
* (offset - prevLen) / (part.offset - prevLen),
|
||||
* (offset - prevLen) / (part.offset - prevLen),
|
||||
index: part.index
|
||||
};
|
||||
}
|
||||
|
@ -8924,8 +8923,8 @@ var PathFitter = Base.extend({
|
|||
var detC0C1 = C[0][0] * C[1][1] - C[1][0] * C[0][1],
|
||||
alpha1, alpha2;
|
||||
if (Math.abs(detC0C1) > epsilon) {
|
||||
var detC0X = C[0][0] * X[1] - C[1][0] * X[0],
|
||||
detXC1 = X[0] * C[1][1] - X[1] * C[0][1];
|
||||
var detC0X = C[0][0] * X[1] - C[1][0] * X[0],
|
||||
detXC1 = X[0] * C[1][1] - X[1] * C[0][1];
|
||||
alpha1 = detXC1 / detC0C1;
|
||||
alpha2 = detC0X / detC0C1;
|
||||
} else {
|
||||
|
@ -9191,9 +9190,9 @@ var Color = Base.extend(new function() {
|
|||
min = Math.min(r, g, b),
|
||||
delta = max - min,
|
||||
h = delta === 0 ? 0
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: max == g ? (b - r) / delta + 2
|
||||
: (r - g) / delta + 4) * 60;
|
||||
: (r - g) / delta + 4) * 60;
|
||||
return [h, max === 0 ? 0 : delta / max, max];
|
||||
},
|
||||
|
||||
|
@ -9217,9 +9216,9 @@ var Color = Base.extend(new function() {
|
|||
delta = max - min,
|
||||
achromatic = delta === 0,
|
||||
h = achromatic ? 0
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: max == g ? (b - r) / delta + 2
|
||||
: (r - g) / delta + 4) * 60,
|
||||
: (r - g) / delta + 4) * 60,
|
||||
l = (max + min) / 2,
|
||||
s = achromatic ? 0 : l < 0.5
|
||||
? delta / (max + min)
|
||||
|
@ -9747,7 +9746,7 @@ var Gradient = Base.extend({
|
|||
equals: function(gradient) {
|
||||
if (gradient === this)
|
||||
return true;
|
||||
if (gradient && this._class === gradient._class
|
||||
if (gradient && this._class === gradient._class
|
||||
&& this._stops.length === gradient._stops.length) {
|
||||
for (var i = 0, l = this._stops.length; i < l; i++) {
|
||||
if (!this._stops[i].equals(gradient._stops[i]))
|
||||
|
@ -10163,7 +10162,7 @@ var DomElement = new function() {
|
|||
rect = { left: 0, top: 0, width: 0, height: 0 };
|
||||
}
|
||||
var x = rect.left - (html.clientLeft || body.clientLeft || 0),
|
||||
y = rect.top - (html.clientTop || body.clientTop || 0);
|
||||
y = rect.top - (html.clientTop || body.clientTop || 0);
|
||||
if (!viewport) {
|
||||
var view = doc.defaultView;
|
||||
x += view.pageXOffset || html.scrollLeft || body.scrollLeft;
|
||||
|
@ -10603,6 +10602,8 @@ var View = Base.extend(Callback, {
|
|||
_id: 0,
|
||||
|
||||
create: function(project, element) {
|
||||
if (typeof element === 'string')
|
||||
element = document.getElementById(element);
|
||||
return new CanvasView(project, element);
|
||||
}
|
||||
}
|
||||
|
@ -11146,7 +11147,7 @@ var ToolEvent = Event.extend({
|
|||
|
||||
getDelta: function() {
|
||||
return !this._delta && this.tool._lastPoint
|
||||
? this.tool._point.subtract(this.tool._lastPoint)
|
||||
? this.tool._point.subtract(this.tool._lastPoint)
|
||||
: this._delta;
|
||||
},
|
||||
|
||||
|
@ -11632,8 +11633,8 @@ var BlendMode = new function() {
|
|||
return;
|
||||
var dstData = dstContext.getImageData(offset.x, offset.y,
|
||||
srcCanvas.width, srcCanvas.height),
|
||||
dst = dstData.data,
|
||||
src = srcContext.getImageData(0, 0,
|
||||
dst = dstData.data,
|
||||
src = srcContext.getImageData(0, 0,
|
||||
srcCanvas.width, srcCanvas.height).data;
|
||||
for (var i = 0, l = dst.length; i < l; i += 4) {
|
||||
sr = src[i];
|
||||
|
|
12
dist/paper-core.min.js
vendored
12
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
137
dist/paper-full.js
vendored
137
dist/paper-full.js
vendored
File diff suppressed because one or more lines are too long
16
dist/paper-full.min.js
vendored
16
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
45
dist/paper-node.js
vendored
45
dist/paper-node.js
vendored
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Paper.js v0.9.19 - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* Paper.js v0.9.20 - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
||||
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Aug 16 18:31:16 2014 +0200
|
||||
* Date: Mon Aug 25 14:21:13 2014 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -706,7 +706,7 @@ var PaperScope = Base.extend({
|
|||
}
|
||||
},
|
||||
|
||||
version: '0.9.19',
|
||||
version: '0.9.20',
|
||||
|
||||
getView: function() {
|
||||
return this.project && this.project.getView();
|
||||
|
@ -4910,8 +4910,7 @@ var HitResult = Base.extend({
|
|||
center: false,
|
||||
bounds: false,
|
||||
guides: false,
|
||||
selected: false,
|
||||
callback: null
|
||||
selected: false
|
||||
}, options);
|
||||
}
|
||||
}
|
||||
|
@ -5157,7 +5156,7 @@ var Segment = Base.extend({
|
|||
|
||||
_transformCoordinates: function(matrix, coords, change) {
|
||||
var point = this._point,
|
||||
handleIn = !change || !this._handleIn.isZero()
|
||||
handleIn = !change || !this._handleIn.isZero()
|
||||
? this._handleIn : null,
|
||||
handleOut = !change || !this._handleOut.isZero()
|
||||
? this._handleOut : null,
|
||||
|
@ -6024,7 +6023,7 @@ new function() {
|
|||
} else if (qy <= dMax) {
|
||||
px = hullBottom[i][0];
|
||||
qx = hullBottom[i + 1][0];
|
||||
tProxy = px + (dMax - py) * (qx - px) / (qy - py);
|
||||
tProxy = px + (dMax - py) * (qx - px) / (qy - py);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
@ -7159,7 +7158,7 @@ var Path = PathItem.extend({
|
|||
if (parameter === 0 || parameter === 1 && numSegments > 1) {
|
||||
if (!checkSegmentStroke(loc.getSegment()))
|
||||
loc = null;
|
||||
} else if (!isCloseEnough(loc.getPoint(), strokePadding)) {
|
||||
} else if (!isCloseEnough(loc.getPoint(), strokePadding)) {
|
||||
loc = null;
|
||||
}
|
||||
}
|
||||
|
@ -7673,7 +7672,7 @@ var Path = PathItem.extend({
|
|||
}
|
||||
}
|
||||
var ext = Math.abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil(ext / 90),
|
||||
count = ext >= 360 ? 4 : Math.ceil(ext / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
|
@ -8712,7 +8711,7 @@ Path.inject({
|
|||
|
||||
CompoundPath.inject({
|
||||
_getMonoCurves: function() {
|
||||
var children = this._children,
|
||||
var children = this._children,
|
||||
monoCurves = [];
|
||||
for (var i = 0, l = children.length; i < l; i++)
|
||||
monoCurves.push.apply(monoCurves, children[i]._getMonoCurves());
|
||||
|
@ -8802,7 +8801,7 @@ var PathFlattener = Base.extend({
|
|||
prevLen = prev ? prev.offset : 0;
|
||||
return {
|
||||
value: prevVal + (part.value - prevVal)
|
||||
* (offset - prevLen) / (part.offset - prevLen),
|
||||
* (offset - prevLen) / (part.offset - prevLen),
|
||||
index: part.index
|
||||
};
|
||||
}
|
||||
|
@ -8929,8 +8928,8 @@ var PathFitter = Base.extend({
|
|||
var detC0C1 = C[0][0] * C[1][1] - C[1][0] * C[0][1],
|
||||
alpha1, alpha2;
|
||||
if (Math.abs(detC0C1) > epsilon) {
|
||||
var detC0X = C[0][0] * X[1] - C[1][0] * X[0],
|
||||
detXC1 = X[0] * C[1][1] - X[1] * C[0][1];
|
||||
var detC0X = C[0][0] * X[1] - C[1][0] * X[0],
|
||||
detXC1 = X[0] * C[1][1] - X[1] * C[0][1];
|
||||
alpha1 = detXC1 / detC0C1;
|
||||
alpha2 = detC0X / detC0C1;
|
||||
} else {
|
||||
|
@ -9196,9 +9195,9 @@ var Color = Base.extend(new function() {
|
|||
min = Math.min(r, g, b),
|
||||
delta = max - min,
|
||||
h = delta === 0 ? 0
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: max == g ? (b - r) / delta + 2
|
||||
: (r - g) / delta + 4) * 60;
|
||||
: (r - g) / delta + 4) * 60;
|
||||
return [h, max === 0 ? 0 : delta / max, max];
|
||||
},
|
||||
|
||||
|
@ -9222,9 +9221,9 @@ var Color = Base.extend(new function() {
|
|||
delta = max - min,
|
||||
achromatic = delta === 0,
|
||||
h = achromatic ? 0
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: ( max == r ? (g - b) / delta + (g < b ? 6 : 0)
|
||||
: max == g ? (b - r) / delta + 2
|
||||
: (r - g) / delta + 4) * 60,
|
||||
: (r - g) / delta + 4) * 60,
|
||||
l = (max + min) / 2,
|
||||
s = achromatic ? 0 : l < 0.5
|
||||
? delta / (max + min)
|
||||
|
@ -9752,7 +9751,7 @@ var Gradient = Base.extend({
|
|||
equals: function(gradient) {
|
||||
if (gradient === this)
|
||||
return true;
|
||||
if (gradient && this._class === gradient._class
|
||||
if (gradient && this._class === gradient._class
|
||||
&& this._stops.length === gradient._stops.length) {
|
||||
for (var i = 0, l = this._stops.length; i < l; i++) {
|
||||
if (!this._stops[i].equals(gradient._stops[i]))
|
||||
|
@ -10024,7 +10023,7 @@ var jsdom = require('jsdom'),
|
|||
domToHtml = require('jsdom/lib/jsdom/browser/domtohtml').domToHtml,
|
||||
Canvas = require('canvas'),
|
||||
document = jsdom.jsdom('<html><body></body></html>'),
|
||||
window = document.createWindow(),
|
||||
window = document.parentWindow,
|
||||
navigator = window.navigator,
|
||||
HTMLCanvasElement = Canvas,
|
||||
Image = Canvas.Image;
|
||||
|
@ -10203,7 +10202,7 @@ var DomElement = new function() {
|
|||
rect = { left: 0, top: 0, width: 0, height: 0 };
|
||||
}
|
||||
var x = rect.left - (html.clientLeft || body.clientLeft || 0),
|
||||
y = rect.top - (html.clientTop || body.clientTop || 0);
|
||||
y = rect.top - (html.clientTop || body.clientTop || 0);
|
||||
if (!viewport) {
|
||||
var view = doc.defaultView;
|
||||
x += view.pageXOffset || html.scrollLeft || body.scrollLeft;
|
||||
|
@ -10995,8 +10994,8 @@ var BlendMode = new function() {
|
|||
return;
|
||||
var dstData = dstContext.getImageData(offset.x, offset.y,
|
||||
srcCanvas.width, srcCanvas.height),
|
||||
dst = dstData.data,
|
||||
src = srcContext.getImageData(0, 0,
|
||||
dst = dstData.data,
|
||||
src = srcContext.getImageData(0, 0,
|
||||
srcCanvas.width, srcCanvas.height).data;
|
||||
for (var i = 0, l = dst.length; i < l; i += 4) {
|
||||
sr = src[i];
|
||||
|
@ -12090,7 +12089,7 @@ Base.exports.PaperScript = (function() {
|
|||
code = compile(code, url, options);
|
||||
function expose(scope, hidden) {
|
||||
for (var key in scope) {
|
||||
if ((hidden || !/^_/.test(key)) && new RegExp('[\\b\\s\\W]'
|
||||
if ((hidden || !/^_/.test(key)) && new RegExp('([\\b\\s\\W]|^)'
|
||||
+ key.replace(/\$/g, '\\$') + '\\b').test(code)) {
|
||||
params.push(key);
|
||||
args.push(scope[key]);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper",
|
||||
"version": "0.9.19",
|
||||
"version": "0.9.20",
|
||||
"description": "The Swiss Army Knife of Vector Graphics Scripting",
|
||||
"license": "MIT",
|
||||
"homepage": "http://paperjs.org",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// The paper.js version.
|
||||
// NOTE: Adjust value here before calling publish.sh, which then updates and
|
||||
// publishes the various JSON package files automatically.
|
||||
var version = '0.9.19';
|
||||
var version = '0.9.20';
|
||||
|
||||
var __options = {
|
||||
// If this file is loaded in the browser, we're in dev mode through load.js
|
||||
|
|
Loading…
Reference in a new issue