Skip to content
On this page

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

NameType
configPartial<{ height: number ; width: number }>

Defined in

src/core/Application.ts:43

Properties

config

config: Partial<{ height: number ; width: number }>

Defined in

src/core/Application.ts:28


eventSystem

eventSystem: EventSystem

全局事件处理器

Defined in

src/core/Application.ts:41


stage

stage: Transform<Container>

舞台,根节点

Defined in

src/core/Application.ts:36

Methods

use

use(install): Application

插件拓展
可注入到app

Parameters

NameTypeDescription
install(app: Application) => void插件入口函数

Returns

Application

Defined in

src/core/Application.ts:70


run

Static run(config?): Application

Parameters

NameType
configPartial<Partial<{ height: number ; width: number }>>

Returns

Application

Defined in

src/core/Application.ts:75