mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Clean up code ('){' -> ') {')).
This commit is contained in:
parent
66465541c6
commit
e0edddd5f6
2 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
function generateConnections(paths) {
|
function generateConnections(paths) {
|
||||||
for (var i = 0, l = paths.length; i < l; i++) {
|
for (var i = 0, l = paths.length; i < l; i++) {
|
||||||
for (var j = i - 1; j >= 0; j--){
|
for (var j = i - 1; j >= 0; j--) {
|
||||||
var path = metaball(paths[i], paths[j], 0.5, handle_len_rate, 300);
|
var path = metaball(paths[i], paths[j], 0.5, handle_len_rate, 300);
|
||||||
if (path) {
|
if (path) {
|
||||||
path.removeOn({
|
path.removeOn({
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------
|
// ---------------------------------------------
|
||||||
function metaball(ball1, ball2, v, handle_len_rate, maxDistance){
|
function metaball(ball1, ball2, v, handle_len_rate, maxDistance) {
|
||||||
var center1 = ball1.position,
|
var center1 = ball1.position,
|
||||||
center2 = ball2.position,
|
center2 = ball2.position,
|
||||||
radius1 = ball1.bounds.width / 2,
|
radius1 = ball1.bounds.width / 2,
|
||||||
|
|
|
@ -61,7 +61,7 @@ var BlendMode = {
|
||||||
var sRA, sGA, sBA, dRA, dGA, dBA, dA2;
|
var sRA, sGA, sBA, dRA, dGA, dBA, dA2;
|
||||||
var demultiply;
|
var demultiply;
|
||||||
|
|
||||||
for (var px=0;px<len;px+=4){
|
for (var px=0;px<len;px+=4) {
|
||||||
sA = src[px+3]/255 * opacity;
|
sA = src[px+3]/255 * opacity;
|
||||||
dA = dst[px+3]/255;
|
dA = dst[px+3]/255;
|
||||||
dA2 = (sA + dA - sA*dA);
|
dA2 = (sA + dA - sA*dA);
|
||||||
|
@ -76,7 +76,7 @@ var BlendMode = {
|
||||||
|
|
||||||
demultiply = 255 / dA2;
|
demultiply = 255 / dA2;
|
||||||
|
|
||||||
switch(blendMode){
|
switch(blendMode) {
|
||||||
// ******* Very close match to Photoshop
|
// ******* Very close match to Photoshop
|
||||||
case 'normal':
|
case 'normal':
|
||||||
case 'src-over':
|
case 'src-over':
|
||||||
|
|
Loading…
Reference in a new issue