Skip to content

Commit

Permalink
Merge pull request #11535 from sunag/86dev
Browse files Browse the repository at this point in the history
ResolutionNode fix pixel ratio
  • Loading branch information
mrdoob authored Jun 16, 2017
2 parents a4edee7 + 3a619a8 commit b550539
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/js/nodes/utils/ResolutionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ THREE.ResolutionNode.prototype.constructor = THREE.ResolutionNode;

THREE.ResolutionNode.prototype.updateFrame = function( delta ) {

var size = this.renderer.getSize();
var size = this.renderer.getSize(),
pixelRatio = this.renderer.getPixelRatio();

this.x = size.width;
this.y = size.height;
this.x = size.width * pixelRatio;
this.y = size.height * pixelRatio;

};

0 comments on commit b550539

Please sign in to comment.