* Copies the settings of the given camera. * * @param {Camera} camera - A camera.
(camera)
| 821 | */ |
| 822 | |
| 823 | copyCameraSettings(camera) { |
| 824 | |
| 825 | if(camera) { |
| 826 | |
| 827 | this.uniforms.cameraNearFar.value.set(camera.near, camera.far); |
| 828 | this.uniforms.projectionMatrix.value.copy(camera.projectionMatrix); |
| 829 | this.uniforms.inverseProjectionMatrix.value.copy(camera.projectionMatrix).invert(); |
| 830 | |
| 831 | if(camera instanceof PerspectiveCamera) { |
| 832 | |
| 833 | this.defines.PERSPECTIVE_CAMERA = "1"; |
| 834 | |
| 835 | } else { |
| 836 | |
| 837 | delete this.defines.PERSPECTIVE_CAMERA; |
| 838 | |
| 839 | } |
| 840 | |
| 841 | this.needsUpdate = true; |
| 842 | |
| 843 | } |
| 844 | |
| 845 | } |
| 846 | |
| 847 | /** |
| 848 | * Sets the size of this object. |
no test coverage detected