Appearance
Class: Application 
应用
ts
// 方式一
const app = new Applaction({
     width: 500,
     height: 500
});
ts
// 方式二
const app = Applaction.run({
     width: 500,
     height: 500
});
Table of contents 
Constructors 
Properties 
Methods 
Constructors 
constructor 
• new Application(config?)
Parameters 
| Name | Type | 
|---|---|
config | Partial<{ height: number ; width: number }> | 
Defined in 
Properties 
config 
• config: Partial<{ height: number ; width: number }>
Defined in 
eventSystem 
• eventSystem: EventSystem
全局事件处理器
Defined in 
stage 
舞台,根节点
Defined in 
Methods 
use 
▸ use(install): Application
插件拓展
 可注入到app
Parameters 
| Name | Type | Description | 
|---|---|---|
install | (app: Application) => void | 插件入口函数 | 
Returns 
Defined in 
run 
▸ Static run(config?): Application
Parameters 
| Name | Type | 
|---|---|
config | Partial<Partial<{ height: number ; width: number }>> |