引擎类

### Hierarchy

- ScillaEngine

## Index

### Constructors

- constructor

### Properties

- _assetsManager
- _currentFlush
- _dataCenter
- _flush
- _interactContext
- _renderContext
- _root
- canvasElement
- customConfig
- dataCenterConfig
- lastFPS
- nextTicks
- tsLast
- tsStart

### Accessors

- assetsManager
- dataCenter
- interactContext
- renderContext
- root

### Methods

- canvasPosToPagePos
- flush
- getEntityByPath
- getEntityPath
- getFPS
- nextTick
- onFrameTick
- onTouchBegin
- onTouchEnd
- onTouchMove
- onUpdateScale
- pagePosToCanvasPos
- pause
- setup
- start
- startTick
- stopTick

### Object literals

- engineConfig

## Constructors

### constructor

- new ScillaEngine(): ScillaEngine

- - Defined in core/ScillaEngine.ts:53

  #### Returns ScillaEngine

## Properties

### Private _assetsManager

_assetsManager: AssetsManager

- Defined in core/ScillaEngine.ts:50

### Private _currentFlush

_currentFlush: number = 0

- Defined in core/ScillaEngine.ts:43

### Private _dataCenter

_dataCenter: DataCenter

- Defined in core/ScillaEngine.ts:51

### Private _flush

_flush: number = 0

- Defined in core/ScillaEngine.ts:42

### Private _interactContext

_interactContext: InteractContext

- Defined in core/ScillaEngine.ts:49

### Private _renderContext

_renderContext: RenderContext

- Defined in core/ScillaEngine.ts:48

### Private _root

_root: Entity

- Defined in core/ScillaEngine.ts:39

### Private canvasElement

canvasElement: HTMLElement

- Defined in core/ScillaEngine.ts:40

### customConfig

customConfig: any

- Defined in core/ScillaEngine.ts:33

自定义配置

### dataCenterConfig

dataCenterConfig: any

- Defined in core/ScillaEngine.ts:37

数据中心配置

### Private lastFPS

lastFPS: number = 0

- Defined in core/ScillaEngine.ts:46

### Private nextTicks

nextTicks: any[] = []

- Defined in core/ScillaEngine.ts:53

### Private tsLast

tsLast: any

- Defined in core/ScillaEngine.ts:45

### Private tsStart

tsStart: any

- Defined in core/ScillaEngine.ts:44

## Accessors

### assetsManager

assetsManager:

- Defined in core/ScillaEngine.ts:184

获取资源管理

### dataCenter

dataCenter:

- Defined in core/ScillaEngine.ts:191

获取数据中心实例

### interactContext

interactContext:

- Defined in core/ScillaEngine.ts:177

获取交互上下文

### renderContext

renderContext:

- Defined in core/ScillaEngine.ts:170

获取渲染上下文

### root

root:

- Defined in core/ScillaEngine.ts:122

获取根Entity

## Methods

### canvasPosToPagePos

- canvasPosToPagePos(x: any, y: any, isLocalPos?: boolean): object

- - Defined in core/ScillaEngine.ts:351

  画布坐标转页面坐标

  #### Parameters

  - ##### x: any

  - ##### y: any

  - ##### Default value isLocalPos: boolean = true

  #### Returns object

  - ##### x: any

  - ##### y: any

### Private flush

- flush(tsNow: any): void

- - Defined in core/ScillaEngine.ts:221

  时钟触发

  #### Parameters

  - ##### tsNow: any

  #### Returns void

### getEntityByPath

- getEntityByPath(path?: string): Entity

- - Defined in core/ScillaEngine.ts:144

  根据节点路径获取节点

  #### Parameters

  - ##### Optional path: string

  #### Returns Entity

### getEntityPath

- getEntityPath(entity?: Entity ): string

- - Defined in core/ScillaEngine.ts:130

  获取节点路径

  #### Parameters

  - ##### Optional entity: Entity

  #### Returns string

### getFPS

- getFPS(): number

- - Defined in core/ScillaEngine.ts:163

  获取当前帧率

  #### Returns number

### nextTick

- nextTick(func: any, tickCount?: number): void

- - Defined in core/ScillaEngine.ts:241

  下一帧执行

  #### Parameters

  - ##### func: any

  - ##### Default value tickCount: number = 1

  #### Returns void

### Private onFrameTick

- onFrameTick(tsNow: any): void

- - Defined in core/ScillaEngine.ts:245

  #### Parameters

  - ##### tsNow: any

  #### Returns void

### Private onTouchBegin

- onTouchBegin(event: any): void

- - Defined in core/ScillaEngine.ts:280

  代理出来的onTouchBegin方法

  #### Parameters

  - ##### event: any

  #### Returns void

### Private onTouchEnd

- onTouchEnd(event: any): void

- - Defined in core/ScillaEngine.ts:300

  代理出来的onTouchEnd方法

  #### Parameters

  - ##### event: any

  #### Returns void

### Private onTouchMove

- onTouchMove(event: any): void

- - Defined in core/ScillaEngine.ts:290

  代理出来的onTouchMove方法

  #### Parameters

  - ##### event: any

  #### Returns void

### Private onUpdateScale

- onUpdateScale(scaleX: any, scaleY: any, rotation: any): void

- - Defined in core/ScillaEngine.ts:195

  #### Parameters

  - ##### scaleX: any

  - ##### scaleY: any

  - ##### rotation: any

  #### Returns void

### pagePosToCanvasPos

- pagePosToCanvasPos(pageX: any, pageY: any, identifier?: any, isLocalPos?: boolean): object

- - Defined in core/ScillaEngine.ts:313

  页面坐标转画布坐标

  #### Parameters

  - ##### pageX: any

  - ##### pageY: any

  - ##### Optional identifier: any

  - ##### Default value isLocalPos: boolean = false

  #### Returns object

  - ##### identifier: any

  - ##### x: number

  - ##### y: number

### pause

- pause(): void

- - Defined in core/ScillaEngine.ts:113

  暂停引擎

  #### Returns void

### setup

- setup(_engineConfig?: any, _customConfig?: any, _dataCenterConfig?: any): void

- - Defined in core/ScillaEngine.ts:66

  装配引擎

  #### Parameters

  - ##### Optional _engineConfig: any

  - ##### Optional _customConfig: any

  - ##### Optional _dataCenterConfig: any

  #### Returns void

### start

- start(): void

- - Defined in core/ScillaEngine.ts:103

  开始引擎

  #### Returns void

### Private startTick

- startTick(): void

- - Defined in core/ScillaEngine.ts:202

  开始时钟

  #### Returns void

### Private stopTick

- stopTick(): void

- - Defined in core/ScillaEngine.ts:214

  停止时钟

  #### Returns void

## Object literals

### engineConfig

engineConfig: object

- Defined in core/ScillaEngine.ts:23

默认配置

### designHeight

designHeight: number = 1334

- Defined in core/ScillaEngine.ts:26

### designWidth

designWidth: number = 750

- Defined in core/ScillaEngine.ts:25

### fps

fps: number = 60

- Defined in core/ScillaEngine.ts:24

### scaleMode

scaleMode: ScaleMode = ScaleMode.FIXED_WIDTH

- Defined in core/ScillaEngine.ts:27

### touchEnabled

touchEnabled: boolean = true

- Defined in core/ScillaEngine.ts:28

Generated using TypeDoc