mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Prebuilt module for commit 47af603173
This commit is contained in:
parent
265041a924
commit
7c06fc1b46
6 changed files with 82 additions and 70 deletions
46
dist/docs/assets/js/paper.js
vendored
46
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Wed Oct 3 19:01:02 2018 +0200
|
||||
* Date: Thu Oct 4 17:26:48 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -11126,7 +11126,9 @@ var Color = Base.extend(new function() {
|
|||
};
|
||||
|
||||
var componentParsers = {},
|
||||
colorCache = {},
|
||||
namedColors = {
|
||||
transparent: [0, 0, 0, 0]
|
||||
},
|
||||
colorCtx;
|
||||
|
||||
function fromCSS(string) {
|
||||
|
@ -11163,26 +11165,28 @@ var Color = Base.extend(new function() {
|
|||
}
|
||||
components[i] = value;
|
||||
}
|
||||
} else if (window) {
|
||||
var cached = colorCache[string];
|
||||
if (!cached) {
|
||||
if (!colorCtx) {
|
||||
colorCtx = CanvasProvider.getContext(1, 1);
|
||||
colorCtx.globalCompositeOperation = 'copy';
|
||||
}
|
||||
colorCtx.fillStyle = 'rgba(0,0,0,0)';
|
||||
colorCtx.fillStyle = string;
|
||||
colorCtx.fillRect(0, 0, 1, 1);
|
||||
var data = colorCtx.getImageData(0, 0, 1, 1).data;
|
||||
cached = colorCache[string] = [
|
||||
data[0] / 255,
|
||||
data[1] / 255,
|
||||
data[2] / 255
|
||||
];
|
||||
}
|
||||
components = cached.slice();
|
||||
} else {
|
||||
components = [0, 0, 0];
|
||||
var color = namedColors[string];
|
||||
if (!color) {
|
||||
if (window) {
|
||||
if (!colorCtx) {
|
||||
colorCtx = CanvasProvider.getContext(1, 1);
|
||||
colorCtx.globalCompositeOperation = 'copy';
|
||||
}
|
||||
colorCtx.fillStyle = 'rgba(0,0,0,0)';
|
||||
colorCtx.fillStyle = string;
|
||||
colorCtx.fillRect(0, 0, 1, 1);
|
||||
var data = colorCtx.getImageData(0, 0, 1, 1).data;
|
||||
color = namedColors[string] = [
|
||||
data[0] / 255,
|
||||
data[1] / 255,
|
||||
data[2] / 255
|
||||
];
|
||||
} else {
|
||||
color = [0, 0, 0];
|
||||
}
|
||||
}
|
||||
components = color.slice();
|
||||
}
|
||||
return [type, components];
|
||||
}
|
||||
|
|
46
dist/paper-core.js
vendored
46
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Wed Oct 3 19:01:02 2018 +0200
|
||||
* Date: Thu Oct 4 17:26:48 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -11126,7 +11126,9 @@ var Color = Base.extend(new function() {
|
|||
};
|
||||
|
||||
var componentParsers = {},
|
||||
colorCache = {},
|
||||
namedColors = {
|
||||
transparent: [0, 0, 0, 0]
|
||||
},
|
||||
colorCtx;
|
||||
|
||||
function fromCSS(string) {
|
||||
|
@ -11163,26 +11165,28 @@ var Color = Base.extend(new function() {
|
|||
}
|
||||
components[i] = value;
|
||||
}
|
||||
} else if (window) {
|
||||
var cached = colorCache[string];
|
||||
if (!cached) {
|
||||
if (!colorCtx) {
|
||||
colorCtx = CanvasProvider.getContext(1, 1);
|
||||
colorCtx.globalCompositeOperation = 'copy';
|
||||
}
|
||||
colorCtx.fillStyle = 'rgba(0,0,0,0)';
|
||||
colorCtx.fillStyle = string;
|
||||
colorCtx.fillRect(0, 0, 1, 1);
|
||||
var data = colorCtx.getImageData(0, 0, 1, 1).data;
|
||||
cached = colorCache[string] = [
|
||||
data[0] / 255,
|
||||
data[1] / 255,
|
||||
data[2] / 255
|
||||
];
|
||||
}
|
||||
components = cached.slice();
|
||||
} else {
|
||||
components = [0, 0, 0];
|
||||
var color = namedColors[string];
|
||||
if (!color) {
|
||||
if (window) {
|
||||
if (!colorCtx) {
|
||||
colorCtx = CanvasProvider.getContext(1, 1);
|
||||
colorCtx.globalCompositeOperation = 'copy';
|
||||
}
|
||||
colorCtx.fillStyle = 'rgba(0,0,0,0)';
|
||||
colorCtx.fillStyle = string;
|
||||
colorCtx.fillRect(0, 0, 1, 1);
|
||||
var data = colorCtx.getImageData(0, 0, 1, 1).data;
|
||||
color = namedColors[string] = [
|
||||
data[0] / 255,
|
||||
data[1] / 255,
|
||||
data[2] / 255
|
||||
];
|
||||
} else {
|
||||
color = [0, 0, 0];
|
||||
}
|
||||
}
|
||||
components = color.slice();
|
||||
}
|
||||
return [type, components];
|
||||
}
|
||||
|
|
4
dist/paper-core.min.js
vendored
4
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
46
dist/paper-full.js
vendored
46
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Wed Oct 3 19:01:02 2018 +0200
|
||||
* Date: Thu Oct 4 17:26:48 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -11126,7 +11126,9 @@ var Color = Base.extend(new function() {
|
|||
};
|
||||
|
||||
var componentParsers = {},
|
||||
colorCache = {},
|
||||
namedColors = {
|
||||
transparent: [0, 0, 0, 0]
|
||||
},
|
||||
colorCtx;
|
||||
|
||||
function fromCSS(string) {
|
||||
|
@ -11163,26 +11165,28 @@ var Color = Base.extend(new function() {
|
|||
}
|
||||
components[i] = value;
|
||||
}
|
||||
} else if (window) {
|
||||
var cached = colorCache[string];
|
||||
if (!cached) {
|
||||
if (!colorCtx) {
|
||||
colorCtx = CanvasProvider.getContext(1, 1);
|
||||
colorCtx.globalCompositeOperation = 'copy';
|
||||
}
|
||||
colorCtx.fillStyle = 'rgba(0,0,0,0)';
|
||||
colorCtx.fillStyle = string;
|
||||
colorCtx.fillRect(0, 0, 1, 1);
|
||||
var data = colorCtx.getImageData(0, 0, 1, 1).data;
|
||||
cached = colorCache[string] = [
|
||||
data[0] / 255,
|
||||
data[1] / 255,
|
||||
data[2] / 255
|
||||
];
|
||||
}
|
||||
components = cached.slice();
|
||||
} else {
|
||||
components = [0, 0, 0];
|
||||
var color = namedColors[string];
|
||||
if (!color) {
|
||||
if (window) {
|
||||
if (!colorCtx) {
|
||||
colorCtx = CanvasProvider.getContext(1, 1);
|
||||
colorCtx.globalCompositeOperation = 'copy';
|
||||
}
|
||||
colorCtx.fillStyle = 'rgba(0,0,0,0)';
|
||||
colorCtx.fillStyle = string;
|
||||
colorCtx.fillRect(0, 0, 1, 1);
|
||||
var data = colorCtx.getImageData(0, 0, 1, 1).data;
|
||||
color = namedColors[string] = [
|
||||
data[0] / 255,
|
||||
data[1] / 255,
|
||||
data[2] / 255
|
||||
];
|
||||
} else {
|
||||
color = [0, 0, 0];
|
||||
}
|
||||
}
|
||||
components = color.slice();
|
||||
}
|
||||
return [type, components];
|
||||
}
|
||||
|
|
4
dist/paper-full.min.js
vendored
4
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1007,9 +1007,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.0.tgz",
|
||||
"integrity": "sha512-7iuEZ5j20aoFhiiaFZiSipk23nPl+UGKsglMJ+dy27HTpQ3wm2tj2esD/UHXlrqh5o6p6MW7m+fYSUz4JvuqVQ==",
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
|
||||
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==",
|
||||
"dev": true
|
||||
},
|
||||
"defaults": {
|
||||
|
|
Loading…
Reference in a new issue