Skip to content

Commit

Permalink
Merge pull request #20897 from gonnavis/SimplifyRegExpOfWebGLState
Browse files Browse the repository at this point in the history
Simplify RegExp of WebGLState.js
  • Loading branch information
mrdoob committed Dec 17, 2020
2 parents 36a8b44 + 40f981c commit fdf9407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderers/webgl/WebGLState.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,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 fdf9407

Please sign in to comment.