Prebuilt module for commit fd1a517e84

This commit is contained in:
Paper.js Bot 2018-10-06 20:02:32 +00:00
parent 3aa328fdb3
commit fedd76c63c
5 changed files with 51 additions and 48 deletions

View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * 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; colorCtx;
function fromCSS(string) { 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', type = 'rgb',
components; components;
if (/^#[A-Fa-f0-9]+$/.test( string )) { if (match) {
var base = string.replace(/^#/,''); var amount = match[4] ? 4 : 3;
var size = base.length; components = new Array(amount);
components = base.split( size <= 4 ? /(.)/ : /(..)/ ); for (var i = 0; i < amount; i++) {
components = components.filter(Boolean).map(function(x) { var value = match[i + 1];
return parseInt(size <= 4 ? x + x : x, 16) / 255; components[i] = parseInt(value.length == 1
}); ? value + value : value, 16) / 255;
}
if ( !components[0] ) components[0] = 0;
if ( !components[1] ) components[1] = 0;
if ( !components[2] ) components[2] = 0;
} else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) { } else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) {
type = match[1]; type = match[1];
components = match[2].split(/[,\s]+/g); components = match[2].split(/[,\s]+/g);

27
dist/paper-core.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * 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; colorCtx;
function fromCSS(string) { 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', type = 'rgb',
components; components;
if (/^#[A-Fa-f0-9]+$/.test( string )) { if (match) {
var base = string.replace(/^#/,''); var amount = match[4] ? 4 : 3;
var size = base.length; components = new Array(amount);
components = base.split( size <= 4 ? /(.)/ : /(..)/ ); for (var i = 0; i < amount; i++) {
components = components.filter(Boolean).map(function(x) { var value = match[i + 1];
return parseInt(size <= 4 ? x + x : x, 16) / 255; components[i] = parseInt(value.length == 1
}); ? value + value : value, 16) / 255;
}
if ( !components[0] ) components[0] = 0;
if ( !components[1] ) components[1] = 0;
if ( !components[2] ) components[2] = 0;
} else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) { } else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) {
type = match[1]; type = match[1];
components = match[2].split(/[,\s]+/g); components = match[2].split(/[,\s]+/g);

File diff suppressed because one or more lines are too long

27
dist/paper-full.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * 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; colorCtx;
function fromCSS(string) { 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', type = 'rgb',
components; components;
if (/^#[A-Fa-f0-9]+$/.test( string )) { if (match) {
var base = string.replace(/^#/,''); var amount = match[4] ? 4 : 3;
var size = base.length; components = new Array(amount);
components = base.split( size <= 4 ? /(.)/ : /(..)/ ); for (var i = 0; i < amount; i++) {
components = components.filter(Boolean).map(function(x) { var value = match[i + 1];
return parseInt(size <= 4 ? x + x : x, 16) / 255; components[i] = parseInt(value.length == 1
}); ? value + value : value, 16) / 255;
}
if ( !components[0] ) components[0] = 0;
if ( !components[1] ) components[1] = 0;
if ( !components[2] ) components[2] = 0;
} else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) { } else if (match = string.match(/^(rgb|hsl)a?\((.*)\)$/)) {
type = match[1]; type = match[1];
components = match[2].split(/[,\s]+/g); components = match[2].split(/[,\s]+/g);

File diff suppressed because one or more lines are too long