Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Root

Root类

Hierarchy

  • Root

Index

Constructors

constructor

  • 构造函数

    Parameters

    Returns Root

Properties

Private _cameraPool

_cameraPool: Pool<Camera> | null = null

_createSceneFun

_createSceneFun: any

_createViewFun

_createViewFun: any

Private _curWindow

_curWindow: GFXWindow | null = null

Private _dataPoolMgr

_dataPoolMgr: DataPoolManager

Private _device

_device: GFXDevice

Private _directLightPool

_directLightPool: Pool<DirectionalLight> | null = null

Private _fixedFPS

_fixedFPS: number = 0

Private _fixedFPSFrameTime

_fixedFPSFrameTime: number = 0

Private _fps

_fps: number = 0

Private _fpsTime

_fpsTime: number = 0

Private _frameCount

_frameCount: number = 0

Private _frameTime

_frameTime: number = 0

Private _lightPools

_lightPools: Map<Function, Pool<any>> = new Map<Function, Pool<any>>()

Private _mainWindow

_mainWindow: GFXWindow | null = null

Private _modelPools

_modelPools: Map<Function, Pool<any>> = new Map<Function, Pool<any>>()

Private _pipeline

_pipeline: RenderPipeline | null = null

Private _scenes

_scenes: RenderScene[] = []

Private _sphereLightPool

_sphereLightPool: Pool<SphereLight> | null = null

Private _spotLightPool

_spotLightPool: Pool<SpotLight> | null = null

Private _tempWindow

_tempWindow: GFXWindow | null = null

Private _time

_time: number = 0

Private _ui

_ui: UI | null = null

Private _views

_views: RenderView[] = []

Private _windows

_windows: GFXWindow[] = []

Accessors

cumulativeTime

  • get cumulativeTime(): number
  • 累计时间(秒)

    Returns number

curWindow

  • Returns GFXWindow | null

  • 当前窗口

    Parameters

    Returns void

dataPoolManager

  • get dataPoolManager(): DataPoolManager
  • Returns DataPoolManager

device

  • GFX设备

    Returns GFXDevice

fixedFPS

  • get fixedFPS(): number
  • set fixedFPS(fps: number): void
  • Returns number

  • 每秒固定帧率

    Parameters

    • fps: number

    Returns void

fps

  • get fps(): number
  • 每秒帧率

    Returns number

frameCount

  • get frameCount(): number
  • 一秒内的累计帧数

    Returns number

frameTime

  • get frameTime(): number
  • 帧时间(秒)

    Returns number

mainWindow

  • 主窗口

    Returns GFXWindow | null

pipeline

  • 渲染管线

    Returns RenderPipeline

scenes

  • get scenes(): RenderScene[]
  • 场景列表

    Returns RenderScene[]

tempWindow

  • Returns GFXWindow | null

  • 临时窗口(用于数据传输)

    Parameters

    Returns void

ui

  • get ui(): UI
  • UI实例

    Returns UI

views

  • 渲染视图列表

    Returns RenderView[]

windows

  • 窗口列表

    Returns GFXWindow[]

Methods

activeWindow

  • 激活指定窗口为当前窗口

    Parameters

    Returns void

createCamera

  • createCamera(): Camera
  • Returns Camera

createLight

  • createLight<T>(lClass: object): T
  • Type parameters

    • T: Light

    Parameters

    • lClass: object

    Returns T

createModel

  • createModel<T>(mClass: object): T
  • Type parameters

    • T: Model

    Parameters

    • mClass: object

    Returns T

createScene

  • createScene(info: IRenderSceneInfo): RenderScene
  • 创建渲染场景

    Parameters

    • info: IRenderSceneInfo

      渲染场景描述信息

    Returns RenderScene

createView

  • 创建渲染视图

    Parameters

    Returns RenderView

createWindow

  • 创建窗口

    Parameters

    Returns GFXWindow | null

destroy

  • destroy(): void
  • Returns void

destroyCamera

  • destroyCamera(c: Camera): void
  • Parameters

    • c: Camera

    Returns void

destroyLight

  • destroyLight(l: Light): void
  • Parameters

    • l: Light

    Returns void

destroyModel

  • destroyModel(m: Model): void
  • Parameters

    • m: Model

    Returns void

destroyScene

  • destroyScene(scene: RenderScene): void
  • 销毁指定的渲染场景

    Parameters

    • scene: RenderScene

      渲染场景

    Returns void

destroyScenes

  • destroyScenes(): void
  • 销毁全部场景

    Returns void

destroyView

  • 销毁指定的渲染视图

    Parameters

    Returns void

destroyViews

  • destroyViews(): void
  • 销毁全部渲染视图

    Returns void

destroyWindow

  • 销毁指定的窗口

    Parameters

    Returns void

destroyWindows

  • destroyWindows(): void
  • 销毁全部窗口

    Returns void

frameMove

  • frameMove(deltaTime: number): void
  • 每帧执行函数

    Parameters

    • deltaTime: number

      间隔时间

    Returns void

initialize

  • 初始化函数

    Parameters

    Returns boolean

resetCumulativeTime

  • resetCumulativeTime(): void
  • 重置累计时间

    Returns void

resize

  • resize(width: number, height: number): void
  • 重置大小

    Parameters

    • width: number

      屏幕宽度

    • height: number

      屏幕高度

    Returns void

setRenderPipeline

  • Parameters

    Returns boolean

sortViews

  • sortViews(): void
  • Returns void

Generated using TypeDoc