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

Removed devicePixelRatio from renderers parameters (for simplicity).

上级 c64d9674
......@@ -123,11 +123,7 @@ THREE.CanvasRenderer = function ( parameters ) {
this.domElement = _canvas;
this.devicePixelRatio = parameters.devicePixelRatio !== undefined
? parameters.devicePixelRatio
: self.devicePixelRatio !== undefined
? self.devicePixelRatio
: 1;
this.devicePixelRatio = self.devicePixelRatio !== undefined ? self.devicePixelRatio : 1;
this.autoClear = true;
this.sortObjects = true;
......
......@@ -10,12 +10,8 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
var pixelWidth = parameters.width !== undefined ? parameters.width : 800;
var pixelHeight = parameters.height !== undefined ? parameters.height : 600;
var currentScale = parameters.scale !== undefined ? parameters.scale : 1;
var devicePixelRatio = parameters.devicePixelRatio !== undefined
? parameters.devicePixelRatio
: self.devicePixelRatio !== undefined
? self.devicePixelRatio
: 1;
var devicePixelRatio = self.devicePixelRatio !== undefined ? self.devicePixelRatio : 1;
var fullWidth = pixelWidth * devicePixelRatio;
var fullHeight = pixelHeight * devicePixelRatio;
......@@ -31,7 +27,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
if ( this.renderer === undefined ) {
this.renderer = new THREE.WebGLRenderer( { antialias: false, devicePixelRatio : devicePixelRatio } );
this.renderer = new THREE.WebGLRenderer( { antialias: false } );
this.renderer.setSize( fullWidth, fullHeight );
this.renderer.setClearColor( 0x000000, 0 );
......
......@@ -42,11 +42,7 @@ THREE.WebGLRenderer = function ( parameters ) {
this.domElement = _canvas;
this.context = null;
this.devicePixelRatio = parameters.devicePixelRatio !== undefined
? parameters.devicePixelRatio
: self.devicePixelRatio !== undefined
? self.devicePixelRatio
: 1;
this.devicePixelRatio = self.devicePixelRatio !== undefined ? self.devicePixelRatio : 1;
// clearing
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册