mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Prebuilt module for commit fd1a517e84
This commit is contained in:
parent
3aa328fdb3
commit
fedd76c63c
5 changed files with 51 additions and 48 deletions
27
dist/docs/assets/js/paper.js
vendored
27
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Oct 6 17:16:55 2018 +0200
|
||||
* Date: Sat Oct 6 21:57:30 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -11202,20 +11202,21 @@ var Color = Base.extend(new function() {
|
|||
colorCtx;
|
||||
|
||||
function fromCSS(string) {
|
||||
var match = string.match(/^#(\w{1,2})(\w{1,2})(\w{1,2})$/),
|
||||
var match = string.match(
|
||||
/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i
|
||||
) || string.match(
|
||||
/^#([\da-f])([\da-f])([\da-f])$/i
|
||||
),
|
||||
type = 'rgb',
|
||||
components;
|
||||
if (/^#[A-Fa-f0-9]+$/.test( string )) {
|
||||
var base = string.replace(/^#/,'');
|
||||
var size = base.length;
|
||||
components = base.split( size <= 4 ? /(.)/ : /(..)/ );
|
||||
components = components.filter(Boolean).map(function(x) {
|
||||
return parseInt(size <= 4 ? x + x : x, 16) / 255;
|
||||
});
|
||||
|
||||
if ( !components[0] ) components[0] = 0;
|
||||
if ( !components[1] ) components[1] = 0;
|
||||
if ( !components[2] ) components[2] = 0;
|
||||
if (match) {
|
||||
var amount = match[4] ? 4 : 3;
|
||||
components = new Array(amount);
|
||||
for (var i = 0; i < amount; i++) {
|
||||
var value = match[i + 1];
|
||||
components[i] = parseInt(value.length == 1
|
||||
? value + value : value, 16) / 255;
|
||||
}
|
||||
} else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) {
|
||||
type = match[1];
|
||||
components = match[2].split(/[,\s]+/g);
|
||||
|
|
27
dist/paper-core.js
vendored
27
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Oct 6 17:16:55 2018 +0200
|
||||
* Date: Sat Oct 6 21:57:30 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -11202,20 +11202,21 @@ var Color = Base.extend(new function() {
|
|||
colorCtx;
|
||||
|
||||
function fromCSS(string) {
|
||||
var match = string.match(/^#(\w{1,2})(\w{1,2})(\w{1,2})$/),
|
||||
var match = string.match(
|
||||
/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i
|
||||
) || string.match(
|
||||
/^#([\da-f])([\da-f])([\da-f])$/i
|
||||
),
|
||||
type = 'rgb',
|
||||
components;
|
||||
if (/^#[A-Fa-f0-9]+$/.test( string )) {
|
||||
var base = string.replace(/^#/,'');
|
||||
var size = base.length;
|
||||
components = base.split( size <= 4 ? /(.)/ : /(..)/ );
|
||||
components = components.filter(Boolean).map(function(x) {
|
||||
return parseInt(size <= 4 ? x + x : x, 16) / 255;
|
||||
});
|
||||
|
||||
if ( !components[0] ) components[0] = 0;
|
||||
if ( !components[1] ) components[1] = 0;
|
||||
if ( !components[2] ) components[2] = 0;
|
||||
if (match) {
|
||||
var amount = match[4] ? 4 : 3;
|
||||
components = new Array(amount);
|
||||
for (var i = 0; i < amount; i++) {
|
||||
var value = match[i + 1];
|
||||
components[i] = parseInt(value.length == 1
|
||||
? value + value : value, 16) / 255;
|
||||
}
|
||||
} else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) {
|
||||
type = match[1];
|
||||
components = match[2].split(/[,\s]+/g);
|
||||
|
|
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
27
dist/paper-full.js
vendored
27
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Oct 6 17:16:55 2018 +0200
|
||||
* Date: Sat Oct 6 21:57:30 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -11202,20 +11202,21 @@ var Color = Base.extend(new function() {
|
|||
colorCtx;
|
||||
|
||||
function fromCSS(string) {
|
||||
var match = string.match(/^#(\w{1,2})(\w{1,2})(\w{1,2})$/),
|
||||
var match = string.match(
|
||||
/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i
|
||||
) || string.match(
|
||||
/^#([\da-f])([\da-f])([\da-f])$/i
|
||||
),
|
||||
type = 'rgb',
|
||||
components;
|
||||
if (/^#[A-Fa-f0-9]+$/.test( string )) {
|
||||
var base = string.replace(/^#/,'');
|
||||
var size = base.length;
|
||||
components = base.split( size <= 4 ? /(.)/ : /(..)/ );
|
||||
components = components.filter(Boolean).map(function(x) {
|
||||
return parseInt(size <= 4 ? x + x : x, 16) / 255;
|
||||
});
|
||||
|
||||
if ( !components[0] ) components[0] = 0;
|
||||
if ( !components[1] ) components[1] = 0;
|
||||
if ( !components[2] ) components[2] = 0;
|
||||
if (match) {
|
||||
var amount = match[4] ? 4 : 3;
|
||||
components = new Array(amount);
|
||||
for (var i = 0; i < amount; i++) {
|
||||
var value = match[i + 1];
|
||||
components[i] = parseInt(value.length == 1
|
||||
? value + value : value, 16) / 255;
|
||||
}
|
||||
} else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) {
|
||||
type = match[1];
|
||||
components = match[2].split(/[,\s]+/g);
|
||||
|
|
6
dist/paper-full.min.js
vendored
6
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue