Class: WindCore ¶
Table of contents ¶
Constructors ¶
Properties ¶
Methods ¶
- setOptions
- getOptions
- updateData
- project
- unproject
- intersectsCoordinate
- clearCanvas
- isStop
- start
- stop
- animate
- prerender
- render
- postrender
Constructors ¶
constructor ¶
• new WindCore(ctx
, options
, field?
): WindCore
Parameters ¶
Name | Type |
---|---|
ctx | CanvasRenderingContext2D |
options | Partial <IOptions > |
field? | Field |
Returns ¶
Defined in ¶
core/dist/index.d.ts:448
Properties ¶
Field ¶
▪ Static
Field: typeof Field
Defined in ¶
core/dist/index.d.ts:438
forceStop ¶
• forceStop: boolean
Defined in ¶
core/dist/index.d.ts:439
Methods ¶
setOptions ¶
▸ setOptions(options
): void
设置配置项
Parameters ¶
Name | Type |
---|---|
options | Partial <IOptions > |
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:453
getOptions ¶
▸ getOptions(): IOptions
获取配置项
Returns ¶
IOptions
Defined in ¶
core/dist/index.d.ts:457
updateData ¶
▸ updateData(field
): void
更新数据
Parameters ¶
Name | Type |
---|---|
field | Field |
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:462
project ¶
▸ project(...args
): null
| [number
, number
]
Parameters ¶
Name | Type |
---|---|
...args | any [] |
Returns ¶
null
| [number
, number
]
Defined in ¶
core/dist/index.d.ts:463
unproject ¶
▸ unproject(...args
): null
| [number
, number
]
Parameters ¶
Name | Type |
---|---|
...args | any [] |
Returns ¶
null
| [number
, number
]
Defined in ¶
core/dist/index.d.ts:464
intersectsCoordinate ¶
▸ intersectsCoordinate(coordinates
): boolean
判断位置是否在当前视窗内
Parameters ¶
Name | Type |
---|---|
coordinates | [number , number ] |
Returns ¶
boolean
Defined in ¶
core/dist/index.d.ts:469
clearCanvas ¶
▸ clearCanvas(): void
清空当前画布
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:473
isStop ¶
▸ isStop(): boolean
Returns ¶
boolean
Defined in ¶
core/dist/index.d.ts:474
start ¶
▸ start(): void
启动粒子动画
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:478
stop ¶
▸ stop(): void
停止粒子动画
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:482
animate ¶
▸ animate(): void
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:483
prerender ¶
▸ prerender(): void
渲染前处理
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:487
render ¶
▸ render(): void
开始渲染
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:491
postrender ¶
▸ postrender(): void
each frame render end
Returns ¶
void
Defined in ¶
core/dist/index.d.ts:495