提交 8a524f69 编写于 作者: M Mr.doob

Updated builds.

上级 82a4fe3c
......@@ -20066,7 +20066,7 @@
//
if ( (object && object.isMesh) ) {
if ( object && object.isMesh ) {
if ( material.wireframe === true ) {
......@@ -20094,7 +20094,7 @@
}
} else if ( (object && object.isLine) ) {
} else if ( object && object.isLine ) {
var lineWidth = material.linewidth;
......@@ -20102,7 +20102,7 @@
state.setLineWidth( lineWidth * getTargetPixelRatio() );
if ( (object && object.isLineSegments) ) {
if ( object && object.isLineSegments ) {
renderer.setMode( _gl.LINES );
......@@ -20112,13 +20112,13 @@
}
} else if ( (object && object.isPoints) ) {
} else if ( object && object.isPoints ) {
renderer.setMode( _gl.POINTS );
}
if ( (geometry && geometry.isInstancedBufferGeometry) ) {
if ( geometry && geometry.isInstancedBufferGeometry ) {
if ( geometry.maxInstancedCount > 0 ) {
......@@ -20138,7 +20138,7 @@
var extension;
if ( (geometry && geometry.isInstancedBufferGeometry) ) {
if ( geometry && geometry.isInstancedBufferGeometry ) {
extension = extensions.get( 'ANGLE_instanced_arrays' );
......@@ -20181,7 +20181,7 @@
} else if ( array instanceof Float64Array ) {
console.warn("Unsupported data buffer format: Float64Array");
console.warn( "Unsupported data buffer format: Float64Array" );
} else if ( array instanceof Uint16Array ) {
......@@ -20212,13 +20212,13 @@
var size = geometryAttribute.itemSize;
var buffer = objects.getAttributeBuffer( geometryAttribute );
if ( (geometryAttribute && geometryAttribute.isInterleavedBufferAttribute) ) {
if ( geometryAttribute && geometryAttribute.isInterleavedBufferAttribute ) {
var data = geometryAttribute.data;
var stride = data.stride;
var offset = geometryAttribute.offset;
if ( (data && data.isInstancedInterleavedBuffer) ) {
if ( data && data.isInstancedInterleavedBuffer ) {
state.enableAttributeAndDivisor( programAttribute, data.meshPerAttribute, extension );
......@@ -20239,7 +20239,7 @@
} else {
if ( (geometryAttribute && geometryAttribute.isInstancedBufferAttribute) ) {
if ( geometryAttribute && geometryAttribute.isInstancedBufferAttribute ) {
state.enableAttributeAndDivisor( programAttribute, geometryAttribute.meshPerAttribute, extension );
......@@ -20353,7 +20353,7 @@
this.render = function ( scene, camera, renderTarget, forceClear ) {
if ( (camera && camera.isCamera) === false ) {
if ( ( camera && camera.isCamera ) === false ) {
console.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );
return;
......@@ -20439,7 +20439,7 @@
glClearColor( _clearColor.r, _clearColor.g, _clearColor.b, _clearAlpha );
} else if ( (background && background.isColor) ) {
} else if ( background && background.isColor ) {
glClearColor( background.r, background.g, background.b, 1 );
......@@ -20451,7 +20451,7 @@
}
if ( (background && background.isCubeTexture) ) {
if ( background && background.isCubeTexture ) {
backgroundCamera2.projectionMatrix.copy( camera.projectionMatrix );
......@@ -20465,7 +20465,7 @@
_this.renderBufferDirect( backgroundCamera2, null, backgroundBoxMesh.geometry, backgroundBoxMesh.material, backgroundBoxMesh, null );
} else if ( (background && background.isTexture) ) {
} else if ( background && background.isTexture ) {
backgroundPlaneMesh.material.map = background;
......@@ -20626,11 +20626,11 @@
if ( object.layers.test( camera.layers ) ) {
if ( (object && object.isLight) ) {
if ( object && object.isLight ) {
lights.push( object );
} else if ( (object && object.isSprite) ) {
} else if ( object && object.isSprite ) {
if ( object.frustumCulled === false || isSpriteViewable( object ) === true ) {
......@@ -20638,11 +20638,11 @@
}
} else if ( (object && object.isLensFlare) ) {
} else if ( object && object.isLensFlare ) {
lensFlares.push( object );
} else if ( (object && object.isImmediateRenderObject) ) {
} else if ( object && object.isImmediateRenderObject ) {
if ( _this.sortObjects === true ) {
......@@ -20653,9 +20653,9 @@
pushRenderItem( object, null, object.material, _vector3.z, null );
} else if ( (object && object.isMesh) || (object && object.isLine) || (object && object.isPoints) ) {
} else if ( ( object && object.isMesh ) || ( object && object.isLine ) || ( object && object.isPoints ) ) {
if ( (object && object.isSkinnedMesh) ) {
if ( object && object.isSkinnedMesh ) {
object.skeleton.update();
......@@ -20676,7 +20676,7 @@
var geometry = objects.update( object );
if ( (material && material.isMultiMaterial) ) {
if ( material && material.isMultiMaterial ) {
var groups = geometry.groups;
var materials = material.materials;
......@@ -20732,7 +20732,7 @@
object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
if ( (object && object.isImmediateRenderObject) ) {
if ( object && object.isImmediateRenderObject ) {
setMaterial( material );
......@@ -20859,8 +20859,8 @@
var uniforms = materialProperties.__webglShader.uniforms;
if ( ! ( (material && material.isShaderMaterial) ) &&
! ( (material && material.isRawShaderMaterial) ) ||
if ( ! ( material && material.isShaderMaterial ) &&
! ( material && material.isRawShaderMaterial ) ||
material.clipping === true ) {
materialProperties.numClippingPlanes = _clipping.numPlanes;
......@@ -21035,9 +21035,9 @@
// load material specific uniforms
// (shader material also gets them for the sake of genericity)
if ( (material && material.isShaderMaterial) ||
(material && material.isMeshPhongMaterial) ||
(material && material.isMeshStandardMaterial) ||
if ( ( material && material.isShaderMaterial ) ||
( material && material.isMeshPhongMaterial ) ||
( material && material.isMeshStandardMaterial ) ||
material.envMap ) {
var uCamPos = p_uniforms.map.cameraPosition;
......@@ -21051,11 +21051,11 @@
}
if ( (material && material.isMeshPhongMaterial) ||
(material && material.isMeshLambertMaterial) ||
(material && material.isMeshBasicMaterial) ||
(material && material.isMeshStandardMaterial) ||
(material && material.isShaderMaterial) ||
if ( ( material && material.isMeshPhongMaterial ) ||
( material && material.isMeshLambertMaterial ) ||
( material && material.isMeshBasicMaterial ) ||
( material && material.isMeshStandardMaterial ) ||
( material && material.isShaderMaterial ) ||
material.skinning ) {
p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse );
......@@ -21121,11 +21121,11 @@
}
if ( (material && material.isMeshBasicMaterial) ||
(material && material.isMeshLambertMaterial) ||
(material && material.isMeshPhongMaterial) ||
(material && material.isMeshStandardMaterial) ||
(material && material.isMeshDepthMaterial) ) {
if ( ( material && material.isMeshBasicMaterial ) ||
( material && material.isMeshLambertMaterial ) ||
( material && material.isMeshPhongMaterial ) ||
( material && material.isMeshStandardMaterial ) ||
( material && material.isMeshDepthMaterial ) ) {
refreshUniformsCommon( m_uniforms, material );
......@@ -21133,36 +21133,36 @@
// refresh single material specific uniforms
if ( (material && material.isLineBasicMaterial) ) {
if ( material && material.isLineBasicMaterial ) {
refreshUniformsLine( m_uniforms, material );
} else if ( (material && material.isLineDashedMaterial) ) {
} else if ( material && material.isLineDashedMaterial ) {
refreshUniformsLine( m_uniforms, material );
refreshUniformsDash( m_uniforms, material );
} else if ( (material && material.isPointsMaterial) ) {
} else if ( material && material.isPointsMaterial ) {
refreshUniformsPoints( m_uniforms, material );
} else if ( (material && material.isMeshLambertMaterial) ) {
} else if ( material && material.isMeshLambertMaterial ) {
refreshUniformsLambert( m_uniforms, material );
} else if ( (material && material.isMeshPhongMaterial) ) {
} else if ( material && material.isMeshPhongMaterial ) {
refreshUniformsPhong( m_uniforms, material );
} else if ( (material && material.isMeshPhysicalMaterial) ) {
} else if ( material && material.isMeshPhysicalMaterial ) {
refreshUniformsPhysical( m_uniforms, material );
} else if ( (material && material.isMeshStandardMaterial) ) {
} else if ( material && material.isMeshStandardMaterial ) {
refreshUniformsStandard( m_uniforms, material );
} else if ( (material && material.isMeshDepthMaterial) ) {
} else if ( material && material.isMeshDepthMaterial ) {
if ( material.displacementMap ) {
......@@ -21172,7 +21172,7 @@
}
} else if ( (material && material.isMeshNormalMaterial) ) {
} else if ( material && material.isMeshNormalMaterial ) {
m_uniforms.opacity.value = material.opacity;
......@@ -21303,7 +21303,7 @@
// WebGLRenderTargetCube will be flipped for backwards compatibility
// WebGLRenderTargetCube.texture will be flipped because it's a Texture and NOT a CubeTexture
// this check must be handled differently, or removed entirely, if WebGLRenderTargetCube uses a CubeTexture in the future
uniforms.flipEnvMap.value = ( ! ( (material.envMap && material.envMap.isCubeTexture) ) ) ? 1 : - 1;
uniforms.flipEnvMap.value = ( ! ( material.envMap && material.envMap.isCubeTexture ) ) ? 1 : - 1;
uniforms.reflectivity.value = material.reflectivity;
uniforms.refractionRatio.value = material.refractionRatio;
......@@ -21349,12 +21349,12 @@
uniforms.fogColor.value = fog.color;
if ( (fog && fog.isFog) ) {
if ( fog && fog.isFog ) {
uniforms.fogNear.value = fog.near;
uniforms.fogFar.value = fog.far;
} else if ( (fog && fog.isFogExp2) ) {
} else if ( fog && fog.isFogExp2 ) {
uniforms.fogDensity.value = fog.density;
......@@ -21552,13 +21552,13 @@
shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null;
if ( (light && light.isAmbientLight) ) {
if ( light && light.isAmbientLight ) {
r += color.r * intensity;
g += color.g * intensity;
b += color.b * intensity;
} else if ( (light && light.isDirectionalLight) ) {
} else if ( light && light.isDirectionalLight ) {
var uniforms = lightCache.get( light );
......@@ -21582,7 +21582,7 @@
_lights.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix;
_lights.directional[ directionalLength ++ ] = uniforms;
} else if ( (light && light.isSpotLight) ) {
} else if ( light && light.isSpotLight ) {
var uniforms = lightCache.get( light );
......@@ -21615,7 +21615,7 @@
_lights.spotShadowMatrix[ spotLength ] = light.shadow.matrix;
_lights.spot[ spotLength ++ ] = uniforms;
} else if ( (light && light.isPointLight) ) {
} else if ( light && light.isPointLight ) {
var uniforms = lightCache.get( light );
......@@ -21651,7 +21651,7 @@
_lights.point[ pointLength ++ ] = uniforms;
} else if ( (light && light.isHemisphereLight) ) {
} else if ( light && light.isHemisphereLight ) {
var uniforms = lightCache.get( light );
......@@ -21718,7 +21718,7 @@
// backwards compatibility: peel texture.texture
return function setTexture2D( texture, slot ) {
if ( (texture && texture.isWebGLRenderTarget) ) {
if ( texture && texture.isWebGLRenderTarget ) {
if ( ! warned ) {
......@@ -21763,7 +21763,7 @@
return function setTextureCube( texture, slot ) {
// backwards compatibility: peel texture.texture
if ( (texture && texture.isWebGLRenderTargetCube) ) {
if ( texture && texture.isWebGLRenderTargetCube ) {
if ( ! warned ) {
......@@ -21778,7 +21778,7 @@
// currently relying on the fact that WebGLRenderTargetCube.texture is a Texture and NOT a CubeTexture
// TODO: unify these code paths
if ( (texture && texture.isCubeTexture) ||
if ( ( texture && texture.isCubeTexture ) ||
( Array.isArray( texture.image ) && texture.image.length === 6 ) ) {
// CompressedTexture can have Array in image :/
......@@ -21814,7 +21814,7 @@
}
var isCube = ( (renderTarget && renderTarget.isWebGLRenderTargetCube) );
var isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );
var framebuffer;
if ( renderTarget ) {
......@@ -21870,7 +21870,7 @@
this.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer ) {
if ( (renderTarget && renderTarget.isWebGLRenderTarget) === false ) {
if ( ( renderTarget && renderTarget.isWebGLRenderTarget ) === false ) {
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );
return;
......@@ -24714,6 +24714,7 @@
var loader = new XHRLoader();
loader.setPath( this.path );
loader.setResponseType( 'blob' );
loader.setWithCredentials( this.withCredentials );
loader.load( url, function ( blob ) {
image.src = URL.createObjectURL( blob );
......@@ -24735,6 +24736,13 @@
},
setWithCredentials: function ( value ) {
this.withCredentials = value;
return this;
},
setPath: function ( value ) {
this.path = value;
......@@ -24830,6 +24838,7 @@
var loader = new ImageLoader( this.manager );
loader.setCrossOrigin( this.crossOrigin );
loader.setWithCredentials( this.withCredentials );
loader.setPath( this.path );
loader.load( url, function ( image ) {
......@@ -24859,6 +24868,13 @@
},
setWithCredentials: function ( value ) {
this.withCredentials = value;
return this;
},
setPath: function ( value ) {
this.path = value;
......@@ -24866,6 +24882,8 @@
}
} );
/**
......@@ -31076,11 +31094,8 @@
//for ( b = bevelSegments; b > 0; b -- ) {
t = b / bevelSegments;
z = bevelThickness * ( 1 - t );
//z = bevelThickness * t;
bs = bevelSize * ( Math.sin ( t * Math.PI / 2 ) ); // curved
//bs = bevelSize * t; // linear
z = bevelThickness * Math.cos( t * Math.PI / 2 );
bs = bevelSize * Math.sin( t * Math.PI / 2 );
// contract shape
......@@ -31177,9 +31192,8 @@
for ( b = bevelSegments - 1; b >= 0; b -- ) {
t = b / bevelSegments;
z = bevelThickness * ( 1 - t );
//bs = bevelSize * ( 1-Math.sin ( ( 1 - t ) * Math.PI/2 ) );
bs = bevelSize * Math.sin ( t * Math.PI / 2 );
z = bevelThickness * Math.cos ( t * Math.PI / 2 );
bs = bevelSize * Math.sin( t * Math.PI / 2 );
// contract shape
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册