add GUI module

This commit is contained in:
jerrywwl
2019-01-15 11:49:36 +08:00
parent e25a002f27
commit 17610f3e13
2 changed files with 27 additions and 2 deletions
+10 -2
View File
@@ -4,6 +4,7 @@ import { ForwardPipeline } from '../pipeline/forward/forward-pipeline';
import { RenderPipeline } from '../pipeline/render-pipeline';
import { IRenderViewInfo, RenderView } from '../pipeline/render-view';
import { IRenderSceneInfo, RenderScene } from '../renderer/scene/render-scene';
import { GUI } from '../renderer/gui/gui';
export let _createSceneFun;
export let _createViewFun;
@@ -29,8 +30,12 @@ export class Root {
return this._windows;
}
public get pipeline (): RenderPipeline | null {
return this._pipeline;
public get pipeline (): RenderPipeline {
return this._pipeline as RenderPipeline;
}
public get gui (): GUI {
return this._gui as GUI;
}
public get scenes (): RenderScene[] {
@@ -52,6 +57,7 @@ export class Root {
private _windows: GFXWindow[] = [];
private _mainWindow: GFXWindow | null = null;
private _pipeline: RenderPipeline | null = null;
private _gui: GUI | null = null;
private _scenes: RenderScene[] = [];
private _views: RenderView[] = [];
private _frameTime: number = 0;
@@ -78,6 +84,8 @@ export class Root {
this._pipeline = pipeline;
this._gui = new GUI(this);
return true;
}
+17
View File
@@ -0,0 +1,17 @@
import { Root } from '../../core/root';
export class GUI {
public get root (): Root {
return this._root;
}
private _root: Root;
constructor (root: Root) {
this._root = root;
}
public frameMove (deltaTime: number) {
}
}