修改三维设备nvidia扩展屏幕下拉伸

This commit is contained in:
sunzhenyu 2020-07-21 15:50:25 +08:00
parent 23974b1c5d
commit b8c60e8069

View File

@ -161,10 +161,35 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
} }
window.onresize = function () { window.onresize = function () {
console.log("ssss");
// if(scope.windowstatus){
// changeelement.style.width = '50%';
// changeelement.style.height = '50%';
// changeelement.style.top = '25%';
// scope.windowstatus = false;
// scope.updatewindowstatus('0');
// }else{
scope.camera.aspect = scope.dom.offsetWidth / scope.dom.offsetHeight; scope.camera.aspect = scope.dom.offsetWidth / scope.dom.offsetHeight;
scope.camera.updateProjectionMatrix(); scope.camera.updateProjectionMatrix();
scope.renderer.setSize(scope.dom.offsetWidth, scope.dom.offsetHeight); scope.renderer.setSize(scope.dom.offsetWidth, scope.dom.offsetHeight);
console.log(scope.windowstatus);
if(scope.windowstatus == "0"){
let changeelement = document.getElementById('jl3d');
changeelement.style.width = '100%';
changeelement.style.height = '100%';
changeelement.style.top = '0';
scope.camera.aspect = scope.dom.offsetWidth*2 / scope.dom.offsetHeight;
scope.camera.updateProjectionMatrix();
scope.renderer.setSize(scope.dom.offsetWidth*2, scope.dom.offsetHeight);
}
// }
} }
this.domresize = function(){ this.domresize = function(){
console.log("domssss"); console.log("domssss");