修正在手机状态下得到的视图大小错误的问题.
This commit is contained in:
4
dist/Viewer.js
vendored
4
dist/Viewer.js
vendored
@@ -13,8 +13,8 @@ class Viewer {
|
||||
this.m_bNeedUpdate = true;
|
||||
this.m_Scene = new THREE.Scene();
|
||||
this.OnSize = (width, height) => {
|
||||
this._Width = width ? width : this.m_DomEl.scrollWidth;
|
||||
this._Height = height ? height : this.m_DomEl.scrollHeight;
|
||||
this._Width = width ? width : this.m_DomEl.clientWidth;
|
||||
this._Height = height ? height : this.m_DomEl.clientHeight;
|
||||
//校验.成为2的倍数 避免外轮廓错误.
|
||||
if (this._Width % 2 == 1)
|
||||
this._Width -= 1;
|
||||
|
Reference in New Issue
Block a user