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

index.ts:102

Properties

Field

Static Field: typeof Field = Field

Defined in

index.ts:89


forceStop

forceStop: boolean

Defined in

index.ts:91

Methods

setOptions

setOptions(options): void

设置配置项

Parameters

NameType
optionsPartial<IOptions>

Returns

void

Defined in

index.ts:122


getOptions

getOptions(): IOptions

获取配置项

Returns

IOptions

Defined in

index.ts:142


updateData

updateData(field): void

更新数据

Parameters

NameType
fieldField

Returns

void

Defined in

index.ts:150


project

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

Parameters

NameType
...argsany[]

Returns

null | [number, number]

Defined in

index.ts:159


unproject

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

Parameters

NameType
...argsany[]

Returns

null | [number, number]

Defined in

index.ts:164


intersectsCoordinate

intersectsCoordinate(coordinates): boolean

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

Parameters

NameType
coordinates[number, number]

Returns

boolean

Defined in

index.ts:172


clearCanvas

clearCanvas(): void

清空当前画布

Returns

void

Defined in

index.ts:179


isStop

isStop(): boolean

Returns

boolean

Defined in

index.ts:185


start

start(): void

启动粒子动画

Returns

void

Defined in

index.ts:192


stop

stop(): void

停止粒子动画

Returns

void

Defined in

index.ts:202


animate

animate(): void

Returns

void

Defined in

index.ts:208


prerender

prerender(): void

渲染前处理

Returns

void

Defined in

index.ts:224


render

render(): void

开始渲染

Returns

void

Defined in

index.ts:242


postrender

postrender(): void

each frame render end

Returns

void

Defined in

index.ts:251

Released under the MIT License.