提交 106ab702 编写于 作者: M Mr.doob

Updated builds.

上级 aa42673b
......@@ -371,46 +371,6 @@ THREE.ZeroCurvatureEnding = 2400;
THREE.ZeroSlopeEnding = 2401;
THREE.WrapAroundEnding = 2402;
// DEPRECATED
THREE.Projector = function () {
console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
this.projectVector = function ( vector, camera ) {
console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
vector.project( camera );
};
this.unprojectVector = function ( vector, camera ) {
console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
vector.unproject( camera );
};
this.pickingRay = function ( vector, camera ) {
console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
};
};
THREE.CanvasRenderer = function () {
console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
this.domElement = document.createElement( 'canvas' );
this.clear = function () {};
this.render = function () {};
this.setClearColor = function () {};
this.setSize = function () {};
};
// File:src/math/Color.js
/**
......@@ -16641,74 +16601,6 @@ THREE.Light = function ( color ) {
THREE.Light.prototype = Object.create( THREE.Object3D.prototype );
THREE.Light.prototype.constructor = THREE.Light;
Object.defineProperties( THREE.Light.prototype, {
onlyShadow: {
set: function ( value ) {
console.warn( 'THREE.Light: .onlyShadow has been removed.' );
}
},
shadowCameraFov: {
set: function ( value ) {
this.shadow.camera.fov = value;
}
},
shadowCameraLeft: {
set: function ( value ) {
this.shadow.camera.left = value;
}
},
shadowCameraRight: {
set: function ( value ) {
this.shadow.camera.right = value;
}
},
shadowCameraTop: {
set: function ( value ) {
this.shadow.camera.top = value;
}
},
shadowCameraBottom: {
set: function ( value ) {
this.shadow.camera.bottom = value;
}
},
shadowCameraNear: {
set: function ( value ) {
this.shadow.camera.near = value;
}
},
shadowCameraFar: {
set: function ( value ) {
this.shadow.camera.far = value;
}
},
shadowCameraVisible: {
set: function ( value ) {
console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow ) instead.' );
}
},
shadowBias: {
set: function ( value ) {
this.shadow.bias = value;
}
},
shadowDarkness: {
set: function ( value ) {
this.shadow.darkness = value;
}
},
shadowMapWidth: {
set: function ( value ) {
this.shadow.mapSize.width = value;
}
},
shadowMapHeight: {
set: function ( value ) {
this.shadow.mapSize.height = value;
}
}
} );
THREE.Light.prototype.copy = function ( source ) {
THREE.Object3D.prototype.copy.call( this, source );
......@@ -27925,144 +27817,6 @@ THREE.WebGLRenderer = function ( parameters ) {
}
// DEPRECATED
this.supportsFloatTextures = function () {
console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
return extensions.get( 'OES_texture_float' );
};
this.supportsHalfFloatTextures = function () {
console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
return extensions.get( 'OES_texture_half_float' );
};
this.supportsStandardDerivatives = function () {
console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
return extensions.get( 'OES_standard_derivatives' );
};
this.supportsCompressedTextureS3TC = function () {
console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
return extensions.get( 'WEBGL_compressed_texture_s3tc' );
};
this.supportsCompressedTexturePVRTC = function () {
console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
return extensions.get( 'WEBGL_compressed_texture_pvrtc' );
};
this.supportsBlendMinMax = function () {
console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
return extensions.get( 'EXT_blend_minmax' );
};
this.supportsVertexTextures = function () {
return capabilities.vertexTextures;
};
this.supportsInstancedArrays = function () {
console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
return extensions.get( 'ANGLE_instanced_arrays' );
};
//
this.initMaterial = function () {
console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
};
this.addPrePlugin = function () {
console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
};
this.addPostPlugin = function () {
console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
};
this.updateShadowMap = function () {
console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
};
Object.defineProperties( this, {
shadowMapEnabled: {
get: function () {
return shadowMap.enabled;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
shadowMap.enabled = value;
}
},
shadowMapType: {
get: function () {
return shadowMap.type;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
shadowMap.type = value;
}
},
shadowMapCullFace: {
get: function () {
return shadowMap.cullFace;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
shadowMap.cullFace = value;
}
},
shadowMapDebug: {
get: function () {
return shadowMap.debug;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.' );
shadowMap.debug = value;
}
}
} );
};
// File:src/renderers/WebGLRenderTarget.js
......@@ -31606,63 +31360,189 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
};
// File:src/extras/CurveUtils.js
// File:src/Three.Legacy.js
/**
* @author zz85 / http://www.lab4games.net/zz85/blog
* @author mrdoob / http://mrdoob.com/
*/
THREE.CurveUtils = {
tangentQuadraticBezier: function ( t, p0, p1, p2 ) {
return 2 * ( 1 - t ) * ( p1 - p0 ) + 2 * t * ( p2 - p1 );
Object.defineProperties( THREE.Light.prototype, {
onlyShadow: {
set: function ( value ) {
console.warn( 'THREE.Light: .onlyShadow has been removed.' );
}
},
// Puay Bing, thanks for helping with this derivative!
tangentCubicBezier: function ( t, p0, p1, p2, p3 ) {
return - 3 * p0 * ( 1 - t ) * ( 1 - t ) +
3 * p1 * ( 1 - t ) * ( 1 - t ) - 6 * t * p1 * ( 1 - t ) +
6 * t * p2 * ( 1 - t ) - 3 * t * t * p2 +
3 * t * t * p3;
shadowCameraFov: {
set: function ( value ) {
this.shadow.camera.fov = value;
}
},
tangentSpline: function ( t, p0, p1, p2, p3 ) {
// To check if my formulas are correct
var h00 = 6 * t * t - 6 * t; // derived from 2t^3 − 3t^2 + 1
var h10 = 3 * t * t - 4 * t + 1; // t^3 − 2t^2 + t
var h01 = - 6 * t * t + 6 * t; // − 2t3 + 3t2
var h11 = 3 * t * t - 2 * t; // t3 − t2
return h00 + h10 + h01 + h11;
shadowCameraLeft: {
set: function ( value ) {
this.shadow.camera.left = value;
}
},
// Catmull-Rom
interpolate: function( p0, p1, p2, p3, t ) {
var v0 = ( p2 - p0 ) * 0.5;
var v1 = ( p3 - p1 ) * 0.5;
var t2 = t * t;
var t3 = t * t2;
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
shadowCameraRight: {
set: function ( value ) {
this.shadow.camera.right = value;
}
},
shadowCameraTop: {
set: function ( value ) {
this.shadow.camera.top = value;
}
},
shadowCameraBottom: {
set: function ( value ) {
this.shadow.camera.bottom = value;
}
},
shadowCameraNear: {
set: function ( value ) {
this.shadow.camera.near = value;
}
},
shadowCameraFar: {
set: function ( value ) {
this.shadow.camera.far = value;
}
},
shadowCameraVisible: {
set: function ( value ) {
console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow ) instead.' );
}
},
shadowBias: {
set: function ( value ) {
this.shadow.bias = value;
}
},
shadowDarkness: {
set: function ( value ) {
this.shadow.darkness = value;
}
},
shadowMapWidth: {
set: function ( value ) {
this.shadow.mapSize.width = value;
}
},
shadowMapHeight: {
set: function ( value ) {
this.shadow.mapSize.height = value;
}
}
} );
};
//
// File:src/extras/GeometryUtils.js
Object.defineProperties( THREE.WebGLRenderer.prototype, {
supportsFloatTextures: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
return this.extensions.get( 'OES_texture_float' );
}
},
supportsHalfFloatTextures: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
return this.extensions.get( 'OES_texture_half_float' );
}
},
supportsStandardDerivatives: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
return this.extensions.get( 'OES_standard_derivatives' );
}
},
supportsCompressedTextureS3TC: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );
}
},
supportsCompressedTexturePVRTC: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );
}
},
supportsBlendMinMax: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
return this.extensions.get( 'EXT_blend_minmax' );
}
},
supportsVertexTextures: {
value: function () {
return this.capabilities.vertexTextures;
}
},
supportsInstancedArrays: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
return this.extensions.get( 'ANGLE_instanced_arrays' );
}
},
initMaterial: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
}
},
addPrePlugin: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
}
},
addPostPlugin: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
}
},
updateShadowMap: {
value: function () {
console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
}
},
shadowMapEnabled: {
get: function () {
return this.shadowMap.enabled;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
this.shadowMap.enabled = value;
}
},
shadowMapType: {
get: function () {
return this.shadowMap.type;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
this.shadowMap.type = value;
}
},
shadowMapCullFace: {
get: function () {
return this.shadowMap.cullFace;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
this.shadowMap.cullFace = value;
}
},
shadowMapDebug: {
get: function () {
return this.shadowMap.debug;
},
set: function ( value ) {
console.warn( 'THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.' );
this.shadowMap.debug = value;
}
}
} );
/**
* @author mrdoob / http://mrdoob.com/
*/
//
THREE.GeometryUtils = {
......@@ -31694,21 +31574,13 @@ THREE.GeometryUtils = {
};
// File:src/extras/ImageUtils.js
/**
* @author alteredq / http://alteredqualia.com/
* @author mrdoob / http://mrdoob.com/
* @author Daosheng Mu / https://github.com/DaoshengMu/
*/
THREE.ImageUtils = {
crossOrigin: undefined,
loadTexture: function ( url, mapping, onLoad, onError ) {
console.warn( 'THREE.ImageUtils.loadTexture is being deprecated. Use THREE.TextureLoader() instead.' );
console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );
var loader = new THREE.TextureLoader();
loader.setCrossOrigin( this.crossOrigin );
......@@ -31723,7 +31595,7 @@ THREE.ImageUtils = {
loadTextureCube: function ( urls, mapping, onLoad, onError ) {
console.warn( 'THREE.ImageUtils.loadTextureCube is being deprecated. Use THREE.CubeTextureLoader() instead.' );
console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );
var loader = new THREE.CubeTextureLoader();
loader.setCrossOrigin( this.crossOrigin );
......@@ -31750,6 +31622,100 @@ THREE.ImageUtils = {
};
//
THREE.Projector = function () {
console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
this.projectVector = function ( vector, camera ) {
console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
vector.project( camera );
};
this.unprojectVector = function ( vector, camera ) {
console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
vector.unproject( camera );
};
this.pickingRay = function ( vector, camera ) {
console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
};
};
//
THREE.CanvasRenderer = function () {
console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
this.domElement = document.createElement( 'canvas' );
this.clear = function () {};
this.render = function () {};
this.setClearColor = function () {};
this.setSize = function () {};
};
// File:src/extras/CurveUtils.js
/**
* @author zz85 / http://www.lab4games.net/zz85/blog
*/
THREE.CurveUtils = {
tangentQuadraticBezier: function ( t, p0, p1, p2 ) {
return 2 * ( 1 - t ) * ( p1 - p0 ) + 2 * t * ( p2 - p1 );
},
// Puay Bing, thanks for helping with this derivative!
tangentCubicBezier: function ( t, p0, p1, p2, p3 ) {
return - 3 * p0 * ( 1 - t ) * ( 1 - t ) +
3 * p1 * ( 1 - t ) * ( 1 - t ) - 6 * t * p1 * ( 1 - t ) +
6 * t * p2 * ( 1 - t ) - 3 * t * t * p2 +
3 * t * t * p3;
},
tangentSpline: function ( t, p0, p1, p2, p3 ) {
// To check if my formulas are correct
var h00 = 6 * t * t - 6 * t; // derived from 2t^3 − 3t^2 + 1
var h10 = 3 * t * t - 4 * t + 1; // t^3 − 2t^2 + t
var h01 = - 6 * t * t + 6 * t; // − 2t3 + 3t2
var h11 = 3 * t * t - 2 * t; // t3 − t2
return h00 + h10 + h01 + h11;
},
// Catmull-Rom
interpolate: function( p0, p1, p2, p3, t ) {
var v0 = ( p2 - p0 ) * 0.5;
var v1 = ( p3 - p1 ) * 0.5;
var t2 = t * t;
var t3 = t * t2;
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
}
};
// File:src/extras/SceneUtils.js
/**
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册