功能:在使用效果图渲染时,关闭WebCAD渲染

pull/1706/MERGE
ChenX 3 years ago
parent 186a32e75b
commit e2717b8f7f

@ -35,6 +35,7 @@ import { RenderType } from './RenderType';
export class Viewer
{
protected NeedUpdate: boolean = true;
DisableRenderer = false;
//相机类
CameraCtrl: CameraUpdate = new CameraUpdate();
//变换控制
@ -301,7 +302,7 @@ export class Viewer
}
}
if (this.Scene && this.NeedUpdate)
if (this.Scene && this.NeedUpdate && !this.DisableRenderer)
{
this.Render();
this.NeedUpdate = false;

@ -133,10 +133,13 @@ export class WebRtcRenderer
app.WebSocket.Send(JSON.stringify({ type: "camera", p: app.Viewer.Camera.position.toArray(), r: [app.Viewer.CameraControl.Orbit.RoX, app.Viewer.CameraControl.Orbit.theta, 0] }));
app.WebSocket.Send(JSON.stringify({ type: "ResSize", w: app.Viewer.Width, h: app.Viewer.Height }));
app.Viewer.DisableRenderer = true;
}
EndRenderer()
{
app.Viewer.DisableRenderer = false;
if (this.webRtcPlayerObj)
this.ws.Close().then(() =>
{

Loading…
Cancel
Save