提交 561f39df 编写于 作者: M Mr.doob

Clean up.

上级 bfadabd6
......@@ -25,17 +25,17 @@ THREE.Object3D = function () {
var quaternion = new THREE.Quaternion();
var scale = new THREE.Vector3( 1, 1, 1 );
var onRotationChange = function () {
function onRotationChange() {
quaternion.setFromEuler( rotation, false );
};
}
var onQuaternionChange = function () {
function onQuaternionChange() {
rotation.setFromQuaternion( quaternion, undefined, false );
};
}
rotation.onChange( onRotationChange );
quaternion.onChange( onQuaternionChange );
......@@ -94,7 +94,7 @@ THREE.Object3D.prototype = {
get eulerOrder () {
console.warn( 'THREE.Object3D: .eulerOrder has been moved to .rotation.order.' );
console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
return this.rotation.order;
......@@ -102,7 +102,7 @@ THREE.Object3D.prototype = {
set eulerOrder ( value ) {
console.warn( 'THREE.Object3D: .eulerOrder has been moved to .rotation.order.' );
console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
this.rotation.order = value;
......@@ -126,6 +126,8 @@ THREE.Object3D.prototype = {
},
//
applyMatrix: function ( matrix ) {
this.matrix.multiplyMatrices( matrix, this.matrix );
......
......@@ -12,7 +12,9 @@ THREE.WebGLRenderTarget = function ( width, height, options ) {
options = options || {};
this.texture = new THREE.Texture( undefined, undefined, options.wrapS, options.wrapT, options.magFilter, options.minFilter !== undefined ? options.minFilter : THREE.LinearFilter, options.format, options.type, options.anisotropy );
if ( options.minFilter === undefined ) options.minFilter = THREE.LinearFilter;
this.texture = new THREE.Texture( undefined, undefined, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy );
this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
......@@ -25,145 +27,206 @@ THREE.WebGLRenderTarget.prototype = {
constructor: THREE.WebGLRenderTarget,
setSize: function ( width, height ) {
if ( this.width !== width || this.height !== height ) {
get wrapS() {
this.width = width;
this.height = height;
console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
this.dispose();
}
return this.texture.wrapS;
},
clone: function () {
set wrapS( value ) {
return new this.constructor().copy( this );
console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
},
this.texture.wrapS = value;
copy: function ( source ) {
this.width = source.width;
this.height = source.height;
this.texture = source.texture.clone();
},
this.depthBuffer = source.depthBuffer;
this.stencilBuffer = source.stencilBuffer;
get wrapT() {
this.shareDepthFrom = source.shareDepthFrom;
console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
return this;
return this.texture.wrapT;
},
dispose: function () {
set wrapT( value ) {
this.dispatchEvent( { type: 'dispose' } );
console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
},
get wrapS() {
return this.texture.wrapS;
this.texture.wrapT = value;
},
set wrapS( wrapS ) {
this.texture.wrapS = wrapS;
get magFilter() {
},
get wrapT() {
console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
return this.texture.wrapT;
return this.texture.magFilter;
},
set wrapT( wrapT ) {
this.texture.wrapT = wrapT;
set magFilter( value ) {
},
get magFilter() {
console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
return this.texture.magFilter;
this.texture.magFilter = value;
},
set magFilter( magFilter ) {
this.texture.magFilter = magFilter;
},
get minFilter() {
console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
return this.texture.minFilter;
},
set minFilter( minFilter ) {
this.texture.minFilter = minFilter;
set minFilter( value ) {
console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
this.texture.minFilter = value;
},
get anisotropy() {
console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
return this.texture.anisotropy;
},
set anisotropy( anisotropy ) {
this.texture.anisotropy = anisotropy;
set anisotropy( value ) {
console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
this.texture.anisotropy = value;
},
get offset() {
console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
return this.texture.offset;
},
set offset( offset ) {
this.texture.offset = offset;
set offset( value ) {
console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
this.texture.offset = value;
},
get repeat() {
console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
return this.texture.repeat;
},
set repeat( repeat ) {
this.texture.repeat = repeat;
set repeat( value ) {
console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
this.texture.repeat = value;
},
get format() {
console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
return this.texture.format;
},
set format( format ) {
this.texture.format = format;
set format( value ) {
console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
this.texture.format = value;
},
get type() {
console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
return this.texture.type;
},
set type( type ) {
this.texture.type = type;
set type( value ) {
console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
this.texture.type = value;
},
get generateMipmaps() {
console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
return this.texture.generateMipmaps;
},
set generateMipmaps( generateMipmaps ) {
this.texture.generateMipmaps = generateMipmaps;
set generateMipmaps( value ) {
console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
this.texture.generateMipmaps = value;
},
//
setSize: function ( width, height ) {
if ( this.width !== width || this.height !== height ) {
this.width = width;
this.height = height;
this.dispose();
}
},
clone: function () {
return new this.constructor().copy( this );
},
copy: function ( source ) {
this.width = source.width;
this.height = source.height;
this.texture = source.texture.clone();
this.depthBuffer = source.depthBuffer;
this.stencilBuffer = source.stencilBuffer;
this.shareDepthFrom = source.shareDepthFrom;
return this;
},
dispose: function () {
this.dispatchEvent( { type: 'dispose' } );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册