Constructor
new Base()
Properties:
| Name | Type | Description |
|---|---|---|
Map |
object | 组件模板映射表 |
InstanceMap |
object | 实例映射表 |
randomId |
object | 随机ID记录器 |
Methods
(static) create(className, extraProp) → {BaseContainer}
Create a instance from model
Parameters:
| Name | Type | Description |
|---|---|---|
className |
string | model's name |
extraProp |
object | instance's prop |
Returns:
Return a instance which designed by model
- Type
- BaseContainer
(static) define(className, prop)
Define a model
Parameters:
| Name | Type | Description |
|---|---|---|
className |
string | model's name |
prop |
object | model's prop |
(static) destroy(instance)
remove instance which has been given
Parameters:
| Name | Type | Description |
|---|---|---|
instance |
BaseContainer | the instance want to destroy; |
(static) getCmp(id) → {BaseContainer}
get a created instance
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | className or ID |
Returns:
A instance
- Type
- BaseContainer
(static) moveInterface()
create a movable display object
Parameters:
| Type | Description |
|---|---|
| PIXI.DisplayObject |
(static) observable()
create a observable object
Parameters:
| Type | Description |
|---|---|
| object |
(static) removeAll()
remove all instance except static instance
(static) removeAllAndStaitic()
remove all instance
(static) shakeContainer(stage, Num, dist, useTime) → {Promise}
a shake container animate
Parameters:
| Name | Type | Description |
|---|---|---|
stage |
object | 摇晃的容器 |
Num |
number | 摇晃次数默认3 |
dist |
number | 摇晃距离 |
useTime |
number | 单次摇晃时间 |
Returns:
- Type
- Promise