Skip to content

Class: WindCore

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WindCore(ctx, options, field?): WindCore

Parameters

NameType
ctxCanvasRenderingContext2D
optionsPartial<IOptions>
field?Field

Returns

WindCore

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

NameType
optionsPartial<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

NameType
fieldField

Returns

void

Defined in

core/dist/index.d.ts:462


project

project(...args): null | [number, number]

Parameters

NameType
...argsany[]

Returns

null | [number, number]

Defined in

core/dist/index.d.ts:463


unproject

unproject(...args): null | [number, number]

Parameters

NameType
...argsany[]

Returns

null | [number, number]

Defined in

core/dist/index.d.ts:464


intersectsCoordinate

intersectsCoordinate(coordinates): boolean

判断位置是否在当前视窗内

Parameters

NameType
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

Released under the MIT License.