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

Moved Light legacy code.

上级 749b83a5
......@@ -2,6 +2,76 @@
* @author mrdoob / http://mrdoob.com/
*/
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.Projector = function () {
console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
......@@ -28,6 +98,8 @@ THREE.Projector = function () {
};
//
THREE.CanvasRenderer = function () {
console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
......
......@@ -18,74 +18,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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册