Skip to content

Commit

Permalink
Updated builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Dec 17, 2020
1 parent fe879a6 commit 5199433
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -6425,40 +6425,40 @@
switch (name) {
case 'rgb':
case 'rgba':
if (color = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(components)) {
if (color = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)) {
// rgb(255,0,0) rgba(255,0,0,0.5)
this.r = Math.min(255, parseInt(color[1], 10)) / 255;
this.g = Math.min(255, parseInt(color[2], 10)) / 255;
this.b = Math.min(255, parseInt(color[3], 10)) / 255;
handleAlpha(color[5]);
handleAlpha(color[4]);
return this;
}

if (color = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(components)) {
if (color = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)) {
// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)
this.r = Math.min(100, parseInt(color[1], 10)) / 100;
this.g = Math.min(100, parseInt(color[2], 10)) / 100;
this.b = Math.min(100, parseInt(color[3], 10)) / 100;
handleAlpha(color[5]);
handleAlpha(color[4]);
return this;
}

break;

case 'hsl':
case 'hsla':
if (color = /^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(components)) {
if (color = /^(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)) {
// hsl(120,50%,50%) hsla(120,50%,50%,0.5)
var h = parseFloat(color[1]) / 360;
var s = parseInt(color[2], 10) / 100;
var l = parseInt(color[3], 10) / 100;
handleAlpha(color[5]);
handleAlpha(color[4]);
return this.setHSL(h, s, l);
}

break;
}
} else if (m = /^\#([A-Fa-f0-9]+)$/.exec(style)) {
} else if (m = /^\#([A-Fa-f\d]+)$/.exec(style)) {
// hex color
var hex = m[1];
var size = hex.length;
Expand Down Expand Up @@ -12956,7 +12956,7 @@
// Parser - builds up the property tree from the path strings


var RePathPart = /([\w\d_]+)(\])?(\[|\.)?/g; // extracts
var RePathPart = /(\w+)(\])?(\[|\.)?/g; // extracts
// - the identifier (member name or array index)
// - followed by an optional right bracket (found when array index)
// - followed by an optional left bracket or dot (type of subscript)
Expand Down Expand Up @@ -15102,10 +15102,10 @@
var glVersion = gl.getParameter(7938);

if (glVersion.indexOf('WebGL') !== -1) {
version = parseFloat(/^WebGL\ ([0-9])/.exec(glVersion)[1]);
version = parseFloat(/^WebGL (\d)/.exec(glVersion)[1]);
lineWidthAvailable = version >= 1.0;
} else if (glVersion.indexOf('OpenGL ES') !== -1) {
version = parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(glVersion)[1]);
version = parseFloat(/^OpenGL ES (\d)/.exec(glVersion)[1]);
lineWidthAvailable = version >= 2.0;
}

Expand Down
2 changes: 1 addition & 1 deletion build/three.min.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -7937,27 +7937,27 @@ class Color {
case 'rgb':
case 'rgba':

if ( color = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec( components ) ) {
if ( color = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) {

// rgb(255,0,0) rgba(255,0,0,0.5)
this.r = Math.min( 255, parseInt( color[ 1 ], 10 ) ) / 255;
this.g = Math.min( 255, parseInt( color[ 2 ], 10 ) ) / 255;
this.b = Math.min( 255, parseInt( color[ 3 ], 10 ) ) / 255;

handleAlpha( color[ 5 ] );
handleAlpha( color[ 4 ] );

return this;

}

if ( color = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec( components ) ) {
if ( color = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) {

// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)
this.r = Math.min( 100, parseInt( color[ 1 ], 10 ) ) / 100;
this.g = Math.min( 100, parseInt( color[ 2 ], 10 ) ) / 100;
this.b = Math.min( 100, parseInt( color[ 3 ], 10 ) ) / 100;

handleAlpha( color[ 5 ] );
handleAlpha( color[ 4 ] );

return this;

Expand All @@ -7968,14 +7968,14 @@ class Color {
case 'hsl':
case 'hsla':

if ( color = /^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec( components ) ) {
if ( color = /^(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) {

// hsl(120,50%,50%) hsla(120,50%,50%,0.5)
const h = parseFloat( color[ 1 ] ) / 360;
const s = parseInt( color[ 2 ], 10 ) / 100;
const l = parseInt( color[ 3 ], 10 ) / 100;

handleAlpha( color[ 5 ] );
handleAlpha( color[ 4 ] );

return this.setHSL( h, s, l );

Expand All @@ -7985,7 +7985,7 @@ class Color {

}

} else if ( m = /^\#([A-Fa-f0-9]+)$/.exec( style ) ) {
} else if ( m = /^\#([A-Fa-f\d]+)$/.exec( style ) ) {

// hex color

Expand Down Expand Up @@ -16557,7 +16557,7 @@ StructuredUniform.prototype.setValue = function ( gl, value, textures ) {

// Parser - builds up the property tree from the path strings

const RePathPart = /([\w\d_]+)(\])?(\[|\.)?/g;
const RePathPart = /(\w+)(\])?(\[|\.)?/g;

// extracts
// - the identifier (member name or array index)
Expand Down Expand Up @@ -19787,12 +19787,12 @@ function WebGLState( gl, extensions, capabilities ) {

if ( glVersion.indexOf( 'WebGL' ) !== - 1 ) {

version = parseFloat( /^WebGL\ ([0-9])/.exec( glVersion )[ 1 ] );
version = parseFloat( /^WebGL (\d)/.exec( glVersion )[ 1 ] );
lineWidthAvailable = ( version >= 1.0 );

} else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) {

version = parseFloat( /^OpenGL\ ES\ ([0-9])/.exec( glVersion )[ 1 ] );
version = parseFloat( /^OpenGL ES (\d)/.exec( glVersion )[ 1 ] );
lineWidthAvailable = ( version >= 2.0 );

}
Expand Down

0 comments on commit 5199433

Please sign in to comment.