|
@@ -179,7 +179,7 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
} );
|
|
|
|
|
|
-var REVISION = '91';
|
|
|
+var REVISION = '92dev';
|
|
|
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
|
|
|
var CullFaceNone = 0;
|
|
|
var CullFaceBack = 1;
|
|
@@ -337,7 +337,7 @@ var _Math = {
|
|
|
|
|
|
for ( var i = 0; i < 256; i ++ ) {
|
|
|
|
|
|
- lut[ i ] = ( i < 16 ? '0' : '' ) + ( i ).toString( 16 ).toUpperCase();
|
|
|
+ lut[ i ] = ( i < 16 ? '0' : '' ) + ( i ).toString( 16 );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -347,11 +347,14 @@ var _Math = {
|
|
|
var d1 = Math.random() * 0xffffffff | 0;
|
|
|
var d2 = Math.random() * 0xffffffff | 0;
|
|
|
var d3 = Math.random() * 0xffffffff | 0;
|
|
|
- return lut[ d0 & 0xff ] + lut[ d0 >> 8 & 0xff ] + lut[ d0 >> 16 & 0xff ] + lut[ d0 >> 24 & 0xff ] + '-' +
|
|
|
+ var uuid = lut[ d0 & 0xff ] + lut[ d0 >> 8 & 0xff ] + lut[ d0 >> 16 & 0xff ] + lut[ d0 >> 24 & 0xff ] + '-' +
|
|
|
lut[ d1 & 0xff ] + lut[ d1 >> 8 & 0xff ] + '-' + lut[ d1 >> 16 & 0x0f | 0x40 ] + lut[ d1 >> 24 & 0xff ] + '-' +
|
|
|
lut[ d2 & 0x3f | 0x80 ] + lut[ d2 >> 8 & 0xff ] + '-' + lut[ d2 >> 16 & 0xff ] + lut[ d2 >> 24 & 0xff ] +
|
|
|
lut[ d3 & 0xff ] + lut[ d3 >> 8 & 0xff ] + lut[ d3 >> 16 & 0xff ] + lut[ d3 >> 24 & 0xff ];
|
|
|
|
|
|
+ // .toUpperCase() here flattens concatenated strings to save heap memory space.
|
|
|
+ return uuid.toUpperCase();
|
|
|
+
|
|
|
};
|
|
|
|
|
|
} )(),
|
|
@@ -13008,7 +13011,7 @@ ShaderMaterial.prototype.copy = function ( source ) {
|
|
|
|
|
|
this.uniforms = UniformsUtils.clone( source.uniforms );
|
|
|
|
|
|
- this.defines = source.defines;
|
|
|
+ this.defines = Object.assign( {}, source.defines );
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
this.wireframeLinewidth = source.wireframeLinewidth;
|
|
@@ -14298,12 +14301,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
intersection = checkBufferGeometryIntersection( this, raycaster, ray, position, uv, a, b, c );
|
|
|
|
|
|
- if ( intersection ) {
|
|
|
-
|
|
|
- intersection.index = a; // triangle number in positions buffer semantics
|
|
|
- intersects.push( intersection );
|
|
|
-
|
|
|
- }
|
|
|
+ if ( intersection ) intersects.push( intersection );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -15988,8 +15986,7 @@ function WebGLUniforms( gl, program, renderer ) {
|
|
|
for ( var i = 0; i < n; ++ i ) {
|
|
|
|
|
|
var info = gl.getActiveUniform( program, i ),
|
|
|
- path = info.name,
|
|
|
- addr = gl.getUniformLocation( program, path );
|
|
|
+ addr = gl.getUniformLocation( program, info.name );
|
|
|
|
|
|
parseUniform( info, addr, this );
|
|
|
|
|
@@ -19018,13 +19015,13 @@ function WebGLState( gl, extensions, utils ) {
|
|
|
|
|
|
if ( glVersion.indexOf( 'WebGL' ) !== - 1 ) {
|
|
|
|
|
|
- version = parseFloat( /^WebGL\ ([0-9])/.exec( glVersion )[ 1 ] );
|
|
|
- lineWidthAvailable = ( version >= 1.0 );
|
|
|
+ version = parseFloat( /^WebGL\ ([0-9])/.exec( glVersion )[ 1 ] );
|
|
|
+ lineWidthAvailable = ( version >= 1.0 );
|
|
|
|
|
|
} else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) {
|
|
|
|
|
|
- version = parseFloat( /^OpenGL\ ES\ ([0-9])/.exec( glVersion )[ 1 ] );
|
|
|
- lineWidthAvailable = ( version >= 2.0 );
|
|
|
+ version = parseFloat( /^OpenGL\ ES\ ([0-9])/.exec( glVersion )[ 1 ] );
|
|
|
+ lineWidthAvailable = ( version >= 2.0 );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -21938,7 +21935,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- function setupVertexAttributes( material, program, geometry, startIndex ) {
|
|
|
+ function setupVertexAttributes( material, program, geometry ) {
|
|
|
|
|
|
if ( geometry && geometry.isInstancedBufferGeometry ) {
|
|
|
|
|
@@ -21951,8 +21948,6 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( startIndex === undefined ) startIndex = 0;
|
|
|
-
|
|
|
state.initAttributes();
|
|
|
|
|
|
var geometryAttributes = geometry.attributes;
|
|
@@ -22007,7 +22002,7 @@ function WebGLRenderer( parameters ) {
|
|
|
}
|
|
|
|
|
|
_gl.bindBuffer( _gl.ARRAY_BUFFER, buffer );
|
|
|
- _gl.vertexAttribPointer( programAttribute, size, type, normalized, stride * bytesPerElement, ( startIndex * stride + offset ) * bytesPerElement );
|
|
|
+ _gl.vertexAttribPointer( programAttribute, size, type, normalized, stride * bytesPerElement, offset * bytesPerElement );
|
|
|
|
|
|
} else {
|
|
|
|
|
@@ -22028,7 +22023,7 @@ function WebGLRenderer( parameters ) {
|
|
|
}
|
|
|
|
|
|
_gl.bindBuffer( _gl.ARRAY_BUFFER, buffer );
|
|
|
- _gl.vertexAttribPointer( programAttribute, size, type, normalized, 0, startIndex * size * bytesPerElement );
|
|
|
+ _gl.vertexAttribPointer( programAttribute, size, type, normalized, 0, 0 );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -36157,13 +36152,11 @@ var LoaderUtils = {
|
|
|
|
|
|
extractUrlBase: function ( url ) {
|
|
|
|
|
|
- var parts = url.split( '/' );
|
|
|
-
|
|
|
- if ( parts.length === 1 ) return './';
|
|
|
+ var index = url.lastIndexOf( '/' );
|
|
|
|
|
|
- parts.pop();
|
|
|
+ if ( index === - 1 ) return './';
|
|
|
|
|
|
- return parts.join( '/' ) + '/';
|
|
|
+ return url.substr( 0, index + 1 );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -37032,9 +37025,9 @@ Object.assign( ObjectLoader.prototype, {
|
|
|
|
|
|
var geometryShapes = [];
|
|
|
|
|
|
- for ( var i = 0, l = data.shapes.length; i < l; i ++ ) {
|
|
|
+ for ( var j = 0, jl = data.shapes.length; j < jl; j ++ ) {
|
|
|
|
|
|
- var shape = shapes[ data.shapes[ i ] ];
|
|
|
+ var shape = shapes[ data.shapes[ j ] ];
|
|
|
|
|
|
geometryShapes.push( shape );
|
|
|
|