Prebuilt module for commit 388146be06

This commit is contained in:
Paper.js Bot 2016-06-16 12:03:14 +00:00
parent 7a67e1947a
commit 253bc68a2f
5 changed files with 109 additions and 79 deletions

View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Thu Jun 16 09:53:54 2016 +0200
* Date: Thu Jun 16 14:00:22 2016 +0200
*
***
*
@ -6254,30 +6254,40 @@ statics: {
_addBounds: function(v0, v1, v2, v3, coord, padding, min, max, roots) {
padding /= 2;
function add(value, padding) {
var left = value - padding,
right = value + padding;
if (left < min[coord])
min[coord] = left;
if (right > max[coord])
max[coord] = right;
}
var a = 3 * (v1 - v2) - v0 + v3,
b = 2 * (v0 + v2) - 4 * v1,
c = v1 - v0,
count = Numerical.solveQuadratic(a, b, c, roots),
tMin = 4e-7,
tMax = 1 - tMin;
add(v3, 0);
for (var i = 0; i < count; i++) {
var t = roots[i],
u = 1 - t;
if (tMin < t && t < tMax)
add(u * u * u * v0
+ 3 * u * u * t * v1
+ 3 * u * t * t * v2
+ t * t * t * v3,
padding);
var minPad = min[coord] - padding,
maxPad = max[coord] + padding;
if (v0 < minPad || v1 < minPad || v2 < minPad || v3 < minPad
|| v0 > maxPad || v1 > maxPad || v2 > maxPad || v3 > maxPad) {
function add(value, padding) {
var left = value - padding,
right = value + padding;
if (left < min[coord])
min[coord] = left;
if (right > max[coord])
max[coord] = right;
}
if (v1 < v0 != v1 < v3 && v2 < v0 != v2 < v3) {
add(v0, padding);
add(v3, padding);
} else {
var a = 3 * (v1 - v2) - v0 + v3,
b = 2 * (v0 + v2) - 4 * v1,
c = v1 - v0,
count = Numerical.solveQuadratic(a, b, c, roots),
tMin = 4e-7,
tMax = 1 - tMin;
add(v3, 0);
for (var i = 0; i < count; i++) {
var t = roots[i],
u = 1 - t;
if (tMin < t && t < tMax)
add(u * u * u * v0
+ 3 * u * u * t * v1
+ 3 * u * t * t * v2
+ t * t * t * v3,
padding);
}
}
}
}
}}, Base.each(

60
dist/paper-core.js vendored
View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Thu Jun 16 09:53:54 2016 +0200
* Date: Thu Jun 16 14:00:22 2016 +0200
*
***
*
@ -6254,30 +6254,40 @@ statics: {
_addBounds: function(v0, v1, v2, v3, coord, padding, min, max, roots) {
padding /= 2;
function add(value, padding) {
var left = value - padding,
right = value + padding;
if (left < min[coord])
min[coord] = left;
if (right > max[coord])
max[coord] = right;
}
var a = 3 * (v1 - v2) - v0 + v3,
b = 2 * (v0 + v2) - 4 * v1,
c = v1 - v0,
count = Numerical.solveQuadratic(a, b, c, roots),
tMin = 4e-7,
tMax = 1 - tMin;
add(v3, 0);
for (var i = 0; i < count; i++) {
var t = roots[i],
u = 1 - t;
if (tMin < t && t < tMax)
add(u * u * u * v0
+ 3 * u * u * t * v1
+ 3 * u * t * t * v2
+ t * t * t * v3,
padding);
var minPad = min[coord] - padding,
maxPad = max[coord] + padding;
if (v0 < minPad || v1 < minPad || v2 < minPad || v3 < minPad
|| v0 > maxPad || v1 > maxPad || v2 > maxPad || v3 > maxPad) {
function add(value, padding) {
var left = value - padding,
right = value + padding;
if (left < min[coord])
min[coord] = left;
if (right > max[coord])
max[coord] = right;
}
if (v1 < v0 != v1 < v3 && v2 < v0 != v2 < v3) {
add(v0, padding);
add(v3, padding);
} else {
var a = 3 * (v1 - v2) - v0 + v3,
b = 2 * (v0 + v2) - 4 * v1,
c = v1 - v0,
count = Numerical.solveQuadratic(a, b, c, roots),
tMin = 4e-7,
tMax = 1 - tMin;
add(v3, 0);
for (var i = 0; i < count; i++) {
var t = roots[i],
u = 1 - t;
if (tMin < t && t < tMax)
add(u * u * u * v0
+ 3 * u * u * t * v1
+ 3 * u * t * t * v2
+ t * t * t * v3,
padding);
}
}
}
}
}}, Base.each(

File diff suppressed because one or more lines are too long

60
dist/paper-full.js vendored
View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Thu Jun 16 09:53:54 2016 +0200
* Date: Thu Jun 16 14:00:22 2016 +0200
*
***
*
@ -6254,30 +6254,40 @@ statics: {
_addBounds: function(v0, v1, v2, v3, coord, padding, min, max, roots) {
padding /= 2;
function add(value, padding) {
var left = value - padding,
right = value + padding;
if (left < min[coord])
min[coord] = left;
if (right > max[coord])
max[coord] = right;
}
var a = 3 * (v1 - v2) - v0 + v3,
b = 2 * (v0 + v2) - 4 * v1,
c = v1 - v0,
count = Numerical.solveQuadratic(a, b, c, roots),
tMin = 4e-7,
tMax = 1 - tMin;
add(v3, 0);
for (var i = 0; i < count; i++) {
var t = roots[i],
u = 1 - t;
if (tMin < t && t < tMax)
add(u * u * u * v0
+ 3 * u * u * t * v1
+ 3 * u * t * t * v2
+ t * t * t * v3,
padding);
var minPad = min[coord] - padding,
maxPad = max[coord] + padding;
if (v0 < minPad || v1 < minPad || v2 < minPad || v3 < minPad
|| v0 > maxPad || v1 > maxPad || v2 > maxPad || v3 > maxPad) {
function add(value, padding) {
var left = value - padding,
right = value + padding;
if (left < min[coord])
min[coord] = left;
if (right > max[coord])
max[coord] = right;
}
if (v1 < v0 != v1 < v3 && v2 < v0 != v2 < v3) {
add(v0, padding);
add(v3, padding);
} else {
var a = 3 * (v1 - v2) - v0 + v3,
b = 2 * (v0 + v2) - 4 * v1,
c = v1 - v0,
count = Numerical.solveQuadratic(a, b, c, roots),
tMin = 4e-7,
tMax = 1 - tMin;
add(v3, 0);
for (var i = 0; i < count; i++) {
var t = roots[i],
u = 1 - t;
if (tMin < t && t < tMax)
add(u * u * u * v0
+ 3 * u * u * t * v1
+ 3 * u * t * t * v2
+ t * t * t * v3,
padding);
}
}
}
}
}}, Base.each(

File diff suppressed because one or more lines are too long