Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Root

Root类

Hierarchy

  • Root

Index

Constructors

constructor

Properties

Private _batcher

_batcher: Batcher2D | null = null

Private _cameraPool

_cameraPool: Pool<Camera> | null = null

createSceneFun

createSceneFun: (root: Root) => RenderScene = null!

Type declaration

    • (root: Root): RenderScene
    • Parameters

      Returns RenderScene

createWindowFun

createWindowFun: (root: Root) => RenderWindow = null!

Type declaration

Private _curWindow

_curWindow: RenderWindow | null = null

Private _dataPoolMgr

_dataPoolMgr: DataPoolManager

Private _device

_device: Device

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 lightPools

lightPools: Map<{}, Pool<Light>> = new Map<Constructor<Light>, Pool<Light>>()

Private _mainWindow

_mainWindow: RenderWindow | null = null

Private modelPools

modelPools: Map<{}, Pool<Model>> = new Map<Constructor<Model>, Pool<Model>>()

Private _pipeline

_pipeline: RenderPipeline | null = null

Private _poolHandle

_poolHandle: RootHandle = NULL_HANDLE

Private _scenes

_scenes: RenderScene[] = []

Private _tempWindow

_tempWindow: RenderWindow | null = null

Private _windows

_windows: RenderWindow[] = []

Accessors

batcher2D

  • get batcher2D(): Batcher2D
  • UI实例 引擎内部使用,用户无需调用此接口

    Returns Batcher2D

cumulativeTime

  • get cumulativeTime(): number

curWindow

dataPoolManager

  • get dataPoolManager(): DataPoolManager

device

fixedFPS

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

fps

  • get fps(): number

frameCount

  • get frameCount(): number

frameTime

  • get frameTime(): number

handle

  • get handle(): RootHandle

mainWindow

pipeline

scenes

  • get scenes(): RenderScene[]

tempWindow

windows

Methods

activeWindow

createCamera

  • createCamera(): Camera

createDefaultPipeline

createLight

  • createLight<T>(LightCtor: {}): T

createModel

  • createModel<T>(ModelCtor: typeof Model): T

createScene

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

    Parameters

    • info: IRenderSceneInfo

      渲染场景描述信息

    Returns RenderScene

createWindow

destroy

  • destroy(): void

destroyLight

  • destroyLight(l: Light): void

destroyModel

  • destroyModel(m: Model): void

destroyScene

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

    Parameters

    • scene: RenderScene

      渲染场景

    Returns void

destroyScenes

  • destroyScenes(): void

destroyWindow

destroyWindows

  • destroyWindows(): void

frameMove

  • frameMove(deltaTime: number): void

initialize

onGlobalPipelineStateChanged

  • onGlobalPipelineStateChanged(): void

resetCumulativeTime

  • resetCumulativeTime(): void

resize

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

    Parameters

    • width: number

      屏幕宽度

    • height: number

      屏幕高度

    Returns void

setRenderPipeline

Generated using TypeDoc