|
@@ -17,6 +17,7 @@ import { Matrix4 } from '../math/Matrix4.js';
|
|
|
import { ShaderLib } from './shaders/ShaderLib.js';
|
|
|
import { UniformsLib } from './shaders/UniformsLib.js';
|
|
|
import { cloneUniforms } from './shaders/UniformsUtils.js';
|
|
|
+import { Vector2 } from '../math/Vector2.js';
|
|
|
import { Vector3 } from '../math/Vector3.js';
|
|
|
import { Vector4 } from '../math/Vector4.js';
|
|
|
import { WebGLAnimation } from './webgl/WebGLAnimation.js';
|
|
@@ -360,12 +361,17 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.getSize = function () {
|
|
|
+ this.getSize = function ( target ) {
|
|
|
|
|
|
- return {
|
|
|
- width: _width,
|
|
|
- height: _height
|
|
|
- };
|
|
|
+ if ( target === undefined ) {
|
|
|
+
|
|
|
+ console.warn( 'WebGLRenderer: .getsize() now requires a Vector2 as an argument' );
|
|
|
+
|
|
|
+ target = new Vector2();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return target.set( _width, _height );
|
|
|
|
|
|
};
|
|
|
|
|
@@ -395,12 +401,17 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.getDrawingBufferSize = function () {
|
|
|
+ this.getDrawingBufferSize = function ( target ) {
|
|
|
|
|
|
- return {
|
|
|
- width: _width * _pixelRatio,
|
|
|
- height: _height * _pixelRatio
|
|
|
- };
|
|
|
+ if ( target === undefined ) {
|
|
|
+
|
|
|
+ console.warn( 'WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument' );
|
|
|
+
|
|
|
+ target = new Vector2();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return target.set( _width * _pixelRatio, _height * _pixelRatio );
|
|
|
|
|
|
};
|
|
|
|