提交 33996b94 编写于 作者: D dubejf

Protect against invalid pixel ratio

We don't usually do this kind of checks, but the renderer's pixel ratio is usually taken directly from `window.devicePixelRatio`, which is undefined in older browsers.

Unbreaks examples in IE 10 (#6628).

I didn't patch `WebglRenderer`. All browsers that support `webgl` appear to define `window.devicePixelRatio`.
上级 ccd22a46
......@@ -155,7 +155,11 @@ THREE.CanvasRenderer = function ( parameters ) {
this.setPixelRatio = function ( value ) {
pixelRatio = value;
if ( value !== undefined ) {
pixelRatio = value;
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册