From da0447c37c836cca1338805b3a011fd02c463ac5 Mon Sep 17 00:00:00 2001 From: ChenX Date: Sat, 16 Sep 2017 11:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=81=E5=92=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=B5=8B=E8=AF=95=E6=80=A7=E8=83=BD=E7=9A=84?= =?UTF-8?q?UI=E6=8E=A7=E4=BB=B6.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ApplicationServices/Application.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ApplicationServices/Application.ts b/src/ApplicationServices/Application.ts index e400aba80..da73dcb99 100644 --- a/src/ApplicationServices/Application.ts +++ b/src/ApplicationServices/Application.ts @@ -1,5 +1,6 @@ -import * as THREE from 'three' -import * as _ from "lodash"; +import { layoutOnsizeEvent } from '../UI/Layout/LayoutOnSizeEventManage'; +import * as THREE from 'three'; +import * as _ from 'lodash'; import { CreateUtil } from "../ApplicationServices/mesh/createObject"; import { Database } from '../DatabaseServices/Database'; import { Viewer } from '../GraphicsSystem/Viewer'; @@ -27,13 +28,19 @@ export class ApplicationService this.m_Database = new Database(); //渲染器 this.m_Viewer = new Viewer(document.getElementById("Webgl")); + + // + layoutOnsizeEvent.register("Webgl", () => + { + this.m_Viewer.onSize(); + }) this.m_Viewer.renderDatabase(this.m_Database); //性能测试 - new RenderPerformanceStatus(this.m_Viewer); + // new RenderPerformanceStatus(this.m_Viewer); //相机控制 - new CameraControls(this.m_Viewer, this.m_Viewer.m_Render.domElement); - new DebugDatUi(); + new CameraControls(this.m_Viewer); + // new DebugDatUi(); this.m_Editor = new Editor(this) app = this;