Tuesday, 15 April 2014

three.js - Threejs render area shrinks to 25% when resizing the renderer -


After setting my viewport to call for a second time, my view is 25% of its original size And go to the lower left corner of the canvas. There is a need to call setSize several times in my use, because I want the user to enter and leave the full screen mode when enabled.

I hope this will be a bug in my program, except that I've managed to reproduce on many instances on the web (which use all viewports).

This is from a Three.js homepage:

This is Stemkoski Io:

For this reason, I'm not sure that this issue is due to a bug in my graphics card, my computer, some unusual settings or three .j I use a MacBook Pro with Retina Display I am able to reproduce both Nvidia Gifers GT650M 1024MB in Chrome and Firefox. Strangely, if I hook up an external monitor on the computer and pull my window on it, then the problem is resolved after refreshing the page. Any help is appreciated. As Gaitat said, this device is a pixel ratio (DPR) that is standard and retina display

Though the viewport size needs to be adjusted, the size of the renderer is not needed. This code is 1: 1 pixel resolution on Chrome and Firefox. JS r65: Receives:

  var.dpr = (window.devicePixelRatio)? Window.device Pixelatean: 1; Var WW = window.innerWidth; Var hh = window.white; Renderer.setSize (WW, HH); Renderer.SetViewport (0, 0, WW * DPR, HH * DPR); Renderer Render (view, camera);   

is something

No comments:

Post a Comment